Restore weights from: data\output\yolo_weights.ckpt
Traceback (most recent call last):
File "D:\anaconda\lib\site-packages\tensorflow\python\client\session.py", line 1322, in _do_call
return fn(*args)
File "D:\anaconda\lib\site-packages\tensorflow\python\client\session.py", line 1307, in _run_fn
options, feed_dict, fetch_list, target_list, run_metadata)
File "D:\anaconda\lib\site-packages\tensorflow\python\client\session.py", line 1409, in _call_tf_sessionrun
run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Assign requires shapes of both tensors to match. lhs shape= [30] rhs shape= [425]
[[Node: save/Assign_15 = Assign[T=DT_FLOAT, _class=["loc:@biases_22"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:GPU:0"](biases_22, save/RestoreV2/_31)]]
[[Node: save/RestoreV2/_56 = _SendT=DT_FLOAT, client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_62_save/RestoreV2", _device="/job:localhost/replica:0/task:0/device:CPU:0"]]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:/360Downloads/ganshijiance/YOLO_v2-master/train_val.py", line 131, in
main()
File "D:/360Downloads/ganshijiance/YOLO_v2-master/train_val.py", line 123, in main
train = Train(yolo, pre_data)
File "D:/360Downloads/ganshijiance/YOLO_v2-master/train_val.py", line 51, in init
self.saver.restore(self.sess, weight_file)
File "D:\anaconda\lib\site-packages\tensorflow\python\training\saver.py", line 1752, in restore
{self.saver_def.filename_tensor_name: save_path})
File "D:\anaconda\lib\site-packages\tensorflow\python\client\session.py", line 900, in run
run_metadata_ptr)
File "D:\anaconda\lib\site-packages\tensorflow\python\client\session.py", line 1135, in _run
feed_dict_tensor, options, run_metadata)
File "D:\anaconda\lib\site-packages\tensorflow\python\client\session.py", line 1316, in _do_run
run_metadata)
File "D:\anaconda\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: Assign requires shapes of both tensors to match. lhs shape= [30] rhs shape= [425]
[[Node: save/Assign_15 = Assign[T=DT_FLOAT, _class=["loc:@biases_22"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:GPU:0"](biases_22, save/RestoreV2/_31)]]
[[Node: save/RestoreV2/_56 = _SendT=DT_FLOAT, client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_62_save/RestoreV2", _device="/job:localhost/replica:0/task:0/device:CPU:0"]]
Caused by op 'save/Assign_15', defined at:
File "D:/360Downloads/ganshijiance/YOLO_v2-master/train_val.py", line 131, in
main()
File "D:/360Downloads/ganshijiance/YOLO_v2-master/train_val.py", line 123, in main
train = Train(yolo, pre_data)
File "D:/360Downloads/ganshijiance/YOLO_v2-master/train_val.py", line 32, in init
self.saver = tf.train.Saver(self.variable_to_restore)
File "D:\anaconda\lib\site-packages\tensorflow\python\training\saver.py", line 1284, in init
self.build()
File "D:\anaconda\lib\site-packages\tensorflow\python\training\saver.py", line 1296, in build
self._build(self._filename, build_save=True, build_restore=True)
File "D:\anaconda\lib\site-packages\tensorflow\python\training\saver.py", line 1333, in _build
build_save=build_save, build_restore=build_restore)
File "D:\anaconda\lib\site-packages\tensorflow\python\training\saver.py", line 781, in _build_internal
restore_sequentially, reshape)
File "D:\anaconda\lib\site-packages\tensorflow\python\training\saver.py", line 422, in _AddRestoreOps
assign_ops.append(saveable.restore(saveable_tensors, shapes))
File "D:\anaconda\lib\site-packages\tensorflow\python\training\saver.py", line 113, in restore
self.op.get_shape().is_fully_defined())
File "D:\anaconda\lib\site-packages\tensorflow\python\ops\state_ops.py", line 219, in assign
validate_shape=validate_shape)
File "D:\anaconda\lib\site-packages\tensorflow\python\ops\gen_state_ops.py", line 63, in assign
use_locking=use_locking, name=name)
File "D:\anaconda\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "D:\anaconda\lib\site-packages\tensorflow\python\framework\ops.py", line 3414, in create_op
op_def=op_def)
File "D:\anaconda\lib\site-packages\tensorflow\python\framework\ops.py", line 1740, in init
self._traceback = self._graph._extract_stack() # pylint: disable=protected-access
Error running train_val
Restore weights from: data\output\yolo_weights.ckpt Traceback (most recent call last): File "D:\anaconda\lib\site-packages\tensorflow\python\client\session.py", line 1322, in _do_call return fn(*args) File "D:\anaconda\lib\site-packages\tensorflow\python\client\session.py", line 1307, in _run_fn options, feed_dict, fetch_list, target_list, run_metadata) File "D:\anaconda\lib\site-packages\tensorflow\python\client\session.py", line 1409, in _call_tf_sessionrun run_metadata) tensorflow.python.framework.errors_impl.InvalidArgumentError: Assign requires shapes of both tensors to match. lhs shape= [30] rhs shape= [425] [[Node: save/Assign_15 = Assign[T=DT_FLOAT, _class=["loc:@biases_22"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:GPU:0"](biases_22, save/RestoreV2/_31)]] [[Node: save/RestoreV2/_56 = _SendT=DT_FLOAT, client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_62_save/RestoreV2", _device="/job:localhost/replica:0/task:0/device:CPU:0"]]
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "D:/360Downloads/ganshijiance/YOLO_v2-master/train_val.py", line 131, in
main()
File "D:/360Downloads/ganshijiance/YOLO_v2-master/train_val.py", line 123, in main
train = Train(yolo, pre_data)
File "D:/360Downloads/ganshijiance/YOLO_v2-master/train_val.py", line 51, in init
self.saver.restore(self.sess, weight_file)
File "D:\anaconda\lib\site-packages\tensorflow\python\training\saver.py", line 1752, in restore
{self.saver_def.filename_tensor_name: save_path})
File "D:\anaconda\lib\site-packages\tensorflow\python\client\session.py", line 900, in run
run_metadata_ptr)
File "D:\anaconda\lib\site-packages\tensorflow\python\client\session.py", line 1135, in _run
feed_dict_tensor, options, run_metadata)
File "D:\anaconda\lib\site-packages\tensorflow\python\client\session.py", line 1316, in _do_run
run_metadata)
File "D:\anaconda\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: Assign requires shapes of both tensors to match. lhs shape= [30] rhs shape= [425]
[[Node: save/Assign_15 = Assign[T=DT_FLOAT, _class=["loc:@biases_22"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:GPU:0"](biases_22, save/RestoreV2/_31)]]
[[Node: save/RestoreV2/_56 = _SendT=DT_FLOAT, client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_62_save/RestoreV2", _device="/job:localhost/replica:0/task:0/device:CPU:0"]]
Caused by op 'save/Assign_15', defined at: File "D:/360Downloads/ganshijiance/YOLO_v2-master/train_val.py", line 131, in
main()
File "D:/360Downloads/ganshijiance/YOLO_v2-master/train_val.py", line 123, in main
train = Train(yolo, pre_data)
File "D:/360Downloads/ganshijiance/YOLO_v2-master/train_val.py", line 32, in init
self.saver = tf.train.Saver(self.variable_to_restore)
File "D:\anaconda\lib\site-packages\tensorflow\python\training\saver.py", line 1284, in init
self.build()
File "D:\anaconda\lib\site-packages\tensorflow\python\training\saver.py", line 1296, in build
self._build(self._filename, build_save=True, build_restore=True)
File "D:\anaconda\lib\site-packages\tensorflow\python\training\saver.py", line 1333, in _build
build_save=build_save, build_restore=build_restore)
File "D:\anaconda\lib\site-packages\tensorflow\python\training\saver.py", line 781, in _build_internal
restore_sequentially, reshape)
File "D:\anaconda\lib\site-packages\tensorflow\python\training\saver.py", line 422, in _AddRestoreOps
assign_ops.append(saveable.restore(saveable_tensors, shapes))
File "D:\anaconda\lib\site-packages\tensorflow\python\training\saver.py", line 113, in restore
self.op.get_shape().is_fully_defined())
File "D:\anaconda\lib\site-packages\tensorflow\python\ops\state_ops.py", line 219, in assign
validate_shape=validate_shape)
File "D:\anaconda\lib\site-packages\tensorflow\python\ops\gen_state_ops.py", line 63, in assign
use_locking=use_locking, name=name)
File "D:\anaconda\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "D:\anaconda\lib\site-packages\tensorflow\python\framework\ops.py", line 3414, in create_op
op_def=op_def)
File "D:\anaconda\lib\site-packages\tensorflow\python\framework\ops.py", line 1740, in init
self._traceback = self._graph._extract_stack() # pylint: disable=protected-access
InvalidArgumentError (see above for traceback): Assign requires shapes of both tensors to match. lhs shape= [30] rhs shape= [425] [[Node: save/Assign_15 = Assign[T=DT_FLOAT, _class=["loc:@biases_22"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:GPU:0"](biases_22, save/RestoreV2/_31)]] [[Node: save/RestoreV2/_56 = _SendT=DT_FLOAT, client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_62_save/RestoreV2", _device="/job:localhost/replica:0/task:0/device:CPU:0"]]