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

Method test_pass

python/caffe/test/test_coord_map.py:55–69  ·  view source on GitHub ↗

A pass-through layer (ReLU) and conv (1x1, stride 1, pad 0) both do identity mapping.

(self)

Source from the content-addressed store, hash-verified

53 self.assertEquals(b, -1)
54
55 def test_pass(self):
56 """
57 A pass-through layer (ReLU) and conv (1x1, stride 1, pad 0)
58 both do identity mapping.
59 """
60 n = coord_net_spec()
61 ax, a, b = coord_map_from_to(n.deconv, n.data)
62 n.relu = L.ReLU(n.deconv)
63 n.conv1x1 = L.Convolution(
64 n.relu, num_output=10, kernel_size=1, stride=1, pad=0)
65 for top in [n.relu, n.conv1x1]:
66 ax_pass, a_pass, b_pass = coord_map_from_to(top, n.data)
67 self.assertEquals(ax, ax_pass)
68 self.assertEquals(a, a_pass)
69 self.assertEquals(b, b_pass)
70
71 def test_padding(self):
72 """

Callers

nothing calls this directly

Calls 2

coord_map_from_toFunction · 0.90
coord_net_specFunction · 0.85

Tested by

no test coverage detected