Skip to content

The part of VGG16 Feature extractor #3

Open
@hichoe95

Description

@hichoe95

Thank you for your PyTorch open-source of IPR!

I have a question about the feature extractor code.
To the best of my knowledge, the feature extractor should use features after the 'ReLU' layer.

In vgg16 classifier block,

(classifier): Sequential( 
    (0): Linear(in_features=25088, out_features=4096, bias=True) 
    (1): ReLU(inplace=True) 
    (2): Dropout(p=0.5, inplace=False) 
    (3): Linear(in_features=4096, out_features=4096, bias=True) 
    (4): ReLU(inplace=True) 
    (5): Dropout(p=0.5, inplace=False) 
    (6): Linear(in_features=4096, out_features=1000, bias=True) 
  )

for using feature after ReLU layer, the code should be feature = self.vgg16.classifier[:5](before_fc)
, not feature = self.vgg16.classifier[:4](before_fc) .

I'd like to know whether my opinion is right or not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions