docstr: Create internal variables for the layer.
  
  Parameters
  ----------
  var_shape
      Tuple representing the shape of the desired array. If considering
       the array as a rectangular matrix, this tuple is represented as
       '(ROWS, COLUMNS)'.
  device
      Device on which to create the layer's variables 'cuda:0', 'cuda:1', 'cpu'
      etc. Default is cpu.
  fan_out
      The number of nodes in the next layer.
  fan_in
      The number of nodes in the previous layer.
  dtype
      Desired data type.
docstr_tok: ["Create","internal","variables","for","the","layer",".","Parameters","--","--","--","--","--","var_shape","Tuple","representing","the","shape","of","the","desired","array",".","If","considering","the","array","as","a","rectangular","matrix",",","this","tuple","is","represented","as","'","(","ROWS",",","COLUMNS",")","'",".","device","Device","on","which","to","create","the","layer","'s","variables","'cuda:0","'",",","'cuda:1","'",",","'cpu'","etc",".","Default","is","cpu",".","fan_out","The","number","of","nodes","in","the","next","layer",".","fan_in","The","number","of","nodes","in","the","previous","layer",".","dtype","Desired","data","type","."]
code: def create_variables(
      self, var_shape, device, fan_out=None, fan_in=None, dtype=None
  ):
      """Create internal variables for the layer.
  
      Parameters
      ----------
      var_shape
          Tuple representing the shape of the desired array. If considering
           the array as a rectangular matrix, this tuple is represented as
           '(ROWS, COLUMNS)'.
      device
          Device on which to create the layer's variables 'cuda:0', 'cuda:1', 'cpu'
          etc. Default is cpu.
      fan_out
          The number of nodes in the next layer.
      fan_in
          The number of nodes in the previous layer.
      dtype
          Desired data type.
      """
      if self._fan_mode == "fan_in":
          ivy.utils.assertions.check_exists(
              fan_in,
              message="input_channels must be specified for fan_in denominator mode",
          )
          fan = fan_in
      elif self._fan_mode == "fan_out":
          ivy.utils.assertions.check_exists(
              fan_out,
              message=(
                  "output_channels must be specified for fan_out denominator mode"
              ),
          )
          fan = fan_out
      elif self._fan_mode == "fan_sum":
          ivy.utils.assertions.check_all_or_any_fn(
              fan_in,
              fan_out,
              fn=ivy.exists,
              type="all",
              message=(
                  "input_channels and output_channels must both be"
                  " specified for fan_sum denominator mode."
              ),
              as_array=False,
          )
          fan = fan_in + fan_out
      elif self._fan_mode == "fan_avg":
          ivy.utils.assertions.check_all_or_any_fn(
              fan_in,
              fan_out,
              fn=ivy.exists,
              type="all",
              message=(
                  "input_channels and output_channels must both be"
                  " specified for fan_avg denominator mode."
              ),
              as_array=False,
          )
          fan = (fan_in + fan_out) / 2
      else:
          raise ivy.utils.exceptions.IvyException(
              "Invalid denominator mode, must be one of [ fan_in | fan_out | "
              "fan_sum | fan_avg ] "
          )
      wlim = ((self._numerator / fan) ** self._power) * self._gain
      return _variable(
          ivy.random_uniform(
              low=-wlim,
              high=wlim,
              shape=var_shape,
              device=device,
              dtype=dtype,
          ),
      )
  
imports: from typing import Tuple, Union, Optional
  import abc
  import ivy
  from ivy.functional.ivy.gradients import _variable
label_desc: Use image node_id 2 for calling the Uniform obj's underlying member method code with example usage: obj.create_variables(var_shape, device, fan_out, fan_in, dtype) and returns: _variable