class_docstr: Protein folding specific Linear Module.
  
  This differs from the standard Haiku Linear in a few ways:
      * It supports inputs of arbitrary rank
      * Initializers are specified by strings
  
  This code is adapted from DeepMind's AlphaFold code release
  (https://github.com/deepmind/alphafold).
  
  Examples
  --------
  >>> import deepchem as dc
  >>> import haiku as hk
  >>> import jax
  >>> import deepchem.models.jax_models.layers
  >>> def forward_model(x):
  ...   layer = dc.models.jax_models.layers.Linear(2)
  ...   return layer(x)
  >>> f = hk.transform(forward_model)
  >>> rng = jax.random.PRNGKey(42)
  >>> x = jnp.ones([8, 28 * 28])
  >>> params = f.init(rng, x)
  >>> output = f.apply(params, rng, x)
class_docstr_tok: ["Protein","folding","specific","Linear","Module",".","This","differs","from","the","standard","Haiku","Linear","in","a","few","ways",":","*","It","supports","inputs","of","arbitrary","rank","*","Initializers","are","specified","by","strings","This","code","is","adapted","from","DeepMind","'s","AlphaFold","code","release","(","https",":","\/\/github.com\/deepmind\/alphafold",")",".","Examples","--","--","--","--",">",">",">","import","deepchem","as","dc",">",">",">","import","haiku","as","hk",">",">",">","import","jax",">",">",">","import","deepchem.models.jax_models.layers",">",">",">","def","forward_model","(","x",")",":","...","layer","=","dc.models.jax_models.layers.Linear","(","2",")","...","return","layer","(","x",")",">",">",">","f","=","hk.transform","(","forward_model",")",">",">",">","rng","=","jax.random.PRNGKey","(","42",")",">",">",">","x","=","jnp.ones","(","[","8",",","28","*","28","]",")",">",">",">","params","=","f.init","(","rng",",","x",")",">",">",">","output","=","f.apply","(","params",",","rng",",","x",")"]
docstr: Constructs Linear Module.
  
  Parameters
  ----------
  num_output: int
      number of output channels.
  initializer: str (default 'linear')
      What initializer to use, should be one of {'linear', 'relu', 'zeros'}
  use_bias: bool (default True)
      Whether to include trainable bias
  bias_init: float (default 0)
      Value used to initialize bias.
  name: str (default 'linear')
      name of module, used for name scopes.
docstr_tok: ["Constructs","Linear","Module",".","Parameters","--","--","--","--","--","num_output",":","int","number","of","output","channels",".","initializer",":","str","(","default","'linear","'",")","What","initializer","to","use",",","should","be","one","of","{","'linear","'",",","'relu","'",",","'zeros","'","}","use_bias",":","bool","(","default","True",")","Whether","to","include","trainable","bias","bias_init",":","float","(","default","0",")","Value","used","to","initialize","bias",".","name",":","str","(","default","'linear","'",")","name","of","module",",","used","for","name","scopes","."]
code: def __init__(
      self,
      num_output: int,
      initializer: str = "linear",
      use_bias: bool = True,
      bias_init: float = 0.0,
      name: str = "linear",
  ):
      """Constructs Linear Module.
  
      Parameters
      ----------
      num_output: int
          number of output channels.
      initializer: str (default 'linear')
          What initializer to use, should be one of {'linear', 'relu', 'zeros'}
      use_bias: bool (default True)
          Whether to include trainable bias
      bias_init: float (default 0)
          Value used to initialize bias.
      name: str (default 'linear')
          name of module, used for name scopes.
      """
  
      super().__init__(name=name)
      self.num_output = num_output
      self.initializer = initializer
      self.use_bias = use_bias
      self.bias_init = bias_init
  
imports: import logging
label_desc: Use image node_id 1 to create a new Linear object from inherited base classes: hk with example: obj = Linear(num_output, initializer, use_bias, bias_init, name)