(self, conv)
| 172 | nn.init.zeros_(conv.bias.data) |
| 173 | |
| 174 | def init_weight2(self, conv): |
| 175 | conv_weight = conv.weight.data |
| 176 | nn.init.zeros_(conv_weight) |
| 177 | c1, c2, t, h, w = conv_weight.size() |
| 178 | init_matrix = torch.eye(c1 // 2, c2) |
| 179 | #init_matrix = repeat(init_matrix, 'o ... -> (o 2) ...').permute(1,0,2).contiguous().reshape(c1,c2) |
| 180 | conv_weight[:c1 // 2, :, -1, 0, 0] = init_matrix |
| 181 | conv_weight[c1 // 2:, :, -1, 0, 0] = init_matrix |
| 182 | conv.weight.data.copy_(conv_weight) |
| 183 | nn.init.zeros_(conv.bias.data) |
| 184 | |
| 185 | |
| 186 | class ResidualBlock(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected