[Feature]: Change map_location to cpu
parent
5244b66d5c
commit
976de2e518
|
@ -71,7 +71,7 @@ def main():
|
||||||
parser.add_argument('dst', help='save path')
|
parser.add_argument('dst', help='save path')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
checkpoint = _load_checkpoint(args.src)
|
checkpoint = _load_checkpoint(args.src, map_location='cpu')
|
||||||
if 'state_dict' in checkpoint:
|
if 'state_dict' in checkpoint:
|
||||||
state_dict = checkpoint['state_dict']
|
state_dict = checkpoint['state_dict']
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue