运行python tools/recongnize_chinese_pdf.py ^
-c data/char_dict/char_dict_cn.json ^
-o data/char_dict/ord_map_cn.json ^
--weights_path crnn_chinese/shadownet.ckpt ^
--image_path data/test_images/test_pdf.png ^
--save_path pdf_recognize_result.txt
报错信息如下:
tensorflow.python.framework.errors_impl.InvalidArgumentError: Restoring from checkpoint failed. This is most likely due to a mismatch between the current gra
ph and the graph from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error:
运行python tools/recongnize_chinese_pdf.py ^ -c data/char_dict/char_dict_cn.json ^ -o data/char_dict/ord_map_cn.json ^ --weights_path crnn_chinese/shadownet.ckpt ^ --image_path data/test_images/test_pdf.png ^ --save_path pdf_recognize_result.txt 报错信息如下: tensorflow.python.framework.errors_impl.InvalidArgumentError: Restoring from checkpoint failed. This is most likely due to a mismatch between the current gra ph 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= [512,37] rhs shape= [512,5825] [[Node: save/Assign_45 = Assign[T=DT_FLOAT, _class=["loc:@shadow_net/sequence_rnn_module/w"], use_locking=true, validate_shape=true, _device="/job:l ocalhost/replica:0/task:0/device:GPU:0"](shadow_net/sequence_rnn_module/w, save/RestoreV2/_91)]] [[Node: save/RestoreV2/_32 = _SendT=DT_FLOAT, client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/jo b:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_38_save/RestoreV2", _device="/job:localhost/replica:0/task:0/device: CPU:0"]]