I want to skip forward pass and backward pass on batch begin

(Divyansh Jha) #1

I want to skip forward pass on a batch if a particular condition is met. Also, I want to skip computation of metrics if that condition is met in during the validation phase.
I see that I can skip the backward pass by the skip_bwd flag, but I want to skip the forward pass altogether, both in training and validation phase.
Is there any way to do this?
@sgugger Please help.

0 Likes