I have rather ment weights matrix created per batch. Then won’t sparse_weights.mm(P)[batch] work? It is kinda weird, as one mm() is really needed per epoch, but training with batches complicates things…