DeepASR中infer_by_ckpy.py接口错误
Created by: MornJ
我碰到了两个问题
- 其他issue里面提到过的DeepASR/data_utils/util.py里面没有lodtensor_to_ndarray的问题,我用了paddle/Paddle/python/paddle/fluid/tests/unittests/test_dynrnn_static_input.py里面的_lodtensor_to_ndarray来替代,这样有没有问题?
- 在infer_by_ckpt.py里会碰到下面的问题: Traceback (most recent call last): File "../../infer_by_ckpt.py", line 273, in infer_from_ckpt(args) File "../../infer_by_ckpt.py", line 197, in infer_from_ckpt parallel=args.parallel) TypeError: stacked_lstmp_model() got an unexpected keyword argument 'frame_dim' stacked_lstmp_model()的参数与定义对不上。在model.py里面的stacked_lstmp_model()定义并没有frame_dim, 但是有feature和label。而在infer_by_ckpt.py里面的调用却没有feature和label。我去掉frame_dim以后仍然会报错。 我对代码的理解是exe.run() 里的feed参数会把feature和label填充到参数里面,但似乎在之前调用的时候仍然需要填充feature和label?