0

I want to implement perceptron with python and ı use following equations, but how can ı set bias and how to update it.

You can click the links below to see the formulas.

f(x) and σ(·) is a custom activation function

where x is a D dimensional input vector, w is a D dimensional weight vector and b is a scalar

The classification rule for the classifier

loss function

I use back propagation algorithm to train perceptron

Hakan Murat Aksüt
  • 17
  • 1
  • 2
  • 10

1 Answers1

0

Maybe you should use Keras and create custom functions with it, it is a really user-friendly framework, here are some links to help you:

How do you create a custom activation function with Keras?

http://keras.io/#getting-started-30-seconds-to-keras

https://www.tensorflow.org/guide/keras/custom_layers_and_models

If you want to do it in plain Python (I wouldn't recommend), I would write all the derivatives to clarify my mind on how to do it.

Bruno Mello
  • 4,448
  • 1
  • 9
  • 39