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

Update chainer version 4.0.0rc1 / 3.5 #223

Merged
merged 6 commits into from
Apr 2, 2018

Conversation

keisukefukuda
Copy link
Member

This PR replaces #220 and #222 (with further version update).

The two pull requests have a circular dependency and must be fixed together.


else: # expect Chainer >4.0.0b3
check_lstm = issubclass(
link.__class__, lconn.n_step_rnn.NStepRNNBase)
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't it more natural to use isinstance(link, lconn.n_step_rnn.NStepRNNBase) ?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not confident, but I guess it's safer to use issubclass. Do you think we can assume link is a direct instance of NStepRNNBase ?

Copy link
Contributor

Choose a reason for hiding this comment

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

isinstance returns True for instances of sub classes.

In [1]: class A(): pass

In [2]: class B(A): pass

In [3]: a = A()

In [4]: b = B()

In [5]: isinstance(a, A)
Out[5]: True

In [6]: isinstance(b, A)
Out[6]: True

Copy link
Member Author

Choose a reason for hiding this comment

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

I see, thanks. I will fix this.

@kuenishi kuenishi added this to the v1.3.0 milestone Mar 26, 2018
@iwiwi iwiwi merged commit a3c67c7 into master Apr 2, 2018
@iwiwi iwiwi deleted the update-chainer-version-4.0rc1-3.5 branch April 2, 2018 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants