MCPcopy Create free account
hub / github.com/waleedka/hiddenlayer / test_graph

Method test_graph

tests/test_pytorch_graph.py:18–28  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

16
17class TestPytorchGraph(unittest.TestCase):
18 def test_graph(self):
19 model = torchvision.models.vgg16()
20 g = hl.build_graph(model, torch.zeros([1, 3, 224, 224]))
21 g.save(os.path.join(OUTPUT_DIR, "pytorch_vgg16.pdf"))
22
23 model = torchvision.models.resnet50()
24 g = hl.build_graph(model, torch.zeros([1, 3, 224, 224]))
25 g.save(os.path.join(OUTPUT_DIR, "pytorch_resnet50.pdf"))
26
27 # Clean up
28 shutil.rmtree(OUTPUT_DIR)
29
30
31 def test_resnet_blocks(self):

Callers

nothing calls this directly

Calls 1

saveMethod · 0.45

Tested by

no test coverage detected