Closed Chunpai closed 3 years ago
config.init_obj
function (defined here) also accepts additional args, kwargs. So, I think you can use this on the train.py
file, like
input_dim = data_loader.dataset.input_dim
model = config.init_obj('arch', module_arch, input_dim=input_dim)
config.init_obj
function (defined here) also accepts additional args, kwargs. So, I think you can use this on thetrain.py
file, likeinput_dim = data_loader.dataset.input_dim model = config.init_obj('arch', module_arch, input_dim=input_dim)
Thank you very much, @SunQpark .
I write a custom dataset and dataloader. The nn's input_dim is determined by one attribute of dataset. However, it seems I can only set the input_dim in config file. Any way to achieve this ? Thanks.