Skip to content

Commit

Permalink
Merge pull request fizyr#856 from martinzlocha/fix-double-weight-load
Browse files Browse the repository at this point in the history
Fix loading weights even if --no-weights is set.
  • Loading branch information
hgaiser authored Jan 2, 2019
2 parents b6e4605 + 42e3cf0 commit a619206
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions keras_retinanet/models/vgg.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ def vgg_retinanet(num_classes, backbone='vgg16', inputs=None, modifier=None, **k

# create the vgg backbone
if backbone == 'vgg16':
vgg = keras.applications.VGG16(input_tensor=inputs, include_top=False)
vgg = keras.applications.VGG16(input_tensor=inputs, include_top=False, weights=None)
elif backbone == 'vgg19':
vgg = keras.applications.VGG19(input_tensor=inputs, include_top=False)
vgg = keras.applications.VGG19(input_tensor=inputs, include_top=False, weights=None)
else:
raise ValueError("Backbone '{}' not recognized.".format(backbone))

Expand Down

0 comments on commit a619206

Please sign in to comment.