modify Early_Stop
This commit is contained in:
@ -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,
|
||||||
|
|||||||
@ -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,
|
||||||
|
|||||||
@ -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
|
||||||
|
|
||||||
|
|||||||
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user