Skip to content

Commit c508af3

Browse files
authored
Merge pull request #123 from li-yan-type/patch-1
Update eval_voc.py
2 parents 3ce224c + 0781663 commit c508af3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

eval_voc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ def __init__(
3737

3838
self.__load_model_weights(weight_path)
3939

40-
self.__evalter = Evaluator(self.__model, showatt=self.showatt)
40+
self.__evalter = Evaluator(self.__model, showatt=self.__showatt)
4141

4242
def __load_model_weights(self, weight_path):
4343
print("loading weight file from : {}".format(weight_path))
4444

4545
weight = os.path.join(weight_path)
4646
chkpt = torch.load(weight, map_location=self.__device)
47-
self.__model.load_state_dict(chkpt)
47+
self.__model.load_state_dict(chkpt["model"])
4848
print("loading weight file is done")
4949
del chkpt
5050

0 commit comments

Comments
 (0)