docstr: ivy.Array instance method variant of ivy. smooth_l1_loss. This
  method simply wraps the function, and so the docstring for
  ivy.smooth_l1_loss also applies to this method with minimal changes.
  
  Parameters
  ----------
  self
      input array containing true labels.
  target
      input array containing targeted labels.
  beta
      A float specifying the beta value for
      the smooth L1 loss. Default: 1.0.
  reduction
      Reduction method for the loss.
      Options are 'none', 'mean', or 'sum'.
      Default: 'mean'.
  out
      Optional output array, for writing the result to.
      It must have a shape
      that the inputs broadcast to.
  
  Returns
  -------
  ret
      The smooth L1 loss between the given labels.
  
  Examples
  --------
  >>> x = ivy.array([1, 2, 3, 4])
  >>> y = ivy.array([2, 2, 2, 2])
  >>> z = x.smooth_l1_loss(y, beta=0.5)
  >>> print(z)
  ivy.array(0.8125)
docstr_tok: ["ivy.Array","instance","method","variant","of","ivy",".","smooth_l1_loss",".","This","method","simply","wraps","the","function",",","and","so","the","docstring","for","ivy.smooth_l1_loss","also","applies","to","this","method","with","minimal","changes",".","Parameters","--","--","--","--","--","self","input","array","containing","true","labels",".","target","input","array","containing","targeted","labels",".","beta","A","float","specifying","the","beta","value","for","the","smooth","L1","loss",".","Default",":","1.0.","reduction","Reduction","method","for","the","loss",".","Options","are","'none","'",",","'mean","'",",","or","'sum","'",".","Default",":","'mean","'",".","out","Optional","output","array",",","for","writing","the","result","to",".","It","must","have","a","shape","that","the","inputs","broadcast","to",".","Returns","--","--","--","-","ret","The","smooth","L1","loss","between","the","given","labels",".","Examples","--","--","--","--",">",">",">","x","=","ivy.array","(","[","1",",","2",",","3",",","4","]",")",">",">",">","y","=","ivy.array","(","[","2",",","2",",","2",",","2","]",")",">",">",">","z","=","x.smooth_l1_loss","(","y",",","beta=0.5",")",">",">",">","print","(","z",")","ivy.array","(","0.8125",")"]
code: def smooth_l1_loss(
      self: ivy.Array,
      target: Union[ivy.Array, ivy.NativeArray],
      /,
      *,
      beta: Optional[float] = 1.0,
      reduction: Optional[str] = "mean",
      out: Optional[ivy.Array] = None,
  ) -> ivy.Array:
      """ivy.Array instance method variant of ivy. smooth_l1_loss. This
      method simply wraps the function, and so the docstring for
      ivy.smooth_l1_loss also applies to this method with minimal changes.
  
      Parameters
      ----------
      self
          input array containing true labels.
      target
          input array containing targeted labels.
      beta
          A float specifying the beta value for
          the smooth L1 loss. Default: 1.0.
      reduction
          Reduction method for the loss.
          Options are 'none', 'mean', or 'sum'.
          Default: 'mean'.
      out
          Optional output array, for writing the result to.
          It must have a shape
          that the inputs broadcast to.
  
      Returns
      -------
      ret
          The smooth L1 loss between the given labels.
  
      Examples
      --------
      >>> x = ivy.array([1, 2, 3, 4])
      >>> y = ivy.array([2, 2, 2, 2])
      >>> z = x.smooth_l1_loss(y, beta=0.5)
      >>> print(z)
      ivy.array(0.8125)
      """
      return ivy.smooth_l1_loss(
          self._data, target, beta=beta, reduction=reduction, out=out
      )
  
file_path: ivy/ivy/data_classes/array/experimental/losses.py
imports: import abc
  from typing import Optional, Union
  import ivy
label_desc: Use image node_id 4 for calling the _ArrayWithLossesExperimental obj's underlying member method code with example usage: obj.smooth_l1_loss() and returns: ivy