We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
def calc_gradient(self, label): delta = self.layers[-1].activator.backward( self.layers[-1].output ) * (label - self.layers[-1].output) //计算梯度时,这里先计算了输出层的delta. 然后再用这个delta去计算隐藏层的delta。
//但是在如下代码却是用隐藏层的Delta计算公式,输出层的delta值再次计算了一下输出层的delta值 ? layer遍历是从输出层开始的? for layer in self.layers[::-1]: layer.backward(delta) delta = layer.delta return delta
The text was updated successfully, but these errors were encountered:
No branches or pull requests
def calc_gradient(self, label):
delta = self.layers[-1].activator.backward(
self.layers[-1].output
) * (label - self.layers[-1].output)
//计算梯度时,这里先计算了输出层的delta. 然后再用这个delta去计算隐藏层的delta。
//但是在如下代码却是用隐藏层的Delta计算公式,输出层的delta值再次计算了一下输出层的delta值 ? layer遍历是从输出层开始的?
for layer in self.layers[::-1]:
layer.backward(delta)
delta = layer.delta
return delta
The text was updated successfully, but these errors were encountered: