After reading:

How to ensemble different CNN models when use the same dataset 1
Custom Ensemble approach 5

I am trying to ensemble two models I have already trained on the same dataset and classify them into 4 categories. I created a custom ensemble classes according to the posts instructions but when running, the tensors don’t seem to match. Here is the ensemble code:

Screen Shot 2021-04-04 at 6.32.06 PM1786×1188 279 KB

Here is how i load the checkpoints into the models I have already trained:

Screen Shot 2021-04-04 at 6.32.25 PM1786×1584 387 KB

And here is the error I get:

Screen Shot 2021-04-04 at 6.32.47 PM1786×434 44 KB

I am not sure how to fix this. Any help will be appreciated.