After update the gradients, model output all zeros for whatever inputs?

I have some training code as the following:

Pair<Gradient, INDArray> pair = trainableModel.calculateGradients(state0BatchProcessed, targets, null, masks);
trainableModel.setGradient(pair.getKey());
trainableModel.update(pair.getKey());

but after one step of the above code, run some code as the following:

INDArray qValues = trainableModel.output(state0BatchProcessed);

qValues are all zeros. And for the second round of training step, all gradients become zeros.
What is the cause? How to fix it?

Thanks in advance!