"doc/git@developer.sourcefind.cn:OpenDAS/ktransformers.git" did not exist on "1db4a67dca09d0a1d5a8c668502b029f47602192"
Commit e99bc87e authored by Catalin Voss's avatar Catalin Voss
Browse files

Merge branch 'patch-1' into patch-2

parents 9775b2eb c0cf0a04
...@@ -163,7 +163,7 @@ def main(): ...@@ -163,7 +163,7 @@ def main():
datasets = (train_dataset, eval_dataset) datasets = (train_dataset, eval_dataset)
encoded_datasets = tokenize_and_encode(datasets) encoded_datasets = tokenize_and_encode(datasets)
# Compute the mex input length for the Transformer # Compute the max input length for the Transformer
max_length = model.config.n_positions // 2 - 2 max_length = model.config.n_positions // 2 - 2
input_length = max(len(story[:max_length]) + max(len(cont1[:max_length]), len(cont2[:max_length])) + 3 \ input_length = max(len(story[:max_length]) + max(len(cont1[:max_length]), len(cont2[:max_length])) + 3 \
for dataset in encoded_datasets for story, cont1, cont2, _ in dataset) for dataset in encoded_datasets for story, cont1, cont2, _ in dataset)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment