Closed ziqiangbuxi0416 closed 2 years ago
For me removing [--memory-efficient-fp16] in ./command/finetune/finetune.sh removed the error.
哇塞,太谢谢你了,比心🎁
---Original--- From: @.> Date: Mon, Jun 13, 2022 15:14 PM To: @.>; Cc: @.**@.>; Subject: Re: [CUMLSec/trex] RuntimeError: "slow_conv2d_cpu" not implementedfor 'Half' (Issue #24)
For me removing [--memory-efficient-fp16] in ./command/finetune/finetune.sh removed the error.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
Yes @ziqiangbuxi0416, what @roflo174 suggested should work. Thanks @ziqiangbuxi0416!
run
./command/finetune/finetune.sh
Traceback (most recent call last): File "/home/thinktwice/aixin/test/trex/train.py", line 14, in
cli_main()
File "/home/thinktwice/aixin/test/trex/fairseq_cli/train.py", line 496, in cli_main
distributed_utils.call_main(cfg, main)
File "/home/thinktwice/aixin/test/trex/fairseq/distributed/utils.py", line 369, in call_main
main(cfg, kwargs)
File "/home/thinktwice/aixin/test/trex/fairseq_cli/train.py", line 173, in main
valid_losses, should_stop = train(cfg, trainer, task, epoch_itr)
File "/home/thinktwice/anaconda3/envs/trex/lib/python3.9/contextlib.py", line 79, in inner
return func(*args, *kwds)
File "/home/thinktwice/aixin/test/trex/fairseq_cli/train.py", line 284, in train
log_output = trainer.train_step(samples)
File "/home/thinktwice/anaconda3/envs/trex/lib/python3.9/contextlib.py", line 79, in inner
return func(args, kwds)
File "/home/thinktwice/aixin/test/trex/fairseq/trainer.py", line 701, in train_step
raise e
File "/home/thinktwice/aixin/test/trex/fairseq/trainer.py", line 669, in train_step
loss, sample_size_i, logging_output = self.task.train_step(
File "/home/thinktwice/aixin/test/trex/fairseq/tasks/fairseq_task.py", line 475, in train_step
loss, sample_size, logging_output = criterion(model, sample)
File "/home/thinktwice/anaconda3/envs/trex/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(input, kwargs)
File "/home/thinktwice/aixin/test/trex/fairseq/criterions/trex.py", line 62, in forward
output = model(sample["net_input"], masked_code=masked_code, masked_value=masked_value)[0]
File "/home/thinktwice/anaconda3/envs/trex/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(input, kwargs)
File "/home/thinktwice/aixin/test/trex/fairseq/models/trex/model.py", line 233, in forward
x, extra = self.encoder(src_tokens, src_lengths, features_only, return_all_hiddens, masked_code, masked_value)
File "/home/thinktwice/anaconda3/envs/trex/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, *kwargs)
File "/home/thinktwice/aixin/test/trex/fairseq/models/trex/model.py", line 593, in forward
x, extra = self.extract_features(src_tokens, return_all_hiddens=return_all_hiddens)
File "/home/thinktwice/aixin/test/trex/fairseq/models/trex/model.py", line 599, in extract_features
encoder_out = self.sentence_encoder(
File "/home/thinktwice/anaconda3/envs/trex/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(input, kwargs)
File "/home/thinktwice/aixin/test/trex/fairseq/modules/trex_encoder.py", line 199, in forward
return self.forward_scriptable(src_tokens,
File "/home/thinktwice/aixin/test/trex/fairseq/modules/trex_encoder.py", line 238, in forward_scriptable
x, encoder_embedding = self.forward_embedding(src_tokens)
File "/home/thinktwice/aixin/test/trex/fairseq/modules/trex_encoder.py", line 160, in forward_embedding
byte_embedding = self.byte_combine(torch.stack(byte_embedding_stack, dim=2))
File "/home/thinktwice/anaconda3/envs/trex/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, *kwargs)
File "/home/thinktwice/aixin/test/trex/fairseq/modules/trex_encoder.py", line 391, in forward
x = conv(features)
File "/home/thinktwice/anaconda3/envs/trex/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(input, **kwargs)
File "/home/thinktwice/anaconda3/envs/trex/lib/python3.9/site-packages/torch/nn/modules/conv.py", line 302, in forward
return self._conv_forward(input, self.weight, self.bias)
File "/home/thinktwice/anaconda3/envs/trex/lib/python3.9/site-packages/torch/nn/modules/conv.py", line 298, in _conv_forward
return F.conv1d(input, weight, bias, self.stride,
RuntimeError: "slow_conv2d_cpu" not implemented for 'Half'