ImportError: no module with dataset name

from datasets import dataset_utils ImportError: no modules named datasets. when i write this in python sript.

import tensorflow as tf
from datasets import dataset_utils
slim = tf.contrib.slim

But I get an error.

from datasets import dataset_utils
ImportError: No module named datasets

I found this solution. How can jupyter access the new tenorflow module installed on the right path?  I did the same and I have data packets in the path anaconda / lib / python2.7 / site-packages /. However, I get the same error.

+4
source share
3 answers

You can find the folder address on your device and add it to the system path.

import sys  
sys.path.append(r"D:\Python35\models\slim\datasets"); import dataset_utils  

"" " "

sys.path.append(r"D:\Python35\models\slim\nets"); import vgg
sys.path.append(r"D:\Python35\models\slim\preprocessing"); import vgg_preprocessing  
+5

https://github.com/tensorflow/models/tree/master/slim/datasets "" pip ( ), python. , . env :

# git clone or wget
wget https://github.com/tensorflow/models/archive/master.zip -O models.zip 
unzip models.zip
# add it to Python PATH
export PYTHONPATH=$PYTHONPATH:$PWD/models-master/slim
# now we are good to call `python mytensorflow.py`
+2

TF-slim image, :

git clone https://github.com/tensorflow/models/

, , , init.py /slim-.

+1
source

Source: https://habr.com/ru/post/1670184/


All Articles