{"action":"created","issue":{"url":"https://api.github.com/repos/TJCVRS/CRNN_Tensorflow/issues/52","repository_url":"https://api.github.com/repos/TJCVRS/CRNN_Tensorflow","labels_url":"https://api.github.com/repos/TJCVRS/CRNN_Tensorflow/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/TJCVRS/CRNN_Tensorflow/issues/52/comments","events_url":"https://api.github.com/repos/TJCVRS/CRNN_Tensorflow/issues/52/events","html_url":"https://github.com/TJCVRS/CRNN_Tensorflow/issues/52","id":306795789,"number":52,"title":"Invalid argument: Input to reshape is a tensor with 39936 values, but the requested shape has 9600","user":{"login":"hanglu","id":14351290,"avatar_url":"https://avatars2.githubusercontent.com/u/14351290?v=4","gravatar_id":"","url":"https://api.github.com/users/hanglu","html_url":"https://github.com/hanglu","followers_url":"https://api.github.com/users/hanglu/followers","following_url":"https://api.github.com/users/hanglu/following{/other_user}","gists_url":"https://api.github.com/users/hanglu/gists{/gist_id}","starred_url":"https://api.github.com/users/hanglu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanglu/subscriptions","organizations_url":"https://api.github.com/users/hanglu/orgs","repos_url":"https://api.github.com/users/hanglu/repos","events_url":"https://api.github.com/users/hanglu/events{/privacy}","received_events_url":"https://api.github.com/users/hanglu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-03-20T09:56:31Z","updated_at":"2018-03-21T08:06:39Z","closed_at":"2018-03-21T08:06:39Z","author_association":"NONE","body":"I made a small data-set for training. when I ran train_shadownet.py, the error prints\r\n\r\n\r\n\r\nINFO: 03-20 17:50:02: train_shadownet.py:187 * 139980221495104 Training from scratch\r\n2018-03-20 17:50:03.162589: W tensorflow/core/framework/op_kernel.cc:1192] Invalid argument: Input to reshape is a tensor with 39936 values, but the requested shape has 9600\r\n\t [[Node: Reshape = Reshape[T=DT_UINT8, Tshape=DT_INT32, _device=\"/job:localhost/replica:0/task:0/device:GPU:0\"](DecodeRaw/_13, Reshape/shape)]]\r\nINFO:tensorflow:Error reported to Coordinator: <class 'tensorflow.python.framework.errors_impl.InvalidArgumentError'>, Input to reshape is a tensor with 39936 values, but the requested shape has 9600\r\n\t [[Node: Reshape = Reshape[T=DT_UINT8, Tshape=DT_INT32, _device=\"/job:localhost/replica:0/task:0/device:GPU:0\"](DecodeRaw/_13, Reshape/shape)]]\r\n\t [[Node: Reshape/_15 = _Recv[client_terminated=false, recv_device=\"/job:localhost/replica:0/task:0/device:CPU:0\", send_device=\"/job:localhost/replica:0/task:0/device:GPU:0\", send_device_incarnation=1, tensor_name=\"edge_31_Reshape\", tensor_type=DT_UINT8, _device=\"/job:localhost/replica:0/task:0/device:CPU:0\"]()]]\r\nINFO: 03-20 17:50:03: tf_logging.py:82 * 139976490587904 Error reported to Coordinator: <class 'tensorflow.python.framework.errors_impl.InvalidArgumentError'>, Input to reshape is a tensor with 39936 values, but the requested shape has 9600\r\n\t [[Node: Reshape = Reshape[T=DT_UINT8, Tshape=DT_INT32, _device=\"/job:localhost/replica:0/task:0/device:GPU:0\"](DecodeRaw/_13, Reshape/shape)]]\r\n\t [[Node: Reshape/_15 = _Recv[client_terminated=false, recv_device=\"/job:localhost/replica:0/task:0/device:CPU:0\", send_device=\"/job:localhost/replica:0/task:0/device:GPU:0\", send_device_incarnation=1, tensor_name=\"edge_31_Reshape\", tensor_type=DT_UINT8, _device=\"/job:localhost/replica:0/task:0/device:CPU:0\"]()]]\r\n2018-03-20 17:50:03.525702: W tensorflow/core/framework/op_kernel.cc:1192] Invalid argument: You must feed a value for placeholder tensor 'phase' with dtype string\r\n\t [[Node: phase = Placeholder[dtype=DT_STRING, shape=<unknown>, _device=\"/job:localhost/replica:0/task:0/device:CPU:0\"]()]]\r\nTraceback (most recent call last):\r\n  File \"tools/train_shadownet.py\", line 302, in <module>\r\n    train_shadownet(args.dataset_dir, args.weights_path)\r\n  File \"tools/train_shadownet.py\", line 204, in train_shadownet\r\n    _, c, seq_distance, preds, gt_labels = sess.run([optimizer, cost, sequence_dist, decoded, input_labels])\r\n  File \"/usr/lib/python2.7/site-packages/tensorflow/python/client/session.py\", line 889, in run\r\n    run_metadata_ptr)\r\n  File \"/usr/lib/python2.7/site-packages/tensorflow/python/client/session.py\", line 1120, in _run\r\n    feed_dict_tensor, options, run_metadata)\r\n  File \"/usr/lib/python2.7/site-packages/tensorflow/python/client/session.py\", line 1317, in _do_run\r\n    options, run_metadata)\r\n  File \"/usr/lib/python2.7/site-packages/tensorflow/python/client/session.py\", line 1336, in _do_call\r\n    raise type(e)(node_def, op, message)\r\ntensorflow.python.framework.errors_impl.InvalidArgumentError: You must feed a value for placeholder tensor 'phase' with dtype string\r\n\t [[Node: phase = Placeholder[dtype=DT_STRING, shape=<unknown>, _device=\"/job:localhost/replica:0/task:0/device:CPU:0\"]()]]\r\n\r\nCaused by op u'phase', defined at:\r\n  File \"tools/train_shadownet.py\", line 302, in <module>\r\n    train_shadownet(args.dataset_dir, args.weights_path)\r\n  File \"tools/train_shadownet.py\", line 77, in train_shadownet\r\n    phase_tensor = tf.placeholder(dtype=tf.string, shape=None, name='phase')\r\n  File \"/usr/lib/python2.7/site-packages/tensorflow/python/ops/array_ops.py\", line 1599, in placeholder\r\n    return gen_array_ops._placeholder(dtype=dtype, shape=shape, name=name)\r\n  File \"/usr/lib/python2.7/site-packages/tensorflow/python/ops/gen_array_ops.py\", line 3091, in _placeholder\r\n    \"Placeholder\", dtype=dtype, shape=shape, name=name)\r\n  File \"/usr/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py\", line 787, in _apply_op_helper\r\n    op_def=op_def)\r\n  File \"/usr/lib/python2.7/site-packages/tensorflow/python/framework/ops.py\", line 2956, in create_op\r\n    op_def=op_def)\r\n  File \"/usr/lib/python2.7/site-packages/tensorflow/python/framework/ops.py\", line 1470, in __init__\r\n    self._traceback = self._graph._extract_stack()  # pylint: disable=protected-access\r\n\r\nInvalidArgumentError (see above for traceback): You must feed a value for placeholder tensor 'phase' with dtype string\r\n\t [[Node: phase = Placeholder[dtype=DT_STRING, shape=<unknown>, _device=\"/job:localhost/replica:0/task:0/device:CPU:0\"]()]]"},"comment":{"url":"https://api.github.com/repos/TJCVRS/CRNN_Tensorflow/issues/comments/374859404","html_url":"https://github.com/TJCVRS/CRNN_Tensorflow/issues/52#issuecomment-374859404","issue_url":"https://api.github.com/repos/TJCVRS/CRNN_Tensorflow/issues/52","id":374859404,"user":{"login":"hanglu","id":14351290,"avatar_url":"https://avatars2.githubusercontent.com/u/14351290?v=4","gravatar_id":"","url":"https://api.github.com/users/hanglu","html_url":"https://github.com/hanglu","followers_url":"https://api.github.com/users/hanglu/followers","following_url":"https://api.github.com/users/hanglu/following{/other_user}","gists_url":"https://api.github.com/users/hanglu/gists{/gist_id}","starred_url":"https://api.github.com/users/hanglu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanglu/subscriptions","organizations_url":"https://api.github.com/users/hanglu/orgs","repos_url":"https://api.github.com/users/hanglu/repos","events_url":"https://api.github.com/users/hanglu/events{/privacy}","received_events_url":"https://api.github.com/users/hanglu/received_events","type":"User","site_admin":false},"created_at":"2018-03-21T08:06:39Z","updated_at":"2018-03-21T08:06:39Z","author_association":"NONE","body":"The issue is from the version of python. When I used the python3 to make the training data, the problem was solved.  "}}
{"actor":{"display_login":"hanglu"}}