Skip to content

Commit

Permalink
Fix critical weight initialization bug
Browse files Browse the repository at this point in the history
The weights of the mapping network were initialized with the inverse of the intended standard deviation making learning substantially slower.
  • Loading branch information
dorarad authored Feb 22, 2022
1 parent b3f6397 commit e987448
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pytorch_version/training/networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def get_weight(shape, gain = 1, use_wscale = True, lrmul = 1, channels_last = Fa
runtime_coef = lrmul

# Create variable
w = torch.randn(shape) / init_std
w = torch.randn(shape) * init_std
w = torch.nn.Parameter(format_memory(w, channels_last))
return w, runtime_coef

Expand Down

0 comments on commit e987448

Please sign in to comment.