Trying to get my Vgg up and running. I trained it with the cats and dogs pictures in my train folder. They are properly separated. Then I run a sample on a batch of 4 (turns out they are all dogs). I then run vgg.predict and it is outputting goldfish (see below). Why is it doing this?
(array([ 0.9999, 1. , 1. , 1. ], dtype=float32),
array([1, 1, 1, 1]),
[u'goldfish', u'goldfish', u'goldfish', u'goldfish'])
The category indexes are based on the ordering of categories used in the VGG model - e.g here are the first four:
[u'tench', u'goldfish', u'great_white_shark', u'tiger_shark']
(Note that, other than creating the Vgg16 object, none of these steps are necessary to build a model; they are just showing how to use the class to view imagenet predictions.)