mirror of
https://github.com/xuebinqin/DIS.git
synced 2024-11-26 08:43:17 +01:00
Update train_valid_inference_main.py
the variable ds_val was accessed after deletion (or before assignment)
This commit is contained in:
parent
7df2a36362
commit
00bbb38776
@ -493,9 +493,9 @@ def valid(net, valid_dataloaders, valid_datasets, hypar, epoch=0):
|
|||||||
F1[i_test,:] = f1
|
F1[i_test,:] = f1
|
||||||
MAE[i_test] = mae
|
MAE[i_test] = mae
|
||||||
|
|
||||||
del ds_val, gt
|
del ds_val, gt
|
||||||
gc.collect()
|
gc.collect()
|
||||||
torch.cuda.empty_cache()
|
torch.cuda.empty_cache()
|
||||||
|
|
||||||
# if(loss_val.data[0]>1):
|
# if(loss_val.data[0]>1):
|
||||||
val_loss += loss_val.item()#data[0]
|
val_loss += loss_val.item()#data[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user