You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently using this template for my project, it's great!
But what I'm struggling with, is trying to add my data preprocessing to the YAML configurations.
I'm using combining torchvision.transforms using transforms.Compose, and I want to define and plug-together the different steps using Hydra. But I'm having a hard time, trying to pull this off, I'm confused about how the "inheritance" works.
# instantiate pipeline straight from this file_target_: torchvision.transforms.transforms.Composerandomrotation:
_target_: torchvision.transforms.transforms.RandomRotationdegrees: ??? # sequence or numberrandomhflip:
_target_: torchvision.transforms.transforms.RandomHorizontalFliprandomvflip:
_target_: torchvision.transforms.transforms.RandomVerticalFlip
In the DataModule, I want to compose my preprocessing steps dynamically by experiment, so switching out different parts of the preprocessing/augmentation. but they should ofc be all combined in one Compose object
My approach has been to use the variable interpolation, but that does not really work as intended:
(datamodule.yaml)
also, I'd like to "globally" set parameters like the randomrotation.degrees, without having to access dataprocessing.augmentations.randomrotation.degrees, but if I put it at top-level at the datamodule file, ofc it tries to use it as a keywordargument for the DataModule instantiation..
any tips? I'm not 100% getting the hang of hydra yet..
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I'm currently using this template for my project, it's great!
But what I'm struggling with, is trying to add my data preprocessing to the YAML configurations.
I'm using combining
torchvision.transforms
usingtransforms.Compose
, and I want to define and plug-together the different steps using Hydra. But I'm having a hard time, trying to pull this off, I'm confused about how the "inheritance" works.I have a datamodule.yaml including
and I have / want a augmentations.yaml:
In the DataModule, I want to compose my preprocessing steps dynamically by experiment, so switching out different parts of the preprocessing/augmentation. but they should ofc be all combined in one Compose object
My approach has been to use the variable interpolation, but that does not really work as intended:
(datamodule.yaml)
also, I'd like to "globally" set parameters like the
randomrotation.degrees
, without having to accessdataprocessing.augmentations.randomrotation.degrees
, but if I put it at top-level at the datamodule file, ofc it tries to use it as a keywordargument for the DataModule instantiation..any tips? I'm not 100% getting the hang of hydra yet..
Beta Was this translation helpful? Give feedback.
All reactions