How To Train Deep Learning Models In Google Colab- Must For Everyone

Поділитися
Вставка
  • Опубліковано 2 лют 2025

КОМЕНТАРІ • 360

  • @maryzakiandourrugrats4671
    @maryzakiandourrugrats4671 Рік тому +6

    This is an amazing video, as a beginner you answered so many questions that popped up as I was following along, as if you were reading my mind, excellent brother

  • @sandhyasharmil
    @sandhyasharmil Місяць тому +3

    I had struggled too much with loading data from MyDrive to Collab. Your video helped. Thank you so much. And God Bless you. :)

  • @JordanMetroidManiac
    @JordanMetroidManiac 3 роки тому +9

    Google Colab is such a helpful resource. Thank you for explaining this!

  • @CreatingUtopia
    @CreatingUtopia 4 роки тому +25

    Tech websites: Let's compare gpu on benchmark scores
    Krish: Let's compare prices

  • @zulfiqarali-zq1rg
    @zulfiqarali-zq1rg 4 роки тому +4

    Exellent sir. you are one of my mentor in Deep learning CV.Thanku sir

  • @apunbhagwan4473
    @apunbhagwan4473 3 роки тому +3

    He did gave UPSC in 2019 and now he is a youtuber, Sandeep bhaiya

  • @ALLFITdudes
    @ALLFITdudes 2 роки тому +3

    Thank you so much sir for this wonderfull video..❤❤

  • @ashutoshdixit2806
    @ashutoshdixit2806 3 роки тому +1

    great work ....
    this is my first time on your channel

  • @tasveerahmad5002
    @tasveerahmad5002 4 роки тому +2

    Thanks dear, A very nice and helpful video. I learned a lot and enjoyed. Stay Blessed!

  • @rkag5811
    @rkag5811 3 роки тому +1

    I got a clear idea. Good explanation sir👏

  • @CogniCraftedMinds
    @CogniCraftedMinds 2 роки тому +1

    Thank you, I've learned from your tutorials.

  • @sheikhobama3759
    @sheikhobama3759 Рік тому +1

    OMG I absolutely loved your video Sir, I Have just watched it halfway and I felt I had to comment. The way you explain things are just perfect. I wish if only we students had teachers like you. I've already subscribed to your channel and can't wait to watch more of your content. Your knowledge is invaluable, and I appreciate you taking the time to share it with us.
    Thanks again for creating such an awesome content! 🥰
    These videos really do help us beginners in a great way!!

  • @kenyosh8957
    @kenyosh8957 Рік тому +1

    Thank you SOOO much for making this video

  • @chinmayshinde6478
    @chinmayshinde6478 4 роки тому +9

    Good video. Can u show the following:
    1) importing tensorflow/pytorch/scikitlearn
    2) import specific version of tensorflow/ pytorch/ detectron
    3) advise about loading personalised dataset - whether it should be zip upload or extracted image files.

    • @vineethv3050
      @vineethv3050 3 роки тому +1

      %tensorflow_version
      % tensorflow_version 2.x
      import tensorflow as tf
      print(tf.__version__)

  • @rshndb99
    @rshndb99 4 роки тому +5

    This video is not for everyone it is for expert
    New learners can't understand

    • @eduxlearntodayapplytomorro6616
      @eduxlearntodayapplytomorro6616 3 місяці тому

      man it's enough for a free video, if you don't know much then learn. Krish can't just explain every single step

  • @muskaanfathima8183
    @muskaanfathima8183 Рік тому +1

    Thank you so much sir u saved my final year project

    • @Kaifrockstar-od1nj
      @Kaifrockstar-od1nj 12 днів тому

      Hello,can you help me out im giving the code because currently iam doing my final yr project

    • @muskaanfathima8183
      @muskaanfathima8183 10 днів тому

      @@Kaifrockstar-od1nj its long back i dont remember now

  • @akansha_bhatt28
    @akansha_bhatt28 4 роки тому +12

    Sir,
    After training model on Google Colab, please make video on how to test on real time

    • @jayhingrajiya3703
      @jayhingrajiya3703 4 роки тому +1

      To test on real time.. just click the picture of the leaf of tomato and use the model to predict whether the leaf is healthy or not.... google it

    • @Thearvindkumar
      @Thearvindkumar 4 роки тому

      Great question .

    • @dhakshajey7032
      @dhakshajey7032 4 роки тому +1

      @@jayhingrajiya3703 Can you please explain sir. what should be done after training the model.

    • @aisyahrobi3623
      @aisyahrobi3623 3 роки тому

      @@jayhingrajiya3703 hello...can you explain more how to test in real-time..thank you so much..

  • @princeprajwal
    @princeprajwal 3 роки тому +1

    u been always helpful krish thank you so much

  • @ashikroy4618
    @ashikroy4618 2 роки тому +8

    Hi Krish,
    Thank you for your tutorials.
    I am a beginner, and I am wandering why didn't you use validation and test, both of the datasets to evaluate the model?
    thanks

  • @nriezedichisom1676
    @nriezedichisom1676 Рік тому

    Perfect as usual. Thank you

  • @kalpanab9869
    @kalpanab9869 4 роки тому +7

    Error in model fit
    InvalidArgumentError Traceback (most recent call last)
    in ()
    7 epochs=10,
    8 steps_per_epoch=len(training_set),
    ----> 9 validation_steps=len(test_set)
    10 )
    InvalidArgumentError: Reduction axis -1 is empty in shape [16,0]
    Any idea what can be the error. I have followed the same steps

  • @ajayraju999
    @ajayraju999 4 роки тому +12

    Sir can you please can you make a video on image segmentation..🙏

  • @amanuelhirkooyoutubepage7743
    @amanuelhirkooyoutubepage7743 3 роки тому +2

    THANKS ALOT! let u teach as well on text classification specially on multi label problem using CNN

  • @anirbansarkar6306
    @anirbansarkar6306 3 роки тому +3

    Thanks for this wonderful tutorial Krish.
    Also please do come up with the architecture video they will be really helpful

  • @dikshabhati1441
    @dikshabhati1441 4 роки тому +2

    really amazing video sir....i have learnt a lot of things thorugh watching your videos....you are just amazing.....sir please one video on how to deploy model by writing code on google colab

  • @mrbroker3777
    @mrbroker3777 4 роки тому +9

    Can we convert our image classification code in colab into tensorflow lite inorder to run it in android studio

  • @2SourceFort
    @2SourceFort 3 роки тому

    Thank you so much 🥰 it's such a wonderful help to me

  • @Pran254
    @Pran254 3 роки тому +3

    After training the model in google colab , how to run or execute the project???

  • @suryav3959
    @suryav3959 4 роки тому +5

    Please make a video on the architectures of cnn transfer learning models.

  • @MAhmadian
    @MAhmadian Рік тому

    Thank you for your great work, I see the input image size in the Kaggle is 256x256 but you specified 224x224 is it a typo or you have done some scaling. My second question is in the training dataset you have 10 classes but your model's output has 15 classes which is not right, please elaborate.Thanks again for your awesome work.

  • @bhaumiks.6543
    @bhaumiks.6543 Рік тому

    Amazing videos sir. Thanks for videos.

  • @sunidhiashtekar9175
    @sunidhiashtekar9175 4 роки тому +2

    sir can you please tell me your video in which you have explained all this code

  • @SurajKumar-bw9oi
    @SurajKumar-bw9oi 4 роки тому +1

    The video was a lot of fun. Explaining and searching about GPUs and saying P4 instead T4 :)

  • @akashdebnath3631
    @akashdebnath3631 4 роки тому +4

    sir, please tell me how did you know how many hidden layer and neuron will give best result in MLP-ANN?

    • @jungleking9
      @jungleking9 4 роки тому

      Neuron will be average of your dependent variables and independent variables.. its the best practice.. and for hidden layers you can take any amount.. increase them until your accuracy increases

  • @madhukanadeeshani6982
    @madhukanadeeshani6982 3 роки тому

    Thank you very much!!! Tutorial is great

  • @kMuhammadUzair
    @kMuhammadUzair 2 місяці тому +1

    krish ? there is no test data folder what path did you give in the data_generator for the test_data

  • @poshamchandrika1340
    @poshamchandrika1340 4 роки тому +2

    during to fit the model i am getting value error
    ValueError: You are passing a target array of shape (16, 1) while using as loss `categorical_crossentropy`. `categorical_crossentropy` expects targets to be binary matrices (1s and 0s) of shape (samples, classes). If your targets are integer classes, you can convert them to the expected format via:
    ```
    from keras.utils import to_categorical
    y_binary = to_categorical(y_int)
    ```
    Alternatively, you can use the loss function `sparse_categorical_crossentropy` instead, which does expect integer targets.

    • @umanggoel5385
      @umanggoel5385 11 місяців тому +1

      you havent setup the number of classes, it should be greater than or equal to 2

  • @carijay2400
    @carijay2400 4 роки тому +2

    thank you very much sir for this tutorial. seems im getting the right direction for ML lecture for clinical dx. im a newbie who want a career shift.

  • @stitou2010
    @stitou2010 9 місяців тому

    Usefull video. Thank you Sir.

  • @qchirac
    @qchirac 3 роки тому

    Another questions, should we save the training data in google drive and mount or copy them to colab? google drive is a cloud drive away from colab I guess. If save in google drive, the training would be slower or same same?

  • @NilBorun
    @NilBorun 4 роки тому +1

    Do you have video on Inception3 or will you make it?

  • @melusimj3800
    @melusimj3800 Рік тому +1

    @Krish Naik, and everyone.. Can someone please assist me, I have a problem when it comes to fitting my model during training... How can I fix the "Invalid-Argument-Error? I have followed all the steps from this video, but I still get the same error. Any suggestion, on how to solve the error?

  • @ginawhalevg
    @ginawhalevg Рік тому

    your video is really helpful thanks a lot! but i can't find the colab notebook address of the examlpe you use in this video. can you please upload again?

  • @SGandhi
    @SGandhi 3 роки тому +1

    Showing epoch 1/10 but then utbis showing failed to get convolution algorithm , because of cuDNN failed so try looking to see if a warning log message is printed above this error is coming how to solve sir

  • @Pran254
    @Pran254 3 роки тому +1

    After training the model what about the next process i.e runing or executing?? Please help or share videos

  • @Abdnimit00
    @Abdnimit00 3 роки тому +9

    After completing the epoch how can i call an image and test it? what is the code can anyone help?

    • @richarashmi72
      @richarashmi72 3 роки тому

      Same here. I too want to do that. I have trained my model, now how to call the trained model while testing my data.

    • @rayane4975
      @rayane4975 3 роки тому +2

      model.evaluate(test_images, test_labels, batch_size=batch_size, verbose=2)

  • @Sazia_Cooking_Creativity
    @Sazia_Cooking_Creativity 3 роки тому +2

    Can you upload a video on the Facial recognition project?

  • @hemanthmohan4334
    @hemanthmohan4334 2 роки тому +1

    Dude, on the galaxy watch 4 is there a way to turn off the indicators like the airplane icon and the phone icon on the main screen? cause its annoying on analog watch faces that these icons overlay it....can't find any toggle in settings? reply plz..anyone

  • @MoganaVadhnaSuntraKumar
    @MoganaVadhnaSuntraKumar 2 роки тому

    Thank you so much😃😃

  • @platypusnebula7401
    @platypusnebula7401 2 роки тому

    Has anyone followed along this video recently with success? I followed along with the video (typed along), and used the picture files from Github, but when I executed the final command to run the cell, I got an "UnimplimentedErrors" at line 8, where the code reads: "validation_steps=len(test_set)". It's a long error message, but at the end is says "DNN Library is not found." Some of the libraries installed earlier in the notebook were of a different version.

  • @lias1
    @lias1 Рік тому

    Do you have zoomclasses or tutoring? if yes where can i sign up?

  • @rehippie
    @rehippie 2 роки тому

    Hi Krish, I didi it all and it worked! Now, how do I save my trained model to use it in onther scripts?

  • @Anilpawar_11
    @Anilpawar_11 4 місяці тому +1

    Please anyone explain to me how to get Testing and Training accuracy in Colab 🙏🙏(and is in data set already training and testing folders included or do we have to create)

  • @priyeshgautam668
    @priyeshgautam668 4 роки тому +2

    can we fine tune the last dense layers using grid search cv or keras tuner

  • @lydiadarla7543
    @lydiadarla7543 3 роки тому

    Thank you so so much sir!

  • @Saad-xo6yc
    @Saad-xo6yc 3 роки тому

    Getting this error
    UnknownError: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above.

  • @jagyansenipanda12panda37
    @jagyansenipanda12panda37 2 роки тому

    Sir can you show a small example of the CNN model for image interpolation using Google Colab?

  • @sovitrath4735
    @sovitrath4735 4 роки тому

    ​I think that GPU is not being used. Because 2 hrs is a long time for 18000 images classification. And I think we have to do !pip install tensorflow-gpu. Please check this out Krish. I may be wrong
    .

    • @krishnaik06
      @krishnaik06  4 роки тому +1

      It is using gpu...it doesn't take 2 hours it will be around 1hr 10 min

    • @sovitrath4735
      @sovitrath4735 4 роки тому

      @@krishnaik06 Thanks for the reply. Good to know. WIll try it out.

    • @rishavsharma7466
      @rishavsharma7466 4 роки тому

      @@krishnaik06 can two classes have same name while training deep learning model(i deliberatly need it)?If yes, what are its effects?

    • @raghurilokesh3270
      @raghurilokesh3270 4 роки тому

      I am getting the error as InvalidArgumentError: Reduction axis -1 is empty in shape [32,0]
      [[node ArgMax_1 (defined at :2) ]] [Op:__inference_train_function_41918]
      Function call stack:
      train_function
      Please advise.

  • @yuvikagajbhiye
    @yuvikagajbhiye 4 місяці тому

    Those who run the code in Colab , Can you please tell me the final results will be the graph which comes after epoch process???

  • @dirobayisa864
    @dirobayisa864 Рік тому

    Hi Krish,
    Thank you for your tutorials.
    I am doing on plant species recognition can you share something............

  • @PoojaGupta-ry3oj
    @PoojaGupta-ry3oj 4 роки тому +2

    After training now how to predict class for new image?

    • @Alexandre-vn6ii
      @Alexandre-vn6ii 4 роки тому

      I want to know that too! Probably he needs to save the trained file on json or h5

  • @qchirac
    @qchirac 3 роки тому

    a third question is how to keep it training backstage. the training might take much time, the mount and even the colab runtime session might disconnected before training is finished. how to resolve this concern..

  • @alaaabdullah2648
    @alaaabdullah2648 2 роки тому

    The path of image should be on Google drive? What if i am working with jupyter and i decide the path in my local device its will work?

  • @afzalrahaman6306
    @afzalrahaman6306 3 роки тому

    Dear krish, your theory explanation on deep learning helped me a lot. My pc is low configured, it dual core windows 7 64 bit. I know it's impossible to work with tensorflow with this configuration. Let me know is it possible to practice in cloud

  • @ochanabondhu
    @ochanabondhu 2 роки тому

    Now this video is nothing but a gem.. Thank you Krish.. Just 1 question... I have seen in many datasets there is another folder called validation.. Why it's so and what's the use? Can you please explain or guide me to any of your video wish such a reference

  • @krazyaria
    @krazyaria 3 роки тому

    works like a charm.

  • @SebasBogota
    @SebasBogota Рік тому

    The tutorial is incomplete. How to actually make predictions and decode category labels?😢

  • @arunakranthig9942
    @arunakranthig9942 2 роки тому

    HI Krish.... I need the concepts of Inception V3 Architecture..If already video is done can u please share the link?

  • @abhishekpatil2811
    @abhishekpatil2811 10 місяців тому

    Can you please make a video on Efficientnet V2 model

  • @touhidulislamsovon6927
    @touhidulislamsovon6927 Рік тому

    Thank You sir!!

  • @samrayaseen4672
    @samrayaseen4672 2 роки тому

    Sir i have been following your tutorials. i need some little help. how i can run project files with connecting one code cell to another code cell. please help i am waiting for your response.

  • @nayanagrawal8157
    @nayanagrawal8157 2 місяці тому

    Hey sir can you tell me how to run code of ResDiff given in github on Google colab

  • @poojakamra1177
    @poojakamra1177 3 роки тому

    Here we have multiple classes. After predict call we get index. How we map index with class name

  • @BuywiselyWithRachana
    @BuywiselyWithRachana 3 роки тому

    This dataset is having so many images ,can you suggest some new dataset which has less files?

  • @badass_bloke144
    @badass_bloke144 Рік тому

    what is the pre-sequence of following up with this video?

  • @umerkhan4987
    @umerkhan4987 3 роки тому

    very nice video, there is one query, can we run the code once and turn off the note book, is there any option with us that we can resume after an hour or some couple of hours to get output values?

    • @stzgaming2430
      @stzgaming2430 3 роки тому

      I have the same question on google colab i dont want to run code again and again or train

  • @mdfaizulabedinshibli3635
    @mdfaizulabedinshibli3635 2 роки тому

    ValueError: Asked to retrieve element 0, but the Sequence has length 0 ...Can you fix this error kindly?

  • @WaiTheng
    @WaiTheng 8 місяців тому

    Can this training process be done by using YOLOv8?

  • @hazkimshazkim1041
    @hazkimshazkim1041 4 роки тому

    hallo sir, great video learning. Can i ask if this method is also in Convolutional neural network?

  • @uswamubeen9522
    @uswamubeen9522 4 роки тому +1

    Assalam o Alaikum sir i want to know which one is the latest architecure for multi class image classification ????

  • @nsd6297
    @nsd6297 3 роки тому

    Can I use the training dataset without a class.....I mean only images in directory and no subfolder

  • @athirajoshy7081
    @athirajoshy7081 4 роки тому +6

    Sir,I admire u a lot..u r my role model..sir,I have a request..can u please make more deeplearning projects on colab pls..bcoz most of the students don't have a high performance laptop

  • @hsahu11
    @hsahu11 3 роки тому

    when we are working on transfer learning why we are training the model. We already set the layer_trainable = false..

  • @vishaldedavat6835
    @vishaldedavat6835 3 роки тому

    i am getting error .. i have run the same code as yours.. but while running the epoch.. it is showing failed to get convolution algorithm

  • @burhanuddinkutub4594
    @burhanuddinkutub4594 3 роки тому

    The model doesnt get trained,also tried to use the same tensorflow version mentioned

  • @mansukhprajapati5242
    @mansukhprajapati5242 3 роки тому

    can u make a video for training a model with provided image dataset using YOLOV3 architecture.
    OR can u add a code for it on your github account...please..

  • @arfinarif9669
    @arfinarif9669 2 роки тому

    any solution? in google collab
    InvalidArgumentError Traceback (most recent call last)
    in ()
    6 epochs=10,
    7 steps_per_epoch=len(training_set),
    ----> 8 validation_steps=len(test_set)

  • @sunnychaturvedi9958
    @sunnychaturvedi9958 4 роки тому

    you are a life saver

  • @surabhibtech
    @surabhibtech 2 роки тому

    Hello Sir, I am following this video with code in COLAB . In model.fit function it goes under training and after running 10-15 min it give CUDA error , out of memory . Kindly guide me with this .

  • @mahinqureshi5809
    @mahinqureshi5809 4 роки тому

    i m totally new on colab .. i have one question ... what can i use in colab instead of OS module?????? i need some operations like, os.isfile .. bt i donno how . and also how can i access the folders in gDrive.. what module to use ??????

  • @Av-yf6nn
    @Av-yf6nn 3 роки тому

    Hi Krish, is EarlyStopping useful for this model? how do we avoid overfitting?

  • @nimayoezer1282
    @nimayoezer1282 3 роки тому +1

    Hello Sir,
    I am Yoezer greeting from Bhutan.
    Sir, may you kindly make videos on how to deploy machine learning models in mobile apps.
    E.g:- Deploying this code to mobile app and use in real life from our mobile phone to detect the disease of the plants.

  • @fabricesimo6163
    @fabricesimo6163 3 роки тому +7

    Hi Sir! Following your steps, I bumped into this error
    UnknownError: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above.
    [[node model/conv2d_94/Conv2D (defined at :7) ]] [Op:__inference_train_function_17502]
    Function call stack:
    train_function
    Could you please help me to solve it?

    • @aditi1666
      @aditi1666 2 роки тому

      Hello Sir, Did u get the solution?

  • @philip-niron
    @philip-niron 3 роки тому

    Nice Video sir. How to change this model to tflite and deploy in android Application? Kindly do a video on that sir

  • @spiritualjourney5566
    @spiritualjourney5566 3 роки тому

    How to predict a test image other than that from dataset?

  • @jongameshow
    @jongameshow Рік тому

    Any idea how I can create a model with three dimensions? As this is resulting in a 2 dimension model

  • @shivaragiman
    @shivaragiman 4 роки тому +1

    for layer in inception.layers:
    layer.trainable=False
    What is the use of this code:?

    • @krishnaik06
      @krishnaik06  4 роки тому +1

      U don't want to train all the layers again.so we have written this code

  • @RaviTeja-cd2tp
    @RaviTeja-cd2tp 3 роки тому

    this is not working on real-time images please look to it. before going for it

  • @Techinigbo
    @Techinigbo 2 роки тому

    Nice tutorial sir .After training on colab ,can I download my model and use as pretrianed model ?

    • @TanujGarg-rw4ng
      @TanujGarg-rw4ng Рік тому

      Yes, just replace NAME OF YOUR MODEL with the name of your model:
      from tensorflow.keras.models import load_model
      model.save('/NAME OF YOUR MODEL.h5')

  • @angie7706
    @angie7706 3 роки тому

    I have photos in different resolutions. How can I resize every images in to same resolution?