class_docstr: Keras layer that only adds a bias to the input.
  
  `BiasLayer` implements the operation:
  `output = input + bias`
  
  Args:
      bias_initializer: Initializer for the bias vector.
  
  Input shape:
      nD tensor with shape: `(batch_size, ..., input_dim)`. The most common
        situation would be a 2D input with shape `(batch_size, input_dim)`. Note
        a rank of at least 2 is required.
  Output shape:
      nD tensor with shape: `(batch_size, ..., input_dim)`. For instance, for a
        2D input with shape `(batch_size, input_dim)`, the output would have
        shape `(batch_size, input_dim)`.
class_docstr_tok: ["Keras","layer","that","only","adds","a","bias","to","the","input",".","`","BiasLayer","`","implements","the","operation",":","`","output","=","input","+","bias","`","Args",":","bias_initializer",":","Initializer","for","the","bias","vector",".","Input","shape",":","nD","tensor","with","shape",":","`","(","batch_size",",","...",",","input_dim",")","`",".","The","most","common","situation","would","be","a","2D","input","with","shape","`","(","batch_size",",","input_dim",")","`",".","Note","a","rank","of","at","least","2","is","required",".","Output","shape",":","nD","tensor","with","shape",":","`","(","batch_size",",","...",",","input_dim",")","`",".","For","instance",",","for","a","2D","input","with","shape","`","(","batch_size",",","input_dim",")","`",",","the","output","would","have","shape","`","(","batch_size",",","input_dim",")","`","."]
code: def __init__(self, bias_initializer="zeros", **kwargs):
      if "input_shape" not in kwargs and "input_dim" in kwargs:
          kwargs["input_shape"] = (kwargs.pop("input_dim"),)
  
      super(BiasLayer, self).__init__(**kwargs)
      self.bias_initializer = tf.keras.initializers.get(
          bias_initializer
      )
  
      self.supports_masking = True
  
file_path: agents/tf_agents/keras_layers/bias_layer.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow
label_desc: Use image node_id 1 to create a new BiasLayer object from inherited base classes: tf.keras.layers with example: obj = BiasLayer(bias_initializer)