如何训练和优化我的神经网络

时间:2020-03-27 17:41:14

标签: neural-network artificial-intelligence conv-neural-network

我想用python实现感知器,我使用以下等式,但是我如何设置偏见以及如何更新它。

您可以单击下面的链接以查看公式。

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

其中x是D维输入向量,w是D维权重向量,b是标量

The classification rule for the classifier

loss function

我使用反向传播算法训练感知器

1 个答案:

答案 0 :(得分:0)

也许您应该使用Keras并使用它创建自定义函数,这是一个非常用户友好的框架,下面是一些可以帮助您的链接:

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

如果您想用普通的Python来做(我不推荐),我会写所有派生词来阐明我的想法。

相关问题