Replies: 1 comment
-
There's no built-in way to compute accuracy using the classifier layer. You'll have to loop through your evaluation dataset, and for each sample get the output of the classifier layer, and compare the max index of the output with the label of each sample.
This is probably the best approach: #583 (comment)
No unfortunately there aren't any in this library. Here's a potentially relevant repo though: https://github.com/salesforce/hierarchicalContrastiveLearning |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm currently testing this library to achieve two main objectives:
Training and testing a classifier:
I would like to train a model to classify images, but without comparing the images between them. Specifically, I want to pass a single image to the model and predict its class.
I noticed the "train_with_classifier" example, which includes an additional "classifier" layer. However, from what I understand, most testers use the "embedder" for prediction and metric computation.
My questions are:
Hierarchical prediction:
For the second task, I aim to implement hierarchical classification. For example, using the CIFAR100 dataset, I would like the network to learn the hierarchical structure of the dataset.
Are there any methods or loss functions implemented in the library that support hierarchical learning for tasks like this?
Thank you for maintaining this repository! I look forward to your guidance.
Beta Was this translation helpful? Give feedback.
All reactions