antirez / antirez/neural-redis

Mathmatics problem in the code, emergency!!!

Open
#11 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
2.2k
Forks
100
PR merge metrics
No merged PRs in 30d

Description

Dear antirez:
Thank you very much for sharing this amazing code. And I have a problem to figure out or I can not sleep.
In function float AnnGlobalError(struct Ann *net, float *desired), Root Mean Square (RMS) error is used to record the loss, which means:
![image](https://cloud.githubusercontent.com/assets/5702248/21088778/5359f330-c06d-11e6-9e31-153433d88b28.png)

thus, I suppose in function AnnCalculateOutputError(struct Ann *net, float *desired) should be the derivation, which means:
![image](https://cloud.githubusercontent.com/assets/5702248/21089020/41a02c0c-c06f-11e6-8a1a-2330f20c6ee1.png)

but in your real implementation, it is like this(let n = classification number):
![image](https://cloud.githubusercontent.com/assets/5702248/21089014/3a679268-c06f-11e6-9c03-b3eaa16357ea.png)

And I do integration on your real implementation to get the real loss function:
![image](https://cloud.githubusercontent.com/assets/5702248/21089172/d666a0e0-c070-11e6-94c7-b20ebf39966a.png)

can you explain this a little bit for me??
what is the real loss function in your code??

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.