Home
last modified time | relevance | path

Searched refs:shape_tensor (Results 1 – 25 of 83) sorted by relevance

1234

/external/tensorflow/tensorflow/lite/delegates/hexagon/builders/
Dreshape_builder.cc30 void PopulateOutputShapeFromTensor(const TfLiteTensor* shape_tensor, in PopulateOutputShapeFromTensor() argument
32 for (int i = 0; i < shape_tensor->dims->data[0]; ++i) { in PopulateOutputShapeFromTensor()
33 output_shape->push_back(shape_tensor->data.i32[i]); in PopulateOutputShapeFromTensor()
61 TfLiteTensor* shape_tensor = nullptr; in PopulateSubGraph() local
64 shape_tensor = &context->tensors[inputs->data[1]]; in PopulateSubGraph()
66 (shape_tensor->dims->size == 1 && shape_tensor->type == kTfLiteInt32); in PopulateSubGraph()
68 if (shape_tensor->allocation_type != kTfLiteMmapRo && is_shape_tensor) { in PopulateSubGraph()
73 shape_tensor = nullptr; in PopulateSubGraph()
77 if (shape_tensor) { in PopulateSubGraph()
78 PopulateOutputShapeFromTensor(shape_tensor, &output_shape_); in PopulateSubGraph()
/external/tensorflow/tensorflow/core/kernels/
Drandom_binomial_op.cc338 const Tensor& shape_tensor = ctx->input(2); in Compute() local
352 ctx, TensorShapeUtils::IsVector(shape_tensor.shape()), in Compute()
354 shape_tensor.shape().DebugString())); in Compute()
356 (shape_tensor.dtype() == DataType::DT_INT32 || in Compute()
357 shape_tensor.dtype() == DataType::DT_INT64), in Compute()
364 if (shape_tensor.dtype() == DataType::DT_INT32) { in Compute()
365 OP_REQUIRES_OK(ctx, TensorShapeUtils::MakeShape(shape_tensor.vec<int32>(), in Compute()
368 OP_REQUIRES_OK(ctx, TensorShapeUtils::MakeShape(shape_tensor.vec<int64>(), in Compute()
383 (shape_tensor.dim_size(0) - bcast.output_shape().size()); in Compute()
385 samples_per_batch *= shape_tensor.flat<int32>()(i); in Compute()
[all …]
Dparameterized_truncated_normal_op.cc620 const Tensor& shape_tensor = ctx->input(0); in Compute() local
627 ctx, TensorShapeUtils::IsVector(shape_tensor.shape()), in Compute()
629 shape_tensor.shape().DebugString())); in Compute()
630 int32 num_batches = shape_tensor.flat<int32>()(0); in Compute()
633 const int32 num_dims = shape_tensor.dim_size(0); in Compute()
635 samples_per_batch *= shape_tensor.flat<int32>()(i); in Compute()
640 auto shape_vec = shape_tensor.flat<int32>(); in Compute()
741 const Tensor& shape_tensor = ctx->input(0); in Compute() local
771 ctx, TensorShapeUtils::IsVector(shape_tensor.shape()), in Compute()
773 shape_tensor.shape().DebugString())); in Compute()
[all …]
Dbroadcast_to_op.cc47 const Tensor& shape_tensor = ctx->input(1); in Compute() local
50 OP_REQUIRES_OK(ctx, tensor::MakeShape(shape_tensor, &output_shape)); in Compute()
Dsparse_conditional_accumulator.h442 Tensor* shape_tensor; in ReturnShapeTensor() local
444 ctx, ctx->allocate_output(2, {accum_val_dims}, &shape_tensor)); in ReturnShapeTensor()
449 shape_tensor->flat<int64>()(0) = in ReturnShapeTensor()
452 shape_tensor->flat<int64>()(i) = accum_val_->dim_size(i); in ReturnShapeTensor()
/external/tensorflow/tensorflow/python/ops/
Drandom_ops.py90 shape_tensor = tensor_util.shape_tensor(shape)
95 shape_tensor, dtype, seed=seed1, seed2=seed2)
141 shape_tensor = tensor_util.shape_tensor(shape)
148 shape_tensor,
199 shape_tensor = tensor_util.shape_tensor(shape)
204 shape_tensor, dtype, seed=seed1, seed2=seed2)
296 shape = tensor_util.shape_tensor(shape)
543 shape = tensor_util.shape_tensor(shape)
Dstateless_random_ops.py214 shape = tensor_util.shape_tensor(shape)
309 shape = tensor_util.shape_tensor(shape)
405 shape = tensor_util.shape_tensor(shape)
476 shape = tensor_util.shape_tensor(shape)
515 shape = tensor_util.shape_tensor(shape)
565 shape = tensor_util.shape_tensor(shape)
730 shape_tensor = tensor_util.shape_tensor(shape)
736 shape_tensor, seed, means_tensor, stddevs_tensor, minvals_tensor,
Dstateful_random_ops.py708 shape_tensor = _shape_tensor(shape)
711 rnd = self._truncated_normal(shape_tensor, dtype=dtype)
885 shape_tensor = _shape_tensor(shape)
889 shape=shape_tensor,
/external/tensorflow/tensorflow/lite/micro/kernels/
Dreshape_test.cc66 TfLiteTensor* shape_tensor, in TestReshapeWithShape() argument
76 tensors[1] = *shape_tensor; in TestReshapeWithShape()
125 TfLiteTensor shape_tensor = CreateTensor(shape_data, shape_dims); in TestReshape() local
128 TestReshapeWithShape(&input_tensor, &shape_tensor, &output_tensor, in TestReshape()
147 TfLiteTensor shape_tensor = CreateTensor(shape_data, shape_dims); in TestReshapeQuantized() local
151 TestReshapeWithShape(&input_tensor, &shape_tensor, &output_tensor, in TestReshapeQuantized()
346 auto shape_tensor = tflite::testing::CreateTensor(shape_data, shape_dims); in TF_LITE_MICRO_TEST() local
354 &input_tensor, &shape_tensor, &output_tensor, expected_output_with_shape, in TF_LITE_MICRO_TEST()
/external/tensorflow/tensorflow/core/kernels/fuzzing/
Dscatter_nd_fuzz.cc56 Tensor shape_tensor(tensorflow::DT_INT32, in FuzzImpl() local
66 auto flat_shape = shape_tensor.flat<int32>(); in FuzzImpl()
124 {"shape", shape_tensor}}); in FuzzImpl()
/external/tensorflow/tensorflow/python/ops/linalg/
Dlinear_operator_zeros.py217 self._num_rows = linear_operator_util.shape_tensor(
224 self._num_columns = linear_operator_util.shape_tensor(
242 self._batch_shape_arg = linear_operator_util.shape_tensor(
459 return math_ops.reduce_min(self.shape_tensor()[-2:])
Dlinear_operator.py321 def shape_tensor(self, name="shape_tensor"): member in LinearOperator
337 return linear_operator_util.shape_tensor(self.shape.as_list())
376 return linear_operator_util.shape_tensor(
379 shape = self.shape_tensor() if shape is None else shape
421 shape = self.shape_tensor() if shape is None else shape
465 shape = self.shape_tensor() if shape is None else shape
509 shape = self.shape_tensor() if shape is None else shape
Dlinear_operator_identity.py87 return math_ops.reduce_min(self.shape_tensor()[-2:])
292 self._num_rows = linear_operator_util.shape_tensor(
300 self._batch_shape_arg = linear_operator_util.shape_tensor(
648 self._num_rows = linear_operator_util.shape_tensor(
/external/tensorflow/tensorflow/python/kernel_tests/linalg/
Dlinear_operator_low_rank_update_test.py314 shape_tensor = operator.shape_tensor().eval(feed_dict=feed_dict)
315 self.assertAllEqual([2, 2, 2, 3, 3], shape_tensor)
Dlinear_operator_composition_test.py206 self.assertAllEqual((2, 3, 5), operator.shape_tensor())
223 (1, 2, 3, 5), operator.shape_tensor().eval(feed_dict=feed_dict))
/external/tensorflow/tensorflow/lite/kernels/
Dtranspose_conv.cc104 const TfLiteTensor* shape_tensor, in ResizeTensor() argument
107 if (shape_tensor->type != kTfLiteInt32) { in ResizeTensor()
109 TfLiteTypeGetName(shape_tensor->type)); in ResizeTensor()
113 TfLiteIntArray* shape = TfLiteIntArrayCreate(NumElements(shape_tensor)); in ResizeTensor()
115 shape->data[i] = GetTensorData<int32_t>(shape_tensor)[i]; in ResizeTensor()
/external/tensorflow/tensorflow/tools/api/golden/v2/
Dtensorflow.linalg.-linear-operator.pbtxt157 name: "shape_tensor"
158 argspec: "args=[\'self\', \'name\'], varargs=None, keywords=None, defaults=[\'shape_tensor\'], "
Dtensorflow.linalg.-linear-operator-toeplitz.pbtxt166 name: "shape_tensor"
167 argspec: "args=[\'self\', \'name\'], varargs=None, keywords=None, defaults=[\'shape_tensor\'], "
Dtensorflow.linalg.-linear-operator-scaled-identity.pbtxt163 name: "shape_tensor"
164 argspec: "args=[\'self\', \'name\'], varargs=None, keywords=None, defaults=[\'shape_tensor\'], "
Dtensorflow.linalg.-linear-operator-full-matrix.pbtxt158 name: "shape_tensor"
159 argspec: "args=[\'self\', \'name\'], varargs=None, keywords=None, defaults=[\'shape_tensor\'], "
Dtensorflow.linalg.-linear-operator-householder.pbtxt162 name: "shape_tensor"
163 argspec: "args=[\'self\', \'name\'], varargs=None, keywords=None, defaults=[\'shape_tensor\'], "
Dtensorflow.linalg.-linear-operator-tridiag.pbtxt166 name: "shape_tensor"
167 argspec: "args=[\'self\', \'name\'], varargs=None, keywords=None, defaults=[\'shape_tensor\'], "
Dtensorflow.linalg.-linear-operator-kronecker.pbtxt162 name: "shape_tensor"
163 argspec: "args=[\'self\', \'name\'], varargs=None, keywords=None, defaults=[\'shape_tensor\'], "
/external/tensorflow/tensorflow/tools/api/golden/v1/
Dtensorflow.linalg.-linear-operator-householder.pbtxt162 name: "shape_tensor"
163 argspec: "args=[\'self\', \'name\'], varargs=None, keywords=None, defaults=[\'shape_tensor\'], "
Dtensorflow.linalg.-linear-operator-kronecker.pbtxt162 name: "shape_tensor"
163 argspec: "args=[\'self\', \'name\'], varargs=None, keywords=None, defaults=[\'shape_tensor\'], "

1234