Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cyberzhg/keras-succ-reg-wrapper
A wrapper that slows down the updates of trainable weights.
https://github.com/cyberzhg/keras-succ-reg-wrapper
keras regularization wrapper
Last synced: about 1 month ago
JSON representation
A wrapper that slows down the updates of trainable weights.
- Host: GitHub
- URL: https://github.com/cyberzhg/keras-succ-reg-wrapper
- Owner: CyberZHG
- License: mit
- Archived: true
- Created: 2018-12-09T08:51:51.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-02-01T03:34:21.000Z (almost 6 years ago)
- Last Synced: 2024-09-30T16:08:11.779Z (about 1 month ago)
- Topics: keras, regularization, wrapper
- Language: Python
- Homepage: https://pypi.org/project/keras-succ-reg-wrapper/
- Size: 6.84 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Keras Successive Regularization Wrapper
[![Travis](https://travis-ci.org/CyberZHG/keras-succ-reg-wrapper.svg)](https://travis-ci.org/CyberZHG/keras-succ-reg-wrapper)
[![Coverage](https://coveralls.io/repos/github/CyberZHG/keras-succ-reg-wrapper/badge.svg?branch=master)](https://coveralls.io/github/CyberZHG/keras-succ-reg-wrapper)A wrapper that slows down the updates of trainable weights.
![](https://user-images.githubusercontent.com/853842/50722430-dce6c580-1109-11e9-834d-7dc92b9221db.png)
## Install
```bash
pip install keras-succ-reg-wrapper
```## Usage
```python
import keras
from keras_succ_reg_wrapper import SuccReginput_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()
```