Stateful RNN Within Single Run

Hi
I was wondering if when running an RNN with multiple batches the hidden state is saved across batches, or if there is a way of switching statefulness on and off (like in keras’ stateful=True).
Thanks!