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 compute_output_shape(self, input_shape):
      output_len = input_shape[2]
      if self.return_attention:
          return [
              (input_shape[0], output_len),
              (input_shape[0], input_shape[1]),
          ]
      return (input_shape[0], output_len)
  
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 5 for calling the AttentionWeightedAverage obj's underlying member method code with example usage: obj.compute_output_shape(input_shape) and returns: input_shape,  output_len, list