'Tests a residual combiner whose shape doesn\'t change
with depth'

def _test_constant_shape(self, combiner):

    inputs = np.random.randn(1, 2)
    with tf.variable_scope(u'same_input_size'):
        res_ = self._test_with_residuals(inputs, residual_combiner=combiner)
        self.assertEqual(res_[0].shape, (1, 2))
        self.assertEqual(res_[1][0].shape, (1, 2))
        self.assertEqual(res_[1][1].shape, (1, 2))
    inputs = np.random.randn(1, 5)
    with tf.variable_scope(u'diff_input_size'):
        res_ = self._test_with_residuals(inputs, residual_combiner=combiner)
        self.assertEqual(res_[0].shape, (1, 2))
        self.assertEqual(res_[1][0].shape, (1, 2))
        self.assertEqual(res_[1][1].shape, (1, 2))
    with tf.variable_scope(u'same_input_size_dense'):
        res_ = self._test_with_residuals(inputs, residual_combiner=combiner, residual_dense=True)
        self.assertEqual(res_[0].shape, (1, 2))
        self.assertEqual(res_[1][0].shape, (1, 2))
        self.assertEqual(res_[1][1].shape, (1, 2))
    inputs = np.random.randn(1, 5)
    with tf.variable_scope(u'diff_input_size_dense'):
        res_ = self._test_with_residuals(inputs, residual_combiner=combiner, residual_dense=True)
        self.assertEqual(res_[0].shape, (1, 2))
        self.assertEqual(res_[1][0].shape, (1, 2))
        self.assertEqual(res_[1][1].shape, (1, 2))
