From the course: Hands-On Introduction to Transformers for Computer Vision
Unlock this course with a free trial
Join today to access over 24,700 courses taught by industry experts.
Comparing convolutional neural networks (CNNs) to transformers - PyTorch Tutorial
From the course: Hands-On Introduction to Transformers for Computer Vision
Comparing convolutional neural networks (CNNs) to transformers
- [Instructor] Hey, everyone. Welcome to chapter two, video four. We're going to be comparing a CNN to a transformer in some code examples today. This is our first code example. So hopefully, you have everything set up by now. You are comfortably in your code spaces or feel free to run this locally if you want to run it by downloading the Jupyter Notebooks from the GitHub repository. Either or will work great. Just make sure that you have your environment completely set up before getting started. The good thing is that our environment shouldn't change too much one code example to another code example. We will mostly be using Torch, transformers, and FiftyOne as our three main pillars here with a couple other ones such as pillow and other things helping us out throughout. So our whole goal for this code example is very straightforward today. We are just going to load a subset of ImageNet. That's that data set that we were just talking about previously in one of our videos. We're just…