Traceback (most recent call last):
File "wenet/bin/train.py", line 448, in
main()
File "wenet/bin/train.py", line 283, in main
script_model = torch.jit.script(model)
File "/home/lsj/.conda/envs/wenet/lib/python3.8/site-packages/torch/jit/_script.py", line 1286, in script
return torch.jit._recursive.create_script_module(
File "/home/lsj/.conda/envs/wenet/lib/python3.8/site-packages/torch/jit/_recursive.py", line 476, in create_script_module
return create_script_module_impl(nn_module, concrete_type, stubs_fn)
File "/home/lsj/.conda/envs/wenet/lib/python3.8/site-packages/torch/jit/_recursive.py", line 542, in create_script_module_impl
create_methods_and_properties_from_stubs(concrete_type, method_stubs, property_stubs)
File "/home/lsj/.conda/envs/wenet/lib/python3.8/site-packages/torch/jit/_recursive.py", line 393, in create_methods_and_properties_from_stubs
concrete_type._create_methods_and_properties(property_defs, property_rcbs, method_defs, method_rcbs, method_defaults)
File "/home/lsj/.conda/envs/wenet/lib/python3.8/site-packages/torch/jit/_recursive.py", line 863, in try_compile_fn
return torch.jit.script(fn, _rcb=rcb)
File "/home/lsj/.conda/envs/wenet/lib/python3.8/site-packages/torch/jit/_script.py", line 1343, in script
fn = torch._C._jit_script_compile(
RuntimeError:
'torch.wenet.transducer.predictor.RNNPredictor (of Python compilation unit at: 0x51e2a80)' object has no attribute or method 'call'. Did you forget to initialize an attribute in init()?:
File "/home/lsj/zdb/wenet/wenet/transducer/transducer.py", line 483
ys_in_pad = add_blank(text, model.blank, model.ignore_id)
predictor
predictor_out = model.predictor(ys_in_pad)
~~~~~~~~~~~~~~~ <--- HERE
if not use_k2:
# joint
'compute_loss' is being compiled since it was called from 'Transducer.forward'
File "/home/lsj/zdb/wenet/wenet/transducer/transducer.py", line 116
拉下最新代码执行/home/lsj/zdb/wenet/examples/aishell/rnnt/run.sh第四步的时候报错如下:
Traceback (most recent call last): File "wenet/bin/train.py", line 448, in
main()
File "wenet/bin/train.py", line 283, in main
script_model = torch.jit.script(model)
File "/home/lsj/.conda/envs/wenet/lib/python3.8/site-packages/torch/jit/_script.py", line 1286, in script
return torch.jit._recursive.create_script_module(
File "/home/lsj/.conda/envs/wenet/lib/python3.8/site-packages/torch/jit/_recursive.py", line 476, in create_script_module
return create_script_module_impl(nn_module, concrete_type, stubs_fn)
File "/home/lsj/.conda/envs/wenet/lib/python3.8/site-packages/torch/jit/_recursive.py", line 542, in create_script_module_impl
create_methods_and_properties_from_stubs(concrete_type, method_stubs, property_stubs)
File "/home/lsj/.conda/envs/wenet/lib/python3.8/site-packages/torch/jit/_recursive.py", line 393, in create_methods_and_properties_from_stubs
concrete_type._create_methods_and_properties(property_defs, property_rcbs, method_defs, method_rcbs, method_defaults)
File "/home/lsj/.conda/envs/wenet/lib/python3.8/site-packages/torch/jit/_recursive.py", line 863, in try_compile_fn
return torch.jit.script(fn, _rcb=rcb)
File "/home/lsj/.conda/envs/wenet/lib/python3.8/site-packages/torch/jit/_script.py", line 1343, in script
fn = torch._C._jit_script_compile(
RuntimeError:
'torch.wenet.transducer.predictor.RNNPredictor (of Python compilation unit at: 0x51e2a80)' object has no attribute or method 'call'. Did you forget to initialize an attribute in init()?:
File "/home/lsj/zdb/wenet/wenet/transducer/transducer.py", line 483
ys_in_pad = add_blank(text, model.blank, model.ignore_id)
predictor
'compute_loss' is being compiled since it was called from 'Transducer.forward' File "/home/lsj/zdb/wenet/wenet/transducer/transducer.py", line 116