Flatten, Reshape, and Squeeze Explained - Tensors for Deep Learning with PyTorch

preview_player
Показать описание
💡Enroll to gain access to the full course:

Tensors for neural network programming and deep learning with PyTorch. A deeper look into the tensor reshaping options like flattening, squeezing, and unsqueezing.

🕒🦎 VIDEO SECTIONS 🦎🕒

00:30 Help deeplizard add video timestamps - See example in the description
09:49 Collective Intelligence and the DEEPLIZARD HIVEMIND

💥🦎 DEEPLIZARD COMMUNITY RESOURCES 🦎💥

👋 Hey, we're Chris and Mandy, the creators of deeplizard!

👉 Check out the website for more learning material:

💻 ENROLL TO GET DOWNLOAD ACCESS TO CODE FILES

🧠 Support collective intelligence, join the deeplizard hivemind:

🧠 Use code DEEPLIZARD at checkout to receive 15% off your first Neurohacker order
👉 Use your receipt from Neurohacker to get a discount on deeplizard courses

👀 CHECK OUT OUR VLOG:

❤️🦎 Special thanks to the following polymaths of the deeplizard hivemind:
Tammy
Mano Prime
Ling Li

🚀 Boost collective intelligence by sharing this video on social media!

👀 Follow deeplizard:

🎓 Deep Learning with deeplizard:

🎓 Other Courses:

🛒 Check out products deeplizard recommends on Amazon:

🎵 deeplizard uses music by Kevin MacLeod

❤️ Please use the knowledge gained from deeplizard content for good, not evil.
Рекомендации по теме
Комментарии
Автор

def flatten(t):
return t.reshape(-1)

philtrem
Автор

thanks deeplizard for making pytorch so easy to understand, an excellent series!!!

prakhardixit
Автор

This was very helpful. I came here looking for what the squeeze operation does. Was happy to find answers to some other questions in the back of my mind. (what does the -1 mean in resize operations) I will say though, that sometimes the visuals can be a little distracting. (Mainly the pancake one. I was having a hard time listening to what you were saying.) Other than that, this was very helpful. I might watch more of your videos in the future!

sethatkins
Автор

When you're writing code, it sounds in the background like airplane cabin white sound and it's relaxing. Nice tutorial! I'm a PyTorch Scholar and since the resources in Udacity aren't good enough for me, I'm watching your very helpful tutorials. Thanks.

luis.barragan
Автор

Really love the analogy ! And I'm really enjoying the course so far.

philtrem
Автор

best work u guys are doing, lot of hard work u both did, to get this knowledge, love from India

rohtashbeniwal
Автор

i was waiting for the pancakes to be squished 'flat'...

Aditya-nelk
Автор

Hi there,

i followed your tutorials and they seem great!!

I implemented in the following manner (Squeeze function in reshape)


def flatten_by_reshaping():
rdata = data.reshape(1, -1)
rd = rdata.reshape(rdata.shape[1], )
return rd
print(flatten_by_reshaping(), len(flatten_by_reshaping()))

amaytrivedi
Автор

Great video! I’m halfway thru the playlist!

AIRoboticsCreator
Автор

Great videos. Best content. Nice animations.
The fact that you make your videos like a meme is exceptional and make watching them enjoyable.
Keep up the good work! I am your fan :)

hosseinaboutalebi
Автор

Gratulations on your 100.000 followers here! :)

Murmur
Автор

awesome content and the way you deliver hats off!

SaiKrishna-trdz
Автор

def flatten(t):
t = t.reshape(1, t.size()[0] * t.size()[1])
t = t.squeeze()

return t


I know this is terribly ineffective but it's something different then all the other ones out there. ;)

srikarvalluri
Автор

def flatten(t):
numel = t.numel()
return t.reshape(numel)

Normalizing-polyamory
Автор

6:00 why you are showing food, I am hungry 😅. But it look like delicious :)

thepresistence
Автор

When you have a sentence like this: "The primary ingredient we use to produce our product, a function that maps inputs to correct outputs, is data.", it's better to write it as: "The primary ingredient we use to produce our product – a function that maps inputs to correct outputs – is data." (ie. using dashes instead of commas). Otherwise it's confusing and difficult to make out that it's a 'parenthetical statement'.

philtrem
Автор

I don't know what the low rumbling sound is, but it is ridiculously soothing. Like doing coding on a star trek starship.

narroric
Автор

I haven’t installed PyTorch yet, but assuming that it works the same as a list, would the answer be: reshape(1, -1)[0]?

M
Автор

@deeplizard thank you very much for this video and the full playlist. Can you make a series on NLP with Pytorch ?

thak
Автор

5:45 why you distracting me with food !

heller