Gordonjo/versa

Forgotten use of output_size in extract_features methods

Closed this issue · 3 comments

The output_size argument in extract_features_omniglot and extract_features_mini_imagenet is not used. My understanding is that this should control the size of the feature outputted. At the moment, the filters=64 (in conv2d_pool_block) is controlling this.

For example, for omniglot, should the first 3 conv2d_pool_block layers have filters=64, but the final conv2d_pool_block have filters=output_size?

Thanks in advance.

jfb54 commented

Thanks for reporting the issue! In an earlier version of this code, the extract_features model had a fully connected layer following the convolutional layers and the output_size parameter controlled the output size of the fully connected layer. In the current revision of the code, the fully connected layer was eliminated (performance was better without it), but the parameter to the function remains (which is an incorrect). The bottom line is that the output_size parameter does nothing and the output size of the feature extractor cannot be controlled. We will eliminate that parameter in the next revision.

Thanks for the clarification! So to confirm, the dimension of the feature provided to the classifier (i.e. first inference_block) is 64?

jfb54 commented

No. The dimension of the output of the classifier is 256. See tables D.1 and D.2 in our paper at https://arxiv.org/pdf/1805.09921.pdf for details. After the final convolution stage, the output is 64 feature maps of size 2 x 2 pixels (= 256 after flattening). You could change the size by adding and average pooling step or a fully connected layer.