MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Average

Class Average

tensorflow/python/keras/layers/merge.py:308–320  ·  view source on GitHub ↗

Layer that averages a list of inputs. It takes as input a list of tensors, all of the same shape, and returns a single tensor (also of the same shape).

Source from the content-addressed store, hash-verified

306
307@keras_export('keras.layers.Average')
308class Average(_Merge):
309 """Layer that averages a list of inputs.
310
311 It takes as input a list of tensors,
312 all of the same shape, and returns
313 a single tensor (also of the same shape).
314 """
315
316 def _merge_function(self, inputs):
317 output = inputs[0]
318 for i in range(1, len(inputs)):
319 output += inputs[i]
320 return output / len(inputs)
321
322
323@keras_export('keras.layers.Maximum')

Callers 3

averageFunction · 0.85
ToStringMethod · 0.85
ToStringMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected