Home
last modified time | relevance | path

Searched refs:value_tensor (Results 1 – 11 of 11) sorted by relevance

/external/tensorflow/tensorflow/lite/kernels/hashtable/
Dhashtable_import.cc47 const TfLiteTensor* value_tensor; in PrepareHashtableImport() local
49 GetInputSafe(context, node, kValueTensor, &value_tensor)); in PrepareHashtableImport()
51 value_tensor->type == kTfLiteString) || in PrepareHashtableImport()
53 value_tensor->type == kTfLiteInt64)); in PrepareHashtableImport()
56 TF_LITE_ENSURE(context, HaveSameShapes(key_tensor, value_tensor)); in PrepareHashtableImport()
69 const TfLiteTensor* value_tensor; in EvalHashtableImport() local
71 GetInputSafe(context, node, kValueTensor, &value_tensor)); in EvalHashtableImport()
78 lookup->CheckKeyAndValueTypes(context, key_tensor, value_tensor)); in EvalHashtableImport()
81 auto result = lookup->Import(context, key_tensor, value_tensor); in EvalHashtableImport()
Dhashtable_ops_test.cc738 TfLiteTensor value_tensor = CreateTensor<ValueType>(value_type, values); in InitHashtableResource() local
739 lookup->Import(&context, &key_tensor, &value_tensor); in InitHashtableResource()
741 TfLiteTensorFree(&value_tensor); in InitHashtableResource()
769 auto value_tensor = interpreter_->tensor(values_); in CreateHashtableResource() local
773 &resources, resource_id, key_tensor->type, value_tensor->type); in CreateHashtableResource()
/external/tensorflow/tensorflow/core/kernels/
Dbias_op.cc45 void GetBiasValueDims(const Tensor& value_tensor, TensorFormat data_format, in GetBiasValueDims() argument
54 int32 channel_dim = value_tensor.dims() - 1; in GetBiasValueDims()
55 *channel = static_cast<int32>(value_tensor.dim_size(channel_dim)); in GetBiasValueDims()
57 *batch *= static_cast<int32>(value_tensor.dim_size(i)); in GetBiasValueDims()
60 *batch = static_cast<int32>(value_tensor.dim_size(0)); in GetBiasValueDims()
61 *channel = static_cast<int32>(value_tensor.dim_size(1)); in GetBiasValueDims()
62 *height = static_cast<int32>(value_tensor.dim_size(2)); in GetBiasValueDims()
63 if (value_tensor.dims() > 3) { in GetBiasValueDims()
64 *width = static_cast<int32>(value_tensor.dim_size(3)); in GetBiasValueDims()
66 if (value_tensor.dims() > 4) { in GetBiasValueDims()
[all …]
/external/tensorflow/tensorflow/python/keras/layers/
Dmulti_head_attention_test.py218 value_tensor = keras.Input(value_shape[1:], name="value")
220 output = test_layer(query=query_tensor, value=value_tensor,
222 model = keras.Model([query_tensor, value_tensor, mask_tensor], output)
253 value_tensor, argument
256 return value_tensor, None
/external/tensorflow/tensorflow/core/kernels/data/experimental/
Dlmdb_dataset_op.cc98 Tensor& value_tensor = out_tensors->back(); in GetNextInternal() local
99 value_tensor.scalar<tstring>()() = string( in GetNextInternal()
/external/tensorflow/tensorflow/python/data/util/
Dstructure_test.py403 value_tensor = constant_op.constant(42.0)
404 s_tensor = structure.type_spec_from_value(value_tensor)
405 flat_tensor = structure.to_tensor_list(s_tensor, value_tensor)
430 structure.to_tensor_list(s_sparse_tensor, value_tensor)
438 structure.to_tensor_list(s_nest, value_tensor)
/external/tensorflow/tensorflow/python/ops/
Dresource_variable_ops.py307 value_tensor = ops.convert_to_tensor(value)
308 shape.assert_is_compatible_with(value_tensor.shape)
310 handle, value_tensor, name=name)
885 value_tensor = ops.convert_to_tensor(value, dtype=self.dtype)
886 if not self._shape.is_compatible_with(value_tensor.shape):
894 (tensor_name, self._shape, value_tensor.shape))
896 self.handle, value_tensor, name=name)
Dmetrics_impl.py1512 value_tensor = _aggregate_variable(count, metrics_collections)
1518 return value_tensor, update_op
/external/tensorflow/tensorflow/core/grappler/
Dgrappler_item_builder.cc338 Tensor value_tensor(input.dtype(), shape_1d); in GrapplerItemFromMetaGraphDef() local
339 InitializeTensor(input.dtype(), &value_tensor); in GrapplerItemFromMetaGraphDef()
341 NodeName(input.coo_sparse().values_tensor_name()), value_tensor); in GrapplerItemFromMetaGraphDef()
/external/tensorflow/tensorflow/lite/delegates/nnapi/
Dnnapi_delegate.cc2745 const auto& value_tensor = context->tensors[node->inputs->data[1]]; in Validate() local
2746 EXPECT_INPUT_TYPE_IN(value_tensor.type, kTfLiteFloat32, kTfLiteInt32, in Validate()
2748 if (value_tensor.type == kTfLiteInt64) { in Validate()
2750 IsConstantTensor(&value_tensor) && in Validate()
2751 *value_tensor.data.i64 <= std::numeric_limits<int32_t>::max() && in Validate()
2752 *value_tensor.data.i64 >= std::numeric_limits<int32_t>::min(), in Validate()
4615 const TfLiteTensor& value_tensor = context->tensors[value_id]; in AddOpsAndTensors() local
4616 switch (value_tensor.type) { in AddOpsAndTensors()
4619 builder.AddScalarFloat32Operand(*value_tensor.data.f)); in AddOpsAndTensors()
4623 builder.AddScalarInt32Operand(*value_tensor.data.i32)); in AddOpsAndTensors()
[all …]
/external/tensorflow/tensorflow/core/grappler/optimizers/
Dconstant_folding_test.cc3722 Tensor value_tensor(DT_FLOAT, TensorShape({})); in TEST_F() local
3723 value_tensor.flat<float>()(0) = 1; in TEST_F()
3724 value_tensor.AsProtoTensorContent(value.mutable_tensor()); in TEST_F()