docstr: Apply the hardswish activation function element-wise.
  
  Parameters
  ----------
  x
      input array
  complex_mode
      optional specifier for how to handle complex data types. See
      ``ivy.func_wrapper.handle_complex_input`` for more detail.
  out
      optional output array, for writing the result to. It must have
      a shape that the inputs broadcast to.
  
  Returns
  -------
  ret
      an array containing the hardswish activation of each element in ``x``.
  
  Examples
  --------
  With :class:`ivy.Array` input:
  
  >>> x = ivy.array([0., 0., 4.])
  >>> y = ivy.hardswish(x)
  >>> y
  ivy.array([0., 0., 4.])
  
  With :class:`ivy.Container` input:
  
  >>> x = ivy.Container(a=ivy.array([-3., 4., 5.]), b=ivy.array([0., 5.]))
  >>> x = ivy.hardswish(x, out=x)
  >>> x
  {
      a: ivy.array([-0.,  4.,  5.]),
      b: ivy.array([0., 5.])
  }
docstr_tok: ["Apply","the","hardswish","activation","function","element-wise",".","Parameters","--","--","--","--","--","x","input","array","complex_mode","optional","specifier","for","how","to","handle","complex","data","types",".","See","``","ivy.func_wrapper.handle_complex_input","``","for","more","detail",".","out","optional","output","array",",","for","writing","the","result","to",".","It","must","have","a","shape","that","the","inputs","broadcast","to",".","Returns","--","--","--","-","ret","an","array","containing","the","hardswish","activation","of","each","element","in","``","x","``",".","Examples","--","--","--","--","With",":","class",":","`","ivy.Array","`","input",":",">",">",">","x","=","ivy.array","(","[","0.",",","0.",",","4",".","]",")",">",">",">","y","=","ivy.hardswish","(","x",")",">",">",">","y","ivy.array","(","[","0.",",","0.",",","4",".","]",")","With",":","class",":","`","ivy.Container","`","input",":",">",">",">","x","=","ivy.Container","(","a=ivy.array","(","[","-3.",",","4.",",","5",".","]",")",",","b=ivy.array","(","[","0.",",","5",".","]",")",")",">",">",">","x","=","ivy.hardswish","(","x",",","out=x",")",">",">",">","x","{","a",":","ivy.array","(","[","-0.",",","4.",",","5",".","]",")",",","b",":","ivy.array","(","[","0.",",","5",".","]",")","}"]
code: def hardswish(
      self: ivy.Array,
      /,
      *,
      complex_mode: Literal["split", "magnitude", "jax"] = "jax",
      out: Optional[ivy.Array] = None,
  ) -> ivy.Array:
      """Apply the hardswish activation function element-wise.
  
      Parameters
      ----------
      x
          input array
      complex_mode
          optional specifier for how to handle complex data types. See
          ``ivy.func_wrapper.handle_complex_input`` for more detail.
      out
          optional output array, for writing the result to. It must have
          a shape that the inputs broadcast to.
  
      Returns
      -------
      ret
          an array containing the hardswish activation of each element in ``x``.
  
      Examples
      --------
      With :class:`ivy.Array` input:
  
      >>> x = ivy.array([0., 0., 4.])
      >>> y = ivy.hardswish(x)
      >>> y
      ivy.array([0., 0., 4.])
  
      With :class:`ivy.Container` input:
  
      >>> x = ivy.Container(a=ivy.array([-3., 4., 5.]), b=ivy.array([0., 5.]))
      >>> x = ivy.hardswish(x, out=x)
      >>> x
      {
          a: ivy.array([-0.,  4.,  5.]),
          b: ivy.array([0., 5.])
      }
      """
      return ivy.hardswish(
          self._data, complex_mode=complex_mode, out=out
      )
  
file_path: ivy/ivy/data_classes/array/activations.py
imports: import abc
  from typing import Optional, Union, Literal
  import ivy
label_desc: Use image node_id 9 for calling the _ArrayWithActivations obj's underlying member method code with example usage: obj.hardswish() and returns: ivy