Tensor2tensor: embedding layer

Created on 17 Oct 2017  路  2Comments  路  Source: tensorflow/tensor2tensor

In the symbol modality, it doesn't seem to have an embedding layer. Instead, symbols are mapped to hidden dimension directly from a one-hot vector. I'm wondering what's an easy way to plug in a pretrained embedding layer that has a different dimension from the hidden layer?

Most helpful comment

You could subclass SymbolModality and override _body_input_depth to be something other than self._model_hparams.hidden_size.

All 2 comments

You could subclass SymbolModality and override _body_input_depth to be something other than self._model_hparams.hidden_size.

A follow-up question: can't the REAL modality be used to plug-in a word embedding (since they are vectors of real numbers)?

Was this page helpful?
0 / 5 - 0 ratings