lsw9021 / MASS

Apache License 2.0
584 stars 109 forks source link

Doesn't render trained networks when CUDA is not available #11

Open aovladi opened 5 years ago

aovladi commented 5 years ago

I think this may be helpful if someone can't use CUDA like me.

I have pytorch-cpu and torchvision-cpu. Everything was working until I tried to render the trained networks. Python gave an error: "Error in Python: <class 'AssertionError'>: Torch not compiled with CUDA enabled".

I fixed it by removing ".cuda()" in Window.cpp line 69: p::eval("MuscleNN(num_total_muscle_related_dofs,num_actions,num_muscles).cuda()",mns);

now I have: p::eval("MuscleNN(num_total_muscle_related_dofs,num_actions,num_muscles)",mns);

lsw9021 commented 5 years ago

Thank you!

We will update the code as soon as possible.