Home
last modified time | relevance | path

Searched refs:shape_tensor (Results 1 – 25 of 87) 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()
369 shape_tensor.vec<int64_t>(), &output_shape)); 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.cc621 const Tensor& shape_tensor = ctx->input(0); in Compute() local
628 ctx, TensorShapeUtils::IsVector(shape_tensor.shape()), in Compute()
630 shape_tensor.shape().DebugString())); in Compute()
631 OP_REQUIRES(ctx, shape_tensor.NumElements() > 0, in Compute()
633 shape_tensor.DebugString())); in Compute()
635 OP_REQUIRES_OK(ctx, tensor::MakeShape(shape_tensor, &tensor_shape)); in Compute()
743 const Tensor& shape_tensor = ctx->input(0); in Compute() local
773 ctx, TensorShapeUtils::IsVector(shape_tensor.shape()), in Compute()
775 shape_tensor.shape().DebugString())); in Compute()
777 if (shape_tensor.dtype() == DataType::DT_INT32) { 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.h417 Tensor* shape_tensor; in ReturnShapeTensor() local
419 ctx, ctx->allocate_output(2, {accum_val_dims}, &shape_tensor)); in ReturnShapeTensor()
424 shape_tensor->flat<int64_t>()(0) = in ReturnShapeTensor()
427 shape_tensor->flat<int64_t>()(i) = accum_val_->dim_size(i); in ReturnShapeTensor()
/external/tensorflow/tensorflow/python/ops/
Drandom_ops.py87 shape_tensor = tensor_util.shape_tensor(shape)
92 shape_tensor, dtype, seed=seed1, seed2=seed2)
138 shape_tensor = tensor_util.shape_tensor(shape)
145 shape_tensor,
196 shape_tensor = tensor_util.shape_tensor(shape)
201 shape_tensor, dtype, seed=seed1, seed2=seed2)
296 shape = tensor_util.shape_tensor(shape)
554 shape = tensor_util.shape_tensor(shape)
Dstateless_random_ops.py465 shape = tensor_util.shape_tensor(shape)
552 shape = tensor_util.shape_tensor(shape)
648 shape = tensor_util.shape_tensor(shape)
719 shape = tensor_util.shape_tensor(shape)
762 shape = tensor_util.shape_tensor(shape)
812 shape = tensor_util.shape_tensor(shape)
981 shape_tensor = tensor_util.shape_tensor(shape)
987 shape_tensor, seed, means_tensor, stddevs_tensor, minvals_tensor,
Dstateful_random_ops.py699 shape_tensor = _shape_tensor(shape)
702 rnd = self._truncated_normal(shape_tensor, dtype=dtype)
861 shape_tensor = _shape_tensor(shape)
865 shape=shape_tensor,
/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/compiler/tf2tensorrt/kernels/
Dtrt_engine_resource_ops_test.cc187 Tensor shape_tensor(DT_INT32, shape); in CreateTRTEngine() local
192 shape_tensor.flat<int32_t>().data()); in CreateTRTEngine()
193 DataVec shape_values{{"one", {}}, {"two", shape_tensor}}; in CreateTRTEngine()
377 Tensor shape_tensor(DT_INT32, shapes[1]); in TEST_P() local
380 shape_tensor.flat<int32_t>().data()); in TEST_P()
383 DataVec shape_values{{"one", {}}, {"two", shape_tensor}}; in TEST_P()
/external/tensorflow/tensorflow/examples/custom_ops_doc/multiplex_3/
Dmultiplex_3_kernel.cc181 const ::tensorflow::Tensor& shape_tensor, in ValidateSparseTensor()
193 if (!TensorShapeUtils::IsVector(shape_tensor.shape())) { in ValidateSparseTensor()
196 " must be a vector, not shape: ", shape_tensor.shape().DebugString()); in ValidateSparseTensor()
/external/tensorflow/tensorflow/python/ops/linalg/
Dlinear_operator_zeros.py214 self._num_rows = linear_operator_util.shape_tensor(
221 self._num_columns = linear_operator_util.shape_tensor(
239 self._batch_shape_arg = linear_operator_util.shape_tensor(
456 return math_ops.reduce_min(self.shape_tensor()[-2:])
Dlinear_operator.py325 def shape_tensor(self, name="shape_tensor"): member in LinearOperator
341 return linear_operator_util.shape_tensor(self.shape.as_list())
380 return linear_operator_util.shape_tensor(
383 shape = self.shape_tensor() if shape is None else shape
425 shape = self.shape_tensor() if shape is None else shape
469 shape = self.shape_tensor() if shape is None else shape
513 shape = self.shape_tensor() if shape is None else shape
Dlinear_operator_identity.py83 return math_ops.reduce_min(self.shape_tensor()[-2:])
289 self._num_rows = linear_operator_util.shape_tensor(
297 self._batch_shape_arg = linear_operator_util.shape_tensor(
662 self._num_rows = linear_operator_util.shape_tensor(
/external/tensorflow/tensorflow/lite/kernels/
Dconv3d_transpose.cc85 const TfLiteTensor* shape_tensor, const TfLiteTensor* filter, in ResizeOutputAndTemporaryTensors() argument
87 auto shape_data = GetTensorData<int32_t>(shape_tensor); in ResizeOutputAndTemporaryTensors()
114 TfLiteIntArrayCreate(NumElements(shape_tensor)); in ResizeOutputAndTemporaryTensors()
116 output_shape->data[i] = GetTensorData<int32_t>(shape_tensor)[i]; in ResizeOutputAndTemporaryTensors()
/external/tensorflow/tensorflow/security/advisory/
Dtfsa-2021-055.md28 int32 num_batches = shape_tensor.flat<int32>()(0);
31 If `shape` argument is empty, then `shape_tensor.flat<T>()` is an empty array.
/external/tensorflow/tensorflow/python/kernel_tests/linalg/
Dlinear_operator_low_rank_update_test.py358 shape_tensor = operator.shape_tensor().eval(feed_dict=feed_dict)
359 self.assertAllEqual([2, 2, 2, 3, 3], shape_tensor)
/external/tensorflow/tensorflow/tools/api/golden/v1/
Dtensorflow.linalg.-linear-operator-identity.pbtxt160 name: "shape_tensor"
161 argspec: "args=[\'self\', \'name\'], varargs=None, keywords=None, defaults=[\'shape_tensor\'], "
Dtensorflow.linalg.-linear-operator-permutation.pbtxt163 name: "shape_tensor"
164 argspec: "args=[\'self\', \'name\'], varargs=None, keywords=None, defaults=[\'shape_tensor\'], "
/external/tensorflow/tensorflow/tools/api/golden/v2/
Dtensorflow.linalg.-linear-operator-inversion.pbtxt163 name: "shape_tensor"
164 argspec: "args=[\'self\', \'name\'], varargs=None, keywords=None, defaults=[\'shape_tensor\'], "
Dtensorflow.linalg.-linear-operator-toeplitz.pbtxt167 name: "shape_tensor"
168 argspec: "args=[\'self\', \'name\'], varargs=None, keywords=None, defaults=[\'shape_tensor\'], "
Dtensorflow.linalg.-linear-operator-full-matrix.pbtxt163 name: "shape_tensor"
164 argspec: "args=[\'self\', \'name\'], varargs=None, keywords=None, defaults=[\'shape_tensor\'], "
Dtensorflow.linalg.-linear-operator-tridiag.pbtxt167 name: "shape_tensor"
168 argspec: "args=[\'self\', \'name\'], varargs=None, keywords=None, defaults=[\'shape_tensor\'], "
Dtensorflow.linalg.-linear-operator-composition.pbtxt163 name: "shape_tensor"
164 argspec: "args=[\'self\', \'name\'], varargs=None, keywords=None, defaults=[\'shape_tensor\'], "
Dtensorflow.linalg.-linear-operator-zeros.pbtxt159 name: "shape_tensor"
160 argspec: "args=[\'self\', \'name\'], varargs=None, keywords=None, defaults=[\'shape_tensor\'], "

1234