You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the HugsVision VisionClassifierTrainer is based on the HuggingFace transformers library and especially on their Trainer, we cannot tweak the loss function.
Thanks @qanastek for the prompt response and its really an amazing library
If possible can you suggest how I can use your models/ directory since there I can change the crossentropy loss to for eg KLDivLoss for testing
HugsVision isn't really suited for reasearch. But you can directly rewrite the Transformers class ViTForImageClassification for the single_label_classification task.
In my opinion, it's the simplest way to do. Clone the Transformers repository, install it locally using pip install --editable . and modify the loss in the class.
I wanted to use a custom loss function with VIT how should I proceed since in the VisionClassifierTrainer there is no use of loss
The text was updated successfully, but these errors were encountered: