awa2-zero-shot-learning
awa2-zero-shot-learning copied to clipboard
I think you overlook one critical thing
In your code, namely, in the 'evaluate' function belonging to the file named 'train.py' you calculate the output of the models and then, you apply a sigmoid function on it. Therefore, your output is a probabilistic vector, i.e., a vector with numbers between 0 and 1 whose sum is the unit. Then, you pass that vector to the 'labels_to_class' function. This function calculates the Euclidean distance between two elements, one is a binary vector corresponding to the attributes of classes and the other is a probabilistic vector. It makes no sense to calculate the Euclidean distance between these two elements given that they belong to different spaces. Thus, it could be the reason why you have low results.
In order to correct that, try to reformulate it as a multilabel problem where you classify each element as many times as attributes you have, in this case, 85. And then, try to calculate again the Euclidean distance between these two elements.