EmbeddingsSharingLevel
- class opennmt.models.EmbeddingsSharingLevel[source]
Level of embeddings sharing.
Possible values are:
NONE
: no sharing (default)SOURCE_TARGET_INPUT
: share source and target word embeddingsTARGET
: share target word embeddings and softmax weightsALL
: share words embeddings and softmax weightsAUTO
: automatically share embeddings when using the same vocabulary file.
Inherits from:
builtins.object
- NONE = 0
- SOURCE_TARGET_INPUT = 1
- TARGET = 2
- ALL = 3
- AUTO = 4
Returns
True
if input embeddings should be shared atlevel
.
Returns
True
if target embeddings should be shared atlevel
.