parameters: (self, mode=True)
return_statement: return self
docstring: Batchnorm's training behavior is using the self.training flag. Prevent
      changing it if BN is frozen. This makes sure that calling `model.train()`
      on a model with a frozen BN will behave properly.
docstring_summary: Batchnorm's training behavior is using the self.training flag. Prevent
      changing it if BN is frozen. This makes sure that calling `model.train()`
      on a model with a frozen BN will behave properly.
docstring_tokens: Batchnorm s training behavior is using the self . training flag . Prevent changing it if BN is frozen . This makes sure that calling model . train () on a model with a frozen BN will behave properly .
function: def train(self, mode=True):
      """Batchnorm's training behavior is using the self.training flag. Prevent
      changing it if BN is frozen. This makes sure that calling `model.train()`
      on a model with a frozen BN will behave properly.
      """
      self.training = mode
      if not self.bn_frozen:
        for module in self.children():
          module.train(mode)
      return self
function_tokens: def train ( self , mode = True ) : self . training = mode if not self . bn_frozen : for module in self . children ( ) : module . train ( mode ) return self