瀏覽代碼

TFDWConv() `depthwise_initializer` fix (#7845)

modifyDataloader
Glenn Jocher GitHub 2 年之前
父節點
當前提交
b52fd48b4a
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: 4AEE18F83AFDEB23
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      models/tf.py

+ 1
- 1
models/tf.py 查看文件

@@ -97,7 +97,7 @@ class TFDWConv(keras.layers.Layer):
strides=s,
padding='SAME' if s == 1 else 'VALID',
use_bias=not hasattr(w, 'bn'),
kernel_initializer=keras.initializers.Constant(w.conv.weight.permute(2, 3, 1, 0).numpy()),
depthwise_initializer=keras.initializers.Constant(w.conv.weight.permute(2, 3, 1, 0).numpy()),
bias_initializer='zeros' if hasattr(w, 'bn') else keras.initializers.Constant(w.conv.bias.numpy()))
self.conv = conv if s == 1 else keras.Sequential([TFPad(autopad(k, p)), conv])
self.bn = TFBN(w.bn) if hasattr(w, 'bn') else tf.identity

Loading…
取消
儲存