Stop passing None to compile() in TF examples (#29597)
* Fix examples to stop passing None to compile(), rework example invocation for run_text_classification.py * Add Amy's fix
This commit is contained in:
@@ -75,7 +75,10 @@ python run_text_classification.py \
|
||||
--train_file training_data.json \
|
||||
--validation_file validation_data.json \
|
||||
--output_dir output/ \
|
||||
--test_file data_to_predict.json
|
||||
--test_file data_to_predict.json \
|
||||
--do_train \
|
||||
--do_eval \
|
||||
--do_predict
|
||||
```
|
||||
|
||||
## run_glue.py
|
||||
|
||||
@@ -477,7 +477,7 @@ def main():
|
||||
adam_global_clipnorm=training_args.max_grad_norm,
|
||||
)
|
||||
else:
|
||||
optimizer = "adam" # Just write anything because we won't be using it
|
||||
optimizer = "sgd" # Just write anything because we won't be using it
|
||||
if is_regression:
|
||||
metrics = []
|
||||
else:
|
||||
|
||||
@@ -526,7 +526,7 @@ def main():
|
||||
adam_global_clipnorm=training_args.max_grad_norm,
|
||||
)
|
||||
else:
|
||||
optimizer = None
|
||||
optimizer = "sgd" # Just use any default
|
||||
if is_regression:
|
||||
metrics = []
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user