class_docstr: Starting from IOS17 the alpha/beta can have different dtypes from the input/output, so this
  test class is mainly to verify the behaviour of those alpha/beta related activations.
class_docstr_tok: ["Starting","from","IOS17","the","alpha\/beta","can","have","different","dtypes","from","the","input\/output",",","so","this","test","class","is","mainly","to","verify","the","behaviour","of","those","alpha\/beta","related","activations","."]
code: def test_builder_eval_alpha(self, backend, different_dtype, op_name):
      x = np.array([[[-1, 2, -3], [4, -5, 6]]], dtype=np.float32)
      alpha = np.float16(2.0) if different_dtype else np.float32(2.0)
      if op_name == "prelu":
          alpha = np.array(
              [2.0, 2.0], dtype=alpha.dtype
          )  # prelu requires alpha to be rank 1.
  
      def prog():
          return getattr(mb, op_name)(x=x, alpha=alpha)
  
      mb.program(input_specs=[], opset_version=backend.opset_version)(
          prog
      )
  
file_path: coremltools/coremltools/converters/mil/mil/ops/tests/iOS17/test_activation.py
imports: import itertools
  import numpy
  import pytest
  from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil import types
  from coremltools.converters.mil.mil.ops.tests.iOS17 import backends
  from coremltools.converters.mil.mil.ops.tests.testing_utils import run_compare_builder
  from coremltools.converters.mil.testing_reqs import compute_units
label_desc: Use image node_id 1 for calling the TestInputWeightDifferentDtypes obj's underlying member method code with example usage: obj.test_builder_eval_alpha(backend, different_dtype, op_name) and returns: getattr