評價此頁

LazyBatchNorm3d#

class torch.nn.LazyBatchNorm3d(eps=1e-05, momentum=0.1, affine=True, track_running_stats=True, device=None, dtype=None)[原始碼]#

一個帶有惰性初始化的 torch.nn.BatchNorm3d 模組。

BatchNorm3dnum_features 引數是透過從 input.size(1) 推斷而來,並進行惰性初始化。惰性初始化的屬性包括 weightbiasrunning_meanrunning_var

有關延遲模組及其限制的更多文件,請檢視 torch.nn.modules.lazy.LazyModuleMixin

引數
  • eps (float) – 為了數值穩定性新增到分母中的值。預設值:1e-5

  • momentum (Optional[float]) – 用於 running_mean 和 running_var 計算的值。可以設定為 None 以進行累積移動平均(即簡單平均)。預設值:0.1

  • affine (bool) – 一個布林值,如果設定為 True,則該模組具有可學習的仿射引數。預設值:True

  • track_running_stats (bool) – 一個布林值。當設定為 True 時,該模組會跟蹤執行均值和方差;當設定為 False 時,該模組不跟蹤這些統計量,並將統計量緩衝區 running_meanrunning_var 初始化為 None。當這些緩衝區為 None 時,該模組在訓練和評估模式下始終使用批統計量。預設為 True

cls_to_become[原始碼]#

別名:BatchNorm3d