class_docstr: Clip the values in the input ``x`` to ``[alpha, beta]``, element-wise.
  Any values less than ``alpha`` are set to ``alpha``, and any values greater
  than ``beta`` are set to ``beta``.
  
  The major difference between this version and the iOS 15 :py:class:`~.iOS15.elementwise_unary.clip`
  is that it uses strict validation to ensure that ``alpha < beta``.
  
  Parameters
  ----------
  x: tensor<[\*d], T> (Required)
  alpha: const T (Required)
  beta: const T (Required)
  
  Returns
  -------
  tensor<[\*d], T>
      * A tensor of the same shape as ``x``.
  
  Attributes
  ----------
  T: fp16, fp32
class_docstr_tok: ["Clip","the","values","in","the","input","``","x","``","to","``","[","alpha",",","beta","]","``",",","element-wise",".","Any","values","less","than","``","alpha","``","are","set","to","``","alpha","``",",","and","any","values","greater","than","``","beta","``","are","set","to","``","beta","``",".","The","major","difference","between","this","version","and","the","iOS","15",":","py",":","class",":","`","~.iOS15.elementwise_unary.clip","`","is","that","it","uses","strict","validation","to","ensure","that","``","alpha","<","beta","``",".","Parameters","--","--","--","--","--","x",":","tensor","<","[","\\","*","d","]",",","T",">","(","Required",")","alpha",":","const","T","(","Required",")","beta",":","const","T","(","Required",")","Returns","--","--","--","-","tensor","<","[","\\","*","d","]",",","T",">","*","A","tensor","of","the","same","shape","as","``","x","``",".","Attributes","--","--","--","--","--","T",":","fp16",",","fp32"]
code: def type_inference(self):
      if self.alpha.val >= self.beta.val:
          raise ValueError(
              f"The `alpha` value ({self.alpha.val}) should be smaller than `beta` value "
              f"({self.beta.val}) in `clip` op."
          )
      return self.x.sym_type
  
file_path: coremltools/coremltools/converters/mil/mil/ops/defs/iOS17/elementwise_unary.py
imports: from coremltools.converters.mil.mil import types
  from coremltools.converters.mil.mil.input_type import InputSpec, TensorInputType
  from coremltools.converters.mil.mil.ops.defs._op_reqs import register_op
  from coremltools.converters.mil.mil.ops.defs.iOS15.elementwise_unary import cast
  from coremltools.converters.mil.mil.ops.defs.iOS15.elementwise_unary import clip
  from coremltools.converters.mil.mil.ops.defs.iOS15.elementwise_unary import inverse
  from coremltools.converters.mil.mil.ops.defs.iOS15.elementwise_unary import log
  from coremltools.converters.mil.mil.ops.defs.iOS15.elementwise_unary import rsqrt
  from coremltools.converters.mil.mil.ops.defs.iOS17 import _IOS17_TARGET
label_desc: Use image node_id 1 for calling the clip obj's underlying member method code with example usage: obj.type_inference() and returns: self