def forward(self, _paths: autograd.Variable):
    lstm_out, (self.h_t, self.c_t) = self.lstm(_paths, (self.h_t,
                                                        self.c_t))
    vertices_space = self.hidden2vertex(lstm_out.view(len(_paths),
                                                      self.batch_size, -1))

    next_vertices = F.log_softmax(vertices_space.permute(2, 0, 1)) \
        .permute(1, 2, 0)
    # Permutations of the dimensions so that every slice along the 2nd dim
    # (the dimension of the output features) sums to 1 along every
    # remaining dimensions.

    return next_vertices