This commit is contained in:
chenxuanhong
2022-01-22 12:45:23 +08:00
parent bebaeef2ce
commit 0f8c2f929e
2 changed files with 7 additions and 4 deletions
+3 -2
View File
@@ -5,7 +5,7 @@
# Created Date: Sunday January 9th 2022
# Author: Chen Xuanhong
# Email: chenxuanhongzju@outlook.com
# Last Modified: Monday, 17th January 2022 9:27:48 pm
# Last Modified: Saturday, 22nd January 2022 12:42:28 pm
# Modified By: Chen Xuanhong
# Copyright (c) 2022 Shanghai Jiao Tong University
#############################################################
@@ -140,7 +140,8 @@ class Trainer(TrainerBase):
# TODO modify this function to evaluate your model
# Evaluate the checkpoint
def __evaluation__(self,
def __evaluation__(
self,
step = 0,
**kwargs
):
+4 -2
View File
@@ -5,7 +5,7 @@
# Created Date: Sunday January 9th 2022
# Author: Chen Xuanhong
# Email: chenxuanhongzju@outlook.com
# Last Modified: Monday, 17th January 2022 5:31:43 pm
# Last Modified: Saturday, 22nd January 2022 12:45:09 pm
# Modified By: Chen Xuanhong
# Copyright (c) 2022 Shanghai Jiao Tong University
#############################################################
@@ -24,7 +24,9 @@ from train_scripts.trainer_base import TrainerBase
class Trainer(TrainerBase):
def __init__(self, config, reporter):
def __init__(self,
config,
reporter):
super(Trainer, self).__init__(config, reporter)
self.img_std = torch.Tensor([0.229, 0.224, 0.225]).view(3,1,1)