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
92b3cb78
"docs/vscode:/vscode.git/clone" did not exist on "5c877fe94a1cbb70132515a9da6a464bf6da49ed"
Commit
92b3cb78
authored
Jan 17, 2020
by
Lysandre
Committed by
Lysandre Debut
Jan 23, 2020
Browse files
TF XLNet
parent
cd656fb2
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
190 additions
and
190 deletions
+190
-190
src/transformers/modeling_tf_xlnet.py
src/transformers/modeling_tf_xlnet.py
+188
-189
src/transformers/modeling_xlnet.py
src/transformers/modeling_xlnet.py
+2
-1
No files found.
src/transformers/modeling_tf_xlnet.py
View file @
92b3cb78
This diff is collapsed.
Click to expand it.
src/transformers/modeling_xlnet.py
View file @
92b3cb78
...
...
@@ -1092,7 +1092,8 @@ class XLNetForSequenceClassification(XLNetPreTrainedModel):
If ``config.num_labels == 1`` a regression loss is computed (Mean-Square loss),
If ``config.num_labels > 1`` a classification loss is computed (Cross-Entropy).
Outputs: `Tuple` comprising various elements depending on the configuration (config) and inputs:
Return:
`tuple(torch.FloatTensor)` comprising various elements depending on the configuration (config) and inputs:
loss (:obj:`torch.FloatTensor` of shape :obj:`(1,)`, `optional`, returned when :obj:`labels` is provided):
Classification (or regression if config.num_labels==1) loss.
logits (:obj:`torch.FloatTensor` of shape :obj:(batch_size, config.num_labels)`):
...
...
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