EmilienDupont / augmented-neural-odes

Pytorch implementation of Augmented Neural ODEs :sunflower:
MIT License
527 stars 88 forks source link

Not making it to run the code for images (Request!) #5

Open asifehmad opened 4 years ago

asifehmad commented 4 years ago

Hello! Thank you so much for the work and providing codes. I am new to this field. I tried the code on Google Colab following the pattern you have provided, but my efforts went in vain (Mainly, the dataloader.). I would be very thankful if you provide any notebook for any of the image dataset. Regards

asifehmad commented 4 years ago

Or any guidance in this regard would be much appreciated, sir.

EmilienDupont commented 4 years ago

Hi! To run code on image datasets I would recommend looking at the experiments_img.py file. This contains code to run experiments on image datasets. It should be pretty easy to take this code and port it to a notebook 😄 Hope that helps!

asifehmad commented 4 years ago

Hi! To run code on image datasets I would recommend looking at the experiments_img.py file. This contains code to run experiments on image datasets. It should be pretty easy to take this code and port it to a notebook 😄 Hope that helps!

Hi! Thank you so much for the response, sir!

asifehmad commented 4 years ago

Hi, sir! I want to test on brain MRI data set. What would you suggest in this regard? Would be very much thankful!

EmilienDupont commented 4 years ago

Hi, if you want to test on brain MRI data, I would suggest trying to build a dataloader for this dataset that looks exactly like the ones for MNIST or CIFAR10, i.e. each dataset item should return a tuple of an image (as a tensor) and a label (as an int). If you put this dataloader in the dataloaders.py file you can then import it at the top of experiments_img.py. You should then simply add a few extra lines here with something like

if dataset == 'brain_mri':
  data_loader, test_loader = brain_mri_dataloader(training_config["batch_size"])
  img_size = (1, 32, 32)  # Put your image sizes here
  output_dim = 10  # Put your number of classes here

Good luck!

asifehmad commented 4 years ago

Hi, if you want to test on brain MRI data, I would suggest trying to build a dataloader for this dataset that looks exactly like the ones for MNIST or CIFAR10, i.e. each dataset item should return a tuple of an image (as a tensor) and a label (as an int). If you put this dataloader in the dataloaders.py file you can then import it at the top of experiments_img.py. You should then simply add a few extra lines here with something like

if dataset == 'brain_mri':
  data_loader, test_loader = brain_mri_dataloader(training_config["batch_size"])
  img_size = (1, 32, 32)  # Put your image sizes here
  output_dim = 10  # Put your number of classes here

Good luck!

Thank you so much, sir!