MCPcopy Create free account
hub / github.com/BVLC/caffe / test_lenet

Method test_lenet

python/caffe/test/test_net_spec.py:58–74  ·  view source on GitHub ↗

Construct and build the Caffe version of LeNet.

(self)

Source from the content-addressed store, hash-verified

56 return caffe.Net(f.name, caffe.TEST)
57
58 def test_lenet(self):
59 """Construct and build the Caffe version of LeNet."""
60
61 net_proto = lenet(50)
62 # check that relu is in-place
63 self.assertEqual(net_proto.layer[6].bottom,
64 net_proto.layer[6].top)
65 net = self.load_net(net_proto)
66 # check that all layers are present
67 self.assertEqual(len(net.layers), 9)
68
69 # now the check the version with automatically-generated layer names
70 net_proto = anon_lenet(50)
71 self.assertEqual(net_proto.layer[6].bottom,
72 net_proto.layer[6].top)
73 net = self.load_net(net_proto)
74 self.assertEqual(len(net.layers), 9)
75
76 def test_zero_tops(self):
77 """Test net construction for top-less layers."""

Callers

nothing calls this directly

Calls 3

load_netMethod · 0.95
lenetFunction · 0.85
anon_lenetFunction · 0.85

Tested by

no test coverage detected