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
8da47b07
"git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "f3bda2352a2911739b85a1bc8fe65b0a33867c13"
Commit
8da47b07
authored
Nov 27, 2019
by
thomwolf
Browse files
fix merge tests
parent
a36f981d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
transformers/modeling_ctrl.py
transformers/modeling_ctrl.py
+1
-1
No files found.
transformers/modeling_ctrl.py
View file @
8da47b07
...
...
@@ -373,7 +373,7 @@ class CTRLModel(CTRLPreTrainedModel):
if
inputs_embeds
is
None
:
inputs_embeds
=
self
.
w
(
input_ids
)
# inputs_embeds = embedded.unsqueeze(0) if len(input_ids.shape)<2 else embedded
seq_len
=
input_shape
.
shape
[
-
1
]
seq_len
=
input_shape
[
-
1
]
mask
=
torch
.
triu
(
torch
.
ones
(
seq_len
+
past_length
,
seq_len
+
past_length
),
1
).
to
(
inputs_embeds
.
device
)
inputs_embeds
*=
np
.
sqrt
(
self
.
d_model_size
)
...
...
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