Skip to content

Commit

Permalink
Simplified example for v2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ys-2020 committed Jul 1, 2023
1 parent 47ec22f commit 897096a
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions examples/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,7 @@ def __len__(self):
model.eval()
# enable fused and locality-aware memory access optimization
torchsparse.backends.benchmark = True # type: ignore
# enable adaptive grouping optimization
torchsparse.tune(
model=model,
data_loader=dataflow,
n_samples=10,
collect_fn=lambda data: data['input'],
)

with torch.no_grad():
for k, feed_dict in enumerate(dataflow):
inputs = feed_dict['input'].to(device=args.device).half()
Expand Down

0 comments on commit 897096a

Please sign in to comment.