yizt / numpy_neural_network Goto Github PK
View Code? Open in Web Editor NEW仅使用numpy从头开始实现神经网络,包括反向传播公式推导过程; numpy构建全连接层、卷积层、池化层、Flatten层;以及图像分类案例及精调网络案例等,持续更新中... ...
License: Apache License 2.0
仅使用numpy从头开始实现神经网络,包括反向传播公式推导过程; numpy构建全连接层、卷积层、池化层、Flatten层;以及图像分类案例及精调网络案例等,持续更新中... ...
License: Apache License 2.0
https://github.com/yizt/numpy_neural_network/blob/master/nn/losses.py
dy = y_probability - y_true 这个地方的推导不是很理解。大佬这个多分类的损失函数求梯度咋来的啊。
如上。
似乎应为 global_max_pooling_backward
`
def sigmoid_backward(next_dz):
"""
sigmoid激活反向过程
:param next_dz:
:return:
"""
return sigmoid_forward(1-sigmoid_forward(next_dz))
`
sigmod激活函数的反向传播,应该是
dz = next_dz*z_{i+1}*z_{i+1}*W_i^{T}
cross entropy的话最后一层后面还要加softmax吧
您好,最近阅读了您的这个仓库,受益非浅,非常感谢。
但是我对您在nn/activations.py 中的Tanh的反向传播函数有点疑惑。
def tanh_backward(next_dz):
"""
tanh激活反向过程
:param next_dz:
:return:
"""
return 1 - np.square(np.tanh(next_dz))
根据反向传播的求导,我觉得Tanh的反向函数应该是:
def tanh_backward(next_dz, z):
return next_dz*(1 - np.square(np.tanh(z)))
谢谢您的指教。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.