Skip to content

Commit

Permalink
Merge pull request #102 from Yoctol/pass-dropout-in-cls
Browse files Browse the repository at this point in the history
Fix emb dropout by sending dropout in cls
  • Loading branch information
GBLin5566 authored Jun 10, 2019
2 parents f79facc + e155414 commit 36e7ab1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions talos/layers/embeddings.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ def from_weights(
mask_index: Union[int, Sequence[int]] = None,
constant: bool = False,
auxiliary_tokens: int = 0,
dropout: float = None,
**kwargs,
):
'''Create a Embedding Layer by pre-defined matrix of shape (vocab_size, dimension).
Expand Down Expand Up @@ -134,6 +135,7 @@ def from_weights(
embeddings_initializer=initializer,
mask_index=mask_index,
dtype=dtype,
dropout=dropout,
**kwargs,
)
if constant:
Expand Down

0 comments on commit 36e7ab1

Please sign in to comment.