I want to have a CNN where I can have flexible kernel_size and in and out_feature dimensions. How do I do this? This may have an easy answer. but I had trouble… For example, I have datasets with images of dimensions 5x38, 9x38, … , 35x38 etc. I’m not sure how to accommodate for the different heights. Note, I run a dataset at a time so the model doesn’t get mixed dimensions.
heights = [5, 9, 15, 25, 35]
kernel_sizes = [3, 5, 7]

for height in heights:
     for kernel_size in kernel_sizes:
          model = my_dynamic_model(height, kernel_size) 
          trainset = Dataset.my_dynamic_dataset(height)

I want to have something like the above. That looks like grid search, but I’m doing Bayesian Optimization and need a similar way of setting the height and kernel_size.
Please help with suggestions.
Thank you so much.