"benchmark/git@developer.sourcefind.cn:change/sglang.git" did not exist on "b0d25e72c401f37b55d689ddbf05b8c583afe854"
Commit d3a8df6b authored by VictorSanh's avatar VictorSanh
Browse files

typos in `input_fn_builder`

parent 836faed9
......@@ -434,7 +434,7 @@ def model_fn_builder(bert_config, num_labels, init_checkpoint, learning_rate,
### ATTENTION - I removed the `use_tpu` argument
def input_fn_builder(features, seq_length, is_training, eval_drop_remainder):
def input_fn_builder(features, seq_length, is_training, drop_remainder):
"""Creates an `input_fn` closure to be passed to TPUEstimator.""" ### ATTENTION - To rewrite ###
all_input_ids = []
......@@ -462,7 +462,7 @@ def input_fn_builder(features, seq_length, is_training, eval_drop_remainder):
"label_ids": torch.IntTensor(all_label_ids, device=device)
})
shuffle = True if training else False
shuffle = True if is_training else False
d = torch.utils.data.DataLoader(dataset=d, batch_size=batch_size,
shuffle=shuffle,drop_last=drop_remainder)
# Cf https://pytorch.org/tutorials/beginner/data_loading_tutorial.html
......
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