I have searched for ensemble method in PyTorch, but fail to get what I want.
I have several models already trained, but these models have different transform methods. I want to use some ensemble method to combine these models. One method is to save all results into files for each model, and load the file for training. But this might be not very elegant.
What I desire is to get outputs given by each model in my code directly (without pre-saving), but I can only get outputs of a batch for each model, as each model has its own dataloader (because they have different transforms). I don’t quite know how can I combine the outputs of these models.
The code looks something like this:
def evaluate(model, device, dataloader):
    ...
    for inputs, labels in dataloader:
        ...
        outputs = model(inputs)
    ###How to combine outputs from different models...

for mdl_name in mdl_list:
    mdl = ...
    tf = mdl.tf
    dataset = ImageLoader(img_path, tf)
    dataloader = DataLoader(dataset, batch_size, shuffle=True)
    mdl.load_state_dict(...)
    ###How to combine outputs from different models...

Thanks in advance.