When we define a Pytorch module, we have to specify the values for all parameters.
But now, I want to make the parameters searchable. For example, maybe we can define a new class ValueChoice, then we can define a convolution as follows:
out_channels = ValueChoice([16,24])
kernel_size = ValueChoice([3,5,7])
convBN = nn.Sequential(
    nn.Conv2d(3, out_channels , kernel_size),
    nn.BatchNorm2d(out_channels)
)

my question is can we implement a class like ValueChoice? If so, how should we do?