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

Implement Softmax and LogSoftMax #118

Closed
wants to merge 3 commits into from
Closed

Implement Softmax and LogSoftMax #118

wants to merge 3 commits into from

Conversation

dcu
Copy link
Contributor

@dcu dcu commented Oct 12, 2021

backwards operations will be send in a different PR

@dcu dcu requested a review from chewxy October 12, 2021 23:32
@coveralls
Copy link

coveralls commented Oct 12, 2021

Coverage Status

Coverage increased (+0.3%) to 21.55% when pulling f7bcdc4 on log-softmax into 1d38d85 on master.

@dcu dcu force-pushed the log-softmax branch 2 times, most recently from 655584f to f7bcdc4 Compare October 14, 2021 02:27
Copy link
Member

@chewxy chewxy left a 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -422,3 +422,8 @@ type denseArgmaxer interface {
type denseArgminer interface {
argminDenseTensor(t DenseTensor, axis int) (*Dense, error)
}

type softMaxer interface {
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chewxy
Copy link
Member

chewxy commented Oct 16, 2021

#119 supercedes this

@chewxy chewxy closed this Oct 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants