Questions tagged [sequence-to-sequence]

The tag has no usage guidance.

50 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3 votes
1 answer
55 views

String together a set of tokens into a sequence

I have this problem scenario - Given a set of tokens, string them or a subset of the tokens together using stop words into a sequence. I am clear that I can have potentially infinite pre-training data ...
Deepak Saini's user avatar
3 votes
0 answers
114 views

Encoder-Decoder Sequence-to-Sequence Model for Translations in Both Directions

Is it possible to use a pre-trained sequence to sequence encoder-decoder model which translates an input text in source language to an output in target language to do an inverse translation? That is, ...
Amir's user avatar
  • 193
2 votes
0 answers
175 views

Why the LSTM on Keras does not work correctly when it is necessary to predict several steps forward

I used AirPassenger Dataset. And based on several previous values(for examples 20) I want to predict several(3 or 5) steps in future. Like X -> y [10,20,30,....200]->[210,220,230] [20,30,40,.......
Vladimir Shebuniayeu's user avatar
2 votes
1 answer
288 views

Timeseries LSTM: does test data need to come after training data?

I have one single, very long time series. I want to train an LSTM to distinguish between two behaviours (A or B) at every timestep (sequence-to-sequence). Because the time series is very long, I plan ...
lodo's user avatar
  • 121
2 votes
0 answers
172 views

LSTM low training/validation error but really bad predictions

I'm building a LSTM model to create an automatic drums composer. I'm following this post: LSTM Metallica I've built my model and done all the enconding, I was able to emulate the behavior of the ...
Mattia Surricchio's user avatar
2 votes
0 answers
387 views

Weight matrices in transformers

I am trying to understand the transformer architecture. I am aware that the encoder/decoder contains multiple stacked self attention layers. Further each layer contains multiple heads. For example ...
boredaf's user avatar
  • 161
2 votes
0 answers
305 views

Why isnt my seq2seq model reconising what the <END> tag is?

I am making a seq2seq chatbot with the help of this guide: https://medium.com/predict/creating-a-chatbot-from-scratch-using-keras-and-tensorflow-59e8fc76be79 . I set up the model and data processing ...
Dup Dup's user avatar
  • 31
2 votes
1 answer
4k views

IndexError: list index out of range

I'm implementing a sequence-2-sequence model with RNN-VAE architecture, and I use an attention mechanism. I have problem in the decoder part. I'm struggling with this error: IndexError: list index ...
Kahina's user avatar
  • 614
2 votes
0 answers
1k views

Recommended model for univariate or multivariate multistep ahead time series forecasting

I have a dataset consisting of recurring and non-recurring expense transactions from bank accounts, as well as other features describing the bank account and each transation. I aggregate these ...
KOB's user avatar
  • 189
2 votes
1 answer
4k views

Predicting next number in a sequence - data analysis

I am a machine learning newbie and I am working on a project where I'm given a sequence of integers all of which are in the range 0 to 70. My goal is to predict the next integer in the sequence given ...
varun's user avatar
  • 21
2 votes
1 answer
299 views

Keras: Softmax output into embedding layer

I'm trying to build an encoder-decoder network in Keras to generate a sentence of a particular style. As my problem is unsupervised i.e. I don't have the ground truths for the generated sentences, I ...
Physbox's user avatar
  • 217
1 vote
1 answer
154 views

Why does a decoder generate all hidden states during inference?

Seems that in Vanilla transformers at least (a la AIAYN), during inference time, the hidden states are generated for all tokens in the input sequence, but only the last one is used to predict the next ...
dashnick's user avatar
  • 163
1 vote
0 answers
29 views

RNN to model DNA sequencing classification

I have a DNA sequence dataset each mapped to a certain class. e,g TCAGCCGAGAGCTCATCGATCGTACGT 2 ATGCAGTGCATCGATCGATCGTAGAAC 3 Where the number after the sequence specifies the type of protein this ...
Juliet Soujbel's user avatar
1 vote
1 answer
176 views

Seq2Seq loss function

I was reading the paper neural_approach_conversational_ai.pdf. And in the section Seq2Seq for Text Generation there is a formula that i feel a bit wrong [1]: https://i.stack.imgur.com/sX0it.png Can ...
Văn Hiếu Lê's user avatar
1 vote
1 answer
173 views

Multioutput prediction using LSTM encoder decoder with Attention

(I am working on Jupter notebook with python version 3.6.12, running Tensorflow 2.4.0 version.) I have a dataset that consists of 5 input features and 3 output features (that requires to be predicted)....
Sukhmani Kaur Thethi's user avatar
1 vote
0 answers
15 views

Sequence learning from farm operations data

I need to generalize a single sequence from N sequences entailing farming tasks/operations and ultimately plotting it on Gantt chart. There are a total let's assume N sequences = n (total fields) * t (...
yash agarwal's user avatar
1 vote
1 answer
189 views

Multi-step forecasts of factory production data using a Seq2Seq Encoder-Decoder Model with Attention

I am attempting to use a Seq2Seq model to make forecasts of factory production data using an Encoder-Decoder model augmented with Attention. I have become a little stuck as the output of the model ...
InvestingScientist's user avatar
1 vote
0 answers
33 views

Workaround / fallback value for tfp.distributions.Categorical.log_prob in tensorflow graph mode

Is there a way to avoid tfp.distributions.Categorical.log_probraising an error if the input is a label out of range? I am passing a batch of samples to the ...
RR_28023's user avatar
1 vote
0 answers
79 views

Dummy Variables of Weights in RNN Backpropagation Through Time

In the deep learning book RNN chapter (https://www.deeplearningbook.org/contents/rnn.html), it is mentioned that - To resolve this ambiguity, we introduce dummy variables $W^{(t)}$ that are defined to ...
KKGanguly's user avatar
  • 111
1 vote
0 answers
113 views

Multiple time series sequence prediction for multiple multivariate time series

My question is somehow similar to this question, but not satisfied with the answer. I have 100 samples, each sample consists of ...
Rajan's user avatar
  • 11
1 vote
0 answers
40 views

Seq2Seq for sentence correction

I have a task in hand where I get a dirty formed sentence and need to correct it. Examples are, "StackOverflow best question answering platform" to be converted to "StackOverflow is best question ...
Sandeep Bhutani's user avatar
1 vote
0 answers
192 views

How can I finetune XLM-R for neural machine translation between the same language(Catalan to Catalan-with different grammar structure))?

Can I fine-tune XLM-R to do something similar to https://www.guru99.com/seq2seq-model.html (encoder-decoder architecture or any other way that perform good in small dataset - around 1000) For example: ...
NLP Dude's user avatar
1 vote
0 answers
34 views

How can I do a sequence to sequence model (RNN / LSTM) with Keras with fixed length data?

What I'm trying to do seems so simple, but I can't find any examples online. First, I'm not working in language, so all of the embedding stuff adds needless ...
Shamoon's user avatar
  • 65
1 vote
0 answers
125 views

Improving Performance of LSTM for time series prediction

My data consists of two features and a set of time series data labeled as "bookings". I have 1056 data point in the times series, for which I have two features for each. The data size is 1056x3. My ...
HaneenSu's user avatar
1 vote
0 answers
107 views

How to create a seq2seq without specifying a fixed decoder length?

Based on the model presented in this answer: ...
user2182857's user avatar
1 vote
0 answers
33 views

Adding context in a sequence to sequence problem

The encoder of a seq2seq model is meant to generate a conditioning context for the decoder, as mentioned here A RNN layer (or stack thereof) acts as "encoder": it processes the input sequence and ...
ignatius's user avatar
  • 1,638
1 vote
0 answers
46 views

Initialising states in a multilayer sequence to sequence model

With a sequence to sequence model where the enocoder and decoder are both comprised of one layer each, the initial state of the decoder is initialised to use the final states of the encoder layer. In ...
Aesir's user avatar
  • 418
1 vote
0 answers
249 views

What should the size of the decoder output be in a sequence to sequence model

In a sequence to sequence model, a lot of the tutorials I have read state that the decoder target length should be the same as the encoder input length (https://blog.keras.io/building-autoencoders-in-...
Aesir's user avatar
  • 418
1 vote
0 answers
71 views

On-the-fly seq2seq: starting translation before the input sequence ends

By now anybody even remotely familiar with RNNs has been exposed to the famous figure representing variants of such networks: However one type that is missing is one where there would be a partial ...
user209974's user avatar
1 vote
0 answers
291 views

Neural network outputting same result for all inputs

I'm building an encoder-decoder neural network in Keras for sequence generation. The specific task is to try and change the styles of the text. Both my encoder and decoders are LSTMs with latent ...
Physbox's user avatar
  • 217
1 vote
2 answers
157 views

How to pad real-valued sequences

I have several sequences of univariate real-valued time-series data. The sequences are of different lengths and right now I cannot batch them and feed them to a network. What is the correct procedure ...
Aechlys's user avatar
  • 111
0 votes
0 answers
8 views

In abstractive document summarization task, if I have multiple target sequences for one input document, what is the ideal loss form?

I use autoregressive model like T5 to tackle the abstractive document summarization task. In my case there are multiple target summarizations for one input document. Is there some related works about ...
namespace-Pt's user avatar
0 votes
0 answers
45 views

I can't figure out why even when training the seq2seq chatbot neural network, it doesn't give adequate answers

When training with 50 thousand pairs of questions and loss 0.2 accuracy 0.9 it does not give adequate answers ...
vamperg's user avatar
0 votes
0 answers
20 views

Batch inference and seq2seq

I am following this guide to the Seq2Seq architecture. It is clear that the author suggests batch training during the teacher forcing step. However, during the inference step, the author restricts the ...
Enk9456's user avatar
  • 123
0 votes
0 answers
38 views

Siamese network for a sequence-to-sequence generation

Shall I use the siamese network for a sequence-to-sequence generation problem in machine learning? Eg: Input 1: Sentence 1 (sequence) Input 2: Sentence 2 (sequence) Output: Newly Generated sentence (...
Pradeep's user avatar
0 votes
0 answers
41 views

Dialogue history encoding for multi-turn dialogues using Seq2seq

In single-turn dialogue seq2seq models where the goal is to produce a good answer y to a query x, sentences are usually encoded such that x is fed to the encoder, while the decoder is only given a &...
postnubilaphoebus's user avatar
0 votes
1 answer
57 views

How to make a pipeline for Videos Dataset for TensorFlow [Sequence Matters] & train Model Effectively with Low Memory System

I am working on a Deep Learning project and I am facing an issue with the size of the dataset. I want to make a pipeline for video dataset [Sequence Matters]. Because if I try the load the whole ...
Sharjeel M.'s user avatar
0 votes
0 answers
232 views

SOS / EOS tokens to encode fixed-size 1D real and complex-valued short signals with seq2seq

Are there any standard or recommended SOS (start of sequence) and EOS (end of sequence) tokens for seq2seq encoding using RNN/LSTM/Transformers applied to real-valued and/or complex-valued 1D signals (...
Blupon's user avatar
  • 101
0 votes
0 answers
20 views

Fixing/up-rezzing images is easily possible these days in practice. Is there any analogous tool available for low-quality audio?

Tools like waifu2x and Anime4k (for the MPV video player) can already easily de-noise and up-rez low quality images to 4k quality pretty darn well. Similar tools like DLSS and FSR are used for video ...
chausies's user avatar
  • 111
0 votes
1 answer
37 views

Forecasting of Images using ConvLSTM2D

I am working on a problem of seq2seq modelling using ConvLSTM2D layer in keras. Implementation of convLSTM in keras allows user to control over output sequence using 'return_sequence' option. When ...
user2771151's user avatar
0 votes
0 answers
61 views

What does logits in Casual Language Modeling represent?

I am reading the docs for transformers by hugging face and I see that the logits produced by casual language models are of the shape (batch_size, sequence_length, config.vocab_size). I also read the ...
Yoni Kremer's user avatar
0 votes
0 answers
33 views

Image captioning using sequence to sequence model

I am trying to build a sequence to sequence model. I have used Vision transformer as the encoder and LSTM with 1 layers as the decoder. The output of the encoder is given as the hidden state for ...
learner_78's user avatar
0 votes
0 answers
17 views

Given an audio file, output a processed audio file (with something like seq2seq)

I have a dataset of audio files of varying durations. Given audio file x, I would like to get audio file y (audio files ...
stefano's user avatar
0 votes
0 answers
63 views

How to use batches for training in Sequence-to-Sequence models?

I am working on a seq-to-seq Image Captioning model, with Vision Transformer as the encoder and a LSTM based model as a decoder. The output from the encoder is given as the hidden state and cell state ...
learner_78's user avatar
0 votes
0 answers
127 views

Predict sequence using seqGAN

I am trying to create a GAN model in which I am using this seq2seq as Generator and the following architecture as Discriminator: ...
ksohan's user avatar
  • 53
0 votes
1 answer
39 views

Preprocess multi-sample time series data: encode each sample separately or in aggregate?

Let's say I have 3 dense sequences of uniform length. Should I fit a scaler on them separately or together? ...
Kermit's user avatar
  • 499
0 votes
0 answers
27 views

How to reduce dimensionality of encoder decoder output?

I have an encoder decoder architecture where the output $ \bar{\bf{y}}_t $ is a sequence of integers of maximum length $n$. Each integer in the sequence is representative of a category so the ...
KaneM's user avatar
  • 101
0 votes
1 answer
56 views

two different attention methods for seq2seq

I see two different ways of applying attention in seq2seq: (a) the context vector (the weighted sum of encoder hidden states) fed into the output softmax, as shown in the diagram below. The diagram ...
DSKim's user avatar
  • 101
0 votes
0 answers
34 views

Strategy for "forcing" number of labels in seq2seq predictions with Keras?

I'm trying to train a seq2seq model that for every timestep in a given timeseries sample will output 1 of 6 possible labels. Furthermore, the training data is constructed in such a way that Each ...
komodovaran_'s user avatar
0 votes
2 answers
99 views

Seq2Seq Model training: Encoder vs. Decoder

Can someone point me to an article which explains how the model training is done in Seq2Seq? I know "Teacher Forcing" is used but what I found so far hasn't been detailed enough. What I am most ...
kee's user avatar
  • 213