--class_name_path : 类名文件
--restore_path :加载训练完成的模型
把这两个文件替换成自己训练的文件夹
tensorflow.python.framework.errors_impl.InvalidArgumentError: Assign requires shapes of both tensors to match. lhs shape= [255] rhs shape= [45]
[[Node: save/Assign_290 = Assign[T=DT_FLOAT, _class=["loc:@yolov3/yolov3_head/Conv_14/biases"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:GPU:0"](yolov3/yolov3_head/Conv_14/biases, save/RestoreV2/_581)]]
tensorflow.python.framework.errors_impl.InvalidArgumentError: Assign requires shapes of both tensors to match. lhs shape= [255] rhs shape= [45]
[[Node: save/Assign_290 = Assign[T=DT_FLOAT, _class=["loc:@yolov3/yolov3_head/Conv_14/biases"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:GPU:0"](yolov3/yolov3_head/Conv_14/biases, save/RestoreV2/_581)]]
InvalidArgumentError (see above for traceback): Assign requires shapes of both tensors to match. lhs shape= [255] rhs shape= [45]
[[Node: save/Assign_290 = Assign[T=DT_FLOAT, _class=["loc:@yolov3/yolov3_head/Conv_14/biases"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:GPU:0"](yolov3/yolov3_head/Conv_14/biases, save/RestoreV2/_581)]]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "test_single_image.py", line 63, in <module>
saver.restore(sess, args.restore_path)
File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1759, in restore
err, "a mismatch between the current graph and the graph")
tensorflow.python.framework.errors_impl.InvalidArgumentError: Restoring from checkpoint failed. This is most likely due to a mismatch between the current graph and the graph from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error:
Assign requires shapes of both tensors to match. lhs shape= [255] rhs shape= [45]
[[Node: save/Assign_290 = Assign[T=DT_FLOAT, _class=["loc:@yolov3/yolov3_head/Conv_14/biases"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:GPU:0"](yolov3/yolov3_head/Conv_14/biases, save/RestoreV2/_581)]]
InvalidArgumentError (see above for traceback): Restoring from checkpoint failed. This is most likely due to a mismatch between the current graph and the graph from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error:
Assign requires shapes of both tensors to match. lhs shape= [255] rhs shape= [45]
[[Node: save/Assign_290 = Assign[T=DT_FLOAT, _class=["loc:@yolov3/yolov3_head/Conv_14/biases"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:GPU:0"](yolov3/yolov3_head/Conv_14/biases, save/RestoreV2/_581)]]
sh-4.2$ python test_single_image.py ./data/demo_data/messi.jpg
/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
from ._conv import register_converters as _register_converters
2019-08-05 12:20:00.624279: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
2019-08-05 12:20:00.886501: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1405] Found device 0 with properties:
name: Tesla P40 major: 6 minor: 1 memoryClockRate(GHz): 1.531
pciBusID: 0000:2d:00.0
totalMemory: 22.38GiB freeMemory: 22.22GiB
2019-08-05 12:20:01.105373: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1405] Found device 1 with properties:
name: Tesla P40 major: 6 minor: 1 memoryClockRate(GHz): 1.531
pciBusID: 0000:31:00.0
totalMemory: 22.38GiB freeMemory: 22.22GiB
2019-08-05 12:20:01.329