megengine.module.Pad.train

Pad.train(mode=True, recursive=True)

Sets training mode of all the modules within this module (including itself) to mode. This effectively sets the training attributes of those modules to mode, but only has effect on certain modules (e.g. BatchNorm2d, Dropout, Observer)

参数
  • mode (bool) – the training mode to be set on modules.

  • recursive (bool) – whether to recursively call submodules’ train().

返回类型

None