How to use Batch Normalization correctly in tensorflow?

I had tried several versions of batch_normalization in tensorflow, but none of them worked! The results were all incorrect when I set batch_size = 1 at inference time. Version 1: directly use the