soxan icon indicating copy to clipboard operation
soxan copied to clipboard

use_amp not define in CTCTrainer

Open AMEERAZAM08 opened this issue 2 years ago • 3 comments

`2 frames 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'`

AMEERAZAM08 avatar Sep 14 '22 11:09 AMEERAZAM08

Either put as True or False ?

AMEERAZAM08 avatar Sep 14 '22 11:09 AMEERAZAM08

hi , thank u for your code and it very good i have a error in run code, can u help me

 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'

mreza1995 avatar Jan 21 '23 08:01 mreza1995

put

self.use_amp = True

inside the

class CTCTrainer(Trainer):

Sneha335 avatar May 06 '23 10:05 Sneha335