Use cloned weights so that a converted model can be trained separately

parent 925df178
......@@ -8,10 +8,8 @@ class Conv2d(torch.nn.modules.Module):
super(Conv2d, self).__init__()
self.stride = conv_spatial.stride
self.weight = conv_spatial.weight
self.padding = conv_spatial.padding
self.register_parameter('weight', self.weight)
self.weight = torch.nn.Parameter(conv_spatial.weight.clone())
self.register_buffer('J', J[0])
self.register_buffer('J_i', J[1])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment