Advertisement
Guest User

Untitled

a guest
Nov 16th, 2017
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.49 KB | None | 0 0
  1.  
  2. InvalidArgumentError Traceback (most recent call last)
  3. ~\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\client\session.py in _do_call(self, fn, *args)
  4. 1326 try:
  5. -> 1327 return fn(*args)
  6. 1328 except errors.OpError as e:
  7.  
  8. ~\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\client\session.py in _run_fn(session, feed_dict, fetch_list, target_list, options, run_metadata)
  9. 1305 feed_dict, fetch_list, target_list,
  10. -> 1306 status, run_metadata)
  11. 1307
  12.  
  13. ~\Anaconda3\envs\tensorflow\lib\contextlib.py in __exit__(self, type, value, traceback)
  14. 65 try:
  15. ---> 66 next(self.gen)
  16. 67 except StopIteration:
  17.  
  18. ~\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\errors_impl.py in raise_exception_on_not_ok_status()
  19. 465 compat.as_text(pywrap_tensorflow.TF_Message(status)),
  20. --> 466 pywrap_tensorflow.TF_GetCode(status))
  21. 467 finally:
  22.  
  23. InvalidArgumentError: Input to reshape is a tensor with 32000000 values, but the requested shape requires a multiple of 3136
  24. [[Node: Reshape_2 = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/cpu:0"](MaxPool_1, Reshape_2/shape)]]
  25.  
  26. During handling of the above exception, another exception occurred:
  27.  
  28. InvalidArgumentError Traceback (most recent call last)
  29. <ipython-input-13-fb01c5f75dd0> in <module>()
  30. 13 if i % 100 == 0:
  31. 14 train_accuracy = accuracy.eval(feed_dict={
  32. ---> 15 x: array_batch_xs, y_: batch_ys, keep_prob: 1.0})
  33. 16 print('step %d, training accuracy %g' % (i, train_accuracy))
  34. 17 train_step.run(feed_dict={x: array_batch_xs, y_: batch_ys, keep_prob: 0.5})
  35.  
  36. ~\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\ops.py in eval(self, feed_dict, session)
  37. 539
  38. 540 """
  39. --> 541 return _eval_using_default_session(self, feed_dict, self.graph, session)
  40. 542
  41. 543
  42.  
  43. ~\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\ops.py in _eval_using_default_session(tensors, feed_dict, graph, session)
  44. 4083 "the tensor's graph is different from the session's "
  45. 4084 "graph.")
  46. -> 4085 return session.run(tensors, feed_dict)
  47. 4086
  48. 4087
  49.  
  50. ~\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\client\session.py in run(self, fetches, feed_dict, options, run_metadata)
  51. 893 try:
  52. 894 result = self._run(None, fetches, feed_dict, options_ptr,
  53. --> 895 run_metadata_ptr)
  54. 896 if run_metadata:
  55. 897 proto_data = tf_session.TF_GetBuffer(run_metadata_ptr)
  56.  
  57. ~\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\client\session.py in _run(self, handle, fetches, feed_dict, options, run_metadata)
  58. 1122 if final_fetches or final_targets or (handle and feed_dict_tensor):
  59. 1123 results = self._do_run(handle, final_targets, final_fetches,
  60. -> 1124 feed_dict_tensor, options, run_metadata)
  61. 1125 else:
  62. 1126 results = []
  63.  
  64. ~\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\client\session.py in _do_run(self, handle, target_list, fetch_list, feed_dict, options, run_metadata)
  65. 1319 if handle is None:
  66. 1320 return self._do_call(_run_fn, self._session, feeds, fetches, targets,
  67. -> 1321 options, run_metadata)
  68. 1322 else:
  69. 1323 return self._do_call(_prun_fn, self._session, handle, feeds, fetches)
  70.  
  71. ~\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\client\session.py in _do_call(self, fn, *args)
  72. 1338 except KeyError:
  73. 1339 pass
  74. -> 1340 raise type(e)(node_def, op, message)
  75. 1341
  76. 1342 def _extend_graph(self):
  77.  
  78. InvalidArgumentError: Input to reshape is a tensor with 32000000 values, but the requested shape requires a multiple of 3136
  79. [[Node: Reshape_2 = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/cpu:0"](MaxPool_1, Reshape_2/shape)]]
  80.  
  81. Caused by op 'Reshape_2', defined at:
  82. File "C:\Users\pc1010101\Anaconda3\envs\tensorflow\lib\runpy.py", line 193, in _run_module_as_main
  83. "__main__", mod_spec)
  84. File "C:\Users\pc1010101\Anaconda3\envs\tensorflow\lib\runpy.py", line 85, in _run_code
  85. exec(code, run_globals)
  86. File "C:\Users\pc1010101\Anaconda3\envs\tensorflow\lib\site-packages\ipykernel_launcher.py", line 16, in <module>
  87. app.launch_new_instance()
  88. File "C:\Users\pc1010101\Anaconda3\envs\tensorflow\lib\site-packages\traitlets\config\application.py", line 658, in launch_instance
  89. app.start()
  90. File "C:\Users\pc1010101\Anaconda3\envs\tensorflow\lib\site-packages\ipykernel\kernelapp.py", line 477, in start
  91. ioloop.IOLoop.instance().start()
  92. File "C:\Users\pc1010101\Anaconda3\envs\tensorflow\lib\site-packages\zmq\eventloop\ioloop.py", line 177, in start
  93. super(ZMQIOLoop, self).start()
  94. File "C:\Users\pc1010101\Anaconda3\envs\tensorflow\lib\site-packages\tornado\ioloop.py", line 888, in start
  95. handler_func(fd_obj, events)
  96. File "C:\Users\pc1010101\Anaconda3\envs\tensorflow\lib\site-packages\tornado\stack_context.py", line 277, in null_wrapper
  97. return fn(*args, **kwargs)
  98. File "C:\Users\pc1010101\Anaconda3\envs\tensorflow\lib\site-packages\zmq\eventloop\zmqstream.py", line 440, in _handle_events
  99. self._handle_recv()
  100. File "C:\Users\pc1010101\Anaconda3\envs\tensorflow\lib\site-packages\zmq\eventloop\zmqstream.py", line 472, in _handle_recv
  101. self._run_callback(callback, msg)
  102. File "C:\Users\pc1010101\Anaconda3\envs\tensorflow\lib\site-packages\zmq\eventloop\zmqstream.py", line 414, in _run_callback
  103. callback(*args, **kwargs)
  104. File "C:\Users\pc1010101\Anaconda3\envs\tensorflow\lib\site-packages\tornado\stack_context.py", line 277, in null_wrapper
  105. return fn(*args, **kwargs)
  106. File "C:\Users\pc1010101\Anaconda3\envs\tensorflow\lib\site-packages\ipykernel\kernelbase.py", line 283, in dispatcher
  107. return self.dispatch_shell(stream, msg)
  108. File "C:\Users\pc1010101\Anaconda3\envs\tensorflow\lib\site-packages\ipykernel\kernelbase.py", line 235, in dispatch_shell
  109. handler(stream, idents, msg)
  110. File "C:\Users\pc1010101\Anaconda3\envs\tensorflow\lib\site-packages\ipykernel\kernelbase.py", line 399, in execute_request
  111. user_expressions, allow_stdin)
  112. File "C:\Users\pc1010101\Anaconda3\envs\tensorflow\lib\site-packages\ipykernel\ipkernel.py", line 196, in do_execute
  113. res = shell.run_cell(code, store_history=store_history, silent=silent)
  114. File "C:\Users\pc1010101\Anaconda3\envs\tensorflow\lib\site-packages\ipykernel\zmqshell.py", line 533, in run_cell
  115. return super(ZMQInteractiveShell, self).run_cell(*args, **kwargs)
  116. File "C:\Users\pc1010101\Anaconda3\envs\tensorflow\lib\site-packages\IPython\core\interactiveshell.py", line 2698, in run_cell
  117. interactivity=interactivity, compiler=compiler, result=result)
  118. File "C:\Users\pc1010101\Anaconda3\envs\tensorflow\lib\site-packages\IPython\core\interactiveshell.py", line 2802, in run_ast_nodes
  119. if self.run_code(code, result):
  120. File "C:\Users\pc1010101\Anaconda3\envs\tensorflow\lib\site-packages\IPython\core\interactiveshell.py", line 2862, in run_code
  121. exec(code_obj, self.user_global_ns, self.user_ns)
  122. File "<ipython-input-9-a80b8aeb0e7a>", line 6, in <module>
  123. h_pool2_flat = tf.reshape(h_pool2, [-1, 7*7*64])
  124. File "C:\Users\pc1010101\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\ops\gen_array_ops.py", line 2619, in reshape
  125. name=name)
  126. File "C:\Users\pc1010101\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 767, in apply_op
  127. op_def=op_def)
  128. File "C:\Users\pc1010101\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\ops.py", line 2630, in create_op
  129. original_op=self._default_original_op, op_def=op_def)
  130. File "C:\Users\pc1010101\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\ops.py", line 1204, in __init__
  131. self._traceback = self._graph._extract_stack() # pylint: disable=protected-access
  132.  
  133. InvalidArgumentError (see above for traceback): Input to reshape is a tensor with 32000000 values, but the requested shape requires a multiple of 3136
  134. [[Node: Reshape_2 = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/cpu:0"](MaxPool_1, Reshape_2/shape)]]
  135.  
  136.  
  137. In [ ]:
  138.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement