whr94621 / NJUNMT-pytorch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[v0.4] checklist to migrate to pytorch 0.4.0

whr94621 opened this issue · comments

I list all the places need to be modified. Feel free to add below.

  • Replace .data with .detach(). (#16, c3636b0)
  • Update pytorch requirement and v0.3 branch in README.md. (2bbae4a)
  • Use set_grad_enabled, enable_grad, no_grad as context-manager. (c3636b0)
  • Use official LayerNorm instead. (247b3a3)
  • Use clip_grad_norm_ instead. (247b3a3)
    Fix shard in v0.4

Unfortunately, shard mechanism maybe not effective in PyTorch 0.4 version.