1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | D:\ProgramData\Anaconda3\envs\python3. 6 \python.exe C:\Users\Administrator\.IntelliJIdea2018. 1 \config\plugins\python\helpers\pydev\pydev_run_in_console.py 61990 61991 D: / IdeaProjects / TensorFlow_Exercises / HelloWorld / cnn_mnist.py Running D: / IdeaProjects / TensorFlow_Exercises / HelloWorld / cnn_mnist.py import sys; print ( 'Python %s on %s' % (sys.version, sys.platform)) sys.path.extend([ 'D:\\IdeaProjects\\TensorFlow_Exercises' , 'D:/IdeaProjects/TensorFlow_Exercises/HelloWorld' ]) WARNING:tensorflow:From D: / IdeaProjects / TensorFlow_Exercises / HelloWorld / cnn_mnist.py: 6 : read_data_sets ( from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version. Instructions for updating: Please use alternatives such as official / mnist / dataset.py from tensorflow / models. WARNING:tensorflow:From D:\ProgramData\Anaconda3\envs\python3. 6 \lib\site - packages\tensorflow\contrib\learn\python\learn\datasets\mnist.py: 260 : maybe_download ( from tensorflow.contrib.learn.python.learn.datasets.base) is deprecated and will be removed in a future version. Instructions for updating: Please write your own downloading logic. WARNING:tensorflow:From D:\ProgramData\Anaconda3\envs\python3. 6 \lib\site - packages\tensorflow\contrib\learn\python\learn\datasets\mnist.py: 262 : extract_images ( from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version. Instructions for updating: Please use tf.data to implement this functionality. Extracting mnist_data\train - images - idx3 - ubyte.gz Extracting mnist_data\train - labels - idx1 - ubyte.gz WARNING:tensorflow:From D:\ProgramData\Anaconda3\envs\python3. 6 \lib\site - packages\tensorflow\contrib\learn\python\learn\datasets\mnist.py: 267 : extract_labels ( from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version. Instructions for updating: Please use tf.data to implement this functionality. Extracting mnist_data\t10k - images - idx3 - ubyte.gz WARNING:tensorflow:From D:\ProgramData\Anaconda3\envs\python3. 6 \lib\site - packages\tensorflow\contrib\learn\python\learn\datasets\mnist.py: 110 : dense_to_one_hot ( from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version. Instructions for updating: Please use tf.one_hot on tensors. Extracting mnist_data\t10k - labels - idx1 - ubyte.gz WARNING:tensorflow:From D:\ProgramData\Anaconda3\envs\python3. 6 \lib\site - packages\tensorflow\contrib\learn\python\learn\datasets\mnist.py: 290 : DataSet.__init__ ( from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version. Instructions for updating: Please use alternatives such as official / mnist / dataset.py from tensorflow / models. 2018 - 06 - 20 17 : 49 : 02.072827 : I tensorflow / core / platform / cpu_feature_guard.cc: 140 ] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2 Traceback (most recent call last): File "D:\ProgramData\Anaconda3\envs\python3.6\lib\site-packages\tensorflow\python\client\session.py" , line 1322 , in _do_call return fn( * args) File "D:\ProgramData\Anaconda3\envs\python3.6\lib\site-packages\tensorflow\python\client\session.py" , line 1307 , in _run_fn options, feed_dict, fetch_list, target_list, run_metadata) File "D:\ProgramData\Anaconda3\envs\python3.6\lib\site-packages\tensorflow\python\client\session.py" , line 1409 , in _call_tf_sessionrun run_metadata) tensorflow.python.framework.errors_impl.InvalidArgumentError: logits and labels must be broadcastable: logits_size = [ 100 , 10 ] labels_size = [ 50 , 10 ] [[Node: softmax_cross_entropy_loss / xentropy = SoftmaxCrossEntropyWithLogits[T = DT_FLOAT, _device = "/job:localhost/replica:0/task:0/device:CPU:0" ](softmax_cross_entropy_loss / xentropy / Reshape, softmax_cross_entropy_loss / xentropy / Reshape_1)]] During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\Administrator\.IntelliJIdea2018.1\config\plugins\python\helpers\pydev\pydev_run_in_console.py" , line 52 , in run_file pydev_imports. execfile ( file , globals , locals ) # execute the script File "C:\Users\Administrator\.IntelliJIdea2018.1\config\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py" , line 18 , in execfile exec ( compile (contents + "\n" , file , 'exec' ), glob, loc) File "D:/IdeaProjects/TensorFlow_Exercises/HelloWorld/cnn_mnist.py" , line 159 , in <module> {input_x: batch[ 0 ], output_y: batch[ 1 ]} File "D:\ProgramData\Anaconda3\envs\python3.6\lib\site-packages\tensorflow\python\client\session.py" , line 900 , in run run_metadata_ptr) File "D:\ProgramData\Anaconda3\envs\python3.6\lib\site-packages\tensorflow\python\client\session.py" , line 1135 , in _run feed_dict_tensor, options, run_metadata) File "D:\ProgramData\Anaconda3\envs\python3.6\lib\site-packages\tensorflow\python\client\session.py" , line 1316 , in _do_run run_metadata) File "D:\ProgramData\Anaconda3\envs\python3.6\lib\site-packages\tensorflow\python\client\session.py" , line 1335 , in _do_call raise type (e)(node_def, op, message) tensorflow.python.framework.errors_impl.InvalidArgumentError: logits and labels must be broadcastable: logits_size = [ 100 , 10 ] labels_size = [ 50 , 10 ] [[Node: softmax_cross_entropy_loss / xentropy = SoftmaxCrossEntropyWithLogits[T = DT_FLOAT, _device = "/job:localhost/replica:0/task:0/device:CPU:0" ](softmax_cross_entropy_loss / xentropy / Reshape, softmax_cross_entropy_loss / xentropy / Reshape_1)]] Caused by op 'softmax_cross_entropy_loss/xentropy' , defined at: File "C:\Users\Administrator\.IntelliJIdea2018.1\config\plugins\python\helpers\pydev\pydev_run_in_console.py" , line 150 , in <module> globals = run_file( file , None , None , is_module) File "C:\Users\Administrator\.IntelliJIdea2018.1\config\plugins\python\helpers\pydev\pydev_run_in_console.py" , line 52 , in run_file pydev_imports. execfile ( file , globals , locals ) # execute the script File "C:\Users\Administrator\.IntelliJIdea2018.1\config\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py" , line 18 , in execfile exec ( compile (contents + "\n" , file , 'exec' ), glob, loc) File "D:/IdeaProjects/TensorFlow_Exercises/HelloWorld/cnn_mnist.py" , line 124 , in <module> onehot_labels = output_y, logits = logits File "D:\ProgramData\Anaconda3\envs\python3.6\lib\site-packages\tensorflow\python\ops\losses\losses_impl.py" , line 749 , in softmax_cross_entropy labels = onehot_labels, logits = logits, name = "xentropy" ) File "D:\ProgramData\Anaconda3\envs\python3.6\lib\site-packages\tensorflow\python\ops\nn_ops.py" , line 1873 , in softmax_cross_entropy_with_logits_v2 precise_logits, labels, name = name) File "D:\ProgramData\Anaconda3\envs\python3.6\lib\site-packages\tensorflow\python\ops\gen_nn_ops.py" , line 7168 , in softmax_cross_entropy_with_logits name = name) File "D:\ProgramData\Anaconda3\envs\python3.6\lib\site-packages\tensorflow\python\framework\op_def_library.py" , line 787 , in _apply_op_helper op_def = op_def) File "D:\ProgramData\Anaconda3\envs\python3.6\lib\site-packages\tensorflow\python\framework\ops.py" , line 3392 , in create_op op_def = op_def) File "D:\ProgramData\Anaconda3\envs\python3.6\lib\site-packages\tensorflow\python\framework\ops.py" , line 1718 , in __init__ self ._traceback = self ._graph._extract_stack() # pylint: disable=protected-access InvalidArgumentError (see above for traceback): logits and labels must be broadcastable: logits_size = [ 100 , 10 ] labels_size = [ 50 , 10 ] [[Node: softmax_cross_entropy_loss / xentropy = SoftmaxCrossEntropyWithLogits[T = DT_FLOAT, _device = "/job:localhost/replica:0/task:0/device:CPU:0" ](softmax_cross_entropy_loss / xentropy / Reshape, softmax_cross_entropy_loss / xentropy / Reshape_1)]] PyDev console: starting. Python 3.6 . 2 |Continuum Analytics, Inc.| (default, Jul 20 2017 , 12 : 30 : 02 ) [MSC v. 1900 64 bit (AMD64)] on win32 |
16.4k 10
1.5k 9
1.5k 8
1.6k 7
1.2k 7