Questions tagged [seq2seq]

Seq2Seq is a sequence to sequence learning add-on for the python deep learning library.

318 questions
1
vote
1 answer

Tensorflow seq2seq - keep max three checkpoints not working

I am writing a seq2seq and would like to keep only three checkpoints; I thought I was implementing this with: checkpoint_dir = './training_checkpoints' checkpoint_prefix = os.path.join(checkpoint_dir, "ckpt") checkpoint =…
kiriloff
  • 25,609
  • 37
  • 148
  • 229
1
vote
1 answer

Tensorflow-addons seq2seq - start and end tokens in BaseDecoder or BasicDecoder

I am writing code inspired from https://www.tensorflow.org/addons/api_docs/python/tfa/seq2seq/BasicDecoder. In the translation/generation we instantiate a BasicDecoder decoder_instance = tfa.seq2seq.BasicDecoder(cell=decoder.rnn_cell, \ …
kiriloff
  • 25,609
  • 37
  • 148
  • 229
1
vote
0 answers

Tensoflow 2.0 Exporting and Importing metagraphs is not supported

("Exporting/importing meta graphs is not supported when " RuntimeError: Exporting/importing meta graphs is not supported when eager execution is enabled. No graph exists when eager execution is enabled. I am trying to run this below code in…
exploding_data
  • 317
  • 1
  • 14
1
vote
0 answers

Order of outputs in stacked LSTM Bidirectional in tensorflow

I want to build a seq2seq model with a Bidirectional LSTM encoder (2 layers), but I don't know how is the order of the outputs of the Bidirecional layer. This is the way how I create the Bidirectional layer: self.lstm_layer =…
1
vote
0 answers

Could not compute output KerasTensor in multi modal seq2seq

I am trying to generate comments from subreddit posts using images, titles, and source subreddit of the post. if you don't know what a subreddit is, just think about it as a category of the post e.g cats, dogs, cars I am using CNN for images, a…
Damian Grzanka
  • 275
  • 2
  • 13
1
vote
0 answers

LSTM encoder decoder model training errors: ValueError

Resources import pandas as pd import numpy as np import tensorflow as tf from tensorflow import keras from tensorflow.keras import layers print(tf.version.VERSION) print(keras.__version__) #2.5.0 #2.5.0 LSTM Encoder Decoder Model with…
1
vote
0 answers

How to add self-attention to a seq2seq model in keras

I have this model with dot product attention layer. I have commented out the part in the code. How do I use self-attention instead of the attention layer I have ? So, basically, I want to replace the commented part with self attention layer. I am…
BlueMango
  • 463
  • 7
  • 21
1
vote
1 answer

Do I need to create separate embedding matrices for source and target vocab for abstractive summarization model?

I'm working on a Seq2Seq model to perform abstractive summarization using the Glove pre-trained word embeddings. Is it required I make two embedding matrices? One that covers the source vocabulary and one that covers the summary vocabulary.
eliboy8
  • 33
  • 1
  • 6
1
vote
1 answer

Runtime Error: Found no NVIDIA driver on your system

I am facing issue while loading the model using torch which was trained using GPU, I am trying to load that model using CPU. however I am successfully able to load the model but while predicting the results I am getting error. However if I use GPU…
Harry DSOUZA
  • 27
  • 1
  • 2
1
vote
1 answer

How to use BERT trained model from Jupyter Notebook to another Ubuntu 20.04 server

We have finetuned our BERT model for text2text generation. It is working fine on the Jupyter notebook. But when I use the same trained model on another server of Ubuntu, then it shows the issue. This is my first post, so please bear with me. The…
1
vote
0 answers

How do I decode my finetuned model's output into text?

I have fine-tuned a machine translation model and I'm trying to load my pytorch_model.bin model checkpoint that was saved during training and predict the translation of a word. How do I convert from transformers.modeling_outputs.Seq2SeqModelOutput…
1
vote
1 answer

How to do inference on seq2seq RNN?

I'm trying to create a chatbot using an RNN in TensorFlow, using this introduction https://blog.keras.io/a-ten-minute-introduction-to-sequence-to-sequence-learning-in-keras.html The model in the example is a character based sequence, but I want to…
gazm2k5
  • 449
  • 5
  • 14
1
vote
1 answer

Is there a limit to the size of target word vocabulary that should be used in seq2seq models?

In a machine translation seq2seq model (using RNN/GRU/LSTM) we provide sentence in a source language and train the model to map it to a sequence of words in another language (e.g., English to German). The idea is, that the decoder part generates a…
anurag
  • 1,715
  • 1
  • 8
  • 28
1
vote
0 answers

Use multiple softmax in transformers output layer and calculate loss

Can I use multiple softmax in the last output layer in transformers? If so, how can I calculate loss from that. I am working in pytorch. And I am asking because my data is a sequence of tuples where, the elements have different dimensions.…
1
vote
2 answers

LSTM seq2seq input and output with different number of time steps

I am new to this field and currently working on a video action prediction project using keras. The input data takes 10% frames of each video and convert all same successive actions into 1 single action. For example [0,0,0,1,1,1,2] -> [0,1,2]. After…
Kexin Wang
  • 23
  • 2