mirror of
https://github.com/huggingface/pytorch-image-models.git
synced 2025-06-03 15:01:08 +08:00
Should have included Conv2d layers in original weight init. Lets see what the impact is...
This commit is contained in:
parent
4de57ccf01
commit
cbcb76d72c
@ -476,7 +476,7 @@ class VisionTransformer(nn.Module):
|
||||
|
||||
|
||||
def _init_weights_original(m: nn.Module, n: str = ''):
|
||||
if isinstance(m, nn.Linear):
|
||||
if isinstance(m, (nn.Conv2d, nn.Linear)):
|
||||
trunc_normal_(m.weight, std=.02)
|
||||
if isinstance(m, nn.Linear) and m.bias is not None:
|
||||
nn.init.constant_(m.bias, 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user