Home
last modified time | relevance | path

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

12

/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)
123 seq_lengths = np.asarray([3, 0, 4], dtype=np.int64)
127 seq_lengths_t = constant_op.constant(seq_lengths, shape=seq_lengths.shape)
132 seq_lengths=seq_lengths_t)
[all …]
/external/tensorflow/tensorflow/lite/kernels/
Dreverse_sequence_test.cc29 ReverseSequenceOpModel(const TensorData& input, const TensorData& seq_lengths, in ReverseSequenceOpModel() argument
32 seq_lengths_ = AddInput(seq_lengths); in ReverseSequenceOpModel()
43 int seq_lengths() { return seq_lengths_; } in seq_lengths() function in tflite::__anond053f1e50111::ReverseSequenceOpModel
61 model.PopulateTensor<int32_t>(model.seq_lengths(), {3, 2, 3, 3}); in TEST()
76 model.PopulateTensor<int32_t>(model.seq_lengths(), {3, 4}); in TEST()
91 model.PopulateTensor<int32_t>(model.seq_lengths(), {3, 2, 3, 3}); in TEST()
106 model.PopulateTensor<int32_t>(model.seq_lengths(), {3, 4}); in TEST()
121 model.PopulateTensor<int32_t>(model.seq_lengths(), {3, 2, 3, 3}); in TEST()
136 model.PopulateTensor<int32_t>(model.seq_lengths(), {3, 4}); in TEST()
151 model.PopulateTensor<int32_t>(model.seq_lengths(), {3, 2, 3, 3}); in TEST()
[all …]
Dreverse_sequence.cc37 const TfLiteTensor* seq_lengths = GetInput(context, node, kSeqLengthsTensor); in Prepare() local
38 TF_LITE_ENSURE_EQ(context, NumDimensions(seq_lengths), 1); in Prepare()
49 if (seq_lengths->type != kTfLiteInt32 && seq_lengths->type != kTfLiteInt64) { in Prepare()
52 TfLiteTypeGetName(seq_lengths->type)); in Prepare()
68 const TS* seq_lengths = GetTensorData<TS>(seq_lengths_tensor); in ReverseSequenceImpl() local
83 TF_LITE_ENSURE(context, seq_lengths[i] <= SizeOfDimension(input, seq_dim)); in ReverseSequenceImpl()
89 seq_lengths, seq_dim, batch_dim, GetTensorShape(input), in ReverseSequenceImpl()
/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.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.cc655 const absl::Span<const int>& seq_lengths, bool time_major) { in CreateForwardAndBackwardIODescriptors() argument
664 if (seq_lengths.data() != nullptr) { in CreateForwardAndBackwardIODescriptors()
668 input_shape.dim_size(2), seq_lengths, time_major, data_type); in CreateForwardAndBackwardIODescriptors()
674 input_shape.dim_size(2), seq_lengths, time_major, data_type); in CreateForwardAndBackwardIODescriptors()
702 if (seq_lengths.data() != nullptr) { in CreateForwardAndBackwardIODescriptors()
706 output_shape.dim_size(2), seq_lengths, time_major, data_type); in CreateForwardAndBackwardIODescriptors()
712 output_shape.dim_size(2), seq_lengths, time_major, data_type); in CreateForwardAndBackwardIODescriptors()
745 absl::Span<const int> seq_lengths; in DoForward() local
747 seq_lengths = absl::Span<const int>( in DoForward()
752 seq_lengths, time_major)); in DoForward()
[all …]
/external/tensorflow/tensorflow/lite/experimental/examples/lstm/
Drnn.py389 def _reverse(input_, seq_lengths, seq_axis, batch_axis): argument
390 if seq_lengths is not None:
393 seq_lengths=seq_lengths,
404 seq_lengths=sequence_length,
422 seq_lengths=sequence_length,
/external/tensorflow/tensorflow/contrib/recurrent/python/ops/
Dfunctional_rnn.py403 def _reverse(input_, seq_lengths, seq_dim, batch_dim): argument
404 if seq_lengths is not None:
406 input=input_, seq_lengths=seq_lengths,
418 seq_lengths=sequence_length,
435 seq_lengths=sequence_length,
/external/tensorflow/tensorflow/python/ops/
Drnn.py453 def _reverse(input_, seq_lengths, seq_axis, batch_axis): argument
454 if seq_lengths is not None:
456 input=input_, seq_lengths=seq_lengths,
466 seq_lengths=sequence_length,
478 tmp, seq_lengths=sequence_length,
Darray_ops.py3243 seq_lengths, argument
3255 seq_lengths=seq_lengths,
3269 input, seq_lengths, seq_axis=None, batch_axis=None, name=None): argument
3272 seq_lengths=seq_lengths,
Dctc_ops.py415 def ctc_state_log_probs(seq_lengths, max_seq_length): argument
429 batch_size = _get_dim(seq_lengths, 0)
444 seq_lengths, depth=num_label_states, axis=0)
Darray_grad.py628 seq_lengths = op.inputs[1]
634 seq_lengths=seq_lengths), None
/external/tensorflow/tensorflow/contrib/rnn/python/kernel_tests/
Dlstm_ops_test.py454 seq_lengths = constant_op.constant([3, 4, 5])
478 cell_inputs, dtype=dtypes.float32, sequence_length=seq_lengths)
492 lengths = [int(i < l) for l in seq_lengths.eval()]
/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.cc245 auto seq_lengths = op.input(1); in ReverseSequenceGrad() local
251 ReverseSequence(scope, grad_inputs[0], seq_lengths, seq_dim, in ReverseSequenceGrad()
/external/tensorflow/tensorflow/stream_executor/
Dstream_executor_pimpl.cc414 const absl::Span<const int> &seq_lengths, bool time_major, in createRnnSequenceTensorDescriptor() argument
422 max_seq_length, batch_size, data_size, seq_lengths, time_major, in createRnnSequenceTensorDescriptor()
Dstream_executor_pimpl.h423 const absl::Span<const int> &seq_lengths,
Ddnn.h2072 const absl::Span<const int>& seq_lengths,
/external/tensorflow/tensorflow/stream_executor/cuda/
Dcuda_dnn.h65 const absl::Span<const int>& seq_lengths,
Dcuda_dnn.cc1296 const absl::Span<const int>& seq_lengths, bool time_major, in Create() argument
1307 const int* seq_lengths_array = seq_lengths.data(); in Create()
1852 const absl::Span<const int>& seq_lengths, bool time_major, in createRnnSequenceTensorDescriptor() argument
1857 seq_lengths, time_major, ToCudnnDataType(data_type))); in createRnnSequenceTensorDescriptor()
/external/tensorflow/tensorflow/tools/api/golden/v2/
Dtensorflow.pbtxt885 …argspec: "args=[\'input\', \'seq_lengths\', \'seq_axis\', \'batch_axis\', \'name\'], varargs=None,…
/external/tensorflow/tensorflow/lite/kernels/internal/reference/
Dreference_ops.h4685 void ReverseSequence(const TS* seq_lengths, const int seq_dim, in ReverseSequence() argument
4721 int sl = seq_lengths[q] - 1; in ReverseSequence()
4740 int sl = seq_lengths[j] - 1; in ReverseSequence()
/external/tensorflow/tensorflow/lite/testing/
Dgenerate_examples.py4350 seq_lengths=parameters["seq_lengths"],
/external/tensorflow/tensorflow/tools/api/golden/v1/
Dtensorflow.pbtxt1881 …argspec: "args=[\'input\', \'seq_lengths\', \'seq_axis\', \'batch_axis\', \'name\', \'seq_dim\', \…

12