gmihaila / ml_things

This is where I put things I find useful that speed up my work with Machine Learning. Ever looked in your old projects to reuse those cool functions you created before? Well, this repo is designed to be a Python Library of functions I created in my previous project that can be reused. I also share some Notebooks Tutorials and Python Code Snippets.
https://gmihaila.github.io
Apache License 2.0
245 stars 61 forks source link

question for imbalanced classification #16

Closed siddpiku closed 2 years ago

siddpiku commented 2 years ago

How do I input class weights if my classes are imbalanced, (99%,1%) into the GPT2 sequence classification?

gmihaila commented 2 years ago

You need to add your own classification layer to GPT2 to add more/less weight depending on your labels count.