Ardeal:

how to print the gamma and beta of BN in the code?


gamma and beta are assigned as weight and bias, respectively, so you could use:
print(bn.weight)
print(bn.bias)




 Ardeal:

how are running_var and running_mean calculated in code? is there a calculation formula?


Yes, the NOTE section in the linked docs show the update formula.