Skip to main content

A Python package for direct implementation of ReLU network.

Project description

ReLU neural network

rectified linear activation function

What is ReLU ?

ReLU is defined as g(x) = max(0,x). It is 0 when x is negative and equal to x when positive. Due to it’s lower saturation region, it is highly trainable and decreases the cost function far more quickly than sigmoid.

acitation functions

Inline-style: alt text

ReLU acitation function

Inline-style: alt text

direct implementation of ReLU neural networks

install

pip install ReLUs

or

pip3 install ReLUs

parameters for the model to train

layers_sizes   (e.g.  layers_size=[13,5,5,1])
num_iters      (e.g. num_iters=1000)
learning_rate (e.g. learning_rate=0.03)

training the model

model_name =  model(X_train, Y_train, layer_sizes, num_iters, learning_rate)

train and test accuracy

train_acc, test_acc = compute_accuracy(X_train, X_test, Y_train, Y_test, model_name)

making predictions

predict(X_train,your_model)

REFRENCES

https://machinelearningmastery.com/rectified-linear-activation-function-for-deep-learning-neural-networks/

https://en.wikipedia.org/wiki/Rectifier_(neural_networks)

https://www.kaggle.com/dansbecker/rectified-linear-units-relu-in-deep-learning

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

ReLUs-1.0.1.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

ReLUs-1.0.1-py3-none-any.whl (3.9 kB view hashes)

Uploaded Python 3

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