Why there is bias values when output BatchNorm2d's parameters?

Since there is no bias parameter in BatchNorm2d function, why there is bias when i output the parameters???

There is a linear scale and bias in BN (you can turn it off as well).

Could you tell me how to do that??

Thank you for your help~~~

set affine=False

maybe look at the doc first next time: http://pytorch.org/docs/master/nn.html#torch.nn.BatchNorm2d

I already tried to set affine=False before

However, if I set affine=False, no parameter in BatchNorm2d will shown.

Yeah that’s expected. There are no other parameters in BN.

any chance i can stop showing bias=0??

What do you want exactly? Do you want there to be learnable scale and bias or not? If there are, they will show up. If there aren’t, they won’t.

ok, i got it
thanks any way