class_docstr: Input graph:
  input -----> transpose(axis=[1,0]) -----> transpose(axis=[1,0]) ---> out
  
  Output graph:
  input -----> identity -----> out
class_docstr_tok: ["Input","graph",":","input","--","--","-",">","transpose","(","axis=","[","1,0","]",")","--","--","-",">","transpose","(","axis=","[","1,0","]",")","--","-",">","out","Output","graph",":","input","--","--","-",">","identity","--","--","-",">","out"]
docstr: Input graph:
                                                          input (shape=(3,4))
                                                               |
  input (shape=(5,3,4,2)) --> transpose (shape=(5,2,3,4)) --> add --> transpose --> relu
  
  Output graph: same as input graph since transpose compliment for 2nd input of add cannot be represented
  as a static reshape
docstr_tok: ["Input","graph",":","input","(","shape=","(","3,4",")",")","|","input","(","shape=","(","5,3,4,2",")",")","--",">","transpose","(","shape=","(","5,2,3,4",")",")","--",">","add","--",">","transpose","--",">","relu","Output","graph",":","same","as","input","graph","since","transpose","compliment","for","2nd","input","of","add","can","not","be","represented","as","a","static","reshape"]
code: def test_binary_op_with_non_constant_input5(self):
      """
      Input graph:
                                                              input (shape=(3,4))
                                                                   |
      input (shape=(5,3,4,2)) --> transpose (shape=(5,2,3,4)) --> add --> transpose --> relu
  
      Output graph: same as input graph since transpose compliment for 2nd input of add cannot be represented
      as a static reshape
      """
  
      @mb.program(
          input_specs=[
              mb.TensorSpec(shape=(5, 3, 4, 2)),
              mb.TensorSpec(shape=(3, 4)),
          ]
      )
      def prog(x, y):
          x = mb.transpose(x=x, perm=[0, 3, 1, 2])
          x = mb.add(x=x, y=y)
          x = mb.transpose(x=x, perm=[0, 2, 3, 1])
          x = mb.relu(x=x)
          return x
  
      prev_prog, prev_block, block = apply_pass_and_basic_check(
          prog, "common::reduce_transposes"
      )
      self.assertEqual(
          get_op_types_in_program(prev_prog),
          ["transpose", "add", "transpose", "relu"],
      )
      self.assertEqual(
          get_op_types_in_program(prog),
          ["transpose", "add", "transpose", "relu"],
      )
      assert_model_is_valid(
          prog,
          {"x": (5, 3, 4, 2), "y": (3, 4)},
          expected_output_shapes={block.outputs[0].name: (5, 3, 4, 2)},
      )
  
imports: import unittest
  import numpy
  import pytest
  from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil import get_new_symbol
  from coremltools.converters.mil.mil.passes.defs.optimize_repeat_ops import TransformAxisUpdateOps
  from coremltools.converters.mil.mil.passes.pass_registry import PASS_REGISTRY
  from coremltools.converters.mil.testing_utils import apply_pass_and_basic_check, assert_model_is_valid, get_op_types_in_program
label_desc: Use image node_id 44 for calling the TransposeOptimizationPass obj's underlying member method code with example usage: obj.test_binary_op_with_non_constant_input5() and returns: x