Closed Victordmz closed 1 year ago
I retried with the Synthetic_experiment_DCAM.ipynb
notebook and the error can be reproduced in that way too.
Hi,
Thank you for your interest in our code and for pointing out this error. Unfortunately, I am not able to reproduce the error. Here is a notebook (pdf format) with the code you sent me (using CPU instead of GPU) using the dCAM-env conda environment.
This code runs on my side without error (the last error is a keyboard interrupt error) for dInception and dResNet. Do you still have the same error when using device='cpu'?
Best,
Paul
Hello,
Thank you for your answer. I ran the exact same code in Google Colab and I unfortunately still get the error.
Here is a link to the notebook that I used to reproduce the error: https://colab.research.google.com/drive/1RQpa4PqS7tvMIVMKXOFr6KJxeVAeaquL?usp=sharing. You would still have to upload FingerMovements.pickle
and CNN_models.py
for it to run. The first two cells are me trying to install the recommended PyTorch version, however, there is no difference between that version and the default in Colab, which is PyTorch 2.
Hi,
Thank you for sharing this notebook! I opened the Google colab notebook you shared in your previous message; I uploaded CNN_model.py and FingerMovement.pickle and ran it without error. Here is a screenshot.
The problem might be with the CNN_model.py file version. Are you sure your CNN_model.py file is identical to the one in the repo?
Hello,
Thank you for your response and your suggestion. I tried running the notebook again by downloading CNN_model.py from source, and uploaded FingerMovements.pickle
to my Google Drive, shared it publicly and let Colab download it (it was downloaded from the zip at parisdescartes.fr and I re-uploaded this particular pickle file only). Unfortunately, the error remains. The updated notebook can still be found here, it is the same link. The runtime I ran it on is CPU only.
It should be noted that the PyTorch version on the current version of the notebook is 2.0.0, but in my local system it is 1.13.1 and I have the same error.
Hi,
Thanks for the new notebook! This time, I managed to reproduce the error. I pushed a new version of CNN_model.py, and it should work now for both torch 2.0.0 and torch 1.7.1.
Let me know if you still get the error.
Hello,
This seems to have done the job. Thank you very much!
Running dInception or dResNetBaseline leaves me with an error
RuntimeError: Expected 2D (unbatched) or 3D (batched) input to conv1d, but got input of size: [<batch size>, <nr of dimensions>, <nr of dimensions>, <time series length>]
. I tried this with the FingerMovements dataset.Here is a minimally reproducible example following the flow of script_exp.py:
When I swap the modelarch to
modelarch = ConvNet2D(original_length,original_dim,original_dim,num_classes).to('cuda')
, as in Synthetic_experiment_DCAM.ipynb, training works fine.