Home
last modified time | relevance | path

Searched refs:last_dim (Results 1 – 14 of 14) sorted by relevance

/external/tensorflow/tensorflow/compiler/xla/client/lib/
Dsorting.cc32 int last_dim = input_shape.dimensions_size() - 1; in TopK() local
33 int64 last_dim_size = input_shape.dimensions(last_dim); in TopK()
50 XlaOp iota_s32 = Iota(builder, iota_shape, last_dim); in TopK()
62 last_dim, /*is_stable=*/true); in TopK()
65 limit_indices[last_dim] = k; in TopK()
80 int last_dim = input_shape.dimensions_size() - 1; in TopKWithPartitions() local
83 int64 last_dim_size = input_shape.dimensions(last_dim); in TopKWithPartitions()
92 XlaOp iota_s32 = Iota(builder, iota_shape, last_dim); in TopKWithPartitions()
116 sliced_input = ConcatInDim(builder, {values, sliced_input}, last_dim); in TopKWithPartitions()
118 ConcatInDim(builder, {indices, sliced_indices}, last_dim); in TopKWithPartitions()
[all …]
/external/tensorflow/tensorflow/python/keras/applications/
Dapplications_test.py98 def test_application_notop(self, app, last_dim): argument
106 self.assertEqual(output_shape[-1], last_dim)
108 self.assertShapeEqual(output_shape, (None, None, None, last_dim))
112 def test_application_pooling(self, app, last_dim): argument
115 self.assertShapeEqual(output_shape, (None, last_dim))
118 def test_application_variable_input_channels(self, app, last_dim): argument
125 self.assertShapeEqual(output_shape, (None, None, None, last_dim))
134 self.assertShapeEqual(output_shape, (None, None, None, last_dim))
/external/tensorflow/tensorflow/c/kernels/ops/
Dbitcast.cc43 TF_DimensionHandle* last_dim = TF_NewDimensionHandle(); in ComputeNewShape() local
45 TF_ShapeInferenceContextDim(ctx, shape, -1, last_dim); in ComputeNewShape()
46 if (!TF_DimensionHandleValueKnown(last_dim) || in ComputeNewShape()
47 TF_DimensionHandleValue(last_dim) == divisor_val) { in ComputeNewShape()
52 << " due to shape. " << TF_DimensionHandleValue(last_dim) in ComputeNewShape()
56 TF_DeleteDimensionHandle(last_dim); in ComputeNewShape()
/external/tensorflow/tensorflow/core/kernels/
Dnth_element_op.cc95 const int last_dim = input_tensor.dim_size(input_tensor.dims() - 1); in operator ()() local
98 auto SubNthElement = [&, input, output, last_dim, n](int64 start, in operator ()()
101 std::vector<T> buf(last_dim); in operator ()()
105 const T* input_start = input + b * last_dim; in operator ()()
106 const T* input_end = input + (b + 1) * last_dim; in operator ()()
121 20 * last_dim, SubNthElement); in operator ()()
Dquantized_bias_add_op.cc52 const auto last_dim = input.shape().dims() - 1; in Compute() local
54 context, bias.shape().dim_size(0) == input.shape().dim_size(last_dim), in Compute()
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Dtopk_op.cc42 int last_dim = input_shape.dims() - 1; in Compile() local
43 int last_dim_size = input_shape.dim_size(last_dim); in Compile()
/external/tensorflow/tensorflow/core/ops/
Dnn_ops.cc110 DimensionHandle last_dim = c->Dim(input, 3); in __anonad10f3360202() local
114 TF_RETURN_IF_ERROR(c->Merge(last_dim, c->Dim(vec, 0), &last_dim)); in __anonad10f3360202()
118 TF_RETURN_IF_ERROR(c->ReplaceDim(input, 3, last_dim, &out)); in __anonad10f3360202()
144 DimensionHandle last_dim = c->Dim(input, 3); in __anonad10f3360302() local
148 TF_RETURN_IF_ERROR(c->Merge(last_dim, c->Dim(vec, 0), &last_dim)); in __anonad10f3360302()
152 TF_RETURN_IF_ERROR(c->ReplaceDim(input, 3, last_dim, &dx)); in __anonad10f3360302()
155 ShapeHandle vector_shape = c->Vector(last_dim); in __anonad10f3360302()
1310 DimensionHandle last_dim = c->Dim(input, -1); in TopKShapeFn() local
1311 if (c->ValueKnown(last_dim) && c->ValueKnown(k_dim) && in TopKShapeFn()
1312 c->Value(last_dim) < c->Value(k_dim)) { in TopKShapeFn()
[all …]
Dimage_ops.cc136 DimensionHandle last_dim; in ColorspaceShapeFn() local
137 TF_RETURN_IF_ERROR(c->WithValue(c->Dim(input, -1), 3, &last_dim)); in ColorspaceShapeFn()
139 TF_RETURN_IF_ERROR(c->ReplaceDim(input, -1, last_dim, &out)); in ColorspaceShapeFn()
Darray_ops.cc3302 ShapeHandle last_dim = c->Vector(c->Dim(inputs, -1)); in __anon42d741194c02() local
3306 TF_RETURN_IF_ERROR(c->Merge(min_max, last_dim, &min_max)); in __anon42d741194c02()
/external/tensorflow/tensorflow/compiler/mlir/lite/transforms/
Dprepare_tf.cc1083 int64_t last_dim = -1; in matchAndRewrite() local
1084 auto is_last_dim_compatible = [](const Value &v, int64_t &last_dim) { in matchAndRewrite() argument
1089 if (last_dim != -1 && v_last_dim != last_dim) return false; in matchAndRewrite()
1090 last_dim = v_last_dim; in matchAndRewrite()
1094 if (!is_last_dim_compatible(*x.begin(), last_dim) || in matchAndRewrite()
1095 !is_last_dim_compatible(*scale.begin(), last_dim) || in matchAndRewrite()
1096 !is_last_dim_compatible(*offset.begin(), last_dim)) { in matchAndRewrite()
1105 if (!is_last_dim_compatible(mean_value, last_dim) || in matchAndRewrite()
1106 !is_last_dim_compatible(variance_value, last_dim)) { in matchAndRewrite()
/external/tensorflow/tensorflow/python/keras/layers/
Dcore.py685 last_dim = int(functools.reduce(operator.mul, non_batch_dims))
686 flattened_shape = constant_op.constant([-1, last_dim])
1181 last_dim = tensor_shape.dimension_value(input_shape[-1])
1182 if last_dim is None:
1185 self.input_spec = InputSpec(min_ndim=2, axes={-1: last_dim})
1188 shape=[last_dim, self.units],
/external/tensorflow/tensorflow/lite/kernels/internal/optimized/
Doptimized_ops.h3769 const int last_dim = in Softmax() local
3777 for (int j = 0; j < last_dim; ++j) { in Softmax()
3785 for (int j = 0; j < last_dim; ++j) { in Softmax()
3791 for (int j = 0; j < last_dim; ++j) { in Softmax()
3798 input_data += last_dim; in Softmax()
3799 output_data += last_dim; in Softmax()
3911 const int last_dim = in SoftmaxInt8LUT() local
3949 int32_t max_val = FindMaxValue(last_dim, input_data_uint, offset); in SoftmaxInt8LUT()
3962 for (; sum_j <= last_dim - 16; sum_j += 16) { in SoftmaxInt8LUT()
3986 for (; sum_j < last_dim; ++sum_j) { in SoftmaxInt8LUT()
[all …]
/external/tensorflow/tensorflow/lite/toco/graph_transformations/
Dpropagate_fixed_sizes.cc2103 int last_dim = (*dims)[dims_size - 1]; in ProcessMatrixDiagOperator() local
2104 dims->push_back(last_dim); in ProcessMatrixDiagOperator()
/external/tensorflow/tensorflow/compiler/mlir/xla/transforms/
Dlegalize_tf.cc3185 int last_dim = std::max(static_cast<int>(input_shape.size()) - 1, 0); in rewriteWithUnknownBegin() local
3201 if (!(ellipsis_mask == 0 || ellipsis_mask == (1 << last_dim))) in rewriteWithUnknownBegin()