Chris Fotache
1 min readJan 23, 2019

--

Zhirui Feng If the model was built on CUDA, when you load on a CPU you use this:

torch.load(‘myfile.pth’, map_location=lambda storage, location: ‘cpu’)

--

--

Chris Fotache
Chris Fotache

Written by Chris Fotache

AI researcher at CYNET.ai, writing about artificial intelligence, Python programming, machine learning, computer vision, robotics, natural language processing

Responses (1)