Keras Targeted Dropout
Unofficial implementation of Targeted Dropout with tensorflow backend. Note that there is no model compression in this implementation.
Install
pip install keras-targeted-dropout
Usage
import keras
from keras_targeted_dropout import TargetedDropout
model = keras.models.Sequential()
model.add(TargetedDropout(
layer=keras.layers.Dense(units=2, activation='softmax'),
drop_rate=0.8,
target_rate=0.2,
drop_patterns=['kernel'],
mode=TargetedDropout.MODE_UNIT,
input_shape=(5,),
))
model.compile(optimizer='adam', loss='mse')
model.summary()
drop_rate: Dropout rate for each pixel.target_rate: The proportion of bottom weights selected as candidatesdrop_patterns: A list of names of weights to be dropped.mode:TargetedDropout.MODE_UNITorTargetedDropout.MODE_WEIGHT.
The final dropout rate will be drop_rate times target_rate.
Metadata
Release files for keras-targeted-dropout 0.5.0
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-targeted-dropout-0.5.0.tar.gz | 4.4 kB | Without provenance | Details |
Release files / keras-targeted-dropout-0.5.0.tar.gz
| Download URL | keras-targeted-dropout-0.5.0.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
673037b49e24790e2eaa24ca607212832346e5b70bda07f6440d5bb9254d6c80
|
|
BLAKE2b-256 checksum How to use checksums |
305a37aa62b2b90b3c0ba992addc89b11abbed79558a0ab6b5f597f12d4c676f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.7.1 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.4
|
Security for keras-targeted-dropout 0.5.0
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.