Transfer Learning | Deep Learning Tutorial 27 (Tensorflow, Keras & Python)

  Рет қаралды 165,246

codebasics

codebasics

3 жыл бұрын

📺 Transfer learning is a very important concept in the field of computer vision and natural language processing. Using transfer learning you can use pre trained model and customize it for your needs. This saves computation time and money. It has been a revolutionary break through in the field of deep learning and nowadays you see it being used widely in the industry. In this video we will go over some theory behind transfer learning and then use google's mobile net v2 pre trained model to train our flowers dataset
#transferlearning #transferlearningdeeplearning #transferlearningkeras #transferlearningtensorflow #transferlearningmodels #deeplearningtutorial #transferlearningexample
Code: github.com/codebasics/deep-le...
Do you want to learn technology from me? Check codebasics.io/?... for my affordable video courses.
Deep learning playlist: • Deep Learning With Ten...
Machine learning playlist : kzbin.info?list...
🌎 My Website For Video Courses: codebasics.io/?...
Need help building software or data analytics and AI solutions? My company www.atliq.com/ can help. Click on the Contact button on that website.
#️⃣ Social Medias #️⃣
🔗 Discord: / discord
📸 Dhaval's Personal Instagram: / dhavalsays
📸 Instagram: / codebasicshub
🌎 Website: codebasics.io/
🔊 Facebook: / codebasicshub
📱 Twitter: / codebasicshub
📝 Linkedin: / codebasics
❗❗ DISCLAIMER: All opinions expressed in this video are of my own and not that of my employers'.

Пікірлер: 147
@codebasics
@codebasics 2 жыл бұрын
Do you want to learn technology from me? Check codebasics.io/ for my affordable video courses.
@sherifbadawy8188
@sherifbadawy8188 Жыл бұрын
Man your courses taught me to lose my ego, and to live out for the people. Thank you so much for this. This has to be a blessed deed that you did this.
@AlonAvramson
@AlonAvramson 2 жыл бұрын
Your way of explaining complex issues in such an easy and simple way is truly amazing. Thank you!
@sandiproy330
@sandiproy330 Жыл бұрын
With a clear example you explained transfer learning so beautifully. LOved to see your tutorial. Thank you so much sir.
@zaidalmahmoud4272
@zaidalmahmoud4272 Жыл бұрын
Wow! What a simple and clear illustration of Transfer Learning. Thank you!
@bhaskargg6018
@bhaskargg6018 2 жыл бұрын
no words to praise, the session is superb , thanks a lot for sharing your knowledge
@GautamKumarBEE
@GautamKumarBEE 3 жыл бұрын
A very humble request, please add atleast 5-6 more videos in this series.
@mums2109
@mums2109 Жыл бұрын
Even though this of two years old it is still very well taught. Thank you!
@mhdkfl
@mhdkfl 3 жыл бұрын
By watching your deep learning whole series i have cleared my bunch of doubts . Your way of putting any topic so simple is really amazing. Hatts off to your teaching methodology. A heartiest request to you to Please upload NLP series (including LSTM and Encoders/Decoders) with a good project. I am eagrely waiting.
@codebasics
@codebasics 3 жыл бұрын
Yes nlp series is in my plans
@zkhan2023
@zkhan2023 2 жыл бұрын
@@codebasics sir, when will you starting that series?
@bagheerathan8975
@bagheerathan8975 Жыл бұрын
here how can we test the model after train the model plz tell me
@bagheerathan8975
@bagheerathan8975 Жыл бұрын
@@codebasics here how can we test the model after train the model plz tell me
@homeOfTrivia
@homeOfTrivia Жыл бұрын
Excellent course. This is my "Go To" resource for Machine Learning and Deep Learning. Please think of creating a series of projects that can make one grow their skills. Keep the price affordable.
@work-dw2hl
@work-dw2hl 3 жыл бұрын
Your teaching style is outstanding
@anoshpa-6531
@anoshpa-6531 3 жыл бұрын
I don`t have words to thank you for this deep learning series, you have explained every single topic in simple language. Thanks a ton :) :) Keep Uploading such series :)
@codebasics
@codebasics 3 жыл бұрын
👍☺️
@bagheerathan8975
@bagheerathan8975 Жыл бұрын
here how can we test the model after train the model plz tell me
@prajjowldahal8959
@prajjowldahal8959 Ай бұрын
@@codebasics sir in github code are not there it shows error it is moved from github????
@shreyasb.s3819
@shreyasb.s3819 3 жыл бұрын
Omg..u have cleared my lot of doubts here...superbbb explained...thank you much sir. Please contribute more towards RNN also like this.
@codebasics
@codebasics 3 жыл бұрын
Sure I will
@sumit121285
@sumit121285 2 жыл бұрын
really helpful....you are the best teacher for deep learning....also for machine learning.....thankyou so much...... i m a big fan of yours.....
@codebasics
@codebasics 2 жыл бұрын
😊🙏
@izharkhankhattak
@izharkhankhattak 3 жыл бұрын
Really great lecture. Keep helping the people like that. Thank you so much.
@codebasics
@codebasics 3 жыл бұрын
My pleasure
@bagheerathan8975
@bagheerathan8975 Жыл бұрын
@@codebasics here how can we test the model after train the model plz tell me
@pratyushsinha5201
@pratyushsinha5201 2 жыл бұрын
Thank you so much sir. This was extremely helpful!
@codebasics
@codebasics 2 жыл бұрын
Glad it helped!
@arcanepersona1676
@arcanepersona1676 2 жыл бұрын
Thanks a lot , I appreciate your way of explaining deep learning 😊 I would like to ask about image classification using transfer learning .. if I have a dataset of images with the size 100x100 .. and the image size in the pre trained model is 300x300 .. a bigger size .. how do I make my smaller sized original images fit in that pre trained model ?
@inhibited44
@inhibited44 6 ай бұрын
That example with the flower identified as an umbrella got me thinking. I applied your model to my data. I have pictures of an object with rust and blemishes on them. The model identified a few pictures as a snake of some sort or a hyena. If I do a case study of a bunch of pictures in my data and feed them to the model, I should be able to program into it the actual appropriate identity once the model has ascertained it's a snake, hyena or whatever.
@harshalbhoir8986
@harshalbhoir8986 Жыл бұрын
This is something new I learned!!!
@akshayvasav2497
@akshayvasav2497 Жыл бұрын
@codebasics this is greatest video of transfer learning i have ever seen, usually people load dataset from tensorflow directly instead of local disk. You load it from local disk which is great thing. I just have one question what you appended in "y" , class name or class Id ?
@srishtikumari6664
@srishtikumari6664 3 жыл бұрын
Wonderful explanation!!
@bensalah90
@bensalah90 2 жыл бұрын
nice video keep going ;so what would you suggest as model from TL HUB to train signal or spectogram
@tomdapchai
@tomdapchai 9 ай бұрын
thanks, very easy to follow
@ansariarbaz3374
@ansariarbaz3374 3 жыл бұрын
nice video sir just wanna add u must use softmax activation function in last layer directly.... please
@tewodrosgebre204
@tewodrosgebre204 2 жыл бұрын
Thank you. Helpful.
@nguyennhi8524
@nguyennhi8524 11 ай бұрын
Thank you so much!!! 👏
@HotshotArafath
@HotshotArafath 2 жыл бұрын
Sir can we use this method for the leaf disease project also as a extension?
@nineteen5899
@nineteen5899 3 жыл бұрын
Thanks mate... it helped.. Love from London..
@codebasics
@codebasics 3 жыл бұрын
Glad it helped
@sagarmahobia5159
@sagarmahobia5159 2 жыл бұрын
Wouldn't it affect the ability to recognize images other than these flowers because now the last layer has been trained with a smaller dataset? Like recognizing a chair or. bike
@dileeppanigrahi4453
@dileeppanigrahi4453 3 жыл бұрын
Hi sir, How can i remove the last layer , without using feature_vector model. what i mean is how to remove the last layer from the classification model(mobilenet_v2) and freeze the trained layers .
@fvviz409
@fvviz409 3 жыл бұрын
Hey can you teach us how to do real time neural network prediction using open-cv? It is very useful in computer vision
@ucm269
@ucm269 Жыл бұрын
In the last layer of the trained model, though softmax layer is being used , how we are getting some of our prediction values to be greater than 1??
@tirthadatta7368
@tirthadatta7368 2 жыл бұрын
Sir, the tutorial is well made. But can u please tell us how to add batch size and other preprocessing steps in this code??
@pvtgcn8752
@pvtgcn8752 Жыл бұрын
Very Lucid Explanation
@saltanatkhalyk3397
@saltanatkhalyk3397 2 жыл бұрын
Thank you very much.
@codebasics
@codebasics 2 жыл бұрын
Glad it was helpful!
@suhaalam2127
@suhaalam2127 2 жыл бұрын
Do you have any tutorial where u have shown any regression problem solving using deep learning?
@sanooosai
@sanooosai 5 ай бұрын
thank you sir
@adityahpatel
@adityahpatel 2 жыл бұрын
Hello, why are there so many MobileNet model variants on Tensorflow hub? Like mobilenet_v2_50_192, mobilenetv2_035_96, mobilenetv3_large_100_224 and so many other variants? What is the different between these?
@navneetkumar5517
@navneetkumar5517 2 ай бұрын
thank you so much bhaiya
@aninditasaha0307
@aninditasaha0307 3 жыл бұрын
Sir... Can you please show CNN in UCIHAR dataset... Will be really helpful
@andrewzolensky9807
@andrewzolensky9807 Жыл бұрын
Hi, great tutorial! Quick question, when training the single dense layer around minute 24:00, why is there no activation function (e.g. softmax) applied to the final, trainable dense layer?
@andrewzolensky9807
@andrewzolensky9807 Жыл бұрын
Edit: minute 23:30
@gauravtripathi562
@gauravtripathi562 Жыл бұрын
It's taking by default value for that and its relu i think or you can check....but keeping it empty means it's taking default value for that
@yassmingourya9975
@yassmingourya9975 2 жыл бұрын
Hey, I really liked your videos you are explaining everything in a quiet simple way, but can we use transfer learning on non_image data set? , like I have a dataset composed of srtings I transformed it to arrays and I want to make predictions using arrays, does transfer learning help in this case? Thanks a lot
@codebasics
@codebasics 2 жыл бұрын
yes transfer learning is not restricted to only images. you can use it for other problems too
@yassmingourya9975
@yassmingourya9975 2 жыл бұрын
@@codebasics ah great, thanks for your reply. please can you help with some documentations or instructions on how to do i'll be so grateful
@sanarabhi4906
@sanarabhi4906 Жыл бұрын
@@yassmingourya9975 please did you found documentations for using transfer learning on non_image data set , i need to do it but can't find anything useful. thank you
@Raj-sz9pg
@Raj-sz9pg 2 жыл бұрын
from where did you downloaded those classes list ?
@Janamejaya.Channegowda
@Janamejaya.Channegowda 3 жыл бұрын
Thank you, can transfer learning be done for time series data?.
@chymoney1
@chymoney1 3 жыл бұрын
Yes, but I’d imagine it does not have advantages over LSTM or transformer
@siddharthkshirsagar2545
@siddharthkshirsagar2545 2 жыл бұрын
amazing🙃
@kollurisharada5102
@kollurisharada5102 2 жыл бұрын
VERY GOOD EXPLANATION
@codebasics
@codebasics 2 жыл бұрын
Thanks for liking
@advertisemedia1509
@advertisemedia1509 10 ай бұрын
can you show how prediction is done after transfer learning is done .... i mean after retraining the model with flower images plz show how to check results... thanks a lot... i tried but couldn't do ....thanks a lot
@zaindurani8168
@zaindurani8168 3 жыл бұрын
Thanks a lot sir
@codebasics
@codebasics 3 жыл бұрын
👍😊
@rahulrangu6506
@rahulrangu6506 Жыл бұрын
hi sir can we get the ppt also in deep learning tutorials and Machine Learning tutorials that you have used to explain the concepts
@juangutierrez3309
@juangutierrez3309 2 жыл бұрын
YOU ARE A LEGEND! Thanks for helping me understand how transfer learning worksQ Just had one question... I understood everything but this piece of code: model.compile( optimizer="adam", loss=tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True), metrics=['acc']) Where did you get this? Do I use this with any model I use for transfer learning?
@codebasics
@codebasics 2 жыл бұрын
This has nothing to do with transfer learning. Whenever you train a model in deep learning you need to use this line
@bagheerathan8975
@bagheerathan8975 Жыл бұрын
here how can we test the model after train the model plz tell me
@bagheerathan8975
@bagheerathan8975 Жыл бұрын
@@codebasics here how can we test the model after train the model plz tell me
@naa12333
@naa12333 11 ай бұрын
thank you sir for the wonderful tutorials... I am following all the steps in this video as well in previous episode (26), I get an error when I train the model, since I am new I could not figure out how to fix this error. error: ValueError: Data cardinality is ambiguous: x sizes: 2752 y sizes: 918 Make sure all arrays contain the same number of samples.
@sabarimahesh
@sabarimahesh Жыл бұрын
Is it possible to do transfer learning for ANN ? Any reference available ? I could see more examples for CNN. Is there any reason behind.
@UsmanKhan-hu8hw
@UsmanKhan-hu8hw Жыл бұрын
can we apply the same way for transforming of text sentiment model?
@jrajpal5
@jrajpal5 Жыл бұрын
Hi sir, i watch your videos every day But with the same dataset, i am getting losses of 1.6 and accuracy close to 0.21 with transfer learning as well as with cnn So please tell how can i improve them
@SachinGupta-dn7wt
@SachinGupta-dn7wt 3 жыл бұрын
You predicted using a classifier that was pre-trained(in which you got inaccurate results), but I wanted to see how we can give one input image and check the output by using the new classifier.
@harshitrathi3077
@harshitrathi3077 3 жыл бұрын
sir is the python project of Grocery Application Completed ?
@reinishasarojini6908
@reinishasarojini6908 10 ай бұрын
I need more videos on transfer learning sir
@abduladhilpk8223
@abduladhilpk8223 3 жыл бұрын
why yolo algorithm takes hours to train to perform object detection using transfer learning
@nastaran1010
@nastaran1010 4 ай бұрын
the model perfomance with useing 'feature vector' is increased. but when i tried to predict ([X[0],X[1], X[2]]), it perfomes so bad. why?
@dilipkumar2k6
@dilipkumar2k6 2 жыл бұрын
You need a standing ovation :-)
@RanjitSingh-rq1qx
@RanjitSingh-rq1qx Жыл бұрын
Sir please make more videos on transferring learning.i think this is not sufficient to use transferring learning in more easy way 🙏
@balajim2107
@balajim2107 2 жыл бұрын
It shows flowers as umbrella and so on..Then using mobilenet is good?or bad?
@Frostbyte-Game-Studio
@Frostbyte-Game-Studio Жыл бұрын
holy fuck that might save me a lot of fucking trouble thank you so much for this video and for this code
@rahaf1418128
@rahaf1418128 2 жыл бұрын
is this could consider as convolutional neural network?
@chealsytchasso3871
@chealsytchasso3871 Жыл бұрын
HI is it possible tu convert an image of 3D dimensions in to an image of 4D dimensions?
@HIMANSHU-lm5tg
@HIMANSHU-lm5tg 11 ай бұрын
sir, u have taught so much of free that i have not learnt in any of the paid courses. i am trying to use ML and AI in financial instruments for trading and investing. but due to non familiarity with ML and AI world I m not able to figure out from where to start and what is relevant for me. plz guide me.
@saarakauser7008
@saarakauser7008 2 жыл бұрын
very informative sir. can you explain how to combine 2 or more pretrained models..
@aintthatharsh
@aintthatharsh Жыл бұрын
How and why would someone do that?
@yashu1089
@yashu1089 2 жыл бұрын
which classifier are you using
@saltanatkhalyk3397
@saltanatkhalyk3397 2 жыл бұрын
your code works ^_^
@nastaran1010
@nastaran1010 4 ай бұрын
what is the version od tensorflow, hub?
@praneedhaweerakoon8570
@praneedhaweerakoon8570 3 жыл бұрын
What are the methods available to improve the accuracy of custom models??except trial and error.
@zaindurani8168
@zaindurani8168 3 жыл бұрын
Keras tuner try it
@user-ez2lb5um4x
@user-ez2lb5um4x 4 ай бұрын
sir, how to search TensorFlow hub training models give me the same as you have used.
@drotta45
@drotta45 2 жыл бұрын
why we didn't use an activation function in last dense layer ?
@kunalll24
@kunalll24 2 ай бұрын
Having error while using the pretrained model, error : ValueError: Only instances of `keras.Layer` can be added to a Sequential model. Received: (of type ) please help.
@rasanjalirathnayake8873
@rasanjalirathnayake8873 Жыл бұрын
when we use pupil detection, i mean wha t I need is to localize the pupil center, are we using classification? just like left eye and right eye ? or something else? please reply.
@codebasics
@codebasics Жыл бұрын
Are you doing object detection? Have you tried yolo etc?
@gokkulkumarvd9125
@gokkulkumarvd9125 3 жыл бұрын
sir, how many more videos will be there?
@charantejchetty149
@charantejchetty149 3 жыл бұрын
Hey , how can I download Mobile net V2 dataset?
@321-youvrajsinghgaur3
@321-youvrajsinghgaur3 10 ай бұрын
Please Tell How can we save this model after transfer learning !
@Maryashahere
@Maryashahere Жыл бұрын
Sir how can we apply transfer learning for numerical data?
@Makingrobloxvids
@Makingrobloxvids 2 жыл бұрын
hello how can I use Transfer learning on 1 dimension data
@Raj-sz9pg
@Raj-sz9pg 2 жыл бұрын
how to know if its working? in the end after we run 5 epoch
@riadelectro1
@riadelectro1 Жыл бұрын
Please teacher; could you give me a master topic proposal about clustering images?
@krutikagouda2696
@krutikagouda2696 Жыл бұрын
Can you please suggest trained model for ai based picture translation project
@quattrandang4312
@quattrandang4312 10 ай бұрын
Hello guy ! I need help . Specifically, I followed your code but when I bring that model to deploy in my project, using load_model does not work. Ok i understand it doesn't save the complete model but i want it to save only the part i changed (output layer) so when i use it i need to have it (custom_objects={'KerasLayer':hub.KerasLayer }) . But the problem here is that when I use the above command, my model will not work after a period of time (according to my understanding, when I load the model in the above way, it will download a temporary folder containing the information. the model number and structure ( which contains some .pb and pbtxt files ) - this folder will be partially deleted by something after about a week , so it causes an unusable error , If you want to use it again, you need to delete the folder and let it download the new one). I don't want my program to crash every once in a while. Do you have any way ? In addition, I have found a way to fix it, but it is not a good way. I use :" from tensorflow.keras.applications import " to load sample models and add classes directly to this model. It works like a self-built model so you don't have to reload the keras layer every time you use it (which caused my error). However, this way it is quite resource-intensive. Do you have a better alternative? Thanks for reading . Looking forward to hearing from you soon.
@dr.md.atiqurrahman2748
@dr.md.atiqurrahman2748 3 жыл бұрын
Wow!!!!!!! If I had an option, I would subscribed (1000000000000000000000000000....................I don't know how many zeros I would add) times.
@codebasics
@codebasics 3 жыл бұрын
Thanks for your kind words of appreciation Atiqur.
@snehashrivastav5544
@snehashrivastav5544 2 жыл бұрын
Can you please add the fish dataset link
@vaishnavip2327
@vaishnavip2327 2 жыл бұрын
Can I get the documentation you refered for mobile v2 net architecture ? I have used the code , so it would be helpful to get explanation of the architecture
@HotshotArafath
@HotshotArafath 2 жыл бұрын
Did you got?
@vaishnavip2327
@vaishnavip2327 2 жыл бұрын
@@HotshotArafath nope
@studentmitra5372
@studentmitra5372 3 ай бұрын
Can you please analyse HAM10000 dataset. Because this dataset is highly imbalanced and it also contain meta data in csv file. So I am bit confused.
@studentmitra5372
@studentmitra5372 3 ай бұрын
it's humble request
@baburamchaudhary159
@baburamchaudhary159 Жыл бұрын
since, we have 1000 classes, why do we get (1, 1001), when executing result.shape
@arpitjain6451
@arpitjain6451 2 жыл бұрын
model.fit(X_train_scaled, y_train, epochs=5) ValueError: Failed to convert a NumPy array to a Tensor (Unsupported object type list). error occur at this line
@anshXR
@anshXR 2 жыл бұрын
model.fit only accept numpy arrays. So try running this :- X_train_scaled = np.array(X_train_scaled) y_train = np.array(y_train)
@user-tr2sm3sw4b
@user-tr2sm3sw4b Жыл бұрын
how to increase running speed of epoch in jupyter notebook for flower dataset classification
@hafizhtrinelzy145
@hafizhtrinelzy145 7 ай бұрын
buy gpu instead
@amudalagopikrishna5745
@amudalagopikrishna5745 10 ай бұрын
what is that third value in the input shape
@huskymotivations
@huskymotivations 9 ай бұрын
it mean the images are color images, like (RGB), and if we have black and white images we use 1 instead of 3. I'm also a beginner but i guess most probably that's the reason
@nareshagarwal8243
@nareshagarwal8243 3 жыл бұрын
can you please also add a video on NLP?
@codebasics
@codebasics 3 жыл бұрын
Yes the RNN tutorials are coming up from tomorrow. First one will be uploaded tomorrow (Tuesday) 7 pm IST
@Abhishek-jd9qk
@Abhishek-jd9qk 2 жыл бұрын
What was the need of adding 1 and 3 to the dimensions ?
@lakshsinghania
@lakshsinghania 6 күн бұрын
same doubt, maybe the index/number
@tickokok1410
@tickokok1410 2 жыл бұрын
while i am running classifier.preduction it's showing your kernal is dead
@tickokok1410
@tickokok1410 2 жыл бұрын
please let me know the solution
@uswakhan3050
@uswakhan3050 19 күн бұрын
can anyone help me in resolving this error .... ValueError: Only instances of `keras.Layer` can be added to a Sequential model. Received: (of type )
@parimalkothari7607
@parimalkothari7607 11 күн бұрын
Got the solution?
@wildkaziranga
@wildkaziranga 3 жыл бұрын
Sir, Please help me, how to make auto segregation wild animal photographs of python coding . I m from Kaziranga National Park.
@highspeedhiasl
@highspeedhiasl 2 жыл бұрын
can you please make me 34b with spicy?
@chathuranj2825
@chathuranj2825 3 жыл бұрын
I am working on a skin disease detection problem, I would like to know if you give me suggestions on how to increase the accuracy. Its because I have been trying to increase the accuracy yet it is stuck at 60%
@chathuranj2825
@chathuranj2825 3 жыл бұрын
Also can you please suggest any good dataset for skin disease detection. It shouldn't be the usually cancer dataset, rather a set of maybe 8-9 diseases prominent in India
@dr.md.atiqurrahman2748
@dr.md.atiqurrahman2748 3 жыл бұрын
I can not believe that this video tutorial series can get dislike. Watch the videos well, I am 100% sure you will covert your thinking from dislike to like.
She ruined my dominos! 😭 Cool train tool helps me #gadget
00:40
Go Gizmo!
Рет қаралды 53 МЛН
MEU IRMÃO FICOU FAMOSO
00:52
Matheus Kriwat
Рет қаралды 14 МЛН
Khóa ly biệt
01:00
Đào Nguyễn Ánh - Hữu Hưng
Рет қаралды 19 МЛН
What is Transfer Learning? | With code in Keras
10:52
AssemblyAI
Рет қаралды 23 М.
Image Classification using CNN Keras | Full implementation
17:56
Coding Lane
Рет қаралды 160 М.
She ruined my dominos! 😭 Cool train tool helps me #gadget
00:40
Go Gizmo!
Рет қаралды 53 МЛН