I had a problem with the approach which is clear in this line:
|
model.add(Dense(2, activation = 'softmax', init='uniform')) |
As it is mentioned in the paper, trained weights in this layer are used for a weighted sum over the last produced activation maps.
For predicting a non-linear function and class score in an MLP, there should be at least two layers (one hidden layer and an output layer like Softmax).
But here, right after the GAP layer, only one FC layer with two units is added for classification.
Can anyone explain the reason?
And why the number of units is 2?
I had a problem with the approach which is clear in this line:
keras-cam/model.py
Line 59 in 2b7ada2
As it is mentioned in the paper, trained weights in this layer are used for a weighted sum over the last produced activation maps.
For predicting a non-linear function and class score in an MLP, there should be at least two layers (one hidden layer and an output layer like Softmax).
But here, right after the GAP layer, only one FC layer with two units is added for classification.
Can anyone explain the reason?
And why the number of units is 2?