class_docstr: Computes a weighted average of the different channels across timesteps.
  Uses 1 parameter pr. channel to compute the attention value for
  a single timestep.
class_docstr_tok: ["Computes","a","weighted","average","of","the","different","channels","across","timesteps",".","Uses","1","parameter","pr",".","channel","to","compute","the","attention","value","for","a","single","timestep","."]
code: def __init__(self, return_attention=False, **kwargs):
      self.init = initializers.get("uniform")
      self.supports_masking = True
      self.return_attention = return_attention
      super(AttentionWeightedAverage, self).__init__(**kwargs)
  
file_path: textgenrnn/textgenrnn/AttentionWeightedAverage.py
imports: from tensorflow.keras.layers import Layer, InputSpec
  from tensorflow.keras import backend
  from tensorflow.keras import initializers
label_desc: Use image node_id 1 to create a new AttentionWeightedAverage object from inherited base classes: Layer with example: obj = AttentionWeightedAverage(return_attention)