From f6835ebf4ea7d5e312f8d2db9d28a450d2a911fe Mon Sep 17 00:00:00 2001 From: Awni Hannun Date: Tue, 19 Dec 2023 13:57:55 -0800 Subject: [PATCH] readme + format --- speechcommands/README.md | 4 ++-- speechcommands/main.py | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/speechcommands/README.md b/speechcommands/README.md index e8b2243a..bcd3a325 100644 --- a/speechcommands/README.md +++ b/speechcommands/README.md @@ -1,8 +1,8 @@ -# Training a Vision Transformer on SpeechCommands +# Train a Keyword Spotting Transformer on Speech Commands An example of training a Keyword Spotting Transformer[^1] on the Speech Commands dataset[^2] with MLX. All supervised only configurations from the -paper are available.The example also illustrates how to use [MLX +paper are available. The example also illustrates how to use [MLX Data](https://github.com/ml-explore/mlx-data) to load and process an audio dataset. diff --git a/speechcommands/main.py b/speechcommands/main.py index 3890baa4..492b8159 100644 --- a/speechcommands/main.py +++ b/speechcommands/main.py @@ -146,7 +146,9 @@ def main(args): ) val_acc, val_throughput = test_epoch(model, val_data) - print(f"Epoch: {epoch} | Val acc {val_acc.item():.3f} | Throughput: {val_throughput.item():.2f} samples/sec") + print( + f"Epoch: {epoch} | Val acc {val_acc.item():.3f} | Throughput: {val_throughput.item():.2f} samples/sec" + ) if val_acc >= best_acc: best_acc = val_acc