Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sid911/tensorflowbasics
Just some basics of tensorflow using keras api and subclassing api
https://github.com/sid911/tensorflowbasics
keras python tensorflow-examples tensorflow2
Last synced: 8 days ago
JSON representation
Just some basics of tensorflow using keras api and subclassing api
- Host: GitHub
- URL: https://github.com/sid911/tensorflowbasics
- Owner: Sid911
- Created: 2020-06-23T16:35:22.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-07-03T17:44:56.000Z (over 4 years ago)
- Last Synced: 2025-01-18T00:12:25.987Z (8 days ago)
- Topics: keras, python, tensorflow-examples, tensorflow2
- Language: Python
- Homepage:
- Size: 11.8 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
## Basic Tensorflow Model Training and Saving Code
### [Tensor.py](tensor.py)
This File Uses the Fashion MNIST dataset and trains a sequential model. This also has some basic Checkpoint system from Keras callback api. The code saves the model as `model.h5````python
checkpoint_path = "training/cp.ckpt"
checkpoint_dir = os.path.dirname(checkpoint_path)
cp_callback = keras.callbacks.ModelCheckpoint(checkpoint_path, save_weights_only=True, verbose=1)```
The script also logs the results of the compiled model which can be viewed on tensorboard using :
```
tensorboard --logdir logs/fit
```### [Tensor2.py](tensor2.py)
This file uses subclassing system of keras in order to create a simple model on MNIST dataset. It also includes a model weights saving system for now as we can't really use `model.save()` in subclassing method.
The [mode2.h5](mode2.h5) is the saved numpy array for models. The loading system doesn't seem to be working properly atm ☹.