docstr: Example taken from Figure 5 of https://link.medium.com/suSvMCsDv1 .
docstr_tok: ["Example","taken","from","Figure","5","of","https",":","\/\/link.medium.com\/suSvMCsDv1","."]
code: def test_computation_padding_valid(self, with_bias):
      """Example taken from Figure 5 of https://link.medium.com/suSvMCsDv1 ."""
  
      def f():
          data = np.ones([1, 4, 4, 1])
          net = conv.Conv2DTranspose(
              output_channels=1,
              kernel_shape=3,
              padding="VALID",
              with_bias=with_bias,
              **create_constant_initializers(1.0, 1.0, with_bias),
          )
          return net(data)
  
      init_fn, apply_fn = transform.transform(f)
      out = apply_fn(init_fn(random.PRNGKey(428)), None)
      expected_out = np.array(
          [
              [1, 2, 3, 3, 2, 1],
              [2, 4, 6, 6, 4, 2],
              [3, 6, 9, 9, 6, 3],
              [3, 6, 9, 9, 6, 3],
              [2, 4, 6, 6, 4, 2],
              [1, 2, 3, 3, 2, 1],
          ]
      )
      if with_bias:
          expected_out += 1
      expected_out = np.expand_dims(np.atleast_3d(expected_out), axis=0)
      np.testing.assert_allclose(out, expected_out, rtol=1e-5)
  
imports: from absl.testing import absltest
  from absl.testing import parameterized
  from haiku._src import conv
  from haiku._src import initializers
  from haiku._src import test_utils
  from haiku._src import transform
  import jax
  from jax import random
  import jax.numpy
  import numpy
label_desc: Use image node_id 2 for calling the Conv2TransposeTest obj's underlying member method code with example usage: obj.test_computation_padding_valid(with_bias) and returns: net