Thanks. Actually no, the only error messages are the three ones posted above, and the program can run until finished.
I was trying to understand how to use register_buffer by checking the code of batch_norm, but it use some function torch.batch_norm, which seems not a python function, but implemented in C/C++.