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)
| 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.""" |