Home | History | Annotate | Download | only in tests

Lines Matching refs:block_shape

29 def space_to_batch_direct(input_array, block_shape, paddings):
36 block_shape: 1-D array of shape [num_block_dims].
43 block_shape = np.array(block_shape)
44 num_block_dims = len(block_shape)
45 paddings = np.array(paddings).reshape((len(block_shape), 2))
52 output_shape = [input_array.shape[0] * np.prod(block_shape)]
53 for block_dim, block_shape_value in enumerate(block_shape):
154 def _testPad(self, inputs, block_shape, paddings, outputs):
155 block_shape = np.array(block_shape)
156 paddings = np.array(paddings).reshape((len(block_shape), 2))
161 x_tf = array_ops.space_to_batch_nd(placeholder, block_shape, paddings)
165 x_tf = array_ops.batch_to_space_nd(placeholder, block_shape, paddings)
168 def _testDirect(self, input_shape, block_shape, paddings):
171 self._testPad(inputs, block_shape, paddings,
172 space_to_batch_direct(inputs, block_shape, paddings))
177 block_shape=[],
184 block_shape=[],
191 block_shape=[1],
198 block_shape=[],
205 block_shape=[1],
212 block_shape=[1, 1],
219 block_shape=[2],
226 block_shape=[2],
234 input_shape=[3, 1, 2, 0], block_shape=[3], paddings=[[0, 2]])
239 input_shape=[3, 0, 2, 5], block_shape=[3], paddings=[[0, 0]])
244 input_shape=[3, 0, 2, 5], block_shape=[3], paddings=[[1, 2]])
249 block_shape=[3, 4, 2],
255 block_shape=[3, 4, 2, 2],
261 block_shape=[1, 1, 3, 4, 2, 2],
267 block_shape=[1, 1, 3, 4, 2, 2, 1],