rm .cpu() in saving models
parent
6c6bd95e33
commit
af853bbbaf
|
@ -166,7 +166,7 @@ def main():
|
|||
if is_best: best_rank1 = rank1
|
||||
|
||||
if use_gpu:
|
||||
state_dict = model.module.cpu().state_dict()
|
||||
state_dict = model.module.state_dict()
|
||||
else:
|
||||
state_dict = model.state_dict()
|
||||
save_checkpoint({
|
||||
|
|
|
@ -159,7 +159,7 @@ def main():
|
|||
if is_best: best_rank1 = rank1
|
||||
|
||||
if use_gpu:
|
||||
state_dict = model.module.cpu().state_dict()
|
||||
state_dict = model.module.state_dict()
|
||||
else:
|
||||
state_dict = model.state_dict()
|
||||
save_checkpoint({
|
||||
|
|
|
@ -168,7 +168,7 @@ def main():
|
|||
if is_best: best_rank1 = rank1
|
||||
|
||||
if use_gpu:
|
||||
state_dict = model.module.cpu().state_dict()
|
||||
state_dict = model.module.state_dict()
|
||||
else:
|
||||
state_dict = model.state_dict()
|
||||
save_checkpoint({
|
||||
|
|
|
@ -167,7 +167,7 @@ def main():
|
|||
if is_best: best_rank1 = rank1
|
||||
|
||||
if use_gpu:
|
||||
state_dict = model.module.cpu().state_dict()
|
||||
state_dict = model.module.state_dict()
|
||||
else:
|
||||
state_dict = model.state_dict()
|
||||
save_checkpoint({
|
||||
|
|
|
@ -176,7 +176,7 @@ def main():
|
|||
if is_best: best_rank1 = rank1
|
||||
|
||||
if use_gpu:
|
||||
state_dict = model.module.cpu().state_dict()
|
||||
state_dict = model.module.state_dict()
|
||||
else:
|
||||
state_dict = model.state_dict()
|
||||
save_checkpoint({
|
||||
|
|
Loading…
Reference in New Issue