To be more specific, that if/else check would have to come inside the iterator for the dataset–i.e. so each batch is drawn and discarded. This would probably take a little while to get through because the data has to be constantly loaded but it’s obviously much, much faster than training on it.