Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
Disable grad in eval.
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesq34 authored Oct 2, 2019
1 parent 69320e1 commit 886f83d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ def preprocess_point_cloud(point_cloud):
# Model inference
inputs = {'point_clouds': torch.from_numpy(pc).to(device)}
tic = time.time()
end_points = net(inputs)
with torch.no_grad():
end_points = net(inputs)
toc = time.time()
print('Inference time: %f'%(toc-tic))
end_points['point_clouds'] = inputs['point_clouds']
Expand Down

0 comments on commit 886f83d

Please sign in to comment.