vaibhavshukla182 / extracting_text_information_using_YOLO

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tensorflow.python.framework.errors_impl.InvalidArgumentError: Input to reshape is a tensor with 20280 values, but the requested shape requires a multiple of 21125

suresh-vy opened this issue · comments

Hi Vaibhav,

When i'm trying to run below statement i'm getting above error,

python flow --model cfg/tiny-yolo-voc1.cfg --train --dataset test/training/images --annotation test/training/annotations_full

Below is the part of error log that i'm getting

`Training statistics:
Learning rate : 1e-05
Batch size : 4
Epoch number : 1000
Backup every : 2000
Traceback (most recent call last):
File "/home/python/extract_text_yolo/venv/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1356, in _do_call
return fn(*args)
File "/home/python/extract_text_yolo/venv/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1341, in _run_fn
options, feed_dict, fetch_list, target_list, run_metadata)
File "/home/python/extract_text_yolo/venv/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1429, in _call_tf_sessionrun
run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Input to reshape is a tensor with 20280 values, but the requested shape requires a multiple of 21125
[[{{node Reshape}}]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "flow", line 6, in
cliHandler(sys.argv)
File "/home/python/extract_text_yolo/extracting_text_information_using_YOLO-master/yolo/darkflow/darkflow/cli.py", line 33, in cliHandler
print('Enter training ...'); tfnet.train()
File "/home/python/extract_text_yolo/extracting_text_information_using_YOLO-master/yolo/darkflow/darkflow/net/flow.py", line 56, in train
fetched = self.sess.run(fetches, feed_dict)
File "/home/python/extract_text_yolo/venv/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 950, in run
run_metadata_ptr)
File "/home/python/extract_text_yolo/venv/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1173, in _run
feed_dict_tensor, options, run_metadata)
File "/home/python/extract_text_yolo/venv/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1350, in _do_run
run_metadata)
File "/home/python/extract_text_yolo/venv/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1370, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Input to reshape is a tensor with 20280 values, but the requested shape requires a multiple of 21125
[[node Reshape (defined at /home/python/extract_text_yolo/extracting_text_information_using_YOLO-master/yolo/darkflow/darkflow/net/yolov2/train.py:56) ]]

Errors may have originated from an input operation.
Input Source operations connected to node Reshape:
output (defined at /home/python/extract_text_yolo/extracting_text_information_using_YOLO-master/yolo/darkflow/darkflow/net/build.py:121)

Original stack trace for 'Reshape':
File "flow", line 6, in
cliHandler(sys.argv)
File "/home/python/extract_text_yolo/extracting_text_information_using_YOLO-master/yolo/darkflow/darkflow/cli.py", line 26, in cliHandler
tfnet = TFNet(FLAGS)
File "/home/python/extract_text_yolo/extracting_text_information_using_YOLO-master/yolo/darkflow/darkflow/net/build.py", line 76, in init
self.setup_meta_ops()
File "/home/python/extract_text_yolo/extracting_text_information_using_YOLO-master/yolo/darkflow/darkflow/net/build.py", line 139, in setup_meta_ops
if self.FLAGS.train: self.build_train_op()
File "/home/python/extract_text_yolo/extracting_text_information_using_YOLO-master/yolo/darkflow/darkflow/net/help.py", line 15, in build_train_op
self.framework.loss(self.out)
File "/home/python/extract_text_yolo/extracting_text_information_using_YOLO-master/yolo/darkflow/darkflow/net/yolov2/train.py", line 56, in loss
net_out_reshape = tf.reshape(net_out, [-1, H, W, B, (4 + 1 + C)])
File "/home/python/extract_text_yolo/venv/lib/python3.7/site-packages/tensorflow/python/ops/gen_array_ops.py", line 7715, in reshape
"Reshape", tensor=tensor, shape=shape, name=name)
File "/home/python/extract_text_yolo/venv/lib/python3.7/site-packages/tensorflow/python/framework/op_def_library.py", line 788, in _apply_op_helper
op_def=op_def)
File "/home/python/extract_text_yolo/venv/lib/python3.7/site-packages/tensorflow/python/util/deprecation.py", line 507, in new_func
return func(*args, **kwargs)
File "/home/python/extract_text_yolo/venv/lib/python3.7/site-packages/tensorflow/python/framework/ops.py", line 3616, in create_op
op_def=op_def)
File "/home/python/extract_text_yolo/venv/lib/python3.7/site-packages/tensorflow/python/framework/ops.py", line 2005, in init
self._traceback = tf_stack.extract_stack()
`