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

Function prod

tensorflow/python/keras/backend.py:1901–1915  ·  view source on GitHub ↗

Multiplies the values in a tensor, alongside the specified axis. Arguments: x: A tensor or variable. axis: An integer, the axis to compute the product. keepdims: A boolean, whether to keep the dimensions or not. If `keepdims` is `False`, the rank of the tensor is reduc

(x, axis=None, keepdims=False)

Source from the content-addressed store, hash-verified

1899
1900@keras_export('keras.backend.prod')
1901def prod(x, axis=None, keepdims=False):
1902 """Multiplies the values in a tensor, alongside the specified axis.
1903
1904 Arguments:
1905 x: A tensor or variable.
1906 axis: An integer, the axis to compute the product.
1907 keepdims: A boolean, whether to keep the dimensions or not.
1908 If `keepdims` is `False`, the rank of the tensor is reduced
1909 by 1. If `keepdims` is `True`,
1910 the reduced dimension is retained with length 1.
1911
1912 Returns:
1913 A tensor with the product of elements of `x`.
1914 """
1915 return math_ops.reduce_prod(x, axis, keepdims)
1916
1917
1918@keras_export('keras.backend.cumsum')

Callers 1

batch_flattenFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected