victoresque / pytorch-template

PyTorch deep learning projects made easy.
MIT License
4.75k stars 1.09k forks source link

Potential Memory Leak #37

Closed fzyzcjy closed 5 years ago

fzyzcjy commented 5 years ago

In train.py line 58:

        config = json.load(open(args.config))

But the "open" without closing will make a memory leak.

If you want I can make a PR.

victoresque commented 5 years ago

Hi, a PR on this issue is welcome, thanks for your contribution