Batch normalization (gamma and beta parameters)

55 views
Skip to first unread message

Jamal

unread,
Jan 17, 2017, 8:39:29 AM1/17/17
to torch7
Hi guys,

I wanted to ask about the learnable parameters gamma and beta in batch-normalization. If I want to strip away the beta parameters, what argument should I pass?
without learnable parameters: nn.BatchNormalization(N [,eps] [,momentum], false)
Here,passing false argument strips away both  gamma and beta parameter.

Joe Jacobs

unread,
Jan 17, 2017, 9:10:11 AM1/17/17
to torch7
If you want to disable affine transform (gamma and beta) without specifying eps and momentum, do this:

nn.BatchNormalization(N,nil,nil,false)

where N is the size of the layer.

Joe

Joe Jacobs

unread,
Jan 17, 2017, 9:11:30 AM1/17/17
to torch7
Sorry just realised I didn't answer your question. Don't think you can just disable the bias without disabling gamma as well.

Joe
Reply all
Reply to author
Forward
0 new messages