modify Early_Stop

This commit is contained in:
Iridoudou
2021-08-09 11:21:18 +08:00
parent c3dc13d2c8
commit 44d1610296
4 changed files with 4 additions and 4 deletions

View File

@ -4,7 +4,7 @@
}, },
"TRAIN": { "TRAIN": {
"LEARNING_RATE": 2e-2, "LEARNING_RATE": 2e-2,
"MAX_EPOCH": 500, "MAX_EPOCH": 1000,
"WRITE": 1 "WRITE": 1
}, },
"USE_GPU": 1, "USE_GPU": 1,

View File

@ -4,7 +4,7 @@
}, },
"TRAIN": { "TRAIN": {
"LEARNING_RATE": 2e-2, "LEARNING_RATE": 2e-2,
"MAX_EPOCH": 500, "MAX_EPOCH": 1000,
"WRITE": 1 "WRITE": 1
}, },
"USE_GPU": 1, "USE_GPU": 1,

View File

@ -12,7 +12,7 @@ sys.path.append(os.getcwd())
from smplpytorch.pytorch.smpl_layer import SMPL_Layer from smplpytorch.pytorch.smpl_layer import SMPL_Layer
from train import train from train import train
from transform import transform from transform import transform
from save import save_pic,save_params from save import save_params
from load import load from load import load
torch.backends.cudnn.benchmark=True torch.backends.cudnn.benchmark=True

View File

@ -25,7 +25,7 @@ class Early_Stop:
if delta >= self.eps: if delta >= self.eps:
self.satis_num += 1 self.satis_num += 1
else: else:
self.satis_num = max(0,self.satis_num-1) self.satis_num = 0
return update_res, self.satis_num >= self.stop_threshold return update_res, self.satis_num >= self.stop_threshold