Questions tagged [encoder-decoder]

184 questions
1
vote
1 answer

How to add Dropout in Encoder-Decoder Seq2Seq model

I am trying the encoder-decoder model for language translation, but the val_acc is fluctuating, and not going beyond 16%. So, I decided to add Dropout to avoid overfitting, but I am not able to do so. Please help me in adding dropout in my code as…
1
vote
1 answer

Tensorflow - Decoder for Machine Translation

I am going through Tensorflow's tutorial on Neural Machine Translation using Attention mechanism. It has the following code for the Decoder : class Decoder(tf.keras.Model): def __init__(self, vocab_size, embedding_dim, dec_units, batch_sz): …
1
vote
0 answers

Simplest LSTM with attention (Encoder-Decoder architecture) using Pytorch

please, help me understand how to write LSTM (RNN) with attention using Encoder-Decoder architecture. I've watched a lot of videos on YouTube, read some articles on towardsdatascience.com and so on but those examples are very complex for me. I need…
1
vote
1 answer

Pytorch transformer forward function masks implementation for decoder forward function

I am trying to use and learn PyTorch Transformer with DeepMind math dataset. I have tokenized (char not word) sequence that is fed into model. Models forward function is doing once forward for encoder and multiple forwards for decoder (till all…
1
vote
0 answers

ValueError: Layer lstm_3 expects 35 inputs, but it received 3 input tensors

I am trying to build a sequence to sequence encoder decoder network for language translation (English to French), I use three BLSTM layers with dropout as encoder and one LSTM decoder. For the model and the fit is ok, but I keep getting an error in…
1
vote
1 answer

Implemenet attention in vanilla encoder-decoder architecture

I have tried a vanila enc-dec arch as following (english to french NMT) I want to know how to integrate keras attention layer here. Either from the keras docs or any other attention module from third party repo is also welcome. I just need to…
1
vote
1 answer

Apply an Encoder-Decoder (Seq2Seq) inference model with Attention

Hello a StackOverflow community! I'm trying to create an inference model for a seq2seq (Encoded-Decoded) model with Attention. It's a definition of the inference model. model = compile_model(tf.keras.models.load_model(constant.MODEL_PATH,…
1
vote
1 answer

Encoder Decoder for time series forecasting

I want to predict for 7 days from training size of 55 days. I tried to apply models given here and here, but I am getting output value for all 7 days as 1. I am also confused about how to give time series as input to encoder decoder and it's code, I…
1
vote
0 answers

Attention with Encoder/Decoder Using Keras

I'm trying to apply this: https://github.com/wanasit/katakana/blob/master/notebooks/Attention-based%20Sequence-to-Sequence%20in%20Keras.ipynb to music generation instead of language translation. But there are more complications with music. Is…
1
vote
0 answers

Time series encoder-decoder LSTM in Keras

I am using 9 features and 18 time steps in the past to forecast 3 values in the future: lookback = 18 forecast = 3 n_features_X = 9 n_features_Y = 1 My code is: # Encoder past_inputs = tf.keras.Input(shape=(lookback, n_features_X),…
1
vote
1 answer

Implementing The 'Learning To Read With Tensorflow' Talk From TF Summit 2020 - EncoderDecoder Seq2Seq Model In Tensorflow 2.1/2.2 - Custom Train Step

Background Info I am creating Google Colabs for each talk I found interesting from the Tensorflow 2020 Summit. As a note, I am using Tensorflow 2.1. I have encountered a problem when attempting to implement the 'Learning To Read With Tensorflow'…
1
vote
0 answers

How to send raw-video data(YUV/RGB) data to surface on android?

I am working on an application where I need to send raw data(YUV/RGB) data on the surface, where I can see the video. Right now what I am doing is, I am receiving an encoded frame(h265 form) and giving it to the decoding API to decode it further…
1
vote
0 answers

Adding attention layer to the Encoder-Decoder model architecture gives worse results

I initially defined a Encoder-Decoder Model architecture for Next Phrase Prediction and trained it on some data, I was successfully able to predict using the same model. But when I tried to insert an Attention layer in the architecture the model…
1
vote
1 answer

Problems with modifying encoder metadata with FFMPEG

I'm trying to change FFMPEG encoder writing application with FFMPEG -metadata and for whatever reason, it's reading the input but not actually writing anything out. -map_metadata -metadata:s:v:0 -metadata writing_application, basically every single…
yrcje
  • 19
  • 2
1
vote
0 answers

Can Encoder-Decoder network be used for different input and output?

Working on image translation problem. Got many pairs of input-output images, say sketch as input, translated sketch as output. Images are b&w with 1 pixel width sketch lines. Can simple encoder-decoder be used to LEARN the image translation? Code…