Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding evaluation mode to script. #10

Merged
merged 2 commits into from
Feb 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion scripts/bert/bert_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@ def tokenize_function(examples):
)

print("==================================== Evaluating Model =================================")
model.fit(train_tf_dataset, validation_data=eval_tf_dataset, epochs=3)
model.fit(train_tf_dataset, validation_data=eval_tf_dataset, epochs=1)
info = model.evaluate(eval_tf_dataset, verbose=2)

3 changes: 2 additions & 1 deletion scripts/bert/bert_train.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ set -x
pip3 install transformers datasets


cd ~ && git clone --branch bert-tf2 https://github.com/ROCmSoftwarePlatform/transformers
cd ~ && git clone https://github.com/ROCmSoftwarePlatform/transformers
cd ~
# Script to train the small 117M model
python3 transformers/scripts/bert/bert_train.py > log.txt
cat log.txt | tail -n 1
Expand Down