docstr: Test 2d transposed convolution with circular padding on a 2x2 example with bias.
docstr_tok: ["Test","2d","transposed","convolution","with","circular","padding","on","a","2x2","example","with","bias","."]
code: def test_circular_conv_transpose_2d_custom_bias(self):
      """Test 2d transposed convolution with circular padding on a 2x2 example with bias."""
      rng = dict(params=random.key(0))
      x = np.array(((1, 2), (3, 4)))
      x = np.expand_dims(x, (0, 3))
      kernel = np.array(
          (
              (1, 2),
              (3, 4),
          )
      )
      kernel = np.expand_dims(kernel, (2, 3))
  
      conv_module = nn.ConvTranspose(
          features=1,
          kernel_size=(2, 2),
          padding="CIRCULAR",
          kernel_init=lambda *_: kernel,
          bias_init=initializers.ones,
      )
      y, initial_params = conv_module.init_with_output(rng, x)
  
      self.assertEqual(
          initial_params["params"]["kernel"].shape, (2, 2, 1, 1)
      )
      # Compare with manually computed convolution
      correct_ans = np.array(
          (
              (21, 23),
              (29, 31),
          )
      )
      correct_ans = np.expand_dims(correct_ans, (0, 3))
      np.testing.assert_allclose(y, correct_ans)
  
imports: import functools
  import jax
  import jax.numpy
  import numpy
  from absl.testing import absltest, parameterized
  from jax import random
  from jax.nn import initializers
  from flax import linen
label_desc: Use image node_id 38 for calling the LinearTest obj's underlying member method code with example usage: obj.test_circular_conv_transpose_2d_custom_bias() without return types