MathGaron / pytorch_toolbox

Boiler plate code for pytorch. Train/Validation loops, visualization etc. For research.
MIT License
10 stars 3 forks source link

error "mismatched types" #17

Closed weberhen closed 7 years ago

weberhen commented 7 years ago

When I try to run on CPU mode I have a problem:

1) on "setup_loaded_data" it will set the data to float and target to long (line 64) , which gives me a torch error of mismatching types in the loss function. So my workaround is convert target to float and not to long.

MathGaron commented 7 years ago

Ho god indeed I thought that this bug was already fixed, actually, we sould find a way to just bring the tensor to cpu, and not convert the type, it is not train loop's job to determine those types. I think you can call cpu() method instead. Make a pull request with those fix if it works!

MathGaron commented 7 years ago

Fixed here #18