code: def test_bcstg_2d_input(self) -> None:
      dim = 3 * 2
      bcstg = BinaryConcreteStochasticGates(dim).to(self.testing_device)
  
      # shape(2,3,2)
      input_tensor = torch.tensor(
          [
              [
                  [0.0, 0.1],
                  [0.2, 0.3],
                  [0.4, 0.5],
              ],
              [
                  [0.6, 0.7],
                  [0.8, 0.9],
                  [1.0, 1.1],
              ],
          ]
      ).to(self.testing_device)
  
      gated_input, reg = bcstg(input_tensor)
  
      expected_reg = 4.9903
      if self.testing_device == "cpu":
          expected_gated_input = [
              [[0.0000, 0.0990], [0.0261, 0.2431], [0.0551, 0.3863]],
              [[0.0476, 0.6177], [0.5400, 0.1530], [0.0984, 0.8013]],
          ]
      elif self.testing_device == "cuda":
          expected_gated_input = [
              [[0.0000, 0.0985], [0.1149, 0.2331], [0.0486, 0.5000]],
              [[0.1840, 0.1571], [0.4612, 0.7937], [0.2975, 0.7393]],
          ]
  
      assertTensorAlmostEqual(
          self, gated_input, expected_gated_input, mode="max"
      )
      assertTensorAlmostEqual(self, reg, expected_reg)
  
imports: import unittest
  import torch
  from captum.module.binary_concrete_stochastic_gates import BinaryConcreteStochasticGates
  from parameterized import parameterized_class
  from tests.helpers.basic import assertTensorAlmostEqual, BaseTest
label_desc: Use image node_id 8 for calling the TestBinaryConcreteStochasticGates obj's underlying member method code with example usage: obj.test_bcstg_2d_input() without return types