OmarMohammed88 / AR-Emotion-Recognition

An implementation of the paper titled "Arabic Speech Emotion Recognition Employing Wav2vec2.0 and HuBERT Based on BAVED Dataset" https://journals.scholarpublishing.org/index.php/TMLAI/article/view/11039

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AttributeError: 'CTCTrainer' object has no attribute 'use_amp'

ama454 opened this issue · comments

commented

I got this error in Wav2Vec2

trainer.train()

The following columns in the training set don't have a corresponding argument in Wav2Vec2ForSpeechClassification.forward and have been ignored: emotion, name. If emotion, name are not expected by Wav2Vec2ForSpeechClassification.forward, you can safely ignore this message.
/usr/local/lib/python3.8/dist-packages/transformers/optimization.py:306: FutureWarning: This implementation of AdamW is deprecated and will be removed in a future version. Use the PyTorch implementation torch.optim.AdamW instead, or set no_deprecation_warning=True to disable this warning
warnings.warn(
***** Running training *****
Num examples = 100
Num Epochs = 5
Instantaneous batch size per device = 4
Total train batch size (w. parallel, distributed & accumulation) = 8
Gradient Accumulation steps = 2
Total optimization steps = 60
Number of trainable parameters = 312280194
Automatic Weights & Biases logging enabled, to disable set os.environ["WANDB_DISABLED"] = "true"

AttributeError Traceback (most recent call last)
in
----> 1 trainer.train()

2 frames
/usr/local/lib/python3.8/dist-packages/transformers/trainer.py in train(self, resume_from_checkpoint, trial, ignore_keys_for_eval, **kwargs)
1561 self._inner_training_loop, self._train_batch_size, args.auto_find_batch_size
1562 )
-> 1563 return inner_training_loop(
1564 args=args,
1565 resume_from_checkpoint=resume_from_checkpoint,

/usr/local/lib/python3.8/dist-packages/transformers/trainer.py in _inner_training_loop(self, batch_size, args, resume_from_checkpoint, trial, ignore_keys_for_eval)
1826 tr_loss_step = self.training_step(model, inputs)
1827 else:
-> 1828 tr_loss_step = self.training_step(model, inputs)
1829
1830 if (

in training_step(self, model, inputs)
41 inputs = self._prepare_inputs(inputs)
42
---> 43 if self.use_amp:
44 with autocast():
45 loss = self.compute_loss(model, inputs)

AttributeError: 'CTCTrainer' object has no attribute 'use_amp'

i think this issue is solved here jonatasgrosman/huggingsound#45 (comment)