Yes, state is a list (each layer has its own dimensionality).
About the equivalence, I’m trying now some basic tests… perhaps I will get it by my own.
Edit: oh my… I misread your post. Yes, indeed state_layer.index_fill_(0, indices, 0) is what I was after. And new.nonzero() is a LongTensor too. Sorry… All it’s needed is to encapsulate it into a Variable.