I am afraid I couldn’t provide the code currently. Actually the same code run in another machine is just fine. This error always happens when the code run into evaluation mode on the validation dataset. I am trying to stop the evaluation part to see what happes.