Closed AK391 closed 2 years ago
I‘ve added an option "--device" for CPU inference. Feel free if you have any questions.
@YuanxunLu thanks i still get this error when using --device cpu
Traceback (most recent call last):
File "demo.py", line 27, in
Thanks for your feedback. I've modified the functions and please check the latest version.
@YuanxunLu thanks i am getting this error now
Traceback (most recent call last):
File "demo.py", line 130, in
I‘ve commented these codes in the latest version. Check it if it has any questions.
@YuanxunLu
pls change these code and then cpu inference can work
FYI pytorch cpu version is required
1.lossess.py
return current_sample.reshape(b, T, -1)
2.demo.py
if torch.cuda.is_available(): map_location=lambda storage, loc: storage.cuda() else: map_location='cpu'
APC_model.load_state_dict(torch.load(config['model_params']['APC']['ckp_path'],map_location=map_location), strict=False)
please add option for cpu inference in demo.py