File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -217,9 +217,13 @@ def apply(self, model):
217
217
# Make sure to keep the biases from the convolution
218
218
if len (conv .input ) == 3 :
219
219
bias_name = conv .input [2 ]
220
- B_conv = model .get_initializer (bias_name ) # (OC,)
220
+ bias_prod = model .find_producer (bias_name )
221
+ # If the producer is None, then it is initialized by the Conv node
222
+ # and we need to ensure it isn't removed with the Conv node
223
+ if bias_prod is None :
224
+ B_conv = model .get_initializer (bias_name ) # (OC,)
225
+ model .set_initializer (bias_name , B_conv )
221
226
deconv_inps .append (bias_name ) # add to the inputs
222
- model .set_initializer (bias_name , B_conv )
223
227
deconv_outs = conv .output
224
228
deconv_pad = pad
225
229
deconv_node = helper .make_node (
You can’t perform that action at this time.
0 commit comments