The Secret to 90%+ Accuracy in Text Classification

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 ธ.ค. 2024

ความคิดเห็น • 68

  • @PritishMishra
    @PritishMishra  ปีที่แล้ว +9

    Please Subscribe.

  • @ankitnsfw
    @ankitnsfw 11 หลายเดือนก่อน +9

    from the last 3-4 hrs i am trying to find a step-by-step proper material on how to fine to BERT with your dataset , finally found it , thank for making this video.

  • @varunparmar4724
    @varunparmar4724 หลายเดือนก่อน +1

    The video quality and the way you explained everything is Top-Notch. Thank you for this video

  • @viswanathhemanth
    @viswanathhemanth ปีที่แล้ว +11

    Really really amazing Pritish. This video is not like those boring lecture videos. The animations are amazing. your explanation is clear with goof pronunciation. Amazing. Keep it up. I hope you continue posting these type of videos. ❤❤❤❤

  • @zhwzh_
    @zhwzh_ 9 หลายเดือนก่อน +1

    Thanks a lot for this video. It's more than a simple tutorial, you really explain the most important concepts in a way that's clear

  • @villurignanesh8458
    @villurignanesh8458 6 หลายเดือนก่อน +2

    Amazing work Pritish. You definitely deserve more views. Hopefully you will get it soon❤.

  • @EduCentre-D4
    @EduCentre-D4 8 หลายเดือนก่อน

    best explanation of fine tuning of bert , got good understanding from video thanks

  • @maheshbhosale3306
    @maheshbhosale3306 3 หลายเดือนก่อน

    I am very impressed with the way you teach.

  • @AdityaBhat-m5v
    @AdityaBhat-m5v 10 หลายเดือนก่อน

    best video i could find , easy, simple and to the point.

  • @hamzaomari7052
    @hamzaomari7052 7 หลายเดือนก่อน +1

    You have so much potential, amazing!

  • @surendrareddydwarampudi4749
    @surendrareddydwarampudi4749 5 หลายเดือนก่อน

    Best explanation in a simple and easy way.

  • @zeelthumar
    @zeelthumar ปีที่แล้ว +1

    Explanation done by you is the best compared to any others....awesome work Pritish ....keep it up

  • @AbhishekBade1310
    @AbhishekBade1310 9 หลายเดือนก่อน

    i have some text files in which there are elements and their values but the pattern in which the text is displayed in the file are different from file to file. Is it possible to train Bert on these files so that when I ask it to extract only the element names and their corresponding values it will do that regardless of the text pattern?

  • @DarkLord79799
    @DarkLord79799 2 หลายเดือนก่อน

    Awesome video bro keep it up. ❤❤

  • @markinius8866
    @markinius8866 5 หลายเดือนก่อน

    I'd like to ask, a paper I am trying to use for another dataset said they had optimal performance at epochs=50, however at epochs=3, it's already getting decent performance. May I ask why this is? Also, do you run bert in inference mode?

  • @enjoycoding7898
    @enjoycoding7898 ปีที่แล้ว

    This is the best way of explaining the Models! Keep it up!!! I expect some plots/graphs on accuracy and predictions details!

  • @dhiraj223
    @dhiraj223 ปีที่แล้ว +2

    Very Nice Explanation and nice Animation 🔥🔥🔥🔥
    Keep it up 👍🏻

  • @FREeZe_Reaper
    @FREeZe_Reaper 7 หลายเดือนก่อน

    so we don't need to freeze any layer of the pretrained model? i have a problem this is with VIT my image shape is 24x24 but the pretrained model input shape is 224x224 it is possible to fix that? and the learning parameter are 8900000 and i want to fine tune it on my dataset

  • @valorw1788
    @valorw1788 2 หลายเดือนก่อน

    Hi what if i want to train it on unsupervised learning like kmeans clustering?

  • @05h92
    @05h92 9 หลายเดือนก่อน

    for the bert text summarization can we do in this way????

  • @World-vf1ts
    @World-vf1ts หลายเดือนก่อน

    Can you please explain how I can retrain the same model (after exporting) with new data. Basically, I want to train the same model in stages. Please help.

  • @wen2498
    @wen2498 ปีที่แล้ว +1

    Very nice video; I wonder if it is possible to save the classifier for future use.

    • @PritishMishra
      @PritishMishra  ปีที่แล้ว

      You can save the classifier as follows:
      classifier.save("filename.h5")

  • @TheFitsome
    @TheFitsome หลายเดือนก่อน

    Well done, Mishra

  • @jentertainment4239
    @jentertainment4239 ปีที่แล้ว

    Can we use bert for context aware similarity?

  • @devadasdamodharan1511
    @devadasdamodharan1511 9 หลายเดือนก่อน

    Awesome explanation 👌

  • @user-wr4yl7tx3w
    @user-wr4yl7tx3w ปีที่แล้ว +1

    I’m not clear on what pooling in the video is.

  • @patrickahrend298
    @patrickahrend298 11 หลายเดือนก่อน

    Can you do a video on how to do Natural language inference with Bert? Thanks!

  • @shahzadsohail6283
    @shahzadsohail6283 7 วันที่ผ่านมา

    i want to save this model and then convert it to tflite and then predict using tflite model what to do

  • @saimanideeep8716
    @saimanideeep8716 ปีที่แล้ว

    Excellent video. I got one error while running the code.
    inputs = tokenizer(['Hello world', 'Hi how are you'], padding=True, truncation=True,
    return_tensors='tf')
    inputs
    For this line I got the following error:
    TypeError Traceback (most recent call last)
    Cell In[50], line 1
    ----> 1 inputs = tokenizer(['Hello world', 'Hi how are you'], padding=True, truncation=True,
    2 return_tensors='tf')
    3 inputs
    TypeError: 'BertTokenizer' object is not callable
    Can you please help?

  • @Ryan-Pot
    @Ryan-Pot 10 หลายเดือนก่อน

    recreated this in pycharm, when i want to use the model (i saved it first) i get this error: TypeError: No common supertype of TensorSpec(shape=(None, None), dtype=tf.int32, name=None) and TensorSpec(shape=(None, 78), dtype=tf.int64, name='input_ids_attention_mask'). is there a way to fix this without retraining the model?

    • @Ryan-Pot
      @Ryan-Pot 10 หลายเดือนก่อน

      all i want is to calculate precision, recall and f1 score of the model btw.

  • @honestklee
    @honestklee 4 หลายเดือนก่อน

    How to fine tune csv dataset on BERT model

  • @chintanparmar7533
    @chintanparmar7533 11 หลายเดือนก่อน

    which model would be suitable for classifying if text is written by human or generated by LLM?

  • @uiandwe
    @uiandwe ปีที่แล้ว

    thank bro!
    Good explanation, it was easy to understand

  • @WoWmastersonTuralyon
    @WoWmastersonTuralyon ปีที่แล้ว

    Hey, nice video! Just one question: how can you serialize a custom Keras model, such as yours -- class BERTForClassification(tf.keras.Model)?

    • @PritishMishra
      @PritishMishra  ปีที่แล้ว +1

      You can serialize a custom Keras model like our BERTForClassification using the model.save('filename') method. This will save the entire model, including the architecture, weights, and optimizer, to a file. You can then load the saved model using the tf.keras.models.load_model('filename') method.
      If the model.save() method doesn't work for you, you can use model.save_weights() instead. This method saves only the weights of the model to a file, so you will need to define the model architecture exactly as it was at the time of saving the weights in order to load the saved weights correctly.
      model = ...
      model.load_weights('/path/to/file')

    • @WoWmastersonTuralyon
      @WoWmastersonTuralyon ปีที่แล้ว

      @@PritishMishra This doesn't work. This is my code:
      classifier.save(save_path)
      classifier_2 = tf.keras.models.load_model(save_path)
      I get this error:
      TypeError: No common supertype of TensorSpec(shape=(None, None), dtype=tf.int32, name=None) and TensorSpec(shape=(None, 27), dtype=tf.int64, name='input_ids/attention_mask').

    • @PritishMishra
      @PritishMishra  ปีที่แล้ว

      @@WoWmastersonTuralyon Could you please try with model.save_weights? Please let me know if this causes any errors.

    • @WoWmastersonTuralyon
      @WoWmastersonTuralyon ปีที่แล้ว +1

      ​@@PritishMishra Yes, upon further research I came upon this solution too. The code that works looks like this:
      classifier.save_weights(save_path)
      classifier_2 = BERTForClassification(bert_model=transformers_model, num_classes=no_classes)
      classifier_2.load_weights(save_path)
      example_input = "just some dummy input string"
      encoded_example = tokenizer.encode(example_input, padding=True, truncation=True, return_tensors="tf")
      _ = classifier_2(encoded_example)
      The input is needed, because the bert input layer has a dynamic size, and gets built after running an input through it. Otherwise, other functions regarding the model (such as classifier_2.summary()) would return an error.
      Thanks for your help!

    • @JeisonJimenez-tb3nc
      @JeisonJimenez-tb3nc 11 หลายเดือนก่อน

      @@WoWmastersonTuralyon Thank you very much for the answer, but I don't understand why the answer that the model gives me when I do classifier_2(encoded_input) is:
      and not the category my input should be in

  • @DonaldTrump101-o7d
    @DonaldTrump101-o7d ปีที่แล้ว

    pritish will you create a video of simulating a robotic arm which is controlled by a GPT-language model , and can cook food in simulation ?

  • @srujan-vy9by
    @srujan-vy9by 8 หลายเดือนก่อน

    How to import our dataset and train and test them

  • @ruizhou1243
    @ruizhou1243 ปีที่แล้ว

    it show me train_dataset is not defined????

  • @snapninjasquad_ad-e3t
    @snapninjasquad_ad-e3t 6 วันที่ผ่านมา

    Can you make a llm by own data like chatgpt

  • @abhijitsarkar3589
    @abhijitsarkar3589 หลายเดือนก่อน

    Thanks brother

  • @syedshahab8471
    @syedshahab8471 ปีที่แล้ว

    Absolutely brilliant!

  • @sherryhp10
    @sherryhp10 ปีที่แล้ว

    Very nicely explained

  • @abhishekpawar1207
    @abhishekpawar1207 ปีที่แล้ว

    Really Good video.

  • @manojbajpai7346
    @manojbajpai7346 ปีที่แล้ว

    Nice explanation.

  • @silasdhayanand8708
    @silasdhayanand8708 6 หลายเดือนก่อน +1

    how to actually decode the output back to the classes is something this video did not explain : \

  • @Professor_The_Trader
    @Professor_The_Trader 2 หลายเดือนก่อน

    Thanks

  • @VishalKumar-su2yc
    @VishalKumar-su2yc 10 หลายเดือนก่อน +1

    it was good video

  • @Officer-kd6
    @Officer-kd6 ปีที่แล้ว

    great video, can you make a video on question answering? and can we make a chatbot just using bert or will we be needing a Decoder along with bert for that

  • @batman9937
    @batman9937 ปีที่แล้ว +3

    bert is not an LLM

    • @HarshPatel-iy5qe
      @HarshPatel-iy5qe 7 หลายเดือนก่อน

      It used to be a LLM, but obviously now in the gen of trillions parameters model we can't say millions parameters model a LLM, but earlier it was a LLM , after few years these llama 2 and gpt 3 can't be LLM according to future models standard, but that does not change the fact of current scenario. hence, BERT is a LLM which trained on less parameters.

  • @soumyaranjan7474
    @soumyaranjan7474 ปีที่แล้ว

    Thanks a lot for this video. Could you write the code how to do inference through pooler_outpt?

  • @dotnetHub
    @dotnetHub ปีที่แล้ว

    hi bro i facing error
    I'm using hugging face dataset if sentiment analysis.
    where in the dataset contain sentiment column and data type of sentiment column is string how to convert into integer and label number 1,2,3
    in your case automatically convert into int64
    please guide me I'm stock from last 7 days
    thanks for your attention

  • @rrrila8851
    @rrrila8851 ปีที่แล้ว

    Hey, I really liked your video, although I have few doubts on a few matters, I would love to have a chat with you if it were possible, so you can help me. Do you think we can have a chat over Discord or similar?

  • @negociosupq
    @negociosupq 8 หลายเดือนก่อน

    Great video! any clue why I got so low accuracy ?
    The Secret to 90%+ Accuracy in Text Classification
    32/32 ━━━━━━━━━━━━━━━━━━━━ 313s 10s/step - accuracy: 0.3567 - loss: 1.5853
    [1.5781687498092651, 0.3684999942779541]

    • @karthik7610
      @karthik7610 8 หลายเดือนก่อน

      same here
      accuracy: 0.3741 - loss: 1.5632

    • @PritishMishra
      @PritishMishra  8 หลายเดือนก่อน

      Hey, there's some problems with the code. Let me try to fix this.

  • @superfreiheit1
    @superfreiheit1 หลายเดือนก่อน

    I got 94% F1 with bert-base-uncased

  • @abdelrahmanmohamed9
    @abdelrahmanmohamed9 7 หลายเดือนก่อน

    from the last 5-6 hrs i am trying to find a step-by-step proper material on how to fine to BERT with your dataset , finally found it , thank for making this video.