Commit 791aaad1 authored by E144069X's avatar E144069X

removed torch autograd anomaly detection

parent 6365155f
......@@ -83,11 +83,10 @@ def epochSeqTr(model,optim,log_interval,loader, epoch, args,writer,**kwargs):
timeElapsedTensor = batch[-1] if args.video_mode else None
timeElapsedTensor = timeElapsedTensor.cuda() if (args.video_mode and args.cuda) else None
with torch.autograd.detect_anomaly():
resDict = model(data,timeElapsedTensor)
output = resDict["pred"]
loss = computeLoss(args.nll_weight,output,target,args.pn_reconst_weight,resDict,data,args.video_mode)
loss.backward()
resDict = model(data,timeElapsedTensor)
output = resDict["pred"]
loss = computeLoss(args.nll_weight,output,target,args.pn_reconst_weight,resDict,data,args.video_mode)
loss.backward()
if args.distributed:
average_gradients(model)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment