From 7158a18a5f2789b2b2902c4b918ed80002970249 Mon Sep 17 00:00:00 2001 From: Jordan Gong Date: Tue, 5 Jan 2021 13:21:16 +0800 Subject: Change and improve weight initialization 1. Change initial weights for Conv layers 2. Find a way to init last fc in init_weights --- models/rgb_part_net.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'models/rgb_part_net.py') diff --git a/models/rgb_part_net.py b/models/rgb_part_net.py index ac76dbf..5012765 100644 --- a/models/rgb_part_net.py +++ b/models/rgb_part_net.py @@ -41,7 +41,7 @@ class RGBPartNet(nn.Module): ) total_parts = sum(hpm_scales) + tfa_num_parts empty_fc = torch.empty(total_parts, out_channels, embedding_dims) - self.fc_mat = nn.init.xavier_uniform_(nn.Parameter(empty_fc)) + self.fc_mat = nn.Parameter(empty_fc) def fc(self, x): return torch.matmul(x, self.fc_mat) -- cgit v1.2.3