Questions tagged [seq2seq]

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

318 questions
1
vote
1 answer

How does this Autoencoder work?

I'm trying to use an Autoencoder to get a timeseries and reconstruct it. My data has 10 timeseries of length 365 and one dimension, with the look back window of 28 days. The Autoencoder model is based on this keras blog. So basically this model…
Birish
  • 5,514
  • 5
  • 32
  • 51
1
vote
1 answer

Dimension Issue with Tensorflow stack_bidirectional_dynamic_rnn

I am building a toy encoder-decoder model for machine translation by using Tensorflow. I use Tensorflow 1.8.0 cpu version. FastText pretrained word vector of 300 dimension is used in the embedding layer. Then the batch of training data goes…
Siyao
  • 25
  • 1
  • 6
1
vote
1 answer

Keras seq2seq padding

I am working on seq2seq chatbot. I would ask you, how to ignore PAD symbols in chatbots responses while val_acc is counting. For example, my model generates response: [I, am, reading, a, book, PAD, PAD, PAD, PAD, PAD] But, right…
1
vote
0 answers

Make predictions for a single sequence using tensorflow seq2seq APIs

I have trained a sequence to sequence model using tensorflow. However, I am unable to make predictions on a single sequence using The Greedy Embedding Helper. Here is a part of the graph for reference : training_helper =…
Himanshu Rai
  • 135
  • 8
1
vote
0 answers

Should I have two set of word vectors(word2vec), one for questionSet and one for answerSet before neural network training?

I am confuse with when building a machine learning chatbot for a close domain topic about car. I have lot of text format information about different car models and do a Word2Vec process with these data and saved a Word2Vec.model. Then question sets…
Tim
  • 11
  • 5
1
vote
0 answers

Pytorch seq2seq learning - using word2vec

I am following a seq2seq tutorial here. I want to use pretrained vectors. I have edited the code to get the vector of the word rather than index. Following is the code: #This piece of code loads the vectors from a json file…
Adorn
  • 1,403
  • 1
  • 23
  • 46
1
vote
1 answer

How to use the param of 'weights' of tensorflow function tf.contrib.legacy_seq2seq.sequence_loss_by_example?

The code: import tensorflow as tf A = tf.constant([[0.1,0.2,0.3,0.4],[0.2,0.1,0.4,0.3],[0.4,0.3,0.2,0.1],[0.3,0.2,0.1,0.4],[0.1,0.4,0.3,0.2]], dtype=tf.float32) B = tf.constant([1, 2, 1, 3, 3], dtype=tf.int32) w_1 = tf.constant(value=[1,1,1,1,1],…
1
vote
0 answers

AttributeError: 'LSTMStateTuple' object has no attribute 'get_shape' in tf.contrib.seq2seq.dynamic_decode(decoder)

I don't know why I am getting this error. I saw a some posts to change state_is_tuple=False but it was giving me some other error. I think the error is in the way I defined lstm cell but not sure what should I change? I followed this link which has…
talos1904
  • 952
  • 3
  • 9
  • 24
1
vote
1 answer

Tensorflow: Troubles with .clone() in seq2seq model using Attention and BeamSearch

I am trying to implement a seq2seq model, using bidirectional_dynamic_decode, Attention and the BeamSearchDecoder in Tensorflow (1.6.0). (I tried to copy only the relevant code, to keep it simple) # encoder def make_lstm(rnn_size, keep_prob): …
tmmmmmi
  • 81
  • 3
0
votes
0 answers

Tensorflow Data Pipeline: Read text files from sub-directories for Seq2Seq Models

I am trying to create a data pipeline using Tensorflow's text_dataset_from_directory method for training a seq-to-seq model. The folder structure as below: BBC News Articles |_ News Articles |_Business |_001.txt, 002.txt …
0
votes
0 answers

How to skip tokenization and translation of custom glossary in huggingface NMT models?

I am using mBART50 and opus-MT-en-de for bilingual translations from huggingface. We have a custom dictionary of organization-specific glossary containing ~10,000 English terms (ngrams with n=1-5) and their specific German translations. I'd like the…
0
votes
0 answers

Building Text summarization model. All i want to is how to clear the following ValueError: GraphDisconnection

valueError: Graph disconnected: cannot obtain value for tensor KerasTensor(type_spec=TensorSpec(shape=(None, 300), dtype=tf.float32, name='input_1'), name='input_1', description="created by layer 'input_1'") at layer "embedding". The following…
Deepak
  • 11
  • 1
0
votes
0 answers

Shape Mismatch: Tensorflow Implementation for Sequence to Sequence models from scratch

I am trying to implement a sequence-to-sequence model using TensorFlow. If I understand correctly, in sequence to sequence the last context state vector of the encoder is passed to the decoder while producing the target sentence. I tried to do the…
Na462
  • 11
  • 2
0
votes
0 answers

Seq2SeqLSTM yields the same output with different inputs

I am trying to predict some time series results from experiment data I collected before. Recently I changed to PyTorch from Tensorflow. I am not sure why my results are the same even with different inputs.enter image description here Here is a link…
0
votes
0 answers

Why is the Masking layer missing the values it should be masking?

I'm trying to build a seq2seq architecture chatbot with LSTM models (for teaching purposes). To make the tensors homogeneous, I supplemented short phrases with special tokens padding_token (which, in my case, is equal to 0). If the network is…