How can jupyter access the new tensorflow module installed on the right path?

Where should I store the model folder? I am confused because python imports modules somewhere in anaconda (e.g. import numpy), but I can also import data (e.g. file.csv) from the folder where my jupyter laptop is stored.

The TF-Slim image model library is not part of the main TF library. So I checked the tensor / model repository as:

 cd $HOME/workspace
 git clone https://github.com/tensorflow/models/

I'm not sure what $ HOME / workspace is. I run the ipython / jupyter laptop from users / me / workspace /, so I saved it:

users/me/workspace/models

In jupyter I will write:

import tensorflow as tf
from datasets import dataset_utils
# Main slim library
slim = tf.contrib.slim

But I get an error message:

ImportError: No module named datasets

- ? , tensorflow '/Users/me/anaconda/lib/python2.7/site-packages/tensorflow/ init.pyc', , , ( / )?

+1
2

"ImportError: "
, . , script.
, "/Users/me/anaconda/lib/python2.7/site-packages/" "/Users/me/anaconda/lib/python2.7/"

https://pypi.python.org/pypi/dataset .

+3

.

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
0

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


All Articles