File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -246,15 +246,15 @@ def create_network(self, blocks):
246246 conv_id = 0
247247 for block in blocks :
248248 if block ['type' ] == 'net' :
249- prev_filters = int (block ['channels' ])
249+ prev_filters = int (float ( block ['channels' ]) )
250250 continue
251251 elif block ['type' ] == 'convolutional' :
252252 conv_id = conv_id + 1
253- batch_normalize = int (block ['batch_normalize' ])
254- filters = int (block ['filters' ])
255- kernel_size = int (block ['size' ])
256- stride = int (block ['stride' ])
257- is_pad = int (block ['pad' ])
253+ batch_normalize = int (float ( block ['batch_normalize' ]) )
254+ filters = int (float ( block ['filters' ]) )
255+ kernel_size = int (float ( block ['size' ]) )
256+ stride = int (float ( block ['stride' ]) )
257+ is_pad = int (float ( block ['pad' ]) )
258258 pad = (kernel_size - 1 ) // 2 if is_pad else 0
259259 activation = block ['activation' ]
260260 model = nn .Sequential ()
You can’t perform that action at this time.
0 commit comments