Performs a mean 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 mean of the values of `x` across the pfor ite
(self, x)
| 1018 | return self._reverse_reduce_concat_map[x] |
| 1019 | |
| 1020 | def reduce_mean(self, x): |
| 1021 | """Performs a mean reduction on `x` across pfor iterations. |
| 1022 | |
| 1023 | Note that this currently may not work inside a control flow construct. |
| 1024 | Args: |
| 1025 | x: an unvectorized Tensor. |
| 1026 | |
| 1027 | Returns: |
| 1028 | A Tensor that has same rank as `x`. The value is the mean of the values |
| 1029 | of `x` across the pfor iterations. |
| 1030 | """ |
| 1031 | y = self.reduce_concat(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. |