Home
last modified time | relevance | path

Searched refs:reduce_dims (Results 1 – 13 of 13) sorted by relevance

/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Dbias_ops.cc106 std::vector<int64> reduce_dims(out_backprop_shape.dims() - 1); in Compile() local
107 std::iota(reduce_dims.begin(), reduce_dims.begin() + feature_dim, 0); in Compile()
108 std::iota(reduce_dims.begin() + feature_dim, reduce_dims.end(), in Compile()
117 *ctx->GetOrCreateAdd(accumulation_type), reduce_dims); in Compile()
/external/eigen/unsupported/test/
Dcxx11_tensor_argmax.cpp73 array<DenseIndex, 3> reduce_dims; in test_argmax_tuple_reducer() local
74 for (int d = 0; d < 3; ++d) reduce_dims[d] = d; in test_argmax_tuple_reducer()
77 reduce_dims, internal::ArgMaxTupleReducer<Tuple<DenseIndex, float> >()); in test_argmax_tuple_reducer()
79 Tensor<float, 1, DataLayout> max_by_dims = tensor.maximum(reduce_dims); in test_argmax_tuple_reducer()
105 array<DenseIndex, 3> reduce_dims; in test_argmin_tuple_reducer() local
106 for (int d = 0; d < 3; ++d) reduce_dims[d] = d; in test_argmin_tuple_reducer()
109 reduce_dims, internal::ArgMinTupleReducer<Tuple<DenseIndex, float> >()); in test_argmin_tuple_reducer()
111 Tensor<float, 1, DataLayout> min_by_dims = tensor.minimum(reduce_dims); in test_argmin_tuple_reducer()
/external/tensorflow/tensorflow/compiler/xla/tests/
Dbatch_normalization_test.cc564 std::vector<int64> reduce_dims; in XLA_TEST_P() local
567 reduce_dims.push_back(i); in XLA_TEST_P()
572 ReferenceUtil::Reduce4DTo1D(input_array, /*init=*/0.0f, reduce_dims, in XLA_TEST_P()
576 ReferenceUtil::Reduce4DTo1D(*input_squared, /*init=*/0.0f, reduce_dims, in XLA_TEST_P()
665 std::vector<int64> reduce_dims; in XLA_TEST_P() local
668 reduce_dims.push_back(i); in XLA_TEST_P()
673 ReferenceUtil::Reduce4DTo1D(input_array, /*init=*/0.0f, reduce_dims, in XLA_TEST_P()
677 ReferenceUtil::Reduce4DTo1D(*input_squared, /*init=*/0.0f, reduce_dims, in XLA_TEST_P()
776 std::vector<int64> reduce_dims; in XLA_TEST_P() local
779 reduce_dims.push_back(i); in XLA_TEST_P()
[all …]
Dreduce_test.cc550 std::vector<int64> reduce_dims; member
555 spec.bounds.size() - spec.reduce_dims.size(), in PrintTo()
558 absl::StrJoin(spec.reduce_dims, "")); in PrintTo()
829 GetParam().reduce_dims); in XLA_TEST_P()
832 ReferenceUtil::Reduce3DTo2D(input_array, 0.0f, GetParam().reduce_dims, in XLA_TEST_P()
/external/eigen/unsupported/Eigen/CXX11/src/Tensor/
DTensorArgMax.h176 const Dims& reduce_dims)
177 : m_xpr(expr), m_reduce_op(reduce_op), m_return_dim(return_dim), m_reduce_dims(reduce_dims) {}
187 const Dims& reduce_dims() const { return m_reduce_dims; }
224 m_impl(op.expression().index_tuples().reduce(op.reduce_dims(), op.reduce_op()), device),
/external/tensorflow/tensorflow/core/kernels/
Dquantize_and_dequantize_op.h237 Eigen::array<int, 2> reduce_dims{{0, 2}}; in Compute()
239 Eigen::IndexList<Eigen::type2index<0>, Eigen::type2index<2> > reduce_dims; in Compute()
241 input_min.device(d) = input.minimum(reduce_dims); in Compute()
242 input_max.device(d) = input.maximum(reduce_dims); in Compute()
Dfused_batch_norm_op.cc165 Eigen::array<int, 1> reduce_dims({0}); in operator ()() local
170 Eigen::IndexList<Eigen::type2index<0>> reduce_dims; in operator ()() local
185 batch_mean.device(d) = (x_rest_by_depth.sum(reduce_dims) * rest_size_inv); in operator ()()
190 x_centered.square().sum(reduce_dims) * rest_size_inv; in operator ()()
302 Eigen::array<int, 1> reduce_dims({0}); in operator ()() local
/external/tensorflow/tensorflow/compiler/xla/client/lib/
Dmatrix.cc242 std::vector<int64> reduce_dims; in EinsumDiagonalLabels() local
251 reduce_dims.push_back(dim); in EinsumDiagonalLabels()
257 return {{unique_labels, reduce_dims, broadcast_dims}}; in EinsumDiagonalLabels()
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/transforms/
Dlegalize_hlo.cc627 SmallVector<int64_t, 4> reduce_dims; in matchAndRewrite() local
629 reduce_dims.emplace_back(dim); in matchAndRewrite()
632 {static_cast<int64_t>(reduce_dims.size())}, rewriter.getI64Type()); in matchAndRewrite()
634 reduce_op.getLoc(), dim_type, rewriter.getI64TensorAttr(reduce_dims)); in matchAndRewrite()
/external/tensorflow/tensorflow/compiler/xla/service/
Dalgebraic_simplifier.cc2436 std::vector<int64> reduce_dims( in HandleDot() local
2445 reduce_dims, in HandleDot()
2447 new_dot = AddReduce(new_dot, reduce_dims, dot_type); in HandleDot()
4621 std::vector<int64> reduce_dims = reduce->dimensions(); in HandleReduce() local
4622 absl::c_sort(reduce_dims); in HandleReduce()
4625 for (int64& dim : reduce_dims) { in HandleReduce()
4634 std::merge(arg_dims.begin(), arg_dims.end(), reduce_dims.begin(), in HandleReduce()
4635 reduce_dims.end(), std::back_inserter(new_dimensions)); in HandleReduce()
4740 std::vector<int64> reduce_dims; in HandleReduce() local
4743 reduce_dims.push_back(dim - removed_dims); in HandleReduce()
[all …]
Dspace_to_batch_converter.cc1133 auto reduce_dims = consumer->dimensions(); in SupportedOpForPropagation() local
1140 return absl::c_linear_search(reduce_dims, batch_dim) && in SupportedOpForPropagation()
1141 absl::c_linear_search(reduce_dims, space_dim); in SupportedOpForPropagation()
/external/tensorflow/tensorflow/core/grappler/optimizers/
Dconstant_folding.cc676 BCast::Vec reduce_dims[2]; in MaterializeBroadcastGradientArgs() local
677 reduce_dims[0] = bcast.grad_x_reduce_idx(); in MaterializeBroadcastGradientArgs()
678 reduce_dims[1] = bcast.grad_y_reduce_idx(); in MaterializeBroadcastGradientArgs()
684 int reduction_indices = reduce_dims[j].size(); in MaterializeBroadcastGradientArgs()
688 value.vec<int32>()(i) = reduce_dims[j][i]; in MaterializeBroadcastGradientArgs()
690 value.vec<int64>()(i) = reduce_dims[j][i]; in MaterializeBroadcastGradientArgs()
/external/tensorflow/tensorflow/compiler/mlir/xla/transforms/
Dlegalize_tf.cc596 DenseIntElementsAttr reduce_dims, in ApplyReduction() argument
598 auto reduce_dims_op = builder->create<ConstOp>(loc, reduce_dims); in ApplyReduction()
1861 auto reduce_dims = GetI64ElementsAttr(non_feature_dims, &rewriter); in matchAndRewrite() local
1879 ApplyReduction(loc, weighted_grad, reduce_dims, &rewriter); in matchAndRewrite()
1893 offset_backprop = ApplyReduction(loc, grad, reduce_dims, &rewriter); in matchAndRewrite()