move the model to device (#52)
Co-authored-by: Jonathan Leban <jonathan.leban@unity3.com> Co-authored-by: Amanda Trang <amanda.trang@unity3d.com>
This commit is contained in:
Родитель
7d405ccec2
Коммит
d4d6e8bbdd
|
@ -130,6 +130,7 @@ def run_model_main(image_file_png, model_file_name):
|
|||
checkpoint = torch.load(model_file_name, map_location=device)
|
||||
model = PoseEstimationNetwork(is_symetric=False)
|
||||
model.load_state_dict(checkpoint["model"])
|
||||
model.to(device)
|
||||
model.eval()
|
||||
|
||||
image = pre_process_image(image_file_png, device)
|
||||
|
|
Загрузка…
Ссылка в новой задаче