Home
last modified time | relevance | path

Searched refs:input_tensor (Results 1 – 25 of 416) sorted by relevance

12345678910>>...17

/external/tflite-support/tensorflow_lite_support/custom_ops/python/
Dsentencepiece_tokenizer.py52 input_tensor = ragged_tensor.convert_to_tensor_or_ragged_tensor(inputs)
53 if input_tensor.shape.ndims is None:
55 if ragged_tensor.is_ragged(input_tensor):
57 input_tensor = input_tensor.with_row_splits_dtype(tf.int32)
59 tokens = self.tokenize(input_tensor.flat_values)
60 return input_tensor.with_flat_values(tokens)
62 if input_tensor.shape.ndims > 1:
66 input_tensor, row_splits_dtype=tf.int32))
67 elif input_tensor.shape.ndims == 0:
68 tokens = self.tokenize(tf.stack([input_tensor]))
[all …]
/external/tflite-support/tensorflow_lite_support/custom_ops/kernel/
Dngrams_test.py75 input_tensor = tf.RaggedTensor.from_nested_row_splits(
78 input_tensor, width, reduction_type=tf_text.Reduction.STRING_JOIN)
92 def __call__(self, input_tensor): argument
94 input_tensor, width, reduction_type=tf_text.Reduction.STRING_JOIN)
112 input_tensor = tf.ragged.constant(test_case).to_tensor()
114 input_tensor, 2, reduction_type=tf_text.Reduction.STRING_JOIN)
116 rank = input_tensor.shape.rank
120 interpreter.resize_tensor_input(0, input_tensor.shape)
123 input_tensor.numpy())
132 input_tensor = tf.ragged.constant(test_case).to_tensor()
[all …]
/external/tensorflow/tensorflow/python/keras/layers/preprocessing/
Dreduction_test.py60 input_tensor = keras.Input(shape=(None, None), ragged=True)
62 output_tensor = reduction.Reduction(reduction=reduction_str)(input_tensor)
63 model = keras.Model(input_tensor, output_tensor)
98 input_tensor = keras.Input(shape=(None, None), ragged=True)
105 input_tensor, weights=weight_input_tensor)
106 model = keras.Model([input_tensor, weight_input_tensor], output_tensor)
114 input_tensor = keras.Input(shape=(None, None), ragged=True)
120 input_tensor, weights=weight_input_tensor)
121 model = keras.Model([input_tensor, weight_input_tensor], output_tensor)
152 input_tensor = keras.Input(shape=(None, None))
[all …]
/external/tensorflow/tensorflow/python/keras/engine/
Dinput_layer.py105 input_tensor=None, argument
147 if input_tensor is None:
150 dtype = backend.dtype(input_tensor)
151 elif input_tensor is not None and input_tensor.dtype != dtype:
153 (input_tensor.dtype, dtype))
171 ('input_tensor', input_tensor),
180 input_tensor = keras_tensor.keras_tensor_from_type_spec(type_spec)
181 if isinstance(input_tensor, keras_tensor.SparseKerasTensor):
183 if isinstance(input_tensor, keras_tensor.RaggedKerasTensor):
187 self._batch_input_shape = tuple(input_tensor.shape.as_list())
[all …]
/external/tensorflow/tensorflow/python/ops/signal/
Dfft_ops.py33 def _infer_fft_length_for_rfft(input_tensor, fft_rank): argument
36 fft_shape = input_tensor.get_shape()[-fft_rank:]
40 return _array_ops.shape(input_tensor)[-fft_rank:]
46 def _infer_fft_length_for_irfft(input_tensor, fft_rank): argument
49 fft_shape = input_tensor.get_shape()[-fft_rank:]
53 fft_length = _array_ops.unstack(_array_ops.shape(input_tensor)[-fft_rank:])
64 def _maybe_pad_for_rfft(input_tensor, fft_rank, fft_length, is_reverse=False): argument
69 if (input_tensor.shape.ndims is not None and
70 any(dim.value == 0 for dim in input_tensor.shape.dims)):
71 return input_tensor
[all …]
/external/tensorflow/tensorflow/python/kernel_tests/
Dregex_full_match_op_test.py40 input_tensor = constant_op.constant(values, dtypes.string)
41 matched = op(input_tensor, "a.*a").eval()
48 input_tensor = constant_op.constant(values, dtypes.string)
49 matched = op(input_tensor, "a.*a").eval()
56 input_tensor = constant_op.constant(values, dtypes.string)
57 matched = op(input_tensor, "").eval()
64 input_tensor = constant_op.constant(values, dtypes.string)
66 matched = op(input_tensor, invalid_pattern)
76 input_tensor = constant_op.constant("foo", dtypes.string)
78 op = string_ops.regex_full_match(input_tensor, pattern)
[all …]
Dfractional_max_pool_op_test.py83 def _GetExpectedFractionalMaxPoolResult(self, input_tensor, row_seq, col_seq, argument
101 input_shape = input_tensor.shape
104 output_tensor = np.zeros(shape=output_shape, dtype=input_tensor.dtype)
107 two_dim_slice = input_tensor[batch, :, :, channel]
114 def _ValidateFractionalMaxPoolResult(self, input_tensor, pooling_ratio, argument
132 input_tensor,
138 expected = self._GetExpectedFractionalMaxPoolResult(input_tensor, row_seq,
372 input_tensor = constant_op.constant(
377 output_tensor = nn_ops.max_pool(input_tensor, window_size,
382 input_tensor, output_tensor, output_backprop, window_size,
[all …]
Dfractional_avg_pool_op_test.py83 def _GetExpectedFractionalAvgPoolResult(self, input_tensor, row_seq, col_seq, argument
101 input_shape = input_tensor.shape
104 output_tensor = np.zeros(shape=output_shape, dtype=input_tensor.dtype)
107 two_dim_slice = input_tensor[batch, :, :, channel]
114 def _ValidateFractionalAvgPoolResult(self, input_tensor, pooling_ratio, argument
132 input_tensor,
138 expected = self._GetExpectedFractionalAvgPoolResult(input_tensor, row_seq,
361 input_tensor = constant_op.constant(
367 output_tensor = nn_ops.avg_pool(input_tensor, window_size,
376 input_tensor.get_shape(), output_backprop, window_size,
[all …]
/external/tensorflow/tensorflow/python/keras/applications/
Defficientnet.py206 input_tensor=None, argument
291 if input_tensor is None:
294 if not backend.is_keras_tensor(input_tensor):
295 img_input = layers.Input(tensor=input_tensor, shape=input_shape)
297 img_input = input_tensor
385 if input_tensor is not None:
386 inputs = layer_utils.get_source_inputs(input_tensor)
525 input_tensor=None, argument
539 input_tensor=input_tensor,
551 input_tensor=None, argument
[all …]
Dmobilenet_v2.py101 input_tensor=None, argument
196 if input_shape is not None and input_tensor is not None:
198 is_input_t_tensor = backend.is_keras_tensor(input_tensor)
202 layer_utils.get_source_inputs(input_tensor))
204 raise ValueError('input_tensor: ', input_tensor,
208 if backend.int_shape(input_tensor)[1] != input_shape[1]:
210 input_tensor,
213 if backend.int_shape(input_tensor)[2] != input_shape[1]:
215 input_tensor,
218 raise ValueError('input_tensor specified: ', input_tensor,
[all …]
Dmobilenet_v3.py158 input_tensor=None, argument
175 if input_shape is not None and input_tensor is not None:
177 is_input_t_tensor = backend.is_keras_tensor(input_tensor)
181 layer_utils.get_source_inputs(input_tensor))
183 raise ValueError('input_tensor: ', input_tensor,
187 if backend.int_shape(input_tensor)[1] != input_shape[1]:
189 input_tensor,
192 if backend.int_shape(input_tensor)[2] != input_shape[1]:
194 input_tensor,
197 raise ValueError('input_tensor specified: ', input_tensor,
[all …]
/external/tensorflow/tensorflow/tools/api/golden/v2/
Dtensorflow.keras.applications.pbtxt65 …argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'cl…
69 …argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'cl…
73 …argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'cl…
77 …argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'cl…
81 …argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'cl…
85 …argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'cl…
89 …argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'cl…
93 …argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'cl…
97 …argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'cl…
101 …argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'cl…
[all …]
Dtensorflow.keras.applications.efficientnet.pbtxt5 …argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'cl…
9 …argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'cl…
13 …argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'cl…
17 …argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'cl…
21 …argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'cl…
25 …argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'cl…
29 …argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'cl…
33 …argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'cl…
/external/tensorflow/tensorflow/tools/api/golden/v1/
Dtensorflow.keras.applications.pbtxt65 …argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'cl…
69 …argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'cl…
73 …argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'cl…
77 …argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'cl…
81 …argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'cl…
85 …argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'cl…
89 …argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'cl…
93 …argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'cl…
97 …argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'cl…
101 …argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'cl…
[all …]
Dtensorflow.keras.applications.efficientnet.pbtxt5 …argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'cl…
9 …argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'cl…
13 …argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'cl…
17 …argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'cl…
21 …argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'cl…
25 …argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'cl…
29 …argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'cl…
33 …argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'cl…
/external/tensorflow/tensorflow/core/kernels/
Dquantized_instance_norm_test.cc125 Tensor input_tensor(DT_QUINT8, {1, 4, 4, 32}); in TestBasic() local
126 auto input = input_tensor.flat<quint8>(); in TestBasic()
130 Expect(input_tensor, 0.0f, 1.0f, false, 0.0f, 0.0f); in TestBasic()
134 Tensor input_tensor(DT_QUINT8, {1, 4, 4, 32}); in TestZeroInput() local
135 auto input = input_tensor.flat<quint8>(); in TestZeroInput()
140 Expect(input_tensor, 2.0f, 3.0f, false, 0.0f, 0.0f); in TestZeroInput()
144 Tensor input_tensor(DT_QUINT8, {1, 1, 2, 16}); in TestMaxInput() local
145 auto input = input_tensor.flat<quint8>(); in TestMaxInput()
149 Expect(input_tensor, 0.0f, in TestMaxInput()
155 Tensor input_tensor(DT_QUINT8, {1, 4, 4, 32}); in TestOutputRangeGiven() local
[all …]
Dbroadcast_to_op.h51 const Tensor &input_tensor, const BCast &bcast) const { in ReshapeAndBCast()
54 input_tensor.NumElements() < kint32max; in ReshapeAndBCast()
58 input_tensor.template shaped<T, NDIMS>(bcast.x_reshape()), in ReshapeAndBCast()
63 input_tensor.template shaped<T, NDIMS>(bcast.x_reshape()), in ReshapeAndBCast()
73 const Tensor &input_tensor, const TensorShape &input_shape, in operator()
78 ReshapeAndBCast<1>(device, output_tensor, input_tensor, bcast); in operator()
81 ReshapeAndBCast<2>(device, output_tensor, input_tensor, bcast); in operator()
84 ReshapeAndBCast<3>(device, output_tensor, input_tensor, bcast); in operator()
87 ReshapeAndBCast<4>(device, output_tensor, input_tensor, bcast); in operator()
90 ReshapeAndBCast<5>(device, output_tensor, input_tensor, bcast); in operator()
/external/tensorflow/tensorflow/python/ops/
Dimage_grad_test_base.py50 input_tensor = constant_op.constant(x, shape=in_shape)
51 resize_out = image_ops.resize_nearest_neighbor(input_tensor,
69 input_tensor = constant_op.constant(x, shape=in_shape)
72 resize_nn, [input_tensor], delta=1 / 8))
86 input_tensor = constant_op.constant(x, shape=in_shape)
89 resize_nn, [input_tensor], delta=1 / 8))
105 input_tensor = constant_op.constant(x, shape=in_shape)
107 resize_nn, [input_tensor], delta=1 / 8)
110 input_tensor = constant_op.constant(x, shape=in_shape)
112 resize_nn, [input_tensor], delta=1 / 8)
[all …]
/external/tensorflow/tensorflow/lite/tools/benchmark/
Dbenchmark_test.cc104 void CheckInputTensorValue(const TfLiteTensor* input_tensor, in CheckInputTensorValue() argument
106 ASSERT_THAT(input_tensor, testing::NotNull()); in CheckInputTensorValue()
108 input_tensor->data.raw, input_tensor->data.raw + input_tensor->bytes, in CheckInputTensorValue()
112 void CheckInputTensorValue(const TfLiteTensor* input_tensor, in CheckInputTensorValue() argument
115 StringRef tensor_value = GetString(input_tensor, tensor_dim_index); in CheckInputTensorValue()
135 : interpreter_->input_tensor(index); in GetInputTensor()
233 auto input_tensor = benchmark.GetInputTensor(0); in TEST() local
234 ASSERT_THAT(input_tensor, testing::NotNull()); in TEST()
236 input_tensor->data.raw, input_tensor->data.raw + input_tensor->bytes, in TEST()
310 auto input_tensor = benchmark.GetInputTensor(0); in TEST() local
[all …]
/external/tensorflow/tensorflow/core/tpu/kernels/
Dinfeed_ops.cc76 const Tensor& input_tensor, in TransposeTensor() argument
96 input_tensor, input_tensor.dtype(), shape)); in TransposeTensor()
102 TF_RETURN_IF_ERROR(ctx->allocate_temp(input_tensor.dtype(), in TransposeTensor()
106 if (input_tensor.NumElements() > 0) { in TransposeTensor()
108 input_tensor, permutation, in TransposeTensor()
196 const Tensor& input_tensor, in AutoTransposeAndLinearize() argument
200 const Tensor* tensor = &input_tensor; in AutoTransposeAndLinearize()
207 TransposeTensor(ctx, input_tensor, shape)); in AutoTransposeAndLinearize()
251 const Tensor& input_tensor = ctx->input(0); in Compute() local
254 ctx, input_tensor.dtype() == dtype_, in Compute()
[all …]
/external/tensorflow/tensorflow/lite/c/
Dc_test.c89 TfLiteTensor* input_tensor = TfLiteInterpreterGetInputTensor(interpreter, 0); in TestSmokeTest() local
90 ASSERT_NE(input_tensor, NULL); in TestSmokeTest()
91 ASSERT_EQ(TfLiteTensorType(input_tensor), kTfLiteFloat32); in TestSmokeTest()
92 ASSERT_EQ(TfLiteTensorNumDims(input_tensor), 1); in TestSmokeTest()
93 ASSERT_EQ(TfLiteTensorDim(input_tensor, 0), 2); in TestSmokeTest()
94 ASSERT_EQ(TfLiteTensorByteSize(input_tensor), sizeof(float) * 2); in TestSmokeTest()
95 ASSERT_NE(TfLiteTensorData(input_tensor), NULL); in TestSmokeTest()
96 ASSERT_STREQ(TfLiteTensorName(input_tensor), "input"); in TestSmokeTest()
99 TfLiteTensorQuantizationParams(input_tensor); in TestSmokeTest()
104 ASSERT_EQ(TfLiteTensorCopyFromBuffer(input_tensor, input, in TestSmokeTest()
Dc_api_test.cc59 TfLiteTensor* input_tensor = TfLiteInterpreterGetInputTensor(interpreter, 0); in TEST() local
60 ASSERT_NE(input_tensor, nullptr); in TEST()
61 EXPECT_EQ(TfLiteTensorType(input_tensor), kTfLiteFloat32); in TEST()
62 EXPECT_EQ(TfLiteTensorNumDims(input_tensor), 1); in TEST()
63 EXPECT_EQ(TfLiteTensorDim(input_tensor, 0), 2); in TEST()
64 EXPECT_EQ(TfLiteTensorByteSize(input_tensor), sizeof(float) * 2); in TEST()
65 EXPECT_NE(TfLiteTensorData(input_tensor), nullptr); in TEST()
66 EXPECT_STREQ(TfLiteTensorName(input_tensor), "input"); in TEST()
69 TfLiteTensorQuantizationParams(input_tensor); in TEST()
74 ASSERT_EQ(TfLiteTensorCopyFromBuffer(input_tensor, input.data(), in TEST()
[all …]
/external/tensorflow/tensorflow/python/keras/layers/
Deinsum_dense_test.py244 input_tensor = keras.Input(shape=non_batch_input_shape)
247 output_tensor = layer(input_tensor)
282 input_tensor = keras.Input(shape=(32,))
287 _ = layer(input_tensor)
290 input_tensor = keras.Input(shape=(32, 64))
296 _ = layer(input_tensor)
299 input_tensor = keras.Input(shape=(32,))
304 _ = layer(input_tensor)
307 input_tensor = keras.Input(shape=(32,))
311 _ = layer(input_tensor)
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/utils/
Dconvert_tensor.cc61 static TensorProto ConvertToProto(const Tensor& input_tensor, in ConvertToProto() argument
71 input_tensor.AsProtoTensorContent(&tensor_proto); in ConvertToProto()
73 input_tensor.AsProtoField(&tensor_proto); in ConvertToProto()
83 StatusOr<ElementsAttr> ConvertFlatTensor(const Tensor& input_tensor, in ConvertFlatTensor() argument
85 auto arr = input_tensor.flat<T>(); in ConvertFlatTensor()
90 ElementsAttr ConvertBf16Tensor(const Tensor& input_tensor, in ConvertBf16Tensor() argument
92 auto buffer = llvm::makeArrayRef(static_cast<char*>(input_tensor.data()), in ConvertBf16Tensor()
93 input_tensor.TotalBytes()); in ConvertBf16Tensor()
107 StatusOr<ElementsAttr> ConvertStringTensor(const Tensor& input_tensor, in ConvertStringTensor() argument
110 auto arr = input_tensor.flat<tstring>(); in ConvertStringTensor()
[all …]
/external/tensorflow/tensorflow/python/ops/ragged/
Dragged_math_ops.py567 def reduce_sum(input_tensor, axis=None, keepdims=None, name=None): argument
573 rt_input=input_tensor,
579 def reduce_prod(input_tensor, axis=None, keepdims=None, name=None): argument
584 rt_input=input_tensor,
590 def reduce_min(input_tensor, axis=None, keepdims=None, name=None): argument
595 rt_input=input_tensor,
601 def reduce_max(input_tensor, axis=None, keepdims=None, name=None): argument
606 rt_input=input_tensor,
612 def reduce_mean(input_tensor, axis=None, keepdims=None, name=None): argument
614 with ops.name_scope(name, 'RaggedReduceMean', [input_tensor, axis]):
[all …]

12345678910>>...17