Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
d7dabfef
Commit
d7dabfef
authored
Feb 06, 2020
by
Ari
Committed by
Lysandre Debut
Feb 07, 2020
Browse files
Fix documentation in ProjectedAdaptiveLogSoftmax
parent
42f08e59
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/transformers/modeling_transfo_xl_utilities.py
src/transformers/modeling_transfo_xl_utilities.py
+2
-2
No files found.
src/transformers/modeling_transfo_xl_utilities.py
View file @
d7dabfef
...
@@ -90,9 +90,9 @@ class ProjectedAdaptiveLogSoftmax(nn.Module):
...
@@ -90,9 +90,9 @@ class ProjectedAdaptiveLogSoftmax(nn.Module):
labels :: [len*bsz]
labels :: [len*bsz]
Return:
Return:
if labels is None:
if labels is None:
out :: [len*bsz] Negative log likelihood
else:
out :: [len*bsz x n_tokens] log probabilities of tokens over the vocabulary
out :: [len*bsz x n_tokens] log probabilities of tokens over the vocabulary
else:
out :: [len*bsz] Negative log likelihood
We could replace this implementation by the native PyTorch one
We could replace this implementation by the native PyTorch one
if their's had an option to set bias on all clusters in the native one.
if their's had an option to set bias on all clusters in the native one.
here: https://github.com/pytorch/pytorch/blob/dbe6a7a9ff1a364a8706bf5df58a1ca96d2fd9da/torch/nn/modules/adaptive.py#L138
here: https://github.com/pytorch/pytorch/blob/dbe6a7a9ff1a364a8706bf5df58a1ca96d2fd9da/torch/nn/modules/adaptive.py#L138
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment