Skip to content

Commit

Permalink
move the model to device (#52)
Browse files Browse the repository at this point in the history
Co-authored-by: Jonathan Leban <jonathan.leban@unity3.com>
Co-authored-by: Amanda Trang <amanda.trang@unity3d.com>
  • Loading branch information
3 people committed Jan 19, 2022
1 parent 7d405cc commit d4d6e8b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ROS/src/ur3_moveit/src/ur3_moveit/setup_and_run_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d4d6e8b

Please sign in to comment.