from tensorflow.examples.tutorials.mnist import inputdata mnist = inputdata.read_data_sets(“MNIST_data/“,one_hot=True) Traceback (most recent call last): File “<stdin>“, line 1, in <module> File “F:\Anaconda\111\envs\tensorflow\lib\site-packages\tensorflow\contrib\learn\python\learn\datasets\mnist.py”, line 235, in read_data_sets SOURCE_URL + TRAIN_IMAGES) File “F:\Anaconda\111\envs\tensorflow\lib\site-packages\tensorflow\contrib\learn\python\learn\datasets\base.py”, line 209, in maybe_download gfile.Copy(temp_file_name, filepath) File “F:\Anaconda\111\envs\tensorflow\lib\site-packages\tensorflow\python\lib\io\file_io.py”, line 384, in copy compat.as_bytes(oldpath), compat.as_bytes(newpath), overwrite, status) File “F:\Anaconda\111\envs\tensorflow\lib\contextlib.py”, line 66, in __exit next(self.gen) File “F:\Anaconda\111\envs\tensorflow\lib\site-packages\tensorflow\python\framework\errors_impl.py”, line 466, in raise_exception_on_not_ok_status pywrap_tensorflow.TF_GetCode(status)) tensorflow.python.framework.errors_impl.NotFoundError: Can not get size for: C:\Users\S\AppData\Local\Temp\tmpjo9xhrxx : \u03f5\u0373\udcd5\u04b2\udcbb\udcb5\udcbd\u05b8\udcb6\udca8\udcb5\udcc4·\udcbe\udcb6\udca1\udca3
InvalidArgumentError (see above for traceback): Cannot assign a device for operation ‘tower_0/gradients/tower_0/local3/add_grad/BroadcastGradientArgs’: Operation was explicitly assigned to /device0 but available devices are [ /job:localhost/replica:0/task:0/cpu:0 ]. Make sure the device specification refers to a valid device. [[Node: tower_0/gradients/tower_0/local3/add_grad/BroadcastGradientArgs = BroadcastGradientArgsT=DT_INT32, _device=”/device0”]]
请教各位一个问题。原书87页最下面在定义cifar10标签的占位符时为啥是label_holder = tf.placeholder(tf.int32,[batch_size]),网络输出层的shape不应该是(batch_size,10)吗?而且最后一层的 bias5 = tf.Variable(tf.constant(0.0,shape=[10]))也说明输出维度是10。不过实测代码如果改成:label_holder = tf.placeholder(tf.int32,[batch_size,10])就会报错,想不明白为啥?
哪位大神解释下这个错误,win10+tensorflow1.2+python3.5.3,多谢!
我是在windows系统下跑的程序。本书85页用进阶的卷积神经网络识别CIFAR-10数据集时,我下载了TensorFlow Models库,放在了Anaconda安装路径的tensorflow文件夹下,但是在运行程序的时候显示没有对应的模块cifar10,cifar10_input,请问这个问题该怎么解决???
各位好:
作者使用的是 1.0.0-rc0版本,我机器上安装的是1.2.0,在运行第九章多GPU并行的例子时,设置allow_soft_placement=True,该代码一直使用CPU去run,设置为False后,一直报错,如下:
InvalidArgumentError (see above for traceback): Cannot assign a device for operation ‘tower_0/gradients/tower_0/local3/add_grad/BroadcastGradientArgs’: Operation was explicitly assigned to /device
0 but available devices are [ /job:localhost/replica:0/task:0/cpu:0 ]. Make sure the device specification refers to a valid device.
0”]]
[[Node: tower_0/gradients/tower_0/local3/add_grad/BroadcastGradientArgs = BroadcastGradientArgsT=DT_INT32, _device=”/device
GPU设备不支持,这是高版本不兼容问题??
你好,我购买了这本书,但是现在遇到一个郁闷的问题,就是想参阅源代码,但是没有找到地址,请问在书中第多少页提供了源代码的地址啊,我怎么没有找到?