Home
last modified time | relevance | path

Searched refs:seq_lengths (Results 1 – 25 of 35) sorted by relevance

12

/external/tensorflow/tensorflow/lite/kernels/
Dreverse_sequence_test.cc32 ReverseSequenceOpModel(const TensorData& input, const TensorData& seq_lengths, in ReverseSequenceOpModel() argument
35 seq_lengths_ = AddInput(seq_lengths); in ReverseSequenceOpModel()
46 int seq_lengths() { return seq_lengths_; } in seq_lengths() function in tflite::__anon39709e830111::ReverseSequenceOpModel
64 model.PopulateTensor<int32_t>(model.seq_lengths(), {3, 2, 3, 3}); in TEST()
79 model.PopulateTensor<int32_t>(model.seq_lengths(), {3, 4}); in TEST()
94 model.PopulateTensor<int32_t>(model.seq_lengths(), {3, 2, 3, 3}); in TEST()
109 model.PopulateTensor<int32_t>(model.seq_lengths(), {3, 4}); in TEST()
124 model.PopulateTensor<int32_t>(model.seq_lengths(), {3, 2, 3, 3}); in TEST()
139 model.PopulateTensor<int32_t>(model.seq_lengths(), {3, 4}); in TEST()
154 model.PopulateTensor<int32_t>(model.seq_lengths(), {3, 2, 3, 3}); in TEST()
[all …]
Dreverse_sequence.cc41 const TfLiteTensor* seq_lengths; in Prepare() local
43 context, GetInputSafe(context, node, kSeqLengthsTensor, &seq_lengths)); in Prepare()
44 TF_LITE_ENSURE_EQ(context, NumDimensions(seq_lengths), 1); in Prepare()
55 if (seq_lengths->type != kTfLiteInt32 && seq_lengths->type != kTfLiteInt64) { in Prepare()
58 TfLiteTypeGetName(seq_lengths->type)); in Prepare()
78 const TS* seq_lengths = GetTensorData<TS>(seq_lengths_tensor); in ReverseSequenceImpl() local
93 TF_LITE_ENSURE(context, seq_lengths[i] <= SizeOfDimension(input, seq_dim)); in ReverseSequenceImpl()
101 seq_lengths, seq_dim, batch_dim, GetTensorShape(input), in ReverseSequenceImpl()
/external/tensorflow/tensorflow/python/kernel_tests/
Dreverse_sequence_op_test.py38 seq_lengths, argument
44 x, batch_axis=batch_axis, seq_axis=seq_axis, seq_lengths=seq_lengths)
57 seq_lengths, argument
60 self._testReverseSequence(x, batch_axis, seq_axis, seq_lengths, truth, True,
62 self._testReverseSequence(x, batch_axis, seq_axis, seq_lengths, truth,
74 seq_lengths = np.asarray([3, 0, 4], dtype=len_dtype)
88 self._testBothReverseSequence(x, batch_axis, seq_axis, seq_lengths, truth)
122 seq_lengths = np.asarray([3, 0, 4], dtype=np.int64)
125 seq_lengths_t = constant_op.constant(seq_lengths, shape=seq_lengths.shape)
130 seq_lengths=seq_lengths_t)
[all …]
/external/tensorflow/tensorflow/core/api_def/base_api/
Dapi_def_ReverseSequence.pbtxt10 name: "seq_lengths"
13 `max(seq_lengths) <= input.dims(seq_dim)`
37 slice `i`, reverses the first `seq_lengths[i]` elements along
40 The elements of `seq_lengths` must obey `seq_lengths[i] <= input.dims[seq_dim]`,
41 and `seq_lengths` must be a vector of length `input.dims[batch_dim]`.
44 slice `i`, with the first `seq_lengths[i]` slices along dimension
54 seq_lengths = [7, 2, 3, 5]
56 # then slices of input are reversed on seq_dim, but only up to seq_lengths:
76 seq_lengths = [7, 2, 3, 5]
78 # then slices of input are reversed on seq_dim, but only up to seq_lengths:
/external/tensorflow/tensorflow/compiler/tests/
Dreverse_sequence_op_test.py35 seq_lengths, argument
40 lengths = array_ops.placeholder(dtypes.as_dtype(seq_lengths.dtype))
43 p, batch_axis=batch_axis, seq_axis=seq_axis, seq_lengths=lengths)
45 tf_ans = ans.eval(feed_dict={p: x, lengths: seq_lengths})
49 ans.eval(feed_dict={p: x, lengths: seq_lengths})
58 seq_lengths=np.array([1, 3, 2], np.int32),
70 seq_lengths = np.asarray([3, 0, 4], dtype=len_dtype)
84 self._testReverseSequence(x, batch_axis, seq_axis, seq_lengths, truth)
/external/tensorflow/tensorflow/core/kernels/
Dreverse_sequence_op.cc46 const Tensor& seq_lengths = context->input(1); in CheckErrors() local
48 auto seq_lens_t = seq_lengths.vec<Tlen>(); in CheckErrors()
65 context, seq_lengths.NumElements() == input.dim_size(batch_dim), in CheckErrors()
67 "), ", "(", seq_lengths.NumElements(), " vs. ", in CheckErrors()
81 const Tensor& seq_lengths = context->input(1); in CheckErrorsGPU() local
93 context, seq_lengths.NumElements() == input.dim_size(batch_dim), in CheckErrorsGPU()
95 "), ", "(", seq_lengths.NumElements(), " vs. ", in CheckErrorsGPU()
122 const Tensor& seq_lengths = context->input(1); in Compute() local
125 OP_REQUIRES(context, TensorShapeUtils::IsVector(seq_lengths.shape()), in Compute()
127 seq_lengths.dims())); in Compute()
[all …]
Dreverse_sequence_op.h33 int32 seq_dim, typename TTypes<Tlen>::ConstVec seq_lengths) in ReverseGenerator() argument
37 seq_lengths_(seq_lengths) {} in ReverseGenerator()
66 typename TTypes<Tlen>::ConstVec seq_lengths, in Compute()
69 seq_dim, seq_lengths); in Compute()
Dcudnn_rnn_ops.cc697 const absl::Span<const int>& seq_lengths, bool time_major) { in CreateForwardAndBackwardIODescriptors() argument
707 if (seq_lengths.data() != nullptr) { in CreateForwardAndBackwardIODescriptors()
711 input_shape.dim_size(2), seq_lengths, time_major, data_type); in CreateForwardAndBackwardIODescriptors()
717 input_shape.dim_size(2), seq_lengths, time_major, data_type); in CreateForwardAndBackwardIODescriptors()
760 if (seq_lengths.data() != nullptr) { in CreateForwardAndBackwardIODescriptors()
764 output_shape.dim_size(2), seq_lengths, time_major, data_type); in CreateForwardAndBackwardIODescriptors()
770 output_shape.dim_size(2), seq_lengths, time_major, data_type); in CreateForwardAndBackwardIODescriptors()
804 absl::Span<const int> seq_lengths; in DoForward() local
806 seq_lengths = absl::Span<const int>( in DoForward()
811 &output_desc, seq_lengths, time_major)); in DoForward()
[all …]
/external/tensorflow/tensorflow/lite/experimental/examples/lstm/
Drnn.py392 def _reverse(input_, seq_lengths, seq_axis, batch_axis): argument
393 if seq_lengths is not None:
396 seq_lengths=seq_lengths,
407 seq_lengths=sequence_length,
425 seq_lengths=sequence_length,
/external/tensorflow/tensorflow/core/ops/compat/ops_history_v1/
DReverseSequence.pbtxt8 name: "seq_lengths"
/external/tensorflow/tensorflow/core/ops/compat/ops_history_v2/
DReverseSequence.pbtxt8 name: "seq_lengths"
/external/tensorflow/tensorflow/lite/testing/op_tests/
Dreverse_sequence.py58 seq_lengths=parameters["seq_lengths"],
/external/tensorflow/tensorflow/python/ops/
Drnn.py457 def _reverse(input_, seq_lengths, seq_axis, batch_axis): argument
458 if seq_lengths is not None:
461 seq_lengths=seq_lengths,
472 seq_lengths=sequence_length,
490 seq_lengths=sequence_length,
Dctc_ops.py510 def ctc_state_log_probs(seq_lengths, max_seq_length): argument
524 batch_size = _get_dim(seq_lengths, 0)
539 seq_lengths, depth=num_label_states, axis=0)
Darray_ops.py4704 seq_lengths, argument
4756 seq_lengths=seq_lengths,
4765 seq_lengths, argument
4811 seq_lengths=seq_lengths,
Darray_grad.py883 seq_lengths = op.inputs[1]
889 seq_lengths=seq_lengths), None
/external/tensorflow/tensorflow/cc/gradients/
Darray_grad_test.cc211 auto seq_lengths = Const(scope_, {1, 2, 3, 4, 5}); in TEST_F() local
213 auto y = ReverseSequence(scope_, x, seq_lengths, /* seq_dim */ 2); in TEST_F()
Darray_grad.cc254 auto seq_lengths = op.input(1); in ReverseSequenceGrad() local
260 ReverseSequence(scope, grad_inputs[0], seq_lengths, seq_dim, in ReverseSequenceGrad()
/external/tensorflow/tensorflow/compiler/mlir/lite/transforms/
Dlegalize_patterns.td189 (TF_ReverseSequenceOp $input, $seq_lengths, $seq_dim, $batch_dim),
190 (TFL_ReverseSequenceOp $input, $seq_lengths,
/external/tensorflow/tensorflow/stream_executor/
Dstream_executor_pimpl.cc399 const absl::Span<const int> &seq_lengths, bool time_major, in createRnnSequenceTensorDescriptor() argument
407 max_seq_length, batch_size, data_size, seq_lengths, time_major, in createRnnSequenceTensorDescriptor()
Dstream_executor_pimpl.h432 const absl::Span<const int> &seq_lengths,
/external/tensorflow/tensorflow/lite/kernels/internal/reference/
Dreference_ops.h1720 void ReverseSequence(const TS* seq_lengths, const int seq_dim, in ReverseSequence() argument
1756 int sl = seq_lengths[q] - 1; in ReverseSequence()
1775 int sl = seq_lengths[j] - 1; in ReverseSequence()
/external/tensorflow/tensorflow/stream_executor/cuda/
Dcuda_dnn.cc1495 const absl::Span<const int>& seq_lengths, bool time_major, in Create() argument
1507 const int* seq_lengths_array = seq_lengths.data(); in Create()
2107 const absl::Span<const int>& seq_lengths, bool time_major, in createRnnSequenceTensorDescriptor() argument
2112 seq_lengths, time_major, ToCudnnDataType(data_type))); in createRnnSequenceTensorDescriptor()
Dcuda_dnn.h66 const absl::Span<const int>& seq_lengths,
/external/tensorflow/tensorflow/compiler/mlir/lite/ir/
Dtfl_ops.td2631 slice `i`, reverses the first `seq_lengths[i]` elements along
2634 The elements of `seq_lengths` must obey `seq_lengths[i] <= input.dims[seq_dim]`,
2635 and `seq_lengths` must be a vector of length `input.dims[batch_dim]`.
2638 slice `i`, with the first `seq_lengths[i]` slices along dimension
2644 TFL_I32OrI64Tensor:$seq_lengths,

12