MCPcopy Create free account
hub / github.com/PeizeSun/SparseR-CNN / test_flop

Method test_flop

tests/test_model_analysis.py:29–33  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

27 self.model = get_model_zoo("COCO-Detection/retinanet_R_50_FPN_1x.yaml")
28
29 def test_flop(self):
30 # RetinaNet supports flop-counting with random inputs
31 inputs = [{"image": torch.rand(3, 800, 800)}]
32 res = flop_count_operators(self.model, inputs)
33 self.assertTrue(int(res["conv"]), 146) # 146B flops
34
35 def test_param_count(self):
36 res = parameter_count(self.model)

Callers

nothing calls this directly

Calls 1

flop_count_operatorsFunction · 0.90

Tested by

no test coverage detected