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 build(self, input_shape):
      self.input_spec = [InputSpec(ndim=3)]
      assert len(input_shape) == 3
  
      self.W = self.add_weight(
          shape=(input_shape[2], 1),
          name="{}_W".format(self.name),
          trainable=True,
          initializer=self.init,
      )
      super(AttentionWeightedAverage, self).build(input_shape)
  
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 2 for calling the AttentionWeightedAverage obj's underlying member method code with example usage: obj.build(input_shape) without return types