An open API service indexing awesome lists of open source software.

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

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)