When I run my code below , I got RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation; But where is the inplace op.Thank you!
    def forward(self, x):
        N, C, T, V, M = x.size()
        logits = []
        for i in range(2):
            out = x[:, :, :, :, i].permute(0, 2, 1, 3).contiguous().view(N,T,C*V)
            self.lstm.flatten_parameters()
            out,_ = self.lstm(out)
            logits.append(out)
        # out = torch.max(logits[0], logits[1])
        out = logits[0]+ logits[1]
        #
        out = out.contiguous().view(out.size(0), -1)
        out = self.fc3(out)
        return out