generated from fastai/nbdev_template
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How could I set the number of classes for the model? #13
Comments
I'm now using a very ugly way 😢 please help me hf_arch, hf_config, hf_tokenizer, hf_model = BLURR_MODEL_HELPER.get_hf_objects(
pretrained_model_name, task=task
)
hf_config.num_labels = num_labels
hf_arch, hf_config, hf_tokenizer, hf_model = BLURR_MODEL_HELPER.get_hf_objects(
pretrained_model_name, task=task, config=hf_config
) |
Its not that ugly ... but no reason to call Checkout out the docs here, in particular the multi-label example. You'll see something like this which is a bit more efficient:
|
Thanks a lot! That's faster and simpler. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, thank you for this excellent work!
I'm a beginner of fastai and huggingface.
And I'm now using your library for sequence classfication problem with more than 2 classes.
I think it's necessary to set the number of class for huggingface. (Cause imdb is running correctly while mine cannot.)
But I don't know how according to your docs.
Could you give me some suggestions?
The text was updated successfully, but these errors were encountered: