Apply method of a module #3298
-
Hello Flax community, I have a resnet architecture with batch-norm layers. While doing forward pass by For example, I am in testing phase, and I want to check performance of my model with specific metrics. In that case, I will use my test data, and batch norm layers will use its statistics. So, batch_stats will not be updated right; I think no need for mutable argument in testing phase ? What do you think ? Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @GoktugGuvercin, you only need to specify |
Beta Was this translation helpful? Give feedback.
Hey @GoktugGuvercin, you only need to specify
mutable=True
whenuse_running_average=False
. If you are using the usualtrain
argument, you don't need to specifymutable
whentrain=False
i.e. during inference.