Skip to content
New issue

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

第四章 4.2.2节自定义损失函数 示例代码运行结果和书上不一致 #118

Open
youlingwangzi opened this issue Jun 24, 2018 · 3 comments
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@youlingwangzi
Copy link

What happened:
使用了相同的代码,但是代码运行结果不一致。
What you expected to happen:
我的代码如下:我的代码

代码运行结果:
[[-0.81131774]
[ 1.4845992 ]]
[[-0.8106414]
[ 1.485216 ]]
[[-0.80985266]
[ 1.4859272 ]]
[[-0.80899984]
[ 1.4866718 ]]
[[-0.80812407]
[ 1.4874339 ]]
Final:
[[-0.8072287]
[ 1.4882191]]

书上预期的结果:

w1最终的值为:
[1.01934695, 1.04280889]
在loss_more为10,loss_less为1的情况下,w1的值为:
[0.95525807, 0.9813394]

@HenryChou0
Copy link

反向传播的优化方法不一致吧tf.train.AdamOptimizer

@caicloud-bot
Copy link
Contributor

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@caicloud-bot caicloud-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 19, 2018
@caicloud-bot
Copy link
Contributor

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

/lifecycle rotten
/remove-lifecycle stale

@caicloud-bot caicloud-bot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Dec 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

3 participants