Verified Commit 40cef28c authored by Max Ehrlich's avatar Max Ehrlich
Browse files

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

parent 925df178
...@@ -8,10 +8,8 @@ class Conv2d(torch.nn.modules.Module): ...@@ -8,10 +8,8 @@ class Conv2d(torch.nn.modules.Module):
super(Conv2d, self).__init__() super(Conv2d, self).__init__()
self.stride = conv_spatial.stride self.stride = conv_spatial.stride
self.weight = conv_spatial.weight
self.padding = conv_spatial.padding self.padding = conv_spatial.padding
self.weight = torch.nn.Parameter(conv_spatial.weight.clone())
self.register_parameter('weight', self.weight)
self.register_buffer('J', J[0]) self.register_buffer('J', J[0])
self.register_buffer('J_i', J[1]) self.register_buffer('J_i', J[1])
Supports Markdown
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