Use Chainer v2 - #100
Conversation
chainer PR #2764
|
Changes Unknown when pulling a855613 on toslunar:chainerv2 into ** on pfnet:master**. |
|
Changes Unknown when pulling f7e6a99 on toslunar:chainerv2 into ** on pfnet:master**. |
|
Changes Unknown when pulling 04ede2d on toslunar:chainerv2 into ** on pfnet:master**. |
| """Load internal states.""" | ||
| for attr in self.saved_attributes: | ||
| serializers.load_npz( | ||
| load_npz_no_strict( |
There was a problem hiding this comment.
What is the reason behind this change? It's better to add comments if this is a fix for some problem.
| # Update the globally shared model | ||
| if self.process_idx == 0: | ||
| norm = self.optimizer.compute_grads_norm() | ||
| # norm = self.optimizer.compute_grads_norm() |
| # Update the globally shared model | ||
| if self.process_idx == 0: | ||
| norm = self.optimizer.compute_grads_norm() | ||
| # norm = self.optimizer.compute_grads_norm() |
| target_link=self.shared_model, source_link=self.model) | ||
| if self.process_idx == 0: | ||
| norm = self.optimizer.compute_grads_norm() | ||
| # norm = self.optimizer.compute_grads_norm() |
| self.v_loss_coef = v_loss_coef | ||
| self.rollout_len = rollout_len | ||
| self.batchsize = batchsize | ||
| self.batchsize = self.xp.int32(batchsize) |
There was a problem hiding this comment.
I guess this is a fix for newint, but it's not clear from the code. Can you add a comment?
| class LeCunNormal(chainer.initializers.HeNormal): | ||
| """sorry | ||
|
|
||
| """ |
| def ensure_initialized_update_rule(param): | ||
| u = param.update_rule | ||
| if u.state is None: | ||
| u._state = {} # Sorry! |
| - cd chainer | ||
| - git checkout _v2 | ||
| - python setup.py install | ||
| - cd .. |
There was a problem hiding this comment.
Now that chainer v2 is released, can you undo these changes?
| opt_b = optimizers.RMSprop() | ||
| opt_b.setup(model) | ||
| opt_b.setup(copy.deepcopy(model)) | ||
| opt_b.update() # sorry |
| arrays = async.share_states_as_shared_arrays(opt_a) | ||
| opt_b = optimizers.RMSprop() | ||
| opt_b.setup(model) | ||
| opt_b.setup(copy.deepcopy(model)) |
There was a problem hiding this comment.
Why is copy.deepcopy required here?
|
Great work! Have you checked tests (including gpu and slow tests) in your environment? |
This reverts commit 07c9d3c.
|
Some slow tests fail because of BLAS errors that seem to be chainer/chainer#2744. |
|
LGTM |
No description provided.