code: def test_invalid_inputs(self):
      gradients = constant_op.constant(
          value=[[1.0], [2.0], [4.0]], dtype=dtypes.float32
      )
      inputs = constant_op.constant(
          value=[[1.0], [2.0], [4.0]], dtype=dtypes.float32
      )
  
      with self.assertRaisesRegex(
          (ValueError, errors.InvalidArgumentError),
          "Shapes must be equal rank|must be rank 1",
      ):
          self.evaluate(
              array_ops.fake_quant_with_min_max_vars_per_channel_gradient(
                  gradients=gradients,
                  inputs=inputs,
                  min=[[0.0]],
                  max=[1.0],
              )
          )
  
      with self.assertRaisesRegex(
          (ValueError, errors.InvalidArgumentError),
          "Dimension 0 in both shapes must be equal|incorrect size",
      ):
          self.evaluate(
              array_ops.fake_quant_with_min_max_vars_per_channel_gradient(
                  gradients=gradients,
                  inputs=inputs,
                  min=[0.0, 0.1],
                  max=[1.0],
              )
          )
  
      with self.assertRaisesRegex(
          (ValueError, errors.InvalidArgumentError),
          "Shapes must be equal rank|must be rank 1",
      ):
          self.evaluate(
              array_ops.fake_quant_with_min_max_vars_per_channel_gradient(
                  gradients=gradients,
                  inputs=inputs,
                  min=[1.0],
                  max=[[1.0]],
              )
          )
  
      with self.assertRaisesRegex(
          (ValueError, errors.InvalidArgumentError),
          "Dimension 0 in both shapes must be equal|incorrect size",
      ):
          self.evaluate(
              array_ops.fake_quant_with_min_max_vars_per_channel_gradient(
                  gradients=gradients,
                  inputs=inputs,
                  min=[0.0],
                  max=[1.0, 1.1],
              )
          )
  
imports: import numpy
  from tensorflow.python.eager import context
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import nn_ops
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 1 for calling the FakeQuantWithMinMaxVarsPerChannelGradientOpTest obj's underlying member method code with example usage: obj.test_invalid_inputs() without return types