The problem is not from memory.sample() (giving a tuple to a Variable yould raise an error). You forgot to also memorize the hidden and cell states (as separate tensors to memorize, don’t try to pass them as a tuple).
Then, in learn, you do:
self.model(batch_state)

but you should have memorized batch_hidden and batch_cell and do:
self.model(batch_state, (batch_hidden, batch_cell) )