我最近安装了Tensorflow for Windows.我正在尝试一个基本教程,我需要访问包含图像子文件夹的文件夹.
我无法访问图像文件夹,因为"访问被拒绝".这在Anaconda 4.2提示符和Pycharm中都会发生,并使用基本的Python 3.5发行版.
我已经为所涉及的所有内容授予了管理员权限,我今天重新安装了所有软件,因此它全部更新到最新版本.
任何想法或帮助将不胜感激!
# change this as you see fit
image_path = 'C:/moles'
# Read in the image_data
image_data = tf.gfile.FastGFile(image_path, 'rb').read()
# Loads label file, strips off carriage return
label_lines = [line.rstrip() for line
in tf.gfile.GFile("/tf_files/retrained_labels.txt")]
# Unpersists graph from file
with tf.gfile.FastGFile("/tf_files/retrained_graph.pb", 'rb') as f:
graph_def = tf.GraphDef()
graph_def.ParseFromString(f.read())
_ = tf.import_graph_def(graph_def, name='')
with tf.Session() as sess:
# Feed the image_data as input to the graph and get first prediction
softmax_tensor = sess.graph.get_tensor_by_name('final_result:0') …Run Code Online (Sandbox Code Playgroud)