Construct and build the Caffe version of LeNet.
(self)
| 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.""" |
nothing calls this directly
no test coverage detected