-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Implement Softmax and LogSoftMax #118
Conversation
655584f
to
f7bcdc4
Compare
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.
Small changes to use divmod
.
|
||
for ii := 0; ii < innerSize*outerSize; ii++ { | ||
outerIndex := ii / innerSize | ||
innerIndex := ii % innerSize |
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.
Can we use this for all divmod: https://github.com/gorgonia/tensor/blob/master/mathutils.go
@@ -422,3 +422,8 @@ type denseArgmaxer interface { | |||
type denseArgminer interface { | |||
argminDenseTensor(t DenseTensor, axis int) (*Dense, error) | |||
} | |||
|
|||
type softMaxer interface { |
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.
this should be exported
|
||
for ii := 0; ii < innerSize*outerSize; ii++ { | ||
outerIndex := ii / innerSize | ||
innerIndex := ii % innerSize |
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.
Use divmod
from https://github.com/gorgonia/tensor/blob/master/mathutils.go
#119 supercedes this |
backwards operations will be send in a different PR