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

Method test_rect

python/caffe/test/test_coord_map.py:109–123  ·  view source on GitHub ↗

Anisotropic mapping is equivalent to its isotropic parts.

(self)

Source from the content-addressed store, hash-verified

107 self.assertEquals(b1, b2)
108
109 def test_rect(self):
110 """
111 Anisotropic mapping is equivalent to its isotropic parts.
112 """
113 n3x3 = coord_net_spec(ks=3, stride=1, pad=0)
114 n5x5 = coord_net_spec(ks=5, stride=2, pad=10)
115 n3x5 = coord_net_spec(ks=[3, 5], stride=[1, 2], pad=[0, 10])
116 ax_3x3, a_3x3, b_3x3 = coord_map_from_to(n3x3.deconv, n3x3.data)
117 ax_5x5, a_5x5, b_5x5 = coord_map_from_to(n5x5.deconv, n5x5.data)
118 ax_3x5, a_3x5, b_3x5 = coord_map_from_to(n3x5.deconv, n3x5.data)
119 self.assertTrue(ax_3x3 == ax_5x5 == ax_3x5)
120 self.assertEquals(a_3x3, a_3x5[0])
121 self.assertEquals(b_3x3, b_3x5[0])
122 self.assertEquals(a_5x5, a_3x5[1])
123 self.assertEquals(b_5x5, b_3x5[1])
124
125 def test_nd_conv(self):
126 """

Callers

nothing calls this directly

Calls 2

coord_map_from_toFunction · 0.90
coord_net_specFunction · 0.85

Tested by

no test coverage detected