()
return base.Fn('WeightedSum', f)
Returns a layer that computes a weighted sum of the given values.
Returns a layer that computes a weighted sum of the given values.
Returns a layer that computes a weighted sum of the given values .
def WeightedSum():
  """Returns a layer that computes a weighted sum of the given values."""
  def f(values, weights):  # pylint: disable=invalid-name
    return jnp.sum(values * weights)
  return base.Fn('WeightedSum', f)
def WeightedSum ( ) : def f ( values , weights ) : # pylint: disable=invalid-name return jnp . sum ( values * weights ) return base . Fn ( 'WeightedSum' , f )