-
Notifications
You must be signed in to change notification settings - Fork 108
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
Multiclass classification #3
Comments
Hey @v4d0k – in |
Thank you! |
Hello, Like @v4d0k I have tried to apply your code on a multiclass problem (where each text/description can belong to several classes; eg: "Cristiano Ronaldo amazing goal vs Juventus" belongs both to "sport" and "football" classes). I have removed the
Any ideas ? Also can you precise which tensorflow version you are using please ? |
@AxeldeRomblay have you found how to use this for multi class? |
@jacobzweig What changes i have to do in your model for multi class? |
@v4d0k did you find how to work with mulit-class? please share what changes we have to do?? |
@Abhinav43 it was just a version issue... Make sure you have tensorflow 1.14 and it should work ! :) |
@AxeldeRomblay I am getting other errors and not getting good accuracy in multi-class. can you share the code or tell me where I have to change in code for multi-label? |
@Abhinav43 here is the code : `class BertLayer(tf.keras.layers.Layer):
|
`class InputExample(object):
def convert_single_example(tokenizer, example, max_seq_length=512):
def convert_examples_to_features(tokenizer, examples, max_seq_length=512):
def convert_text_to_examples(texts, labels): |
I am looking for model information. Should i use binary cross-entropy other one? |
@AxeldeRomblay I am trying to integrate bert as an embeddings layer in my model, however, everytime I get this Traceback
Here is my model, and I am using the implementation of strongio to the bert layer here is an example of my data
Thank you and you may refer to my issue |
Solved my issue stackoverflow |
Hello ! Thanks for the notebook, it is really helpful! I am trying to make it work for multiclass classification but I have some difficulties. My dataset its strings with multiple labels, which I one-hot encode before I train/test split them and feed them into the class 'Inputexample'. It seems to work after that, but when I try to call the model later on it gives me the following error.
"Input arrays should have the same number of samples as target arrays. Found 10251 input samples and 51255 target samples."
I suspect it has something to do with how it converts y to features since 10251 x 5 = 51255 and I have 5 classes. Is there something inherent to binary classification in your code that would raise this error?
The text was updated successfully, but these errors were encountered: