MCPcopy Create free account
hub / github.com/NVIDIA/MinkowskiEngine / forward

Function forward

tests/python/network_speed.py:80–94  ·  view source on GitHub ↗
(coords, colors, model)

Source from the content-addressed store, hash-verified

78
79
80def forward(coords, colors, model):
81 # Measure time
82 timer = Timer()
83 for i in range(5):
84 # Feed-forward pass and get the prediction
85 timer.tic()
86 sinput = ME.SparseTensor(
87 features=colors,
88 coordinates=coords,
89 device=device,
90 allocator_type=ME.GPUMemoryAllocatorType.PYTORCH,
91 )
92 logits = model(sinput)
93 timer.toc()
94 return timer.min_time, len(logits)
95
96
97def train(coords, colors, model):

Callers 1

test_networkFunction · 0.85

Calls 3

ticMethod · 0.95
tocMethod · 0.95
TimerClass · 0.90

Tested by 1

test_networkFunction · 0.68