mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-10-24 06:28:07 +08:00
Updated CIFAR-10 ResNet example to use BatchNorm instead of LayerNorm (#257)
* replaced nn.LayerNorm by nn.BatchNorm * mlx>=0.0.8 required * updated default to 30 epochs instead of 100 * updated README after adding BatchNorm * requires mlx>=0.0.9 * updated README.md with results for mlx-0.0.9
This commit is contained in:
@@ -36,16 +36,15 @@ python main.py --help
|
||||
|
||||
## Results
|
||||
|
||||
After training with the default `resnet20` architecture for 100 epochs, you
|
||||
After training with the default `resnet20` architecture for 30 epochs, you
|
||||
should see the following results:
|
||||
|
||||
```
|
||||
Epoch: 99 | avg. Train loss 0.320 | avg. Train acc 0.888 | Throughput: 416.77 images/sec
|
||||
Epoch: 99 | Test acc 0.807
|
||||
Epoch: 29 | avg. Train loss 0.294 | avg. Train acc 0.897 | Throughput: 270.81 images/sec
|
||||
Epoch: 29 | Test acc 0.841
|
||||
```
|
||||
|
||||
Note this was run on an M1 Macbook Pro with 16GB RAM.
|
||||
|
||||
At the time of writing, `mlx` doesn't have built-in learning rate schedules,
|
||||
or a `BatchNorm` layer. We intend to update this example once these features
|
||||
are added.
|
||||
At the time of writing, `mlx` doesn't have built-in learning rate schedules.
|
||||
We intend to update this example once these features are added.
|
||||
|
Reference in New Issue
Block a user