albertbup / deep-belief-network

A Python implementation of Deep Belief Networks built upon NumPy and TensorFlow with scikit-learn compatibility
MIT License
481 stars 212 forks source link

How To Define new Activation Function? #24

Closed Sam4n closed 6 years ago

Sam4n commented 6 years ago

how to define new activation function. in library use class az activation function. please write sample :) for example:

def double_activation(x): return x * 2

ayoubbargach commented 6 years ago

Hey ! You need to add your activation function to dbn/activations.py

Take a look at fit method of models.py, you can add some lines to manage your new activation function.

I think its as simple as that.

Good coding !