-
Notifications
You must be signed in to change notification settings - Fork 969
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
moved zeroing to blas in batch linear
- Loading branch information
1 parent
3dd5d1d
commit 8abe926
Showing
1 changed file
with
2 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8abe926
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@szagoruyko Hi Sergey, I think this breaks Linear:forward on some blases, see this thread karpathy/char-rnn#38 (comment)
8abe926
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirming that this is incorrect.
self.output
is not initialized, and depending on how blas implements the0*self.output
, it may results in NaNs. If no Blas is used, it definitely results in NaNs... This needs to be reverted.8abe926
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proposing a patch here: #351 — it still preserves the blas optimization, but enforces a clean self.output.