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

Function sum

tensorflow/python/keras/backend.py:1883–1897  ·  view source on GitHub ↗

Sum of the values in a tensor, alongside the specified axis. Arguments: x: A tensor or variable. axis: An integer, the axis to sum over. keepdims: A boolean, whether to keep the dimensions or not. If `keepdims` is `False`, the rank of the tensor is reduced by

(x, axis=None, keepdims=False)

Source from the content-addressed store, hash-verified

1881
1882@keras_export('keras.backend.sum')
1883def sum(x, axis=None, keepdims=False):
1884 """Sum of the values in a tensor, alongside the specified axis.
1885
1886 Arguments:
1887 x: A tensor or variable.
1888 axis: An integer, the axis to sum over.
1889 keepdims: A boolean, whether to keep the dimensions or not.
1890 If `keepdims` is `False`, the rank of the tensor is reduced
1891 by 1. If `keepdims` is `True`,
1892 the reduced dimension is retained with length 1.
1893
1894 Returns:
1895 A tensor with sum of `x`.
1896 """
1897 return math_ops.reduce_sum(x, axis, keepdims)
1898
1899
1900@keras_export('keras.backend.prod')

Callers 15

topological_sortMethod · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
log_process.pyFile · 0.85

Calls 1

reduce_sumMethod · 0.80