The problem with ModuleList is that its size can only grow. I would like to be able to reset the container through reset() or clear(). However _modules is private.
Please let me know if I misunderstood the purpose of ModuleList. Any idea of creating a container of torch::nn::Module that can be reset is highly appreciated.