mlverse / torchvision

R interface to torchvision
https://torchvision.mlverse.org
Other
62 stars 14 forks source link

support for more datasets? #104

Open tdhock opened 7 months ago

tdhock commented 7 months ago

Hi! I see that R torch support mnist and cifar data sets, but I was wondering if there are plans to support the other data sets which are present in pytorch? https://pytorch.org/vision/stable/datasets.html

cregouby commented 1 week ago

Hello @tdhock,

Which one should be a priority for you ?

Don't you want to try to do it on your own and propose a pull-request? Depending on which dataset, you may need to simply augment dataset-mnist.R or dataset_cifar.R or take inspiration out of both files.

tdhock commented 1 week ago

all of them would be great but perhaps it would be easiest to start with the mnist variants? I expected that the R package would provide the same/analogous functionality as the python module. More generally, is there documentation for what features of the python version are not implemented? And which will be implemented at some point? And which will never be implemented?

cregouby commented 1 week ago

Hello @tdhock

MNist variant are indeed a good first issue to try: you have to duplicate the block of code https://github.com/mlverse/torchvision/blob/6310e2e840ea2305d772de269970b3cb5953e52d/R/dataset-mnist.R#L122-L150 and modify the few varables name, ressources and classes . Do you want to give a try ?

For the difference in between implementations, there is not such thing AFAIK. And there is no implementation plan nor a plan to "never implement", but only your and the community spare time to contribute...

tdhock commented 1 week ago

I don't have time myself but it sounds like a reasonable target for a gsoc'25 contributor, I wrote a project, https://github.com/rstats-gsoc/gsoc2025/wiki/torch-in-R-improvements could you co-mentor next summer? If so could you please add your name/email under EVALUATING MENTOR on that wiki page?
are there any other tasks where someone could contribute? If so please add them to "Details of your coding project"