Closed springminhcm closed 1 year ago
嗯嗯,这个问题我也没有解决。麻烦用下其他的模型
嗯嗯,这个问题我也没有解决。麻烦用下其他的模型
你好,我使用你今日更新的[修复efficient_conformer模型导出问题]后,已经可以正常的导出efficient_conformer了模型,但是执行infer_path.py后,则出现以下错误讯息:
Traceback (most recent call last):
File "infer_path.py", line 24, in
那我这种处理应该是不行的。我再看看其他办法。
那我这种处理应该是不行的。我再看看其他办法。
非常感谢版主热心的帮忙。今天我也有看到你有更新回去,看来这个efficient_conformer不太好搞定呢!
您好,不知可否检查一下,使用export_model.py无法导出模型,但其它如Conformer则是正常的。 错误讯息如下:
/home/t777/anaconda3/envs/ppasr/lib/python3.8/site-packages/paddle/fluid/dygraph/jit.py:838: UserWarning: What you save is a function, and
trainer.export(save_model_path=args.save_model,
File "/home/t777/PPASR/ppasr/trainer.py", line 618, in export
paddle.jit.save(infer_model, infer_model_path)
File "/home/t777/anaconda3/envs/ppasr/lib/python3.8/site-packages/decorator.py", line 232, in fun
return caller(func, *(extras + args), kw)
File "/home/t777/anaconda3/envs/ppasr/lib/python3.8/site-packages/paddle/fluid/wrapped_decorator.py", line 26, in impl
return wrapped_func(args, kwargs)
File "/home/t777/anaconda3/envs/ppasr/lib/python3.8/site-packages/paddle/fluid/dygraph/jit.py", line 649, in wrapper
func(layer, path, input_spec, configs)
File "/home/t777/anaconda3/envs/ppasr/lib/python3.8/site-packages/decorator.py", line 232, in fun
return caller(func, (extras + args), kw)
File "/home/t777/anaconda3/envs/ppasr/lib/python3.8/site-packages/paddle/fluid/wrapped_decorator.py", line 26, in impl
return wrapped_func(*args, kwargs)
File "/home/t777/anaconda3/envs/ppasr/lib/python3.8/site-packages/paddle/fluid/dygraph/base.py", line 67, in impl
return func(*args, *kwargs)
File "/home/t777/anaconda3/envs/ppasr/lib/python3.8/site-packages/paddle/fluid/dygraph/jit.py", line 959, in save
concrete_program = attr_func.concrete_program_specify_input_spec(
File "/home/t777/anaconda3/envs/ppasr/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/program_translator.py", line 577, in concrete_program_specify_input_spec
concreteprogram, = self.get_concrete_program(
File "/home/t777/anaconda3/envs/ppasr/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/program_translator.py", line 485, in get_concrete_program
concrete_program, partial_program_layer = self._program_cache[cache_key]
File "/home/t777/anaconda3/envs/ppasr/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/program_translator.py", line 955, in getitem
self._caches[item_id] = self._build_once(item)
File "/home/t777/anaconda3/envs/ppasr/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/program_translator.py", line 939, in _build_once
concrete_program = ConcreteProgram.from_func_spec(
File "/home/t777/anaconda3/envs/ppasr/lib/python3.8/site-packages/decorator.py", line 232, in fun
return caller(func, (extras + args), kw)
File "/home/t777/anaconda3/envs/ppasr/lib/python3.8/site-packages/paddle/fluid/wrapped_decorator.py", line 26, in impl
return wrapped_func(*args, *kwargs)
File "/home/t777/anaconda3/envs/ppasr/lib/python3.8/site-packages/paddle/fluid/dygraph/base.py", line 67, in impl
return func(args, **kwargs)
File "/home/t777/anaconda3/envs/ppasr/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/program_translator.py", line 895, in from_func_spec
error_data.raise_new_exception()
File "/home/t777/anaconda3/envs/ppasr/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/error.py", line 350, in raise_newexception
six.exec("raise new_exception from None")
File "", line 1, in
TypeError: In transformed code:
jit.save
will generate the name of the model file according topath
you specify. When loading these files withjit.load
, you get aTranslatedLayer
whose inference result is the same as the inference result of the function you saved. warnings.warn( /home/t777/anaconda3/envs/ppasr/lib/python3.8/site-packages/paddle/fluid/layers/control_flow.py:211: UserWarning: Return results from different branches in cond are not same type: false_var returned by fasle_fn is '<class 'int'>' and true_var of true_fn is '<class 'paddle.fluid.framework.Variable'>' warnings.warn( /home/t777/anaconda3/envs/ppasr/lib/python3.8/site-packages/paddle/fluid/layers/control_flow.py:211: UserWarning: Return results from different branches in cond are not same type: false_var returned by fasle_fn is '<class 'paddle.fluid.framework.Variable'>' and true_var of true_fn is '<class 'int'>' warnings.warn( /home/t777/anaconda3/envs/ppasr/lib/python3.8/site-packages/paddle/fluid/layers/control_flow.py:124: UserWarning: the input shapes of select_input should have the same rank, but get (-1, -1, -1, -1), (-1, -1, -1) warnings.warn( /home/t777/anaconda3/envs/ppasr/lib/python3.8/site-packages/paddle/fluid/layers/tensor.py:667: UserWarning: paddle.assign doesn't support float64 input now due to current platform protobuf data limitation, we convert it to float32 warnings.warn( /home/t777/anaconda3/envs/ppasr/lib/python3.8/site-packages/paddle/fluid/layers/control_flow.py:124: UserWarning: the input shapes of select_input should have the same rank, but get (1,), (-1, -1, -1, -1) warnings.warn( Traceback (most recent call last): File "export_model.py", line 22, inInvoked with: <paddle.fluid.libpaddle.OpDesc object at 0x7ff4bc1b8df0>, 'paddings', [0, 0, 0, var tmp_36 : LOD_TENSOR.shape(1,).dtype(int32).stop_gradient(False), 0, 0]