Hi Pytorch Gurus,
I found a similar question, but it was left unanswered: Training an ensemble model with and without saperately
I believe I have a similar question.
I would like to ensemble 2 models together which I have trained. The classifier will be in charged of predicting whether there will be retweets or not (basically a 0 or 1). The predictor was trained only with retweets data and will only be used if the classifier model returns a 1.
However, I have some issues with the forward function of this “Ensemble” Model, due to batch size problems. The workaround of setting batch_size=1 works, but this would mean it is very inefficient and slow. Could I seek for advice and suggestions how to maintain a large batch_size?

Without a batch_size of 1, it gives an ambiguity error: “RuntimeError: bool value of Tensor with more than one value is ambiguous”