Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

激活函数Tanh的反向传播 #6

Copy link
Copy link
@qianchne

Description

@qianchne
Issue body actions

您好,最近阅读了您的这个仓库,受益非浅,非常感谢。
但是我对您在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)))
谢谢您的指教。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.