TF_FeatureExtraction icon indicating copy to clipboard operation
TF_FeatureExtraction copied to clipboard

Why logits is the feature?

Open Amitayus opened this issue 7 years ago • 7 comments

Thank you for your sharing. In your Usage introduction, Logits layer of Inception-v4 is exacted as feature using example_feat_extract.py. I wonder that why the logits is the feature be extracted?

Amitayus avatar Dec 14 '17 16:12 Amitayus

@Amitayus I believe that the feature vector that you call to be extracted depends on the ultimate usage of the feature vector. In this case, the Logits feature vector is effectively a probability distribution among the 1000 possible objects that can be extracted from the image

@tomrunia How would one extract a feature vector from somewhere earlier in the network? For example, the final convolutional layer?

alexandercameronh avatar Dec 18 '17 22:12 alexandercameronh

@alexandercameronh You can just set the command line parameter --layer_names where the layer names are comma separated. Of course the layer names need to correspond to your network architecture. Your can use the feature extractor's method print_network_summary() to find out the layer names.

tomrunia avatar Dec 19 '17 10:12 tomrunia

@alexandercameronh To my understand, if the Logits output is regarded as feature vector, then there is no need for the existing of classifier. Feature vector should be independent of the specific classification tasks.

Amitayus avatar Dec 20 '17 02:12 Amitayus

@tomrunia Hello,I want to use the eigenvector of the image in conjunction with the text, which layers should I extract?

bkwwangjie avatar Dec 21 '17 10:12 bkwwangjie

@bkwwangjie did you figure out the answer to this? If so, which layer(s) did you extract?

alexandercameronh avatar Jan 02 '18 18:01 alexandercameronh

@alexandercameronh I remove the fully connected layer (regrading as classifier) and extract vector of end_points['PreLogitsFlatten'] as feature of the input.

Amitayus avatar Jan 05 '18 03:01 Amitayus

@Amitayus Could please show the code?

zengsn avatar Mar 19 '18 14:03 zengsn