Closed dvro closed 7 years ago
@dvro can you please tell me how do you retrained the model for custom data sets (I dont need a heat map) . This is my guess
/convnets-keras/convnetskeras/
convnets.py
VGG_16
functionmodel.add(Dense(1000, name='dense_3'))
model.add(Activation("softmax",name="softmax"))
model.add(Dense(1, name='dense_3'))
model.add(Activation("softmax",name="softmax"))
vgg16_weights
model.fit(X,y)
Am I in the right direction? Any help will be greatly appreciated.
I am trying to retrain the VGG16 for a specific set of classes. It works with heatmap=False, (without Softmax4D), but I need to generate a heatmap.
Here is what I am doing:
However, I have a problem finding the adequate format for y_ (the classes).
I know that y must have 3 dimensions
Exception: Error when checking model target: expected softmax to have 3 dimensions
but not sure how to do that considering that my y currently has 1 dimension (values 0,1 and 2).Even applying
np_utils.to_categorical(y_, len(set(y_)))
, I still get only 2 dimensions.Is the workflow correct? How can I solve this issue?
Thanks in advance,