Skip to content

Commit

Permalink
update to 0.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
holyseven committed Jun 2, 2022
1 parent 3f62bfc commit 411b450
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion interpretdl/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from .interpreter import *
from .evaluate_interpreter import *
__version__ = '0.6.0'
__version__ = '0.6.1'
4 changes: 3 additions & 1 deletion tutorials/assets/fine_tuning_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,18 +114,20 @@ def run(args, train_set, test_set):
logging.info(f"EPOCH | {epoch} TOTAL LOSS | {losses / len(train_loader.dataset): .4f}")

print(datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S'))
print(f"EPOCH | {epoch} TOTAL LOSS | {losses / len(train_loader.dataset)}: .4f")
print(f"EPOCH | {epoch} TOTAL LOSS | {losses / len(train_loader.dataset): .4f}")

# writer.add_scalar('Loss/train', losses / len(train_loader.dataset), epoch)

loss_test, acc_test = evaluate(model, test_loader)
logging.info(f"TEST ACC| {acc_test}, LOSS| {loss_test}")
print(f"TEST ACC| {acc_test}, LOSS| {loss_test}")

if epoch % args.ckpt == 0:
paddle.save(model.state_dict(), f'./work_dirs/result_{args.name}/ckpt-{epoch}.pd')

loss_test, acc_test = evaluate(model, test_loader)
logging.info(f"TEST ACC| {acc_test}, LOSS| {loss_test}")
print(f"TEST ACC| {acc_test}, LOSS| {loss_test}")

paddle.save(model.state_dict(), f'./work_dirs/result_{args.name}/ckpt-final.pd')

Expand Down

0 comments on commit 411b450

Please sign in to comment.