How to train an ensemble of two CNNs and a classifier?

Thanks again @smth. Can we do something like in this post - Combining Trained Models in PyTorch but for let’s say resnet152 and densenet161? An example would help. Appreciate your humble support.