carpedm20 / ENAS-pytorch

PyTorch implementation of "Efficient Neural Architecture Search via Parameters Sharing"
Apache License 2.0
2.7k stars 494 forks source link

Upgrade to PyTorch 0.4, add regularizations, clip hidden states #8

Closed dukebw closed 6 years ago

dukebw commented 6 years ago

Hi, I wanted to open a pull request and get some feedback about how you would like changes to get merged into your repository.

I guess the major issue is that I had to make a number of changes to get the codebase to work with PyTorch v0.4.

I also made a number of aesthetic changes, including adding comments, but also other changes such as reducing line length to 80. I just did these as a force of habit to make the code more readable to me as I got used to it. I realize this is probably annoying as it clutters the commits.

So yea, let me know please what is acceptable to merge. All of it? Or if not, I can potentially create another pull request incorporating maintainer feedback.

Thank you for the repository by the way.

carpedm20 commented 6 years ago

Because the public release version of pytorch is 0.3.1, I think it's a little bit early to merge this PR. But I think codes for stability is helpful to others... Do you know when 0.4.0 will be officially released?

dukebw commented 6 years ago

Good point, there are indeed some incompatible behaviour changes between v0.3.1 and current PyTorch master, e.g., there are no implicit casts from single-element tensor to int in v0.4, but there is no .item() in v0.3.1.

I may take the time to make this PR compatible with both v0.3.1 and PyTorch master. I am not sure when v0.4 is planned for PyTorch, sorry. Do they have any openly discussed release schedule?

carpedm20 commented 6 years ago

Looks good! Thank you very much for the PR and I'm merging this now. I don't know much about the release schedule.

dukebw commented 6 years ago

Thank you, yes this makes sense.