Skip to main content

Targeted dropout implemented in Keras

Project description

Keras Targeted Dropout

Travis Coverage Version Downloads License

Unofficial implementation of Targeted Dropout with tensorflow backend. Note that there is no model compression in this implementation.


pip install keras-targeted-dropout


import keras
from keras_targeted_dropout import TargetedDropout

model = keras.models.Sequential()
    layer=keras.layers.Dense(units=2, activation='softmax'),
model.compile(optimizer='adam', loss='mse')
  • drop_rate: Dropout rate for each pixel.
  • target_rate: The proportion of bottom weights selected as candidates
  • drop_patterns: A list of names of weights to be dropped.
  • mode: TargetedDropout.MODE_UNIT or TargetedDropout.MODE_WEIGHT.

The final dropout rate will be drop_rate times target_rate.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for keras-targeted-dropout, version 0.5.0
Filename, size File type Python version Upload date Hashes
Filename, size keras-targeted-dropout-0.5.0.tar.gz (4.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page