Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ImportError: No module named datasets

from datasets import dataset_utils ImportError: No module named datasets. when i am writing this in python sript.

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

But i am getting error.

from datasets import dataset_utils
ImportError: No module named datasets

I found this solution How can jupyter access a new tensorflow module installed in the right path? I did the same and i have dataset packages at path anaconda/lib/python2.7/site-packages/. Still i am getting same error.

like image 929
ansu1234 Avatar asked Feb 18 '17 18:02

ansu1234


1 Answers

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

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

You'll need to do the same with 'nets' and 'preprocessing'

sys.path.append(r"D:\Python35\models\slim\nets"); import vgg
sys.path.append(r"D:\Python35\models\slim\preprocessing"); import vgg_preprocessing  
like image 200
Hisham Sliman Avatar answered Oct 19 '22 14:10

Hisham Sliman