Home
last modified time | relevance | path

Searched refs:reduction_axes (Results 1 – 25 of 48) sorted by relevance

12

/external/tensorflow/tensorflow/python/kernel_tests/
Dreduction_ops_test.py139 def _tf_reduce(self, x, reduction_axes, keepdims): argument
142 def _np_reduce(self, x, reduction_axes, keepdims): argument
157 def _compare(self, x, reduction_axes, keepdims, feed_dict=None): argument
158 np_ans = self._np_reduce(x, reduction_axes, keepdims)
160 tf_ans = self._tf_reduce(x, reduction_axes, keepdims)
165 def _compareAll(self, x, reduction_axes, feed_dict=None): argument
166 if reduction_axes is not None and np.shape(reduction_axes) == (1,):
168 self._compareAll(x, reduction_axes[0])
169 self._compare(x, reduction_axes, keepdims=False, feed_dict=feed_dict)
170 self._compare(x, reduction_axes, keepdims=True, feed_dict=feed_dict)
[all …]
Dreduction_ops_test_big.py32 def _tf_reduce(self, x, reduction_axes, keepdims): argument
39 def _tf_reduce_max(self, x, reduction_axes, keepdims): argument
40 return math_ops.reduce_max(x, reduction_axes, keepdims)
42 def _tf_reduce_all(self, x, reduction_axes, keepdims): argument
43 return math_ops.reduce_all(x, reduction_axes, keepdims)
45 def _tf_reduce_mean(self, x, reduction_axes, keepdims): argument
46 return math_ops.reduce_mean(x, reduction_axes, keepdims)
48 def _tf_reduce_sum(self, x, reduction_axes, keepdims): argument
49 return math_ops.reduce_sum(x, reduction_axes, keepdims)
Dsparse_ops_test.py631 def _compare(self, sp_t, reduction_axes, ndims, keep_dims, do_sum): argument
635 if reduction_axes is None:
641 if not isinstance(reduction_axes, list): # Single scalar.
642 reduction_axes = [reduction_axes]
643 reduction_axes = np.array(reduction_axes).astype(np.int32)
645 reduction_axes = (reduction_axes + ndims) % ndims
647 reduction_axes.sort()
648 for ra in reduction_axes.ravel()[::-1]:
656 tf_dense_ans = sparse_ops.sparse_reduce_sum(sp_t, reduction_axes,
659 tf_dense_ans = sparse_ops.sparse_reduce_max(sp_t, reduction_axes,
[all …]
/external/tensorflow/tensorflow/core/kernels/
Dreduction_ops.h55 const ReductionAxes& reduction_axes, const Reducer& reducer) {
56 out.device(d) = in.reduce(reduction_axes, reducer);
68 const ReductionAxes& reduction_axes, \
75 in_as_intermediate.reduce(reduction_axes, intermediate_reducer) \
88 const ReductionAxes& reduction_axes,
92 out.device(d) = in.reduce(reduction_axes, sum_reducer) /
105 const ReductionAxes& reduction_axes, \
111 reduction_axes, sum_reducer) / \
132 const ReductionAxes& reduction_axes,
137 (in * in.conjugate()).reduce(reduction_axes, sum_reducer).sqrt();
[all …]
Dreduction_gpu_kernels.cu.h1075 const ReductionAxes& reduction_axes, Op op) {
1082 reduction_axes[0] == 1) { // row reduction
1085 reduction_axes[0] == 0) { // column reduction
1087 } else if (in_rank == 3 && out_rank == 2 && reduction_axes[0] == 1) {
1096 } else if (in_rank == 3 && out_rank == 1 && reduction_axes[0] == 0 &&
1097 reduction_axes[1] == 2) {
1104 if (out_rank == 1) ss << " " << reduction_axes[0];
1105 if (out_rank == 2) ss << " " << reduction_axes[1];
1114 const ReductionAxes& reduction_axes,
1122 const ReductionAxes& reduction_axes,
[all …]
Dsparse_reduce_op.cc59 std::vector<int32> reduction_axes(axes_slice.begin(), axes_slice.end()); in SparseTensorReduceHelper() local
61 for (int64 i = 0; i < reduction_axes.size(); ++i) { in SparseTensorReduceHelper()
62 reduction_axes[i] = (reduction_axes[i] + ndims) % ndims; in SparseTensorReduceHelper()
64 std::sort(reduction_axes.begin(), reduction_axes.end()); in SparseTensorReduceHelper()
74 perm.begin(), perm.end(), reduction_axes.begin(), reduction_axes.end(), in SparseTensorReduceHelper()
Dreduction_ops_common_gpu.h33 const ReductionAxes& reduction_axes,
Dreduction_ops_gpu_bool.cu.cc40 const Eigen::array<Index, NUM_AXES>& reduction_axes, \
Dreduction_ops_half_mean_sum.cu.cc40 const Eigen::array<Index, NUM_AXES>& reduction_axes, \
/external/tensorflow/tensorflow/core/api_def/base_api/
Dapi_def_SparseReduceSumSparse.pbtxt23 name: "reduction_axes"
40 Reduces `sp_input` along the dimensions given in `reduction_axes`. Unless
42 `reduction_axes`. If `keep_dims` is true, the reduced dimensions are retained
45 If `reduction_axes` has no entries, all dimensions are reduced, and a tensor
Dapi_def_SparseReduceMaxSparse.pbtxt23 name: "reduction_axes"
40 Reduces `sp_input` along the dimensions given in `reduction_axes`. Unless
42 `reduction_axes`. If `keep_dims` is true, the reduced dimensions are retained
45 If `reduction_axes` has no entries, all dimensions are reduced, and a tensor
Dapi_def_SparseReduceSum.pbtxt23 name: "reduction_axes"
46 Reduces `sp_input` along the dimensions given in `reduction_axes`. Unless
48 `reduction_axes`. If `keep_dims` is true, the reduced dimensions are retained
51 If `reduction_axes` has no entries, all dimensions are reduced, and a tensor
Dapi_def_SparseReduceMax.pbtxt23 name: "reduction_axes"
46 Reduces `sp_input` along the dimensions given in `reduction_axes`. Unless
48 `reduction_axes`. If `keep_dims` is true, the reduced dimensions are retained
51 If `reduction_axes` has no entries, all dimensions are reduced, and a tensor
/external/tensorflow/tensorflow/core/ops/compat/ops_history_v2/
DSparseReduceMax.pbtxt16 name: "reduction_axes"
63 name: "reduction_axes"
112 name: "reduction_axes"
162 name: "reduction_axes"
DSparseReduceSum.pbtxt16 name: "reduction_axes"
68 name: "reduction_axes"
122 name: "reduction_axes"
177 name: "reduction_axes"
DSparseReduceMaxSparse.pbtxt16 name: "reduction_axes"
71 name: "reduction_axes"
128 name: "reduction_axes"
186 name: "reduction_axes"
DSparseReduceSumSparse.pbtxt16 name: "reduction_axes"
76 name: "reduction_axes"
138 name: "reduction_axes"
201 name: "reduction_axes"
/external/tensorflow/tensorflow/core/ops/compat/ops_history_v1/
DSparseReduceMax.pbtxt16 name: "reduction_axes"
63 name: "reduction_axes"
112 name: "reduction_axes"
162 name: "reduction_axes"
DSparseReduceMaxSparse.pbtxt16 name: "reduction_axes"
71 name: "reduction_axes"
128 name: "reduction_axes"
186 name: "reduction_axes"
DSparseReduceSum.pbtxt16 name: "reduction_axes"
68 name: "reduction_axes"
122 name: "reduction_axes"
177 name: "reduction_axes"
DSparseReduceSumSparse.pbtxt16 name: "reduction_axes"
76 name: "reduction_axes"
138 name: "reduction_axes"
201 name: "reduction_axes"
/external/tensorflow/tensorflow/compiler/mlir/tfr/examples/mnist/
Dops_defs.py90 _, reduction_axes = tf.raw_ops.BroadcastGradientArgs(
93 grad, axis=reduction_axes, keepdims=True)
154 _, reduction_axes = tf.raw_ops.BroadcastGradientArgs(
157 grad, axis=reduction_axes, keepdims=True)
/external/tensorflow/tensorflow/tools/api/golden/v1/
Dtensorflow.sparse.pbtxt73 …argspec: "args=[\'sp_input\', \'axis\', \'keepdims\', \'reduction_axes\', \'keep_dims\'], varargs=…
77 …argspec: "args=[\'sp_input\', \'axis\', \'keepdims\', \'reduction_axes\', \'keep_dims\'], varargs=…
81 …argspec: "args=[\'sp_input\', \'axis\', \'keepdims\', \'reduction_axes\', \'keep_dims\'], varargs=…
85 …argspec: "args=[\'sp_input\', \'axis\', \'keepdims\', \'reduction_axes\', \'keep_dims\'], varargs=…
/external/tensorflow/tensorflow/python/keras/layers/
Dnormalization.py713 def _calculate_mean_and_var(self, inputs, reduction_axes, keep_dims): argument
714 return nn.moments(inputs, reduction_axes, keep_dims=keep_dims)
716 def _moments(self, inputs, reduction_axes, keep_dims): argument
717 mean, variance = self._calculate_mean_and_var(inputs, reduction_axes,
780 reduction_axes = [i for i in range(ndims) if i not in self.axis]
782 del reduction_axes[1] # Do not reduce along virtual batch dim
791 reduction_axes != list(range(ndims - 1))):
824 reduction_axes,
/external/tensorflow/tensorflow/python/keras/layers/preprocessing/
Dnormalization_v1.py236 reduction_axes = tuple(np.arange(values.ndim)[axis_mask])
238 mean = np.mean(values, axis=reduction_axes, dtype=np.float64)
239 variance = np.var(values, axis=reduction_axes, dtype=np.float64)

12