Home
last modified time | relevance | path

Searched refs:input_rank (Results 1 – 25 of 36) 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.cc118 int input_rank = -1; in AnalyzeInputs() local
122 input_rank = in.dims(); in AnalyzeInputs()
124 context, input_rank >= 2, in AnalyzeInputs()
126 " must have rank >= 2, got ", input_rank)); in AnalyzeInputs()
130 for (int dim = 0; dim < input_rank - 2; ++dim) { in AnalyzeInputs()
135 OP_REQUIRES(context, input_rank == in.dims(), in AnalyzeInputs()
138 for (int dim = 0; dim < input_rank - 2; ++dim) { in AnalyzeInputs()
146 const int row_dimension = input_rank - 2; in AnalyzeInputs()
147 const int col_dimension = input_rank - 1; in AnalyzeInputs()
Dreshape_util.cc50 const int64 input_rank = input_shape_in.NumElements(); in Reshape() local
109 gtl::InlinedVector<int64, 8> input_strides(input_rank); in Reshape()
110 if (input_rank > 0) { in Reshape()
111 input_strides[input_rank - 1] = 1; in Reshape()
112 for (int d = input_rank - 2; d >= 0; --d) { in Reshape()
134 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.cc85 const int input_rank = input.dims(); in ComputeAsync() local
88 context, input_rank >= 2, in ComputeAsync()
89 errors::InvalidArgument("Input must have rank >= 2, got ", input_rank), in ComputeAsync()
92 const int64 num_rows = input.dim_size(input_rank - 2); in ComputeAsync()
93 const int64 num_cols = input.dim_size(input_rank - 1); in ComputeAsync()
102 for (int dim = 0; dim < input_rank - 2; ++dim) { in ComputeAsync()
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
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()
Dpermute_op.cc50 int input_rank = input_tensor_shape.dims(); in Compile() local
51 OP_REQUIRES(ctx, input_rank == 1 || input_rank == 2, in Compile()
60 if (input_rank == 2) { in Compile()
77 if (input_rank == 2) { 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()
/external/tensorflow/tensorflow/contrib/model_pruning/python/layers/
Dlayers.py198 input_rank = inputs.get_shape().ndims
200 if input_rank == 3:
202 input_rank)
203 elif input_rank == 4:
205 elif input_rank == 5:
207 input_rank)
210 input_rank)
/external/tensorflow/tensorflow/core/common_runtime/
Deval_const_tensor.cc53 int input_rank = c->Rank(c->input(0)); in TryToInferTensorOutputFromInputShapes() local
54 Tensor t(node->output_type(0), TensorShape({input_rank})); in TryToInferTensorOutputFromInputShapes()
57 for (int i = 0; i < input_rank; i++) { in TryToInferTensorOutputFromInputShapes()
68 for (int i = 0; i < input_rank; i++) { in TryToInferTensorOutputFromInputShapes()
81 int32 input_rank = c->Rank(c->input(0)); in TryToInferTensorOutputFromInputShapes() local
83 t.flat<int32>()(0) = input_rank; in TryToInferTensorOutputFromInputShapes()
/external/tensorflow/tensorflow/contrib/layers/python/layers/
Dfeature_column_ops.py59 input_rank = tensor.get_shape().ndims
61 if input_rank is None and isinstance(tensor, sparse_tensor_py.SparseTensor):
63 input_rank = tensor.dense_shape.get_shape().as_list()[0]
65 if input_rank is None:
69 if output_rank > input_rank + 1:
75 column_name, input_rank, output_rank))
76 elif output_rank == input_rank + 1:
88 elif output_rank < input_rank:
Dlayers.py1022 input_rank = inputs.get_shape().ndims
1024 if conv_dims is not None and conv_dims + 2 != input_rank:
1026 (conv_dims + 2, input_rank))
1027 if input_rank == 3:
1029 elif input_rank == 4:
1031 elif input_rank == 5:
1035 input_rank)
2517 input_rank = inputs.get_shape().ndims
2518 if input_rank is None:
2520 if input_rank < 3:
[all …]
Dfeature_column.py1652 input_rank = input_tensor.get_shape().ndims
1653 if input_rank is not None:
1654 if output_rank > input_rank + 1:
1659 input_rank, output_rank))
1664 if output_rank == input_rank + 1:
1669 input_rank, output_rank))
1671 if output_rank == input_rank:
/external/tensorflow/tensorflow/core/ops/
Darray_ops.cc1490 const int32 input_rank = c->Rank(input); in __anon7c94107b2402() local
1491 if (batch_dim >= input_rank) { in __anon7c94107b2402()
1493 "batch_dim must be < input rank: ", batch_dim, " vs. ", input_rank); in __anon7c94107b2402()
1495 if (seq_dim >= input_rank) { in __anon7c94107b2402()
1497 "seq_dim must be < input rank: ", seq_dim, " vs. ", input_rank); in __anon7c94107b2402()
1808 const Tensor* paddings_t, int64 input_rank) { in MirrorPadKnown() argument
1810 std::vector<DimensionHandle> dims(input_rank); in MirrorPadKnown()
1811 for (int64 i = 0; i < input_rank; ++i) { in MirrorPadKnown()
1844 int64 input_rank = c->Value(pad_0); in __anon7c94107b2c02() local
1846 TF_RETURN_IF_ERROR(c->WithRank(c->input(0), input_rank, &input)); in __anon7c94107b2c02()
[all …]
Dmath_ops.cc917 const int32 input_rank = c->Rank(input_shape); in ArgOpShape() local
918 if (input_rank <= 1) { in ArgOpShape()
928 std::vector<DimensionHandle> dims(input_rank - 1); in ArgOpShape()
944 int64 axis = dimension_val < 0 ? dimension_val + input_rank : dimension_val; in ArgOpShape()
945 if (axis < 0 || axis >= input_rank) { in ArgOpShape()
947 "Dimension (", dimension_val, ") must be in the range [", -input_rank, in ArgOpShape()
948 ", ", input_rank, "), where ", input_rank, in ArgOpShape()
954 for (int i = 0; i < input_rank; ++i) { in ArgOpShape()
/external/tensorflow/tensorflow/core/framework/
Dshape_inference.cc984 int idx, int input_rank, DimensionHandle* out) { in MakeDimForScalarInputWithNegativeIndexing() argument
993 if (input_rank < 0) { in MakeDimForScalarInputWithNegativeIndexing()
996 } else if (val + input_rank < 0) { in MakeDimForScalarInputWithNegativeIndexing()
998 val, " must be in range [-", input_rank, in MakeDimForScalarInputWithNegativeIndexing()
999 ", ", input_rank, ")"); in MakeDimForScalarInputWithNegativeIndexing()
1001 val += input_rank; in MakeDimForScalarInputWithNegativeIndexing()
1003 } else if (input_rank >= 0 && val >= input_rank) { in MakeDimForScalarInputWithNegativeIndexing()
1005 val, " must be in range [-", input_rank, in MakeDimForScalarInputWithNegativeIndexing()
1006 ", ", input_rank, ")"); in MakeDimForScalarInputWithNegativeIndexing()
Dcommon_shape_fns.cc1133 const int32 input_rank, in ReductionShapeHelper() argument
1138 if (reduction_index < -input_rank || reduction_index >= input_rank) { in ReductionShapeHelper()
1141 input_rank, " dimensions."); in ReductionShapeHelper()
1146 wrapped_index += input_rank; in ReductionShapeHelper()
1183 const int32 input_rank = c->Rank(input); in ReductionShape() local
1187 input_rank, &true_indices)); in ReductionShape()
1190 input_rank, &true_indices)); in ReductionShape()
1197 for (int i = 0; i < input_rank; ++i) { in ReductionShape()
/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.cc572 int input_rank = input_shape.dimensions_count(); in ProcessTensorFlowReductionOperator() local
578 if (reduction_index < -input_rank || reduction_index >= input_rank) { in ProcessTensorFlowReductionOperator()
580 << " for input with " << input_rank << " dimensions"; in ProcessTensorFlowReductionOperator()
584 wrapped_index += input_rank; in ProcessTensorFlowReductionOperator()
591 for (int i = 0; i < input_rank; ++i) { in ProcessTensorFlowReductionOperator()
1396 op->input_rank = input_shape.dimensions_count(); in ProcessGatherOperator()
1397 QCHECK_LT(axis, op->input_rank); in ProcessGatherOperator()
/external/tensorflow/tensorflow/compiler/xla/
Dshape_util.cc1302 int64 input_rank = input_shape.rank(); in AlignLayouts() local
1324 std::vector<int64> dimension_to_alignment_index(input_rank); in AlignLayouts()
1326 for (int64 i = 0, j = 0; i < input_rank || j < output_rank;) { in AlignLayouts()
1335 if (i == input_rank) { in AlignLayouts()
1352 alignment.push_back({input_rank, output_rank}); in AlignLayouts()
1361 for (int64 i = 0; i < input_rank;) { in AlignLayouts()
1378 if (i == input_rank) { in AlignLayouts()
/external/tensorflow/tensorflow/python/ops/signal/
Dfft_ops.py95 input_rank = _array_ops.rank(input_tensor)
97 outer_dims = _math_ops.maximum(0, input_rank - fft_rank)
/external/tensorflow/tensorflow/python/ops/
Dnn_ops.py2857 input_rank = array_ops.rank(logits)
2859 logits = _swap_axis(logits, dim_axis, math_ops.subtract(input_rank, 1))
2865 output, dim_axis, math_ops.subtract(input_rank, 1), name=name)
3119 input_rank = array_ops.rank(precise_logits)
3134 precise_logits = _move_dim_to_end(precise_logits, axis, input_rank)
3135 labels = _move_dim_to_end(labels, axis, input_rank)
3151 [math_ops.subtract(input_rank, 1)])
/external/tensorflow/tensorflow/cc/gradients/
Dmath_grad.cc644 auto input_rank = Size(scope, input_shape); in ReducedShapeHelper() local
648 auto axes = Mod(scope, Add(scope, reduction_axes, input_rank), input_rank); in ReducedShapeHelper()
653 auto input_rank_range = Range(scope, zero, input_rank, one); in ReducedShapeHelper()

12