baiduCN1.2k模型部署运行test脚本报错Variable's shape does not match
Created by: lujx1024
部署方式:docker
已经升级了CUDA 10.0和对应的cudnn版本,测试aishell数据模型,运行run_test.sh和run_infer.sh正常
现在想部署测试一下baiduCN1.2k的模型,脚本仿照example/aishell/run_infer_golden.sh脚本进行修改,将模型防放置在对应的位置后运行报错,根据错误信息,参考了issue #382 和issue #388,按照上述的两个issue进行配置,没有解决问题,请各位指导一下解决方案,谢谢
以下是错误信息:
Traceback (most recent call last): File "test.py", line 149, in <module> main() File "test.py", line 145, in main evaluate() File "test.py", line 113, in evaluate feeding_dict=data_generator.feeding) File "/DeepSpeech/model_utils/model.py", line 411, in infer_batch_probs self.init_from_pretrained_model(exe, infer_program) File "/DeepSpeech/model_utils/model.py", line 161, in init_from_pretrained_model filename="params.pdparams") File "/usr/local/lib/python2.7/dist-packages/paddle/fluid/io.py", line 876, in load_params filename=filename) File "/usr/local/lib/python2.7/dist-packages/paddle/fluid/io.py", line 750, in load_vars filename=filename) File "/usr/local/lib/python2.7/dist-packages/paddle/fluid/io.py", line 819, in load_vars format(orig_shape, each_var.name, new_shape)) RuntimeError: Variable's shape does not match, the Program requires a parameter with the shape of ((3072L,)), whil e the loaded parameter (namely [ layer_2_forward_batch_norm_moving_mean ]) has a shape of ((6144,)). Failed in evaluation!
issue #388 (closed) 中提到的模型不同的问题,两种模型我都尝试了,更换另一种并没有解决问题。
再此,粘贴一下两种模型的结构:
github主页下载的模型
github issue #388 (closed) 的下载模型
请各位大神与老师指导,谢谢