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

training julia models #44

Merged
merged 3 commits into from Jul 3, 2017
Merged

training julia models #44

merged 3 commits into from Jul 3, 2017

Conversation

@ylxdzsw
Copy link
Contributor

@ylxdzsw ylxdzsw commented Jun 12, 2017

This PR fixes bugs of back! in core.jl (the fallback method) and Chain, and add the support of Affine. With these we can run the training process of some basic linear models like LogisticRegression on our pure Julia implementation. This allow us to test training process and optimizers before we can run them on backends.

Copy link
Member

@MikeInnes MikeInnes left a comment

Great. Eventually it would be nice to generate the backward pass for @net layers – we should at least do the update! method, which is trivial. But this is good for now.

update!(m.W, η)
update!(m.b, η)
m
end
Copy link
Member

@MikeInnes MikeInnes Jun 13, 2017

would be good to have the newline here

Copy link
Contributor Author

@ylxdzsw ylxdzsw Jun 14, 2017

Yes, usually I use editorconfig for trimming trailling white spaces and insert new line automatically. It's simple and works on almost all editors and platforms. Would you mind me adding one for Flux?

Copy link
Member

@MikeInnes MikeInnes Jun 15, 2017

Better to just keep editor config locally, I think.

Copy link
Member

@MikeInnes MikeInnes Jul 3, 2017

By the way, this method is already output by @net, but may be incorrect. Could you fix that and remove this version?


for i in 1:N-1
xs = s.layers[i](xs...)
xs isa Tuple || (xs = (xs, ))
Copy link
Member

@MikeInnes MikeInnes Jun 13, 2017

we can assume that all layers in a chain are single input/output. Then it should be easy to do this as fold agains as well.

Copy link
Contributor Author

@ylxdzsw ylxdzsw Jun 14, 2017

OK, that would make things easier.

@MikeInnes
Copy link
Member

@MikeInnes MikeInnes commented Jun 15, 2017

Great, can you add a test?

@MikeInnes
Copy link
Member

@MikeInnes MikeInnes commented Jul 3, 2017

Thanks!

@MikeInnes MikeInnes merged commit 7e48018 into FluxML:master Jul 3, 2017
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants