rdevon / cortex

A machine learning library for PyTorch
BSD 3-Clause "New" or "Revised" License
92 stars 25 forks source link

Pytorch 0.4 update #34

Closed rdevon closed 6 years ago

rdevon commented 6 years ago

Moved to Pytorch 0.4 No more Variables No more .data[0]

Note, some of the new features, such as device need to be added

nouiz commented 6 years ago

just a quick comment. If you can test the version of Pytorch from the user it 0.4, it would give much better error message when the user have the wrong version of pytorch. Otherwise, he will get ugly error. Something like:

import pytorch
if pytorch.__version__ < "0.4":
   raise Exception("Your Pytorch version is too old (%s). You need to install Pytorch 0.4." % pytorch.__version__)