@ptrblck
I try to get the outputs from several models, stack it together and feed into another classifier, but I get the following error:
RuntimeError: One of the differentiated Tensors appears to not have been used in the graph. Set allow_unused=True if this is the desired behavior.
Below is the forward method of my model:
def forward_model(self, x, member_id=None):
        mem_outpus = []
        for i in range(5):
            output = self.models[i](x)
            mem_outpus.append(output)               
                
        ensemle_inputs = torch.stack(mem_outpus, dim=1).unsqueeze(dim=1)
        ensemle_inputs = (ensemle_inputs - self.mu)/self.std
        ensemle_outputs = self.classifier(ensemle_inputs)
        return ensemle_inputs