Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
1a647abf
Unverified
Commit
1a647abf
authored
Jul 15, 2020
by
Sam Shleifer
Committed by
GitHub
Jul 15, 2020
Browse files
[fix] check code quality (#5772)
parent
b23d3a5a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
7 deletions
+0
-7
examples/seq2seq/utils.py
examples/seq2seq/utils.py
+0
-1
tests/test_modeling_t5.py
tests/test_modeling_t5.py
+0
-6
No files found.
examples/seq2seq/utils.py
View file @
1a647abf
...
@@ -182,7 +182,6 @@ class SortishSampler(Sampler):
...
@@ -182,7 +182,6 @@ class SortishSampler(Sampler):
return
iter
(
sort_idx
)
return
iter
(
sort_idx
)
logger
=
getLogger
(
__name__
)
logger
=
getLogger
(
__name__
)
...
...
tests/test_modeling_t5.py
View file @
1a647abf
...
@@ -143,12 +143,6 @@ class T5ModelTester:
...
@@ -143,12 +143,6 @@ class T5ModelTester:
decoder_attention_mask
=
decoder_attention_mask
,
decoder_attention_mask
=
decoder_attention_mask
,
)
)
decoder_output
,
decoder_past
,
encoder_output
=
model
(
input_ids
=
input_ids
,
decoder_input_ids
=
decoder_input_ids
)
decoder_output
,
decoder_past
,
encoder_output
=
model
(
input_ids
=
input_ids
,
decoder_input_ids
=
decoder_input_ids
)
result
=
{
"encoder_output"
:
encoder_output
,
"decoder_output"
:
decoder_output
,
"decoder_past"
:
decoder_past
,
}
self
.
parent
.
assertEqual
(
encoder_output
.
size
(),
(
self
.
batch_size
,
self
.
encoder_seq_length
,
self
.
hidden_size
))
self
.
parent
.
assertEqual
(
encoder_output
.
size
(),
(
self
.
batch_size
,
self
.
encoder_seq_length
,
self
.
hidden_size
))
self
.
parent
.
assertEqual
(
decoder_output
.
size
(),
(
self
.
batch_size
,
self
.
decoder_seq_length
,
self
.
hidden_size
))
self
.
parent
.
assertEqual
(
decoder_output
.
size
(),
(
self
.
batch_size
,
self
.
decoder_seq_length
,
self
.
hidden_size
))
self
.
parent
.
assertEqual
(
len
(
decoder_past
),
2
)
self
.
parent
.
assertEqual
(
len
(
decoder_past
),
2
)
...
...
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