Home
last modified time | relevance | path

Searched refs:input_rank (Results 1 – 25 of 40) sorted by relevance

12

/external/tensorflow/tensorflow/core/kernels/
Dsparse_concat_op.cc77 const int input_rank = input_shape.dims(); in Compute() local
79 ? input_rank + concat_dim_attr_ in Compute()
81 OP_REQUIRES(context, concat_dim >= 0 && concat_dim < input_rank, in Compute()
83 -input_rank, ", ", input_rank, in Compute()
88 context, current_shape.dims() == input_rank, in Compute()
90 "Ranks of all input tensors must match: expected ", input_rank, in Compute()
92 for (int j = 0; j < input_rank; ++j) { in Compute()
112 gtl::InlinedVector<int64, 8> std_order(input_rank); in Compute()
116 concat_order.reserve(input_rank); in Compute()
118 for (int j = 0; j < input_rank; ++j) { in Compute()
Dlinalg_ops_common.cc120 int input_rank = -1; in AnalyzeInputs() local
124 input_rank = in.dims(); in AnalyzeInputs()
126 context, input_rank >= 2, in AnalyzeInputs()
128 " must have rank >= 2, got ", input_rank)); in AnalyzeInputs()
132 for (int dim = 0; dim < input_rank - 2; ++dim) { in AnalyzeInputs()
137 OP_REQUIRES(context, input_rank == in.dims(), in AnalyzeInputs()
140 for (int dim = 0; dim < input_rank - 2; ++dim) { in AnalyzeInputs()
148 const int row_dimension = input_rank - 2; in AnalyzeInputs()
149 const int col_dimension = input_rank - 1; in AnalyzeInputs()
Dreshape_util.cc50 const int64 input_rank = input_shape_in.NumElements(); in Reshape() local
112 gtl::InlinedVector<int64, 8> input_strides(input_rank); in Reshape()
113 if (input_rank > 0) { in Reshape()
114 input_strides[input_rank - 1] = 1; in Reshape()
115 for (int d = input_rank - 2; d >= 0; --d) { in Reshape()
137 for (int j = 0; j < input_rank; ++j) { in Reshape()
Dlu_op.cc71 int input_rank = input.dims(); in Compute() local
72 OP_REQUIRES(context, input_rank >= 2, in Compute()
74 "Input tensor must have rank >= 2, got ", input_rank)); in Compute()
81 for (int dim = 0; dim < input_rank - 2; ++dim) { in Compute()
84 const int64 num_rows = input.dim_size(input_rank - 2); in Compute()
85 const int64 num_cols = input.dim_size(input_rank - 1); in Compute()
Dlu_op_gpu.cu.cc87 const int input_rank = input.dims(); in ComputeAsync() local
90 context, input_rank >= 2, in ComputeAsync()
91 errors::InvalidArgument("Input must have rank >= 2, got ", input_rank), in ComputeAsync()
94 const int64 num_rows = input.dim_size(input_rank - 2); in ComputeAsync()
95 const int64 num_cols = input.dim_size(input_rank - 1); in ComputeAsync()
104 for (int dim = 0; dim < input_rank - 2; ++dim) { in ComputeAsync()
Dmatrix_set_diag_op.cc90 const int input_rank = input_shape.dims(); in Compute() local
103 const Eigen::Index num_rows = input_shape.dim_size(input_rank - 2); in Compute()
104 const Eigen::Index num_cols = input_shape.dim_size(input_rank - 1); in Compute()
129 (diag_shape.dim_size(input_rank - 2) == num_diags), in Compute()
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Dmatrix_diag_ops.cc125 const int input_rank = input_shape.dims(); in SetMatrixDiag() local
127 padding_config = xla::MakeNoPaddingConfig(input_rank - 1); in SetMatrixDiag()
158 std::vector<int64> broadcast_dimensions(input_rank - 1); in SetMatrixDiag()
191 broadcast_dimensions.back() = input_rank - 1; // Column-wise. in SetMatrixDiag()
193 broadcast_dimensions.back() = input_rank - 2; // Row-wise. in SetMatrixDiag()
199 broadcast_dimensions.back() = input_rank - 2; // Row-wise. in SetMatrixDiag()
202 broadcast_dimensions.back() = input_rank - 1; // Column-wise. in SetMatrixDiag()
210 padding_config.mutable_dimensions(input_rank - 2) in SetMatrixDiag()
212 padding_config.mutable_dimensions(input_rank - 2) in SetMatrixDiag()
357 const int input_rank = input_shape.dims(); in Compile() local
[all …]
Ddepthtospace_op.cc62 int input_rank = input_shape.size(); in Compile() local
65 OP_REQUIRES(ctx, kRequiredDims == input_rank, in Compile()
67 "; got: ", input_rank)); in Compile()
69 int feature_dim = GetTensorFeatureDimIndex(input_rank, data_format); in Compile()
70 int num_spatial_dims = GetTensorSpatialDims(input_rank, data_format); in Compile()
75 reshaped_shape.reserve(input_rank); in Compile()
76 transpose_order.reserve(input_rank); in Compile()
77 output_shape.reserve(input_rank); in Compile()
Dspacetodepth_op.cc62 int input_rank = input_shape.size(); in Compile() local
65 OP_REQUIRES(ctx, kRequiredDims == input_rank, in Compile()
67 "; got ", input_rank)); in Compile()
69 int feature_dim = GetTensorFeatureDimIndex(input_rank, data_format); in Compile()
70 int num_spatial_dims = GetTensorSpatialDims(input_rank, data_format); in Compile()
75 reshaped_shape.reserve(input_rank); in Compile()
76 transpose_order.reserve(input_rank); in Compile()
77 output_shape.reserve(input_rank); in Compile()
Dbatchtospace_op.cc28 const int input_rank = input_tensor_shape.dims(); in BatchToSpace() local
34 ctx, input_rank >= 1 + block_rank, in BatchToSpace()
36 " instead of ", input_rank)); in BatchToSpace()
70 std::vector<int64> reshaped_shape(input_rank + block_rank); in BatchToSpace()
105 std::vector<int64> reshaped_permuted_shape(input_rank); in BatchToSpace()
125 std::vector<int64> start_indices(input_rank, 0); in BatchToSpace()
127 std::vector<int64> strides(input_rank, 1); in BatchToSpace()
Dspacetobatch_op.cc28 const int input_rank = input_tensor_shape.dims(); in SpaceToBatch() local
34 ctx, input_rank >= 1 + block_rank, in SpaceToBatch()
36 " instead of ", input_rank)); in SpaceToBatch()
89 std::vector<int64> reshaped_padded_shape(input_rank + block_rank); in SpaceToBatch()
136 std::vector<int64> output_shape(input_rank); in SpaceToBatch()
Ddata_format_ops.cc104 int input_rank = input_tensor_shape.dims(); in Compile() local
105 OP_REQUIRES(ctx, input_rank == 1 || input_rank == 2, in Compile()
114 if (input_rank == 2) { in Compile()
Dquantize_and_dequantize_op.cc81 int64 input_rank = input_shape.dims(); in Compile() local
82 OP_REQUIRES(ctx, input_rank >= 1, in Compile()
86 ctx, axis_ >= 0 && axis_ < input_rank, in Compile()
88 dimensions_to_reduce.reserve(input_rank - 1); in Compile()
89 for (int64 i = 0; i < input_rank; ++i) { in Compile()
/external/tensorflow/tensorflow/core/common_runtime/
Deval_const_tensor.cc56 int input_rank = c->Rank(c->input(0)); in TryToInferTensorOutputFromInputShapes() local
57 Tensor t(node->output_type(0), TensorShape({input_rank})); in TryToInferTensorOutputFromInputShapes()
60 for (int i = 0; i < input_rank; i++) { in TryToInferTensorOutputFromInputShapes()
71 for (int i = 0; i < input_rank; i++) { in TryToInferTensorOutputFromInputShapes()
84 int32 input_rank = c->Rank(c->input(0)); in TryToInferTensorOutputFromInputShapes() local
86 t.flat<int32>()(0) = input_rank; in TryToInferTensorOutputFromInputShapes()
/external/tensorflow/tensorflow/core/framework/
Dcommon_shape_fns.cc1237 const int32 input_rank = c->Rank(input_shape); in MatrixDiagPartV2Shape() local
1238 const int32 num_rows = c->Value(c->Dim(input_shape, input_rank - 2)); in MatrixDiagPartV2Shape()
1239 const int32 num_cols = c->Value(c->Dim(input_shape, input_rank - 1)); in MatrixDiagPartV2Shape()
1256 dims.reserve(input_rank - 2); in MatrixDiagPartV2Shape()
1257 for (int i = 0; i < input_rank - 2; ++i) { in MatrixDiagPartV2Shape()
1295 const int32 input_rank = c->Rank(input_shape); in MatrixDiagV2Shape() local
1297 const int32 num_diags = c->Value(c->Dim(input_shape, input_rank - 2)); in MatrixDiagV2Shape()
1298 const int32 other_dim = c->Value(c->Dim(input_shape, input_rank - 1)); in MatrixDiagV2Shape()
1305 ", d_upper = ", upper_diag_index, " ", input_rank, " ", other_dim); in MatrixDiagV2Shape()
1324 const int32 max_diag_len = c->Value(c->Dim(input_shape, input_rank - 1)); in MatrixDiagV2Shape()
[all …]
Dshape_inference.cc924 int idx, int input_rank, DimensionHandle* out) { in MakeDimForScalarInputWithNegativeIndexing() argument
933 if (input_rank < 0) { in MakeDimForScalarInputWithNegativeIndexing()
936 } else if (val + input_rank < 0) { in MakeDimForScalarInputWithNegativeIndexing()
938 val, " must be in range [-", input_rank, in MakeDimForScalarInputWithNegativeIndexing()
939 ", ", input_rank, ")"); in MakeDimForScalarInputWithNegativeIndexing()
941 val += input_rank; in MakeDimForScalarInputWithNegativeIndexing()
943 } else if (input_rank >= 0 && val >= input_rank) { in MakeDimForScalarInputWithNegativeIndexing()
945 val, " must be in range [-", input_rank, in MakeDimForScalarInputWithNegativeIndexing()
946 ", ", input_rank, ")"); in MakeDimForScalarInputWithNegativeIndexing()
/external/tensorflow/tensorflow/compiler/mlir/xla/transforms/
Dlegalize_tf.cc577 int64_t input_rank = input_ty.getRank(); in CanBeTranslatedToDynamicSlice() local
581 for (int64_t i = 0; i < input_rank; ++i) { in CanBeTranslatedToDynamicSlice()
591 for (int64_t i = 0; i < input_rank; ++i) { in CanBeTranslatedToDynamicSlice()
624 int64_t input_rank = input_ty.getRank(); in TFSliceSizes2HLOSliceSizes() local
628 for (int64_t i = 0; i < input_rank; ++i) { in TFSliceSizes2HLOSliceSizes()
1588 int64_t input_rank = input_type.getRank(); in matchAndRewrite() local
1590 if (dim_index < 0) dim_index += input_rank; in matchAndRewrite()
1608 SmallVector<int64_t, 4> begin_indices(input_rank, 0); in matchAndRewrite()
1610 SmallVector<int64_t, 4> strides(input_rank, 1); in matchAndRewrite()
1704 int64_t input_rank = input_type.getRank(); in matchAndRewrite() local
[all …]
/external/tensorflow/tensorflow/core/ops/
Darray_ops.cc1579 const int32 input_rank = c->Rank(input); in __anonf6523ebd2302() local
1580 if (batch_dim >= input_rank) { in __anonf6523ebd2302()
1582 "batch_dim must be < input rank: ", batch_dim, " vs. ", input_rank); in __anonf6523ebd2302()
1584 if (seq_dim >= input_rank) { in __anonf6523ebd2302()
1586 "seq_dim must be < input rank: ", seq_dim, " vs. ", input_rank); in __anonf6523ebd2302()
1913 const Tensor* paddings_t, int64 input_rank) { in MirrorPadKnown() argument
1915 std::vector<DimensionHandle> dims(input_rank); in MirrorPadKnown()
1916 for (int64 i = 0; i < input_rank; ++i) { in MirrorPadKnown()
1949 int64 input_rank = c->Value(pad_0); in __anonf6523ebd2b02() local
1951 TF_RETURN_IF_ERROR(c->WithRank(c->input(0), input_rank, &input)); in __anonf6523ebd2b02()
[all …]
Dmath_ops.cc1037 const int32 input_rank = c->Rank(input_shape); in ArgOpShape() local
1038 if (input_rank <= 1) { in ArgOpShape()
1048 std::vector<DimensionHandle> dims(input_rank - 1); in ArgOpShape()
1064 int64 axis = dimension_val < 0 ? dimension_val + input_rank : dimension_val; in ArgOpShape()
1065 if (axis < 0 || axis >= input_rank) { in ArgOpShape()
1067 "Dimension (", dimension_val, ") must be in the range [", -input_rank, in ArgOpShape()
1068 ", ", input_rank, "), where ", input_rank, in ArgOpShape()
1074 for (int i = 0; i < input_rank; ++i) { in ArgOpShape()
/external/tensorflow/tensorflow/lite/toco/graph_transformations/
Dunpartition_embedding_lookup.cc198 gather_params_permute_op->input_rank = in Run()
218 merged_gather_op->input_rank = partition_array.shape().dimensions_count(); in Run()
Dpropagate_fixed_sizes.cc573 int input_rank = input_shape.dimensions_count(); in ProcessTensorFlowReductionOperator() local
579 if (reduction_index < -input_rank || reduction_index >= input_rank) { in ProcessTensorFlowReductionOperator()
581 << " for input with " << input_rank << " dimensions"; in ProcessTensorFlowReductionOperator()
585 wrapped_index += input_rank; in ProcessTensorFlowReductionOperator()
592 for (int i = 0; i < input_rank; ++i) { in ProcessTensorFlowReductionOperator()
1409 op->input_rank = input_shape.dimensions_count(); in ProcessGatherOperator()
1410 QCHECK_LT(axis, op->input_rank); in ProcessGatherOperator()
/external/tensorflow/tensorflow/compiler/xla/
Dshape_util.cc1329 int64 input_rank = input_shape.rank(); in AlignLayouts() local
1351 std::vector<int64> dimension_to_alignment_index(input_rank); in AlignLayouts()
1353 for (int64 i = 0, j = 0; i < input_rank || j < output_rank;) { in AlignLayouts()
1362 if (i == input_rank) { in AlignLayouts()
1379 alignment.push_back({input_rank, output_rank}); in AlignLayouts()
1388 for (int64 i = 0; i < input_rank;) { in AlignLayouts()
1405 if (i == input_rank) { in AlignLayouts()
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/ir/
Dtf_ops.cc1012 int64_t input_rank = input_ty.getRank(); in InferExpandDimsOpType() local
1014 if (dim_val < -input_rank - 1 || dim_val > input_rank + 1) return unranked_ty; in InferExpandDimsOpType()
1015 if (dim_val < 0) dim_val += input_rank + 1; in InferExpandDimsOpType()
2057 int64_t input_rank = input_type.getRank(); in VerifySplitInputAndSplitDim() local
2058 if (input_rank == 0) in VerifySplitInputAndSplitDim()
2066 if (index + input_rank < 0 || index >= input_rank) { in VerifySplitInputAndSplitDim()
2068 << input_rank << ", " << input_rank << ")"; in VerifySplitInputAndSplitDim()
2071 if (index < 0) index += input_rank; in VerifySplitInputAndSplitDim()
/external/tensorflow/tensorflow/python/ops/signal/
Dfft_ops.py96 input_rank = _array_ops.rank(input_tensor)
98 outer_dims = _math_ops.maximum(0, input_rank - fft_rank)
/external/tensorflow/tensorflow/python/ops/
Dnn_ops.py3009 input_rank = array_ops.rank(logits)
3011 logits = _swap_axis(logits, dim_axis, math_ops.subtract(input_rank, 1))
3017 output, dim_axis, math_ops.subtract(input_rank, 1), name=name)
3292 input_rank = array_ops.rank(precise_logits)
3307 precise_logits = _move_dim_to_end(precise_logits, axis, input_rank)
3308 labels = _move_dim_to_end(labels, axis, input_rank)
3324 [math_ops.subtract(input_rank, 1)])

12