Skip to content

[refactor] Introduce BaseForwardModel #137

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

Merged
merged 2 commits into from
Apr 13, 2018

Conversation

corochann
Copy link
Member

Introduce BaseForwardModel

  1. to commonize _forward method
  2. introduce _device management
    user can update device of model by update_device method.

This PR also resolves #134

@codecov-io
Copy link

codecov-io commented Apr 13, 2018

Codecov Report

Merging #137 into master will increase coverage by 0.22%.
The diff coverage is 83.58%.

@@            Coverage Diff             @@
##           master     #137      +/-   ##
==========================================
+ Coverage   74.36%   74.59%   +0.22%     
==========================================
  Files          74       75       +1     
  Lines        3125     3098      -27     
==========================================
- Hits         2324     2311      -13     
+ Misses        801      787      -14

if device >= 0:
chainer.cuda.get_device_from_id(device).use()
self.to_gpu() # Copy the model to the GPU
self.initialize(device)
Copy link
Member

Choose a reason for hiding this comment

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

Please add same comment that is in Regressor

@mottodora
Copy link
Member

LGTM!

@mottodora mottodora merged commit dcda27f into chainer:master Apr 13, 2018
@corochann corochann deleted the base_forward_model branch April 13, 2018 09:02
@delta2323 delta2323 added this to the 0.3.0 milestone Apr 23, 2018
@mottodora mottodora modified the milestone: 0.3.0 Apr 24, 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.

Improve classifier
4 participants