Keras Models Hub
This repo aims at providing both reusable Keras Models and pre-trained models, which could easily integrated into your projects.
Install
pip install keras-models
If you will using the NLP models, you need run one more command:
python -m spacy download xx_ent_wiki_sm
Usage Guide
Import
import kearasmodels
Examples
Reusable Models
LinearModel
DNN
CNN
from keras_models.models import CNN
# fake data
X = np.random.normal(0, 1.0, size=500 * 100 * 100 * 3).reshape(500, 100, 100, 3)
w1 = np.random.normal(0, 1.0, size=100)
w2 = np.random.normal(0, 1.0, size=3)
Y = np.dot(np.dot(np.dot(X, w2), w1), w1) + np.random.randint(1)
# initialize & train model
model = CNN(input_shape=X.shape[1:], filters=[32, 64], kernel_size=(2, 2), pool_size=(3, 3), padding='same', r_dropout=0.25, num_classes=1)
model.compile(optimizer='adam', loss=mean_squared_error, metrics=['mae', 'mse'])
model.summary()
model.fit(X, Y, batch_size=16, epochs=100, validation_split=0.1)
SkipGram
WideDeep
Pre-trained Models
VGG16_Places365
This model is forked from GKalliatakis/Keras-VGG16-places365 and CSAILVision/places365
from keras_models.models.pretrained import vgg16_places365
labels = vgg16_places365.predict(['your_image_file_pathname.jpg', 'another.jpg'], n_top=3)
# Example Result: labels = [['cafeteria', 'food_court', 'restaurant_patio'], ['beach', 'sand']]
Models
- LinearModel
- DNN
- WideDeep
- TextCNN
- TextDNN
- SkipGram
- ResNet
- VGG16_Places365 [pre-trained]
- working on more models
Citation
WideDeep
Cheng H T, Koc L, Harmsen J, et al.
Wide & deep learning for recommender systems[C]
Proceedings of the 1st workshop on deep learning for recommender systems. ACM, 2016: 7-10.
TextCNN
Kim Y.
Convolutional neural networks for sentence classification[J].
arXiv preprint arXiv:1408.5882, 2014.
SkipGram
Mikolov T, Chen K, Corrado G, et al.
Efficient estimation of word representations in vector space[J].
arXiv preprint arXiv:1301.3781, 2013.
VGG16_Places365
Zhou, B., Lapedriza, A., Khosla, A., Oliva, A., & Torralba, A.
Places: A 10 million Image Database for Scene Recognition
IEEE Transactions on Pattern Analysis and Machine Intelligence
ResNet
He K, Zhang X, Ren S, et al.
Deep residual learning for image recognition[C]
Proceedings of the IEEE conference on computer vision and pattern recognition. 2016: 770-778.
Contribution
Please submit PR if you want to contribute, or submit issues for new model requirements.
Metadata
Release files for keras-models 0.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| keras-models-0.0.7.tar.gz | 12.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| keras_models-0.0.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.1 kB
Release files / keras-models-0.0.7.tar.gz
| Download URL | keras-models-0.0.7.tar.gz |
|---|---|
| Size | 12.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6aad06ffc82dc1adf0d319c557e0963c2e9f7932536a1addbca4a539bc33c189
|
|
BLAKE2b-256 checksum How to use checksums |
d4a54d1dd4a1d31c56a28e32441404c01694faa13d384f7d679987eb16a0456e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.4
|
Release files / keras_models-0.0.7-py3-none-any.whl
| Download URL | keras_models-0.0.7-py3-none-any.whl |
|---|---|
| Size | 18.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5983ea2caf98611b079b3bb8d1cc43382ba6d8b337f326246d600286299a1e67
|
|
BLAKE2b-256 checksum How to use checksums |
25b9b97f7202081346923af692be7c926faf7b10c4ed432f99dca416786fec1e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.4
|
Security for keras-models 0.0.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.