Keras deep learning model implementations
Project description
# DeepModels
Implementations of various deep learning models using Keras.
## Requirements
An existing installation of either Tensorflow or Theano.
## Installation
```
pip install deep-models
```
## Usage
The models are implemented using Keras and instantiation returns a Keras Model object unless otherwise noted.
### Wide Residual Network
```python3
from deep_models import wide_residual_network as wrn
# Load your data
trainX = ...
trainY = ...
img_shape = (32, 32, 3)
# Create the model
# k is the width, 6 * n + 4 is the depth
model = wrn.build_model(img_shape, classes=10, n=4, k=10, dropout=0.3)
# Train the model
model.compile(loss="categorical_crossentropy", optimizer="adam", metrics=["acc"])
model.fit(
trainX, trainY,
batch_size=128,
epochs=100,
validation_split=0.2)
```
## Examples
Some working examples are available in the notebooks directory.
## License
See LICENSE file
Implementations of various deep learning models using Keras.
## Requirements
An existing installation of either Tensorflow or Theano.
## Installation
```
pip install deep-models
```
## Usage
The models are implemented using Keras and instantiation returns a Keras Model object unless otherwise noted.
### Wide Residual Network
```python3
from deep_models import wide_residual_network as wrn
# Load your data
trainX = ...
trainY = ...
img_shape = (32, 32, 3)
# Create the model
# k is the width, 6 * n + 4 is the depth
model = wrn.build_model(img_shape, classes=10, n=4, k=10, dropout=0.3)
# Train the model
model.compile(loss="categorical_crossentropy", optimizer="adam", metrics=["acc"])
model.fit(
trainX, trainY,
batch_size=128,
epochs=100,
validation_split=0.2)
```
## Examples
Some working examples are available in the notebooks directory.
## License
See LICENSE file
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Deep-Models-0.1.4.tar.gz
(2.6 kB
view details)
File details
Details for the file Deep-Models-0.1.4.tar.gz.
File metadata
- Download URL: Deep-Models-0.1.4.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09199af4c557884d70aa3b0a36b1d903e6c44677f62c14d5a393d10a7cec0300
|
|
| MD5 |
daae345cb5d37933dd5370548569766b
|
|
| BLAKE2b-256 |
8f0763a6347e200fe0f826488dfaf76e79f6f78c5c839e4a9ee2a7f22633b3e3
|