modify Early_Stop
This commit is contained in:
@ -12,7 +12,7 @@ sys.path.append(os.getcwd())
|
||||
from smplpytorch.pytorch.smpl_layer import SMPL_Layer
|
||||
from train import train
|
||||
from transform import transform
|
||||
from save import save_pic,save_params
|
||||
from save import save_params
|
||||
from load import load
|
||||
torch.backends.cudnn.benchmark=True
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ class Early_Stop:
|
||||
if delta >= self.eps:
|
||||
self.satis_num += 1
|
||||
else:
|
||||
self.satis_num = max(0,self.satis_num-1)
|
||||
self.satis_num = 0
|
||||
return update_res, self.satis_num >= self.stop_threshold
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user