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

Method reduce_sum

tensorflow/python/ops/parallel_for/pfor.py:1034–1046  ·  view source on GitHub ↗

Performs a sum reduction on `x` across pfor iterations. Note that this currently may not work inside a control flow construct. Args: x: an unvectorized Tensor. Returns: A Tensor that has same rank as `x`. The value is the sum of the values of `x` across the pfor itera

(self, x)

Source from the content-addressed store, hash-verified

1032 return math_ops.reduce_mean(y, axis=0)
1033
1034 def reduce_sum(self, x):
1035 """Performs a sum reduction on `x` across pfor iterations.
1036
1037 Note that this currently may not work inside a control flow construct.
1038 Args:
1039 x: an unvectorized Tensor.
1040
1041 Returns:
1042 A Tensor that has same rank as `x`. The value is the sum of the values
1043 of `x` across the pfor iterations.
1044 """
1045 y = self.reduce_concat(x)
1046 return math_ops.reduce_sum(y, axis=0)
1047
1048 def _lookup_reduction(self, pl):
1049 """Lookups Placeholder `pl` in the reduction map."""

Callers 15

_create_modelMethod · 0.80
_create_modelMethod · 0.80
_cross_netMethod · 0.80
_create_modelMethod · 0.80
_create_modelMethod · 0.80
bodyFunction · 0.80
__init__Method · 0.80
predictionMethod · 0.80
bodyFunction · 0.80
__init__Method · 0.80
bodyFunction · 0.80
__init__Method · 0.80

Calls 1

reduce_concatMethod · 0.95

Tested by 15

testArgRenamesMethod · 0.64
testSummariesMethod · 0.64
_dotFunction · 0.64
compute_true_l2Method · 0.64
test_regularizationMethod · 0.64
tf_functionMethod · 0.64
testBasicMethod · 0.64
GradMethod · 0.64
calculate_lossFunction · 0.64