https://github.com/donaldkellett/fmnist-keras3
Fashion MNIST linear classification model with Keras 3.0 and PyTorch
https://github.com/donaldkellett/fmnist-keras3
aiml fashion-mnist keras python pytorch
Last synced: 7 months ago
JSON representation
Fashion MNIST linear classification model with Keras 3.0 and PyTorch
- Host: GitHub
- URL: https://github.com/donaldkellett/fmnist-keras3
- Owner: DonaldKellett
- License: mit
- Created: 2023-12-02T08:08:29.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-02T09:51:34.000Z (almost 2 years ago)
- Last Synced: 2025-01-10T07:44:23.361Z (9 months ago)
- Topics: aiml, fashion-mnist, keras, python, pytorch
- Language: Python
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fmnist-keras3
[Fashion MNIST](https://keras.io/api/datasets/fashion_mnist/) linear classification model with [Keras 3.0](https://keras.io/) and [PyTorch](https://pytorch.org/)
## Quickstart
Just install Python 3.11 - no GPU or specialized hardware required.
We recommend [pyenv](https://github.com/pyenv/pyenv) for creating and managing virtual environments.
Install project dependencies:
```bash
pip install -r requirements.txt
```Set PyTorch as the backend for Keras \(you may want to save this in your `$HOME/.bashrc` as well\):
```bash
export KERAS_BACKEND='torch'
```Now train the model:
```bash
python main.py
```Optionally save the model with `--save-model`:
```bash
python main.py --save-model
```Run the unit tests:
```bash
pytest -v
```## Credits
Adapted from Ch. 4.2-4.5 of [D2L.ai](http://d2l.ai/) for the latest and greatest [Keras 3.0](https://keras.io/) framework with [PyTorch](https://pytorch.org/) as the backend
## License
[MIT](./LICENSE)