def forward(self, inputs, dt=None):
        """
        inputs : (L, B, M)
        dt     : (L, B, M)
        output : (L, B, M, N) [length, batch, size, order]
        # TODO this puts the input unsqueeze inside here rather than outside, should make RNN versions the same
        """

        L, B, M = inputs.shape

        # Construct discretization if necessary
        if dt is None:
            if self.dt is None:
                dt = torch.cumsum(inputs.new_ones(L), dim=0) # no new_arange
                dt = (1./dt)[:, None, None] # (L, 1, 1)
            else:
                dt = torch.full((L, 1, 1), self.dt).to(inputs) # fixed dt

        # Create transition matrices
        # I = self.I[:, None, None, None, :].expand((self.order, L, B, M, self.order)) # (N, L, B, M, N)
        I = self.I[:, None, None, None, :].repeat((1, L, B, M, 1)) # (N, L, B, M, N)
        As = self.transition.bilinear(dt, I, 0) # (N, L, B, M, N) # NOTE due to the broadcasting here, the ManualTransition actually swaps axes back for efficiency; can potential save if this axis reordering is too slow [probably not a bottleneck]
        As = As.permute((1, 2, 3, 0, 4)) # (L, B, M, N, N)
        # TODO this A might be transposed; should print to compare
        # print(As.shape)
        Bs = self.transition.bilinear(dt, inputs.new_zeros(self.order), 1) # (L, B, M, N)

        inputs = inputs.unsqueeze(-1)
        # u = F.linear(inputs, self.transition.B) # (L, B, M, N)
        # u = F.linear(inputs, Bs) # (L, B, M, N)
        u = inputs * Bs # (L, B, M, N)
        # output = unroll.unroll(self.A, u)
        # output = unroll.parallel_unroll_recursive(self.A, u)
        output = unroll.variable_unroll(As, u, variable=True)
        # output = unroll.parallel_unroll_iterative(self.A, u)

        return output

        inputs : (L, B, M)
        dt     : (L, B, M)
        output : (L, B, M, N) [length, batch, size, order]
        # TODO this puts the input unsqueeze inside here rather than outside, should make RNN versions the same
        
analyze/convnexts4nd/src/models/sequence/rnns/qrnn.py