Closed programmin1 closed 5 years ago
This might be because you're running on CPU. Being extremely slow on CPU is expected, as training requires evaluating a neural net multiple times. Does ode-demo work?
Yes, ./examples/ode_demo.py
works. I thought the examples would work overnight on a 2.6ghz i5.
Is a Geforce GT 630M enough to run this example?
I also let the code run for ~12 hours and it managed to finish 13 epochs (I would assume an epoch/hour). Does it mean that I have to stick to less epochs (from the default 160 if I am not mistaken) since I don't have a GPU?
Thanks in advance.
Hmm.. I'd suggest using a GPU as running neural nets on CPU is way too slow. Colaboratory (https://colab.research.google.com/) lets you use a free GPU. You'll be able to install torchdiffeq with the following command:
pip install git+https://github.com/rtqichen/torchdiffeq
Thank you for the suggestion. I find the Jupyter Notebook terrible for debugging. I tried running the ode_demo.py and odenet_mnist.py with GPU and I get : `usage: ODE demo [-h] [--method {dopri5,adams}] [--data_size DATA_SIZE] [--batch_time BATCH_TIME] [--batch_size BATCH_SIZE] [--niters NITERS] [--test_freq TEST_FREQ] [--viz] [--gpu GPU] [--adjoint] ODE demo: error: unrecognized arguments: -f /root/.local/share/jupyter/runtime/kernel-eddba8cd-8dd7-4e14-8e81-6da72c82bf76.json An exception has occurred, use %tb to see the full traceback.
SystemExit: 2 /usr/local/lib/python3.6/dist-packages/IPython/core/interactiveshell.py:2890: UserWarning: To exit: use 'exit', 'quit', or Ctrl-D. warn("To exit: use 'exit', 'quit', or Ctrl-D.", stacklevel=1)`
and for odenet_mnist.py: `usage: ipykernel_launcher.py [-h] [--network {resnet,odenet}] [--tol TOL] [--adjoint {True,False}] [--downsampling-method {conv,res}] [--nepochs NEPOCHS] [--data_aug {True,False}] [--lr LR] [--batch_size BATCH_SIZE] [--test_batch_size TEST_BATCH_SIZE] [--save SAVE] [--debug] [--gpu GPU] ipykernel_launcher.py: error: unrecognized arguments: -f /root/.local/share/jupyter/runtime/kernel-eddba8cd-8dd7-4e14-8e81-6da72c82bf76.json An exception has occurred, use %tb to see the full traceback.
SystemExit: 2 /usr/local/lib/python3.6/dist-packages/IPython/core/interactiveshell.py:2890: UserWarning: To exit: use 'exit', 'quit', or Ctrl-D. warn("To exit: use 'exit', 'quit', or Ctrl-D.", stacklevel=1)`
Could you tell me why you use 160 epochs (I know the more the better)?
Thanks in advance!
The idea is you can just copy the Python code instead of running it as a script.
Yeah, you should be able to get the same accuracy with much fewer number of epochs.
Thank you!
When I run it it prints out:
and uses 100% cpu for hours - checking in morning and nothing seems to have happened.
It doesn't finish - Ctrl+C stops it at this point: