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.
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 | |
|---|---|---|---|
| keras-targeted-dropout-0.5.0.tar.gz | 4.4 kB | 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
|