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

Сorrected typos, fixed ineffassign, gofmt, go_vet #202

Merged
merged 6 commits into from
May 11, 2018
Merged

Сorrected typos, fixed ineffassign, gofmt, go_vet #202

merged 6 commits into from
May 11, 2018

Conversation

squaredice
Copy link
Contributor

No description provided.

solvers.go Outdated
@@ -1160,13 +1160,13 @@ func (s *BarzilaiBorweinSolver) Step(model Nodes) error {
contractionAxes[axis] = axis
}

valGradDiffscalarProd, err := tensor.Contract(valueDiff, gradDiff, contractionAxes, contractionAxes)
valGradDiffscalarProd, _ := tensor.Contract(valueDiff, gradDiff, contractionAxes, contractionAxes)
Copy link
Member

Choose a reason for hiding this comment

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

This is not a good idea. @siquus how should errrors be handled for Barzilai Borwein. I'm going to guess the default is to return the error?

@chewxy
Copy link
Member

chewxy commented May 10, 2018

Thanks for this. More importantly thanks for finding a potential bug

I have left a comment waiting @siquus' reply on how to handle errors. If he doesn't respond in 12 hrs, can you please fix it such that the err is not shadowed? Specifically, we try to make it such that no errors in Gorgonia is unhandled. The default way of handling error is to return early.

@squaredice
Copy link
Contributor Author

@chewxy i will check what i can do if he not respond

@chewxy
Copy link
Member

chewxy commented May 10, 2018

Thanks 👍 I'll merge this when ready.

@coveralls
Copy link

coveralls commented May 10, 2018

Coverage Status

Coverage increased (+0.006%) to 61.902% when pulling 5195be0 on trigun117:master into cffb53c on gorgonia:master.

@siquus
Copy link
Contributor

siquus commented May 11, 2018

@trigun117 nice catch ...somebody... forgot to actually react to err ;-)
Failing silently at that point will be very hard to debug, so if you could please add a return errors.new or so along the lines "operationError, Contracting value / gradient difference" that would be nicer.
Thanks!

@squaredice
Copy link
Contributor Author

@chewxy updated code

@chewxy
Copy link
Member

chewxy commented May 11, 2018

LGTM. Merged

@chewxy chewxy merged commit f155b21 into gorgonia:master May 11, 2018
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.

4 participants