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
55a989e8
"git@developer.sourcefind.cn:OpenDAS/ollama.git" did not exist on "927d98a6cde43ffee3ef269cf013df5e96cbe767"
Commit
55a989e8
authored
Nov 11, 2017
by
Myle Ott
Browse files
Fix max_positions_valid in train.py
parent
c6d6256b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
train.py
train.py
+4
-1
No files found.
train.py
View file @
55a989e8
...
@@ -74,7 +74,10 @@ def main():
...
@@ -74,7 +74,10 @@ def main():
# The max number of positions can be different for train and valid
# The max number of positions can be different for train and valid
# e.g., RNNs may support more positions at test time than seen in training
# e.g., RNNs may support more positions at test time than seen in training
max_positions_train
=
(
args
.
max_source_positions
,
args
.
max_target_positions
)
max_positions_train
=
(
args
.
max_source_positions
,
args
.
max_target_positions
)
max_positions_valid
=
(
model
.
max_encoder_positions
(),
model
.
max_decoder_positions
())
max_positions_valid
=
(
min
(
args
.
max_source_positions
,
model
.
max_encoder_positions
()),
min
(
args
.
max_target_positions
,
model
.
max_decoder_positions
())
)
# Start multiprocessing
# Start multiprocessing
trainer
=
MultiprocessingTrainer
(
args
,
model
,
criterion
)
trainer
=
MultiprocessingTrainer
(
args
,
model
,
criterion
)
...
...
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