Skip to main content

A wrapper that slows down the updates of trainable weights

Project description

Keras Successive Regularization Wrapper

Travis Coverage

A wrapper that slows down the updates of trainable weights.

Install

pip install keras-succ-reg-wrapper

Usage

import keras
from keras_succ_reg_wrapper import SuccReg

input_layer = keras.layers.Input(shape=(1,), name='Input')
dense_layer = SuccReg(
    layer=keras.layers.Dense(units=1, name='Dense'),
    regularizer=keras.regularizers.L1L2(l2=1e-3),  # Any regularizer
    name='Output',
)(input_layer)
model = keras.models.Model(inputs=input_layer, outputs=dense_layer)
model.compile(optimizer='adam', loss='mse')
model.summary()

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

keras-succ-reg-wrapper-0.4.0.tar.gz (2.9 kB view details)

Uploaded Source

File details

Details for the file keras-succ-reg-wrapper-0.4.0.tar.gz.

File metadata

  • Download URL: keras-succ-reg-wrapper-0.4.0.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for keras-succ-reg-wrapper-0.4.0.tar.gz
Algorithm Hash digest
SHA256 f95e5da1fd1b1f59a8e800dbec4db7582d99abcdcfbde613d4454ec50a844ce9
MD5 c7978ce087645c9d45e05ecac6be691a
BLAKE2b-256 78317a2847ddf48af8c3aff91b926c2b22c9fb2cb3db12afb92994eeae0195fd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page