added option to change default tensor
This commit is contained in:
parent
88fbf6cc4b
commit
5f0a71c414
|
@ -8,7 +8,6 @@ from torch.optim.lr_scheduler import MultiStepLR
|
||||||
import pdb
|
import pdb
|
||||||
|
|
||||||
try:
|
try:
|
||||||
pdb.set_trace()
|
|
||||||
from apex import amp
|
from apex import amp
|
||||||
APEX_AVAILABLE = True
|
APEX_AVAILABLE = True
|
||||||
except ModuleNotFoundError:
|
except ModuleNotFoundError:
|
||||||
|
@ -369,6 +368,7 @@ class Trainer(TrainerIO):
|
||||||
self.__add_tqdm_metrics(model_specific_tqdm_metrics_dic)
|
self.__add_tqdm_metrics(model_specific_tqdm_metrics_dic)
|
||||||
|
|
||||||
# backward pass
|
# backward pass
|
||||||
|
pdb.set_trace()
|
||||||
if self.use_amp:
|
if self.use_amp:
|
||||||
for optimizer in self.optimizers:
|
for optimizer in self.optimizers:
|
||||||
with amp.scale_loss(loss, optimizer) as scaled_loss:
|
with amp.scale_loss(loss, optimizer) as scaled_loss:
|
||||||
|
|
Loading…
Reference in New Issue