VFlash: Fast, Accurate Visual Planning via Flash Primitive Decoding
u_Unrolled
Easy10 XPPyTorchbugs

Why do I get different predictions for the same input?

At inference time the same input gives slightly different outputs on every call. The model has dropout layers. What was missed?

Stuck? Show the solution

Answer: B. model.eval(): dropout (and batch norm) behave differently in training mode

In training mode, dropout randomly zeroes activations. Call model.eval() (and use torch.no_grad()) for inference.

Learn the idea behind itPyTorch Engineering — From Tensors to Fast, Correct Training Loops