Lab41 / attalos

Joint Vector Spaces

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Extract inception features

ymt123 opened this issue · comments

The vg_prep class returns different number of keys for list_keys() vs from the iterator. This causes extract inception features to incorrectly create a feature matrix larger than is needed, in the case of the current code this means that 'feats' in the hdf5 is (108077, 2048) vs the 'ids' being of length 108073.

It appears that the vectors are still aligned ['feats'][0] corresponds with ['ids][0] and that the final rows in the 'feats' matrix without a corresponding 'ids' row are zero.

Fix:

  • Make sure that the length of the list_keys() in vg_prep is the same as the length iterator
  • Consider making extract_inception_features use the iterator to get the length or creating an explicit length in base class