Repository: PaddlePaddle/PaddleSpeech

Issue #2401: TypeError: __init__() got an unexpected keyword argument 'negative_slope'
Created: 2022-09-17T03:29:05Z
你好，
我使用docker镜像想要运行这个Paddle Speech Demo speech_web，依照这个readme文档
在执行 python main.py --port 8010 时报错
grep: warning: GREP_OPTIONS is deprecated; please use an alias or script [2022-09-17 02:56:35,240] [    INFO] - We are using <class 'paddlenlp.transformers.ernie.tokenizer.ErnieTokenizer'> to load 'source/model'. ---    fused 0 elementwise_add with relu activation ---    fused 0 elementwise_add with tanh activation ---    fused 0 elementwise_add with leaky_relu activation ---    fused 0 elementwise_add with swish activation ---    fused 0 elementwise_add with hardswish activation ---    fused 0 elementwise_add with sqrt activation ---    fused 0 elementwise_add with abs activation ---    fused 0 elementwise_add with clip activation ---    fused 0 elementwise_add with gelu activation ---    fused 0 elementwise_add with relu6 activation ---    fused 0 elementwise_add with sigmoid activation ---    fused 0 elementwise_sub with relu activation ---    fused 0 elementwise_sub with tanh activation ---    fused 0 elementwise_sub with leaky_relu activation ---    fused 0 elementwise_sub with swish activation ---    fused 0 elementwise_sub with hardswish activation ---    fused 0 elementwise_sub with sqrt activation ---    fused 0 elementwise_sub with abs activation ---    fused 0 elementwise_sub with clip activation ---    fused 0 elementwise_sub with gelu activation ---    fused 0 elementwise_sub with relu6 activation ---    fused 0 elementwise_sub with sigmoid activation ---    fused 0 elementwise_mul with relu activation ---    fused 0 elementwise_mul with tanh activation ---    fused 0 elementwise_mul with leaky_relu activation ---    fused 0 elementwise_mul with swish activation ---    fused 0 elementwise_mul with hardswish activation ---    fused 0 elementwise_mul with sqrt activation ---    fused 0 elementwise_mul with abs activation ---    fused 0 elementwise_mul with clip activation ---    fused 0 elementwise_mul with gelu activation ---    fused 0 elementwise_mul with relu6 activation ---    fused 0 elementwise_mul with sigmoid activation [2022-09-17 02:56:36,889] [    INFO] - Already cached /root/.paddlenlp/models/plato-mini/plato-mini-vocab.txt[2022-09-17 02:56:36,890] [    INFO] - Already cached /root/.paddlenlp/models/plato-mini/plato-mini-spm.model[2022-09-17 02:56:36,948] [    INFO] - tokenizer config file saved in /root/.paddlenlp/models/plato-mini/tokenizer_config.json [2022-09-17 02:56:36,949] [    INFO] - Special tokens file saved in /root/.paddlenlp/models/plato-mini/special_tokens_map.json Traceback (most recent call last): File "main.py", line 73, in <module> 2022-09-17 02:56:48.298 | INFO     | paddlespeech.s2t.modules.embedding:__init__:153 - max len: 5000 chatbot = Robot(asr_config, tts_config, asr_init_path, ie_model_path=ie_model_path) File "/home/PaddleSpeech/demos/speech_web/speech_server/src/robot.py", line 15, in __init__ self.asr = ASR(config_path=asr_config) File "/home/PaddleSpeech/demos/speech_web/speech_server/src/SpeechBase/asr.py", line 37, in __init__ self.engine.init(self.config) File "/usr/local/lib/python3.7/dist-packages/paddlespeech/server/engine/asr/online/python/asr_engine.py", line 891, in init if not self.init_model(): File "/usr/local/lib/python3.7/dist-packages/paddlespeech/server/engine/asr/online/python/asr_engine.py", line 862, in init_model am_predictor_conf=self.config.am_predictor_conf): File "/usr/local/lib/python3.7/dist-packages/paddlespeech/server/engine/asr/online/python/asr_engine.py", line 836, in _init_from_path self.init_model() File "/usr/local/lib/python3.7/dist-packages/paddlespeech/server/engine/asr/online/python/asr_engine.py", line 756, in init_model model = model_class.from_config(self.config) File "/usr/local/lib/python3.7/dist-packages/paddlespeech/s2t/models/u2/u2.py", line 886, in from_config model = cls(configs) File "/usr/local/lib/python3.7/dist-packages/paddlespeech/s2t/models/u2/u2.py", line 803, in __init__ configs) File "/usr/local/lib/python3.7/dist-packages/paddlespeech/s2t/models/u2/u2.py", line 849, in _init_from_config input_dim, global_cmvn=global_cmvn, **configs['encoder_conf']) File "/usr/local/lib/python3.7/dist-packages/paddlespeech/s2t/modules/encoder.py", line 472, in __init__ use_dynamic_left_chunk, max_len) File "/usr/local/lib/python3.7/dist-packages/paddlespeech/s2t/modules/encoder.py", line 130, in __init__ max_len=max_len), ) File "/usr/local/lib/python3.7/dist-packages/paddlespeech/s2t/modules/subsampling.py", line 114, in __init__ Conv2D(1, odim, 3, 2), File "/usr/local/lib/python3.7/dist-packages/paddlespeech/s2t/modules/align.py", line 131, in __init__ weight_attr = paddle.ParamAttr(initializer=nn.initializer.KaimingUniform(fan_in=None, negative_slope=math.sqrt(5), nonlinearity='leaky_relu')) TypeError: __init__() got an unexpected keyword argument 'negative_slope'
环境 ： ubuntu 20.04
docker image TAG develop-cpu-5d5888

Duplicate issue #2503: [S2T] FatalError: `Erroneous arithmetic operation` is detected by the operating system.
Created: 2022-10-08T07:47:12Z
您好，我按安装教程拉取官网dockers安装。[develop-gpu-cuda11.2-cudnn8-latest]
之后按example/aishell/sr1 的教程，bash run.sh --stage 1 --stop_stage 1时，出现以下错误：
TypeError: init() got an unexpected keyword argument 'negative_slope'
参考其他issues，将paddle2.3.0-gpu升级为2.3.1-gpu，主机环境为A100、CUDA Version: 11.2，结果出现以下错误：
。。。
2022-10-08 07:16:43.986 | INFO     | paddlespeech.s2t.training.optimizer:from_args:120 -  LR: WarmupLR(warmup_steps=25000, lr=0.002, last_epoch=0)
2022-10-08 07:16:43.986 | INFO     | paddlespeech.s2t.exps.u2.model:setup_model:304 - Setup optimizer/lr_scheduler!
2022-10-08 07:16:43.987 | INFO     | paddlespeech.s2t.training.trainer:resume_or_scratch:225 - Init from scratch!
2022-10-08 07:16:44.464 | INFO     | paddlespeech.s2t.utils.checkpoint:_save_parameters:286 - Saved model to exp/conformer/checkpoints/init.pdparams
2022-10-08 07:16:44.466 | INFO     | paddlespeech.s2t.utils.checkpoint:_save_parameters:292 - Saved optimzier state to exp/conformer/checkpoints/init.pdopt
2022-10-08 07:16:44.466 | INFO     | paddlespeech.s2t.exps.u2.model:do_train:160 - Train Total Examples: 30025
/home/PaddleSpeech/paddlespeech/audio/transform/spec_augment.py:48: DeprecationWarning: BICUBIC is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.BICUBIC instead.
Image.BICUBIC)
/home/PaddleSpeech/paddlespeech/audio/transform/spec_augment.py:50: DeprecationWarning: BICUBIC is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.BICUBIC instead.
Image.BICUBIC)
/home/PaddleSpeech/paddlespeech/audio/transform/spec_augment.py:48: DeprecationWarning: BICUBIC is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.BICUBIC instead.
Image.BICUBIC)
/home/PaddleSpeech/paddlespeech/audio/transform/spec_augment.py:50: DeprecationWarning: BICUBIC is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.BICUBIC instead.
Image.BICUBIC)

C++ Traceback (most recent call last):
0   paddle::imperative::Tracer::TraceOp(std::string const&, paddle::imperative::NameVarBaseMap const&, paddle::imperative::NameVarBaseMap const&, paddle::framework::AttributeMap, std::map<std::string, std::string, std::less<std::string >, std::allocator<std::pair<std::string const, std::string > > > const&)
1   void paddle::imperative::Tracer::TraceOpImplpaddle::imperative::VarBase(std::string const&, paddle::imperative::details::NameVarMapTraitpaddle::imperative::VarBase::Type const&, paddle::imperative::details::NameVarMapTraitpaddle::imperative::VarBase::Type const&, paddle::framework::AttributeMap&, phi::Place const&, bool, std::map<std::string, std::string, std::less<std::string >, std::allocator<std::pair<std::string const, std::string > > > const&, paddle::framework::AttributeMap*, bool)
2   paddle::imperative::PreparedOp::Run(paddle::imperative::NameVarBaseMap const&, paddle::imperative::NameVarBaseMap const&, paddle::framework::AttributeMap const&, paddle::framework::AttributeMap const&)
3   void phi::ArangeKernel<long, phi::GPUContext>(phi::GPUContext const&, phi::DenseTensor const&, phi::DenseTensor const&, phi::DenseTensor const&, phi::DenseTensor*)

Error Message Summary:
FatalError: Erroneous arithmetic operation is detected by the operating system.
[TimeInfo: *** Aborted at 1665213404 (unix time) try "date -d @1665213404" if you are using GNU date ***]
[SignalInfo: *** SIGFPE (@0x7ff9b1daf5f3) received by PID 1460 (TID 0x7ffa0b562740) from PID 18446744072398501363 ***]
INFO 2022-10-08 07:16:59,575 launch_utils.py:343] terminate all the procs
INFO 2022-10-08 07:16:59,575 launch_utils.py:343] terminate all the procs
ERROR 2022-10-08 07:16:59,575 launch_utils.py:642] ABORT!!! Out of all 1 trainers, the trainer process with rank=[0] was aborted. Please check its log.
ERROR 2022-10-08 07:16:59,575 launch_utils.py:642] ABORT!!! Out of all 1 trainers, the trainer process with rank=[0] was aborted. Please check its log.
INFO 2022-10-08 07:17:03,579 launch_utils.py:343] terminate all the procs
INFO 2022-10-08 07:17:03,579 launch_utils.py:343] terminate all the procs
INFO 2022-10-08 07:17:03,579 launch.py:402] Local processes completed.
INFO 2022-10-08 07:17:03,579 launch.py:402] Local processes completed.

Closing comment (2022-10-08T08:05:00Z): Duplicate of #2401