Home
last modified time | relevance | path

Searched refs:shape_t (Results 1 – 25 of 27) sorted by relevance

12

/external/tensorflow/tensorflow/core/kernels/
Dsparse_reduce_op.cc106 Status ValidateInputs(const Tensor *shape_t, const Tensor *reduction_axes_t) { in ValidateInputs() argument
108 if (!TensorShapeUtils::IsVector(shape_t->shape())) { in ValidateInputs()
111 shape_t->shape().DebugString()); in ValidateInputs()
123 if (axis < -shape_t->NumElements() || axis >= shape_t->NumElements()) { in ValidateInputs()
126 shape_t->NumElements(), " dimensions."); in ValidateInputs()
161 const Tensor *indices_t, *values_t, *shape_t, *reduction_axes_t; in Compute() local
164 OP_REQUIRES_OK(ctx, ctx->input("input_shape", &shape_t)); in Compute()
167 OP_REQUIRES_OK(ctx, ValidateInputs(shape_t, reduction_axes_t)); in Compute()
174 const auto shape_vec = shape_t->vec<int64>(); in Compute()
257 const Tensor *indices_t, *values_t, *shape_t, *reduction_axes_t; in Compute() local
[all …]
Dparameterized_truncated_normal_op_test.cc29 Tensor shape_t(DT_INT32, TensorShape({2})); in PTruncatedNormal() local
30 shape_t.flat<int32>().setValues({num_batches, samples_per_batch}); in PTruncatedNormal()
46 .Input(test::graph::Constant(g, shape_t)) in PTruncatedNormal()
58 Tensor shape_t(DT_INT32, TensorShape({2})); in PTruncatedNormal2SD() local
59 shape_t.flat<int32>().setValues({num_batches, samples_per_batch}); in PTruncatedNormal2SD()
73 .Input(test::graph::Constant(g, shape_t)) in PTruncatedNormal2SD()
85 Tensor shape_t(DT_INT32, TensorShape({2})); in PTruncatedNormalOneTail() local
86 shape_t.flat<int32>().setValues({num_batches, samples_per_batch}); in PTruncatedNormalOneTail()
100 .Input(test::graph::Constant(g, shape_t)) in PTruncatedNormalOneTail()
Dsparse_softmax_op.cc43 const Tensor *indices_t, *values_t, *shape_t; in Compute() local
46 OP_REQUIRES_OK(context, context->input("sp_shape", &shape_t)); in Compute()
55 TensorShapeUtils::IsVector(shape_t->shape()), in Compute()
60 shape_t->shape().DebugString())); in Compute()
61 OP_REQUIRES(context, shape_t->NumElements() >= 2, in Compute()
64 shape_t->SummarizeValue(3))); in Compute()
72 TensorShape(shape_t->flat<int64>()), &st)); in Compute()
Dsparse_dense_binary_op_shared.cc62 const Tensor *indices_t, *values_t, *shape_t, *dense_t; in Compute() local
65 OP_REQUIRES_OK(ctx, ctx->input("sp_shape", &shape_t)); in Compute()
75 TensorShapeUtils::IsVector(shape_t->shape()), in Compute()
80 shape_t->shape().DebugString())); in Compute()
83 const auto shape_vec = shape_t->vec<int64>(); in Compute()
Drandom_op.cc147 const Tensor& shape_t = ctx->input(0); in Compute() local
151 TensorShapeUtils::IsVector(shape_t.shape()) && in Compute()
152 (shape_t.dtype() == DataType::DT_INT32 || in Compute()
153 shape_t.dtype() == DataType::DT_INT64), in Compute()
156 shape_t.DebugString())); in Compute()
158 if (shape_t.dtype() == DataType::DT_INT32) { in Compute()
159 auto vec = shape_t.flat<int32>(); in Compute()
162 } else if (shape_t.dtype() == DataType::DT_INT64) { in Compute()
163 auto vec = shape_t.flat<int64>(); in Compute()
Drandom_binomial_op_test.cc30 Tensor shape_t(DT_INT32, TensorShape({2})); in RandomBinomialGraph() local
31 shape_t.flat<int32>().setValues({num_batches, samples_per_batch}); in RandomBinomialGraph()
40 .Input(test::graph::Constant(g, shape_t)) in RandomBinomialGraph()
Dstateful_random_ops.cc132 const Tensor& shape_t = ctx->input(shape_input_idx); in StatefulRandomCompute() local
134 OP_REQUIRES_OK(ctx, tensor::MakeShape(shape_t, &shape)); in StatefulRandomCompute()
321 const Tensor& shape_t = ctx->input(0); in Compute() local
323 OP_REQUIRES_OK(ctx, tensor::MakeShape(shape_t, &shape)); in Compute()
Dstateless_random_gamma_op.cc202 const Tensor& shape_t = context->input(0); in Compute() local
205 OP_REQUIRES_OK(context, tensor::MakeShape(shape_t, &shape)); in Compute()
Dctc_decoder_ops.cc148 auto shape_t = p_shape->vec<int64>(); in StoreAllDecodedSequences() local
171 shape_t(0) = batch_size; in StoreAllDecodedSequences()
172 shape_t(1) = max_decoded; in StoreAllDecodedSequences()
Dnccl_ops.cc233 const Tensor& shape_t = c->input(0); in ComputeAsync() local
236 c, TensorShapeUtils::MakeShape(shape_t.vec<int32>(), &shape), done); in ComputeAsync()
Drandom_poisson_op.cc293 const Tensor& shape_t = ctx->input(0); in Compute() local
297 OP_REQUIRES_OK(ctx, tensor::MakeShape(shape_t, &samples_shape)); in Compute()
Dstateless_random_ops.cc76 const Tensor& shape_t = context->input(0); in Compute() local
79 OP_REQUIRES_OK(context, tensor::MakeShape(shape_t, &shape)); in Compute()
Dexample_parsing_ops.cc1046 auto shape_t = sp_shape_d->vec<int64>(); in Compute() local
1047 shape_t(0) = num_elements; in Compute()
1062 auto shape_t = sp_shape_d->vec<int64>(); in Compute() local
1063 shape_t(0) = 0; in Compute()
1172 auto shape_t = sp_shape_d->vec<int64>(); in Compute() local
1173 shape_t(0) = feature_list_size; in Compute()
1174 shape_t(1) = max_num_features; in Compute()
Dstateless_random_ops_v2.cc73 const Tensor& shape_t = ctx->input(0); in Compute() local
84 OP_REQUIRES_OK(ctx, tensor::MakeShape(shape_t, &shape)); in Compute()
/external/tensorflow/tensorflow/core/kernels/image/
Drandom_crop_op.cc39 const Tensor& shape_t = context->input(1); in Compute() local
40 OP_REQUIRES(context, shape_t.dims() == 1, in Compute()
42 shape_t.shape().DebugString())); in Compute()
43 OP_REQUIRES(context, shape_t.NumElements() == 2, in Compute()
45 shape_t.shape().DebugString())); in Compute()
47 auto shape_vec = shape_t.vec<int64>(); in Compute()
Dimage_ops.cc70 const Tensor& shape_t = ctx->input(2); in DoImageProjectiveTransformOp() local
71 OP_REQUIRES(ctx, shape_t.dims() == 1, in DoImageProjectiveTransformOp()
73 shape_t.shape().DebugString())); in DoImageProjectiveTransformOp()
74 OP_REQUIRES(ctx, shape_t.NumElements() == 2, in DoImageProjectiveTransformOp()
76 shape_t.shape().DebugString())); in DoImageProjectiveTransformOp()
77 auto shape_vec = shape_t.vec<int32>(); in DoImageProjectiveTransformOp()
Dresize_nearest_neighbor_op.cc218 const Tensor& shape_t = context->input(1); in Compute() local
219 OP_REQUIRES(context, shape_t.dims() == 1, in Compute()
221 shape_t.shape().DebugString())); in Compute()
222 OP_REQUIRES(context, shape_t.NumElements() == 2, in Compute()
224 shape_t.shape().DebugString())); in Compute()
226 auto sizes = shape_t.vec<int32>(); in Compute()
Dresize_bicubic_op_test.cc262 auto shape_t = shape.flat<int32>(); in ResizeBicubic() local
263 shape_t(0) = scale_y * size; in ResizeBicubic()
264 shape_t(1) = scale_x * size; in ResizeBicubic()
/external/tensorflow/tensorflow/core/util/
Dimage_resizer_state.h89 const Tensor& shape_t = context->input(1); in ValidateAndCalculateOutputSize() local
90 OP_REQUIRES(context, shape_t.dims() == 1, in ValidateAndCalculateOutputSize()
92 shape_t.shape().DebugString())); in ValidateAndCalculateOutputSize()
93 OP_REQUIRES(context, shape_t.NumElements() == 2, in ValidateAndCalculateOutputSize()
95 shape_t.shape().DebugString())); in ValidateAndCalculateOutputSize()
96 auto Svec = shape_t.vec<int32>(); in ValidateAndCalculateOutputSize()
Dexample_proto_helper.cc391 auto shape_t = (*output_sparse_shapes_tensor)[d].vec<int64>(); in BatchExampleProtoToTensors() local
392 shape_t(0) = batch_size; in BatchExampleProtoToTensors()
393 shape_t(1) = sparse_tensor_batch_shapes.max_num_features; in BatchExampleProtoToTensors()
/external/tensorflow/tensorflow/core/ops/
Dnn_ops_test.cc571 Tensor shape_t = test::AsTensor<int32>(shape); in TEST() local
572 op.input_tensors[0] = &shape_t; in TEST()
Darray_ops_test.cc558 Tensor shape_t(DT_INT64, TensorShape{3}); in TEST() local
559 test::FillValues<int64>(&shape_t, {2, 10, 3}); in TEST()
560 op.input_tensors[1] = &shape_t; in TEST()
/external/python/cpython3/Lib/test/
Dtest_buffer.py1351 shape_t = [randrange(2, 10) for _ in range(ndim)]
1352 nitems = prod(shape_t)
1353 for shape in permutations(shape_t):
1563 shape_t = (2, 3, 5)
1564 nitems = prod(shape_t)
1565 for shape in permutations(shape_t):
1722 shape_t = (2, 3, 5)
1723 ndim = len(shape_t)
1724 nitems = prod(shape_t)
1725 for shape in permutations(shape_t):
[all …]
/external/tensorflow/tensorflow/python/training/
Dserver_lib_test.py128 shape_t = array_ops.shape(c)
129 self.assertAllEqual([10000, 3000], sess.run(shape_t))
/external/tensorflow/tensorflow/core/framework/
Dtensor_util.h330 Status MakeShape(const Tensor& shape_t, TensorShape* out);

12