ebetica / autogradpp

Direct C++ Interface to PyTorch
MIT License
80 stars 12 forks source link

SimpleContainer with parameters doesn't support ->cuda() #48

Open ebetica opened 6 years ago

ebetica commented 6 years ago

I think there is no way to realistically do this, since the parameters are added outside of the container. Best to just error out, or at least warn.

Specifically, you can't do simple_container->cuda() if you've ever added any Variables as parameters. If you only have containers, everything is fine.