OpenNMT-tf icon indicating copy to clipboard operation
OpenNMT-tf copied to clipboard

Allowing target inputters to accept SequenceRecordInputter dtype

Open veskoch opened this issue 7 years ago • 3 comments

Hi –

I am looking at the SequenceToSequence class. It requires the target inputter to be a of inputters.WordEmbedder while inputters.SequenceRecordInputter raises an exception. The source inputter can be of either type.

Are there any design/practical reasons necessitating the limitation?

What would be the best way if I want to add support for a inputters.SequenceRecordInputter target inputter in SequenceToSequence?

veskoch avatar Jun 26 '18 11:06 veskoch

Hello,

Could you describe the use case for this? Is the goal to produce vectors instead of symbols?

guillaumekln avatar Jun 26 '18 13:06 guillaumekln

Hi

Thank for the fast reply. Yes, my goal is to produce vectors. I have encoded both the source input and the target output as one-hot vectors in a .tfrecord file.

veskoch avatar Jun 26 '18 15:06 veskoch

It seems like most use case are equivalent to producing symbols, or can be emulated by symbols.

Additionally, some TensorFlow components we used for dynamic decoding assume that ids are produced (for example tf.contrib.seq2seq.BeamSearchDecoder).

guillaumekln avatar Jun 26 '18 16:06 guillaumekln