Make sure to call model.eval() before running your test.
This will make sure to disable dropout layers and use the running estimates of batchnorm layers.
During training, dropout will of course alter your output and batchnorm layers will normalize the input batch using the current batch statistics and will also update the running estimates.
I’m not sure how TensorFlow handles it.