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
OpenDAS
Fairseq
Commits
0e9e7f7b
"docs/git@developer.sourcefind.cn:OpenDAS/pytorch3d.git" did not exist on "09992a388ff5e14dde8110e61dbe4ba69cb3967e"
Commit
0e9e7f7b
authored
Jul 02, 2018
by
alexeib
Committed by
Myle Ott
Jul 25, 2018
Browse files
make model access saner
parent
d494485f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
eval_lm.py
eval_lm.py
+3
-1
No files found.
eval_lm.py
View file @
0e9e7f7b
...
@@ -37,11 +37,13 @@ def main(args):
...
@@ -37,11 +37,13 @@ def main(args):
if
args
.
fp16
:
if
args
.
fp16
:
model
.
half
()
model
.
half
()
assert
len
(
models
)
>
0
itr
=
data
.
EpochBatchIterator
(
itr
=
data
.
EpochBatchIterator
(
dataset
=
task
.
dataset
(
args
.
gen_subset
),
dataset
=
task
.
dataset
(
args
.
gen_subset
),
max_tokens
=
args
.
max_tokens
,
max_tokens
=
args
.
max_tokens
,
max_sentences
=
args
.
max_sentences
or
4
,
max_sentences
=
args
.
max_sentences
or
4
,
max_positions
=
model
.
max_positions
(),
max_positions
=
model
s
[
0
]
.
max_positions
(),
num_shards
=
args
.
num_shards
,
num_shards
=
args
.
num_shards
,
shard_id
=
args
.
shard_id
,
shard_id
=
args
.
shard_id
,
ignore_invalid_inputs
=
True
,
ignore_invalid_inputs
=
True
,
...
...
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