"bunch of images of little demons" vs "bunch of images of adorable animals" :>
@Oregonian19894 жыл бұрын
hahaha was laughing so hard
@SamuelOgazi8 ай бұрын
I was actually going to thank him for saying that.....looool
@snakesandarrows5 жыл бұрын
I assume it's called "eye" as a play on "identity matrix"
@Freeball995 жыл бұрын
correct: eye = I
@scottmiller25915 жыл бұрын
It's literally called "eye" in MATLAB
@datasciencetips7065 жыл бұрын
The identity matrix is often denoted "I" in math notation, but only the letter can't be used as people can confuse it for the imaginary unit... Since "I" and "eye" are homophones, and "eye" is easier to type than "identity", most programming languages define the identity operation as "eye".
@Razorhunter94 жыл бұрын
It is... that matrix is an ID matrix
@damianshaw84565 жыл бұрын
I don't like "sometimes this throws an exception so just catch it and move on" scenarios so I dug a little deeper! While the resize is throwing the exception it's actually because the imread is returning None. The first example is 10125.jpg in the cat directory. If you open that file in a text editor you'll see it begins with "GIF" so the problem is probably even though all files end with ".jpg" some of them are different image format. Fortunately imghdr is in the standard library, you can filter out the files which aren't easy to read by imread. You can easily work with png, bmp, and jpeg,. As for gif you can keep but you have to do extra work on it by capturing the first frame of the gif and convert to gray-scale after reading. Some files returned None for imghdr like 10404.jpg in cats, it appears to be a RAW file as near the beginning of the file it has "KONICA.MINOLTA.DIGITAL.CAMERA.8BIM", these I skipped.
@Demodude1234 жыл бұрын
Also worth noting there's Thumbs.db in each directory. It would be better to import glob and return a list of all files with an image extension.
@hackercop3 жыл бұрын
Thats good to know
@tommarsh21403 жыл бұрын
For the question at 23:34 .As far as i understand, np.eye() comes from a matlab function. Since matlab deals with a lot of matrices an I() function was probably already used for something. eye() refers to an identity matrix which only has ones along the diagonal.
@harkishansinghbaniya27845 жыл бұрын
I would like to request a video on practically handling imbalanced datasets. It is not always practical to throw away data with imbalanced class. For e.g. if we are to predict fraudulent transactions with credit card datasets, it's highly likely to have a huge imbalance in dataset like 5% fraudulent transaction and the rest 95% are not. In that case, if we remove 90% of the data to balance it out than first of all we will lose a huge amount of data and then it will also unbalance the distribution of the dataset because there is only a rare chance for fraudulent transactions so, we will get a lot of false positives with the data removal method. By the really love your tutorials. ❤️
@nitroyetevn4 жыл бұрын
I've never known how to resolve this (I'm somewhat of a beginner)... for example, as he said in a previous video, reweighting the classes in the loss function has usually made things worse for me. The only thing I've seen work is creating new examples of the minority class, but depending on the problem this can be hard/impossible...
@rlew124 жыл бұрын
@@nitroyetevn I know this post is old but wanted to reply incase anyone else is watching this video later like me.... I'd recommend anyone with this issue look into the imblearn library to help deal with these class imbalances. It's a pretty good one stop shop. I've had issues with this too and there's different types of over-sampling you can use to create more values from the minority class. Depending on the type of data you might want to use a method which essentially creates duplicate points instead of inferring new ones, but there's a few different ways to handle it. Under-sampling usually doesn't seem to give a meaningful improvement but can be worth trying. I also haven't had good luck with class weights.
if you get this error during the make_training_data function: ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 2 dimensions. The detected shape was (25000, 2) + inhomogeneous part. Change this line: np.save("training_data.npy", self.training_data) to this: with open("training_data.pkl", "wb") as f: pickle.dump(self.training_data, f)
@propjoe82969 ай бұрын
Thank you!
@SaiLee-d1j4 ай бұрын
Thank you!
@MaliBalaviАй бұрын
Life saver, but dont forget to import pickle
@arindam963 жыл бұрын
Just finished all the 8 videos in this playlist. Loved it. Hope you make more of these pytorch videos.
@faithneemabenson83754 жыл бұрын
I am a beginner in learning neural networks, I had soo many difficulties in understanding how they work, and even the implementation, but since I found this link I am at peace now and I just see things flow, thank you for your great work.
@grzegorzkozinski23083 жыл бұрын
"Neural networks are not as easy as online tutorials make them seem" - 1100 % true
@bencegay4 жыл бұрын
the "be my subscriber" doorbell is very good you got me man
@joppie1005 жыл бұрын
Great series, loving it so far! Nevertheless, I would also love to see an example not involving computer vision.
@martinmartin63004 жыл бұрын
Great that you added the discussion whether or not to go for greyscale! I often find that people do not really think about what are the features which actually enable the network to do the job but rather throw everything into the network which will work too but it adds unnecessary complexity.
@dr.mikeybee3 жыл бұрын
First you say you aren't good with visuals. Then you show that amazing drawing of a cat. You're just too modest. ;)
@OriAlon1005 жыл бұрын
on the subject of color: what it gives you in this example is a more measurable differences between the subject and the background. so not helping you differentiate between cat or dog directly, but giving the first few layers richer data to comprehend features from therefore, in theory, indirectly helping the net's potential for accuracy but weather it would be better to spend the extra processing power on color or more resolution here is debatable.
@stevenodonnell15145 жыл бұрын
For those on a conda environment, use "conda install -c menpo opencv" worked on python 3.7
@danieljambor14375 жыл бұрын
love ya man
@codejunky98314 жыл бұрын
In conda, write: pip install opencv-contrib-python worked for me. pypi.org/project/opencv-python/
@p.s_kev.in965 жыл бұрын
Was waiting for part 5....you are epic!!!...can't deny that😎
@noamills11302 жыл бұрын
I get the following warning: "VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray." This is because we are putting the image contents and the one-hot encoded label together in a list (they're obviously different dimensions so this creates a ragged list) and save the list of all of these to a .npy file. When I tried using dtype=object in the append() function, the warning went away, but the data didn't load properly. Any ideas?
@mohamedaakhil Жыл бұрын
gives me this error when I do np.save() Error: ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 2 dimensions. The detected shape was (4046, 2) + inhomogeneous part. Anyone else encountered this and have a possible solution?
@jewelcleared6833 Жыл бұрын
downgrade numpy. for some reason that worked. pip install numpy==1.21.6
@jeffreydecoste Жыл бұрын
Downgrading numpy didn't resolve this for me. import pickle # no need to pip install, it is in the standard library Replace: np.save("training_data.npy", self.training_data) with: with open("training_data.pkl", "wb") as f: pickle.dump(self.training_data, f) Then you can load the .pkl file instead of the .npy training_data = np.load("training_data.pkl", allow_pickle=True)
@nikosterizakis Жыл бұрын
@@jeffreydecoste Thank you sir, saved me a ton of angst!
@akintilotimileyin6202 Жыл бұрын
@@jeffreydecoste Thanks a bunch. This worked.
@ShahafGev Жыл бұрын
thank you so much@@jeffreydecoste
@m.derakhshan64645 жыл бұрын
oh my God! I was looking forward to releasing this
@germanjesus11174 жыл бұрын
Sentdex: I don't think I'm the greatest at visuals Me: Yeah I know but cant be that bad Sentdex: So let's say we got an image of a cat *hardest laugh in weeks* no front lol... love your videos..and they are really helpful...thanks
@sentdex4 жыл бұрын
Heheh
@girish79145 жыл бұрын
your way of teaching is very nice and completely understandable !!! thank you
@VimalasKitchen5 жыл бұрын
That was a smooth transition to talk about join and subscribe buttons.
@neeravjain8055 жыл бұрын
Love the way you explain the concepts 👍
@leonardfricke45795 жыл бұрын
The eye function is called "eye" because the diagonal can be offset. There is another function "identity" which does the exact same thing but doesn't have an offset option
@timockenga2 жыл бұрын
The identity matrix is often denoted by In, or simply by I. Therefore, they called the function .eye()
@souravdey12273 жыл бұрын
It is called an eye because it is homonymous to "I" and makes things easier to read instead of just "I", which is what is used to denote an identity matrix in matrix maths. The one hot encoding basically creates an identity matrix.
@gonzaloriosley25 жыл бұрын
Nice series of videos. I believe it follows the Udacity notebooks for PyTorch, but your explanations and comments make it much easier to understand
@seanfeely79909 ай бұрын
Hey, so I hit an error with the np.save part of the video, I got an Value error: setting an array element with a sequence. Inhomogeneous shape after 2 dimensions. I fixed this by using: b = np.array(self.training_data, dtype = object) np.save("training_data", b, allow_pickle = True) Hope this helps anyone!
@yunsikohm59309 ай бұрын
Was looking for this!
@benjaminbianchi18045 жыл бұрын
I hate when i press the insert :@ . Great video !!!! PD: I would like to see an advanced data preprocessing tutorial
@snackbob1005 жыл бұрын
"this isnt really a dog, its basically a cat"
@peterkanini867 Жыл бұрын
24:26 In Linear Algebra there is a Matrix referred to as an Identity Matrix represented by the letter I. The Matrix is made up of zeros and then ones in the diagonal. The word eye and the letter I should have the same pronunciation so when you create a np eye matrix, you are creating an identity Matrix represented by the letter I. Hope that explains it clearly enough.
@usamanadeem79744 жыл бұрын
"attempt" at being a dog. Man I cracked up at that xD
@dalmatoth-lakits71712 жыл бұрын
I really like your videos. My favourite part was the difference between cats and dogs, haha love it! Also a dog person, of course.
@yasmineguemouria90995 жыл бұрын
I love watching your videos because you're so entertaining and not boring like some other tutorial makers might be. "that's already a terrible photo" "well that's jsut a sad-looking dog". you kill me!! Also plz see if you can make a deep learning tutorial using YOLO :) otherwise thank you for the amazing content.
@peterhpchen Жыл бұрын
I have problem in np.save() It has the dimension mis-match error.
@bhaskarsyamal5 жыл бұрын
Here np.eye(n) stands for identity matrix, the matrix with 1s in diagonal. And in mathematics it is denoted with the character, "I". That's why they're calling it "eye" maybe.
@prathammehta32753 жыл бұрын
This is an incredible series and you are an amazing teacher! My question is more related to OOP: Why haven't you included an __init__ function in the class? Similarly, why have the variables been introduced without self.variable=variable, but have been referenced as self.variable throughout? Thanks :)
@noamills11302 жыл бұрын
All instances of a CatsVsDogs class would have all the same values. There are no class variables that would have different values from one instance to the next. We don't need to initialize an instance with the __init__ function because there are no specific values we need to set in order to create an instance of this class.
@asdf-ef8if5 жыл бұрын
"Why are we allowing pickle to be false?" -sentdex
@yasmineguemouria90995 жыл бұрын
ikr he killed me at that point hahaha
@cheezzinator3 жыл бұрын
I believe allow_pickle is set to false by default for security reasons, as allowing pickle lets numpy run *any* binary file.
@CruceibleProductions4 жыл бұрын
Thank you some much! you helped me understand a coding assignment for school!
@thequestion39532 жыл бұрын
It's called eye because of the identity matrix. The symbol of which is a big "I", so eye is just a easy way to reference it without using the actual letter i.
@uddhavdave9085 жыл бұрын
Umm you're my knowledge dealer now, cant learn without your stuff. so please be regular XP love ur vids
@rajcivils5 жыл бұрын
I think it is called eye because of the colour of the eye white and the middle round thingy black. Like as if white is on because light is on. black is off because light is off
@tiagocmau5 жыл бұрын
Usually in Mathematics and Physics, the 'I(eye)dentity' matrix is named 'I' (eye)!
@mkliu18825 жыл бұрын
I like your visual! Very contemporary art.
@sentdex4 жыл бұрын
why thank you kind sir!
@jobandeepsingh19295 жыл бұрын
Awesome video, Your are a great programmer. Cheers Mate.
@greatgamedota5 жыл бұрын
Great series so far! Perfect thing to transition from Keras and TensorFlow to Pytorch. I would love to see a video or two explaining how CNNs are better than RNNs. I havnt looked into RNNs yet so I am very interested if I can apply things I already know to new problems! :)
@martinmartin63004 жыл бұрын
Yeah the condensing due to the convolution/filter is more like a side effect. It is worth mentioning that there is another mode where you can assume that all pixels which are beyond the image are zero. This provides the possibility to keep the dimension of your image the same. However, this leads to the issue that the pixels at the edges get less filtered than the pixels in the inner part of your image. This might or might not be a problem. Therefore, most of the time the people stick to the type of convolution that you have shown here. However, if you have rather small images and you still want to have a larger number of convolutional layers, you might not be able to have that much because at some layer you already condensed all images to a single pixel. In order to overcome this, you could use the other mode of convolution (after decreasing pooling size to something like 2x2 already of course).
@junlinlim85245 жыл бұрын
prolly eye-dentity matrix
@ibrahemnasser27442 жыл бұрын
its np.eye() because it makes identity matrix which is refered to as "I" in math
@Cat_Sterling3 жыл бұрын
What is "HL" in "Conv + Pool = HL" at 5:33?
@ensabinha4 жыл бұрын
It is much mor intuitive for anyone to read $ one_hot_vectors = np.array([[1, 0], [0, 1]]) than $ np.eye(2)
@kousthubhrao92782 жыл бұрын
Latest version of numpy produces a VisibleDeprecationWarning error. How to resolve? Thanks
@ishapandey17233 жыл бұрын
I am trying running this code but while loading the saved data from .npy it is throwing error: OSError: Failed to interpret file 'training_data.npy' as a pickle. And if i disallow pickle, its not allowing me to asking to make it allowed. Any fixes??
@dr.mikeybee3 жыл бұрын
I think of pooling as zooming out to get a higher level view. I think it's a helpful metaphor.
@blackberrybbb5 жыл бұрын
Really enjoy watching your tutorials! (it's like addiction...) Next vedio please!!!
@martinmartin63004 жыл бұрын
Yeah numpy load is complaining because by default it does not want to use pickle. The numpy format is really meant to be used for numeric data, only; data which is some numpy data object such as arrays. Generally, you can serialize your objects with numpy, too (it uses pickle to do so) but the latter is generally not recommended (as of pickle documentation) since the binary data format of pickle changes here and there over the course of time, so it's not reliable. The clean way is to introduce some converter functions/methods to convert everything to numpy arrays, first, before saving and loading it. However, you can get away with it when you argue that the saved ".npy" file is not meant to be a long term storage format (e.g. for tracibility) but rather some intermediate step of the training pipe which you can easily rebuild as you have implemented here, too.
@muhannadimad20703 жыл бұрын
"tqdm" derives from the Arabic word taqaddum (تقدّم) which can mean “progress,” and is an abbreviation for “I love you so much” in Spanish (te quiero demasiado).
@sebastianvazquez64744 жыл бұрын
Me new to programming: Wow, what wonders await? Python: A L L O W P I C K L E C A N N O T B E F A L S E
@chinmayakishore62194 жыл бұрын
how do i open the saved training_data.npy file?is it supposed to be opened?what is its prupose?
@myothantthedev11 ай бұрын
I got this error "ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 2 dimensions." at np.save("training_data.npy", self.training_data). Why?
@ScumbridledUn11 ай бұрын
My first guess would be that its due to a different version of numpy.Try this instead: np.save("training_data.npy", np.array(self.training_data, dtype=object))
@haralambiepapastathopoulos78765 жыл бұрын
I strongly recommend the book Deep Learning by Yoshua Bengio, Ian Goodfellow
@jackmaison42094 жыл бұрын
What are your thoughts on this book?
@prajganesh4 жыл бұрын
have a basic question. When Forward and background propagation happens, does it enumerate any number of time back and forth to go to minimize loss or do we need to iterate in a loop? So the training loop is for each image, but then the Forward and Backward goes any number of times to optimize, correct?
@bks84394 жыл бұрын
How do you find if there is an apple in the catvsdog dataset? What your network will predict about apple?
@atharhussain65344 жыл бұрын
Sir, You did not initialize constructor . I m unable to understand how object of class can be called Please help🙏🙏🙏
@remicote75822 жыл бұрын
I would say that np.eye() comes from the fact that "eye" sounds the same as "I" and in linear algebra, "I" is the identity matrix [[1, 0]. [0, 1]].
@Rawr0s5 жыл бұрын
I would LOVE if you did a PyTorch tutorial on GANs.
@paquitagallego61713 жыл бұрын
Thanks greetings from Pereira Col..
@nishatrabbi3 жыл бұрын
If i use colab and mount drive to work, what can i use instead of importing os ?
@MikaelUmaN4 жыл бұрын
np.eye -> Identity Matrix. It's a heritage from matlab. lots of np functions use the same name as in matlab
@eamonglavin25324 жыл бұрын
When talking about the convolutional neural network, you mention that a 3*3 kernel is used to find simple features in the first layer, does this kernel typically become larger upon subsequent layers or is does higher complexity arise from feeding in the procesed, down-sampled image?
@chowadagod5 жыл бұрын
Your videos are amazing... Place do a tensor flow series when you done with pytorch
@neonz27125 жыл бұрын
Yes. This is what I need. What language though? I know this is primarily a Python channel, but I am really interested in incorporating TensorFlow in my pure JavaScript workflow. I think TensorFlow would work amazingly with NodeJS.
@elisabethdoyon1075 жыл бұрын
there's plenty of those...... just look up the channel
@deepaktripathi8925 жыл бұрын
Hi... I have problem where i want to do Root cause analysis in unsupervised fashion. Example : Text : Machinedoes not have space in G drive and Rebooted RCA: Drive Full Do you have any pointer to this?
@openroomxyz4 жыл бұрын
Can you 26:32 duplicate images and not throw them away to achieve balance?
@ahmedabdussalam34764 жыл бұрын
np.eye() is eye because it represents identity matrix which is usually denoted by 'I' so pronounced 'eye'
@artaa82335 жыл бұрын
Why didn't you use Dataset and Dataloader or even ImageFolder? is this a good way for loading the data?
@jeff2005at3 жыл бұрын
What's the reason of using class instead of putting everything in a single def function?
@krishnachauhan28224 жыл бұрын
Can any one plz explain How to deal with audio classification on this model? I dont have csv file only raw audio of different classes. any reference will help
@usamanadeem79744 жыл бұрын
Why can't I join that community? The link does not open apparently
@nathanieluk98184 жыл бұрын
12:00 very smooth
@atakansalih2335 жыл бұрын
what is the best way to code and run the code in windows I tried setting up vscode but it is not working properly. Anyone have an easy and robust suggestion? (I tried dualbooting but bootloader somehow crashes all the time)
@shauryapatel83724 жыл бұрын
click 4 and 5 repeatedly while paused and look at sentdex
@yowza96384 жыл бұрын
Thank you, good sir.
@christofjugel53024 жыл бұрын
Dunno if you still answer question but I just try: Your call operates with 800 it/s. Mine (using colab tho and images from drive) only runs with like 1-2 so it takes forever. Is colab the issue?
@sentdex4 жыл бұрын
Probably collab bc you're sharing resources
@christofjugel53024 жыл бұрын
@@sentdex Thanks for the answer. Tried it locally with anaconda and jupyterlab and it works much faster. Loved the idea of programming in the cloud and having data in my drive tho
@RumikXxeno5 жыл бұрын
Just a quick note - I'm using ubuntu linux and I came across quite unpleasant problem: The images in MS dataset were unreadable by my computer, so I had to delete tens of images to get it running (try and except didn't help)
@Akshaylive3 жыл бұрын
No need to maintain the class counts np.array([d[1] for d in dogsvcats.training_data]).sum(axis=0)
@jrg70495 жыл бұрын
Hey people, I am on an Ubuntu 18.04 and I am following along in an environment I manage with anaconda. Unfortunately the conda command for installing opencv didn't let me import cv2 despite opencv being listed as installed in the packages list. I pip installed opencv-python inside my environment and I can import cv2 in the shell just fine, just not in JupyterLab. I also tried !pip install opencv-python INSIDE JupyterLab, again, no cigar, just says "Requirement already satisfied". Can anyone point me in a direction of a tutorial or better yet just plain tell me how to properly install the thing?
@URBIdaB3AST174 жыл бұрын
I used this link and copied item #2 from the anaconda list of commands into the Anaconda prompt and it seemed to work afterwards. There's also a linux link that you might need to use. cppsecrets.com/users/11429798104105115104101107117115104119971049754494864103109971051084699111109/Python-3-ModuleNotFoundError-No-module-named-cv2.php I also had issues with tqdm after fixing that Module Error. So I used this link afterwards. Again, I used the conda command line into the Anaconda Prompt. pypi.org/project/tqdm/
@waqasaps4 жыл бұрын
using torch ImageFolder class will do all these steps for you!
@evasiveplant75993 жыл бұрын
Did the image number 666 for cats fail to download for anyone else?
@sagesy97744 жыл бұрын
34:20 THAT SHIT'S GETTING SENTIENT
@Rohankumar-dd2ss4 жыл бұрын
are we loading all data at same time in memory
@joshcoder55975 жыл бұрын
Good Stuff. BTW, there are libraries that can turn images in folder to labeled images. Fast AI for example and more...
@sentdex5 жыл бұрын
Sure. But then you eventually need far more complicated preprocessing, and you're lost. Once you know how to do it yourself, should you need to, the sure, check out the higher level premade stuff to save time.
@jayh59925 жыл бұрын
3:30 So that means that the YOLO model is a convnet?
@SatyamKumar-dj3jo4 жыл бұрын
Eye for identity matrix as this function creates an identity matrix which is denoted by letter “I”.
@hazemsaeed63724 жыл бұрын
hi, i searched for pytorch tutorial on youtube and found this course the first one.. good job.. and i hope when i finish this series i'll become pytorch expert xD anyway, i still don't understand what's the use of REBUILD_DATA does.. could you elaborate on that, please? thanks
@acidtears4 жыл бұрын
REBUILD_DATA is a "temporary" boolean. We only use it once for the if conditional that creates the object (dogvcats = DogVSCats()) and calls the function make_training_data(). The whole point is to build the dataset only once because otherwise we'd have to load the images every time we run the python script. By initially setting it to True the if conditional executes normally and the training_data is build. After the first run of the script we set it to False so that we do not repeat the process of loading the data, resizing the images etc. which are very resource intensive processes. In short: changing it to False ensures that we run the make_training_data() method only once.
@jobandeepsingh19295 жыл бұрын
please make more videos on kaggle competitions
@atharvataras2 жыл бұрын
That weird thing happens when you press the INSERT key. Instead of adding a new character, it replaces what you type with whatever is in front of it.
@FlyingPhilUK5 жыл бұрын
What do you think about the new FAA drone regs?? (OT)
@anilsarode61644 жыл бұрын
You did not mention the step size with which you slide the window. I think the number of features we are seeking depends upon how we slide the window? I mean with what step size. In your case, you slide it by 2 If I am not wrong.
@abhisarbharti19205 жыл бұрын
Hi , can you do a video on unsupervised time series aspects for neural network
@nerdygeek74254 жыл бұрын
If anyone facing problem with "module" object is not callable then try to remove tqdm to os.listdir(label)
@atiqchep6524 жыл бұрын
cool. I had this error and was trying a lot to fix the bug and then I have seen your comment! Thanks, buddy! :)
@koushiksahu685 жыл бұрын
Please have a recurrent neural network video as well