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

Function test_network

tests/python/network_speed.py:115–126  ·  view source on GitHub ↗
(coords, feats, model, batch_sizes, forward_only=True)

Source from the content-addressed store, hash-verified

113
114
115def test_network(coords, feats, model, batch_sizes, forward_only=True):
116 for batch_size in batch_sizes:
117 bcoords = batched_coordinates([coords for i in range(batch_size)])
118 bfeats = torch.cat([feats for i in range(batch_size)], 0)
119 if forward_only:
120 with torch.no_grad():
121 time, length = forward(bcoords, bfeats, model)
122 else:
123 time, length = train(bcoords, bfeats, model)
124
125 print(f"{net.__name__}\t{voxel_size}\t{batch_size}\t{length}\t{time}")
126 torch.cuda.empty_cache()
127
128
129if __name__ == "__main__":

Callers 1

network_speed.pyFile · 0.85

Calls 3

forwardFunction · 0.85
trainFunction · 0.70
batched_coordinatesFunction · 0.50

Tested by

no test coverage detected