Questions tagged [encoder-decoder]

184 questions
3
votes
0 answers

EncoderDecoder model training/prediction with two different tokenizers

I am currently trying to get a hang of the EncoderDecoder model for seq2seq task from pretrained decoder models. I am a bit confused about how to create a Encoder-decoder from two pretrained Bert models with different tokenizers and different…
Georg B
  • 181
  • 1
  • 1
  • 8
3
votes
1 answer

ValueError: The following `model_kwargs` are not used by the model: ['encoder_outputs'] (note: typos in the generate arguments will also show up

When I try to run my code for Donut for DocVQA model, I got the following error """Test""" from donut import DonutModel from PIL import Image import torch model = DonutModel.from_pretrained( "naver-clova-ix/donut-base-finetuned-cord-v2") if…
3
votes
0 answers

Is the encoder in decoder = LSTM(128)(encoder) the hidden state or the input to the decoder?

Here is a sample code: inputs = input(shape=shape) encoder = LSTM(128)(inputs) decoder = LSTM(128)(encoder) Now, is the encoder in decoder = LSTM(128)(encoder) the hidden state or the input to the decoder? If it is the hidden state,…
user14349917
3
votes
1 answer

TimeDistributed(Dense) vs Dense in seq2seq

Given the code below encoder_inputs = Input(shape=(16, 70)) encoder = LSTM(latent_dim, return_state=True) encoder_outputs, state_h, state_c = encoder(encoder_inputs) # We discard `encoder_outputs` and only keep the states. encoder_states = [state_h,…
william007
  • 17,375
  • 25
  • 118
  • 194
3
votes
0 answers

how to make decoder in rnn, tensorflow, feeded previous output

I'm wondering how to make decoder in tensorflow rnn, feed it's i th output to (i+1)th input my inputs have 20 sequence and 3680 dementions and my outputs have 39 sequence and 3680 dementions all data is 0~1 number here is my model with…
Bonic
  • 67
  • 5
3
votes
2 answers

Keras encoder-decoder model RuntimeError: You must compile your model before using it

I am trying to reproduce the results of an image captioning model but I get this error. The code for the two models is the following: image_model = Sequential() image_model.add(Dense(EMBEDDING_DIM, input_dim=4096,…
meme mimis
  • 81
  • 1
  • 6
3
votes
1 answer

Seq2seq LSTM fails to produce sensible summaries

I am training an encoder-decoder LSTM in keras for text summarization and the CNN dataset with the following architecture Picture of bidirectional encoder-decoder LSTM I am pretraining the word embedding (of size 256) using skip-gram and I then…
2
votes
0 answers

How can I execute decoder of ONNX Export from Seq2Seq model

I made an export of the Helsinki model using python optimum and i am trying to run the model with only the onnx environment and implement beam search from scratch because I have to later port this to a system not running python. So I want to…
klsmgföl
  • 21
  • 3
2
votes
0 answers

torch.nn.Transformer huge memory impact

I'm trying to use a Transformers Encoder as part of my model, something like this: self.trans = torch.nn.TransformerEncoder(torch.nn.TransformerEncoderLayer( d_model=18, nhead=6, dim_feedforward=64), num_layers=6) Now, I'm not sure if…
2
votes
1 answer

Enabling OMX support in GStreamer for Android

I'm currently trying to hook onto an HW H.264 decoder on Oculus Quest 2 (Adreno 650). The platform supports just one HW decoder OMX.qcom.video.decoder.avc The video decoding pipeline is created using GStreamer and currently looking like this:…
2
votes
1 answer

How my LSTM model knows about testing data and simply cheats previous values/patterns?

I have Encoder-Decoder LSTM model that learns to predict 12 months data in advance, while looking back 12 months. If it helps at all, my dataset has around 10 years in total (120 months). I keep 8 years for training/validation, and 2 years for…
Traveling Salesman
  • 2,209
  • 11
  • 46
  • 83
2
votes
1 answer

How to get the actual type of a swift struct in the disguise of a `__SwiftValue`

I'm using YapDatabase to encode/decode my Swift value types. After decoding, the type information seems to be lost, that is type(of:element) returns __SwiftValue instead of, e.g., Reservation. If I call po element in the debugger though, it seems…
DrMickeyLauer
  • 4,455
  • 3
  • 31
  • 67
2
votes
1 answer

Encoder-Decoder noise problem after decoding

I have an array of size (12960, ) and I'm using very simple dense autoencoder architecture to reproduce array as shown below. input_img = Input(shape=(12960,)) encoded = Dense(units=2000, activation='relu')(input_img) decoded = Dense(units=12960,…
2
votes
1 answer

Self-defined tensorflow decoder TypeError: __call__() missing 1 required positional argument: 'inputs'

I am using tensorflow 2.0 for training my own attention model, however I ran into one big issue when building my decoder class, like this TypeError Traceback (most recent call last) in…
Leon Wang
  • 188
  • 1
  • 7
2
votes
1 answer

Reactive GZIP Decoder

Spring-core 5.2 have codec package with decoder such as StringDecoder that support reactive programing. the API get Publisher and return decoded Flux. I was hoping to find GzipDecoder that get Publisher or…
Etay Ceder
  • 160
  • 1
  • 9
1
2
3
12 13