TensorFlow Tutorial 2 - Tensor Basics
In this video we go through the most basic and essential tensor operations that really build the foundation to TensorFlow 2.0 and is important to know before moving on to building neural networks which we will start with in the next tutorial! :)
Knowledge in Linear Algebra is very important to have an easier time understanding many tensor operations we go through so I would view as a prerequisite. I think if you don't have that then this series by 3Blue1Brown can be helpful:
• Essence of linear algebra
❤️ Support the channel ❤️
/ @aladdinpersson
Paid Courses I recommend for learning (affiliate links, no extra cost for you):
⭐ Machine Learning Specialization bit.ly/3hjTBBt
⭐ Deep Learning Specialization bit.ly/3YcUkoI
⭐ TensorFlow Specialization bit.ly/3FmEVK1
📘 MLOps Specialization bit.ly/3wibaWy
📘 GAN Specialization bit.ly/3FmnZDl
📘 NLP Specialization bit.ly/3GXoQuP
✨ Free Resources that are great:
NLP: web.stanford.edu/class/cs224n/
CV: cs231n.stanford.edu/
Deployment: fullstackdeeplearning.com/
FastAI: www.fast.ai/
💻 My Deep Learning Setup and Recording Setup:
www.amazon.com/shop/aladdinpe...
GitHub Repository:
github.com/aladdinpersson/Mac...
✅ One-Time Donations:
Paypal: bit.ly/3buoRYH
▶️ You Can Connect with me on:
Twitter - / aladdinpersson
LinkedIn - / aladdin-persson-a95384153
Github - github.com/aladdinpersson
OUTLINE:
0:00 - Introduction
0:48 - Imports
2:21 - Initialization methods for Tensors
8:34 - Casting to different types
9:36 - Mathematical Operations
15:16 - Indexing a Tensor
19:18 - Reshaping a Tensor
20:40 - Ending words
Пікірлер: 101
this guys is the best watch ads to suport him honestly thanks man
@debajyotimajumder472
3 жыл бұрын
Agreed
I was trying to understang somthing else and I came to one of your video and I checked out ur contents. They are awesome. Hope to get much more content from you. Keep Posting
Thank you so much! This saved me so much time. Great tutorial!
Your explanation is awesome. please keep going and create more content. Thanks for your efforts in creating amazing videos.
Great tutorial for beginners. Thank you so much!
Dude, you're so underrated, you're videos are the best!
Can I just say, youuuuuuuuuuuuuuuuuuu AAAAAAAAAAAAARRRRREEEE the best to explain TF till now, thanks man
Sir, than you for such a worthfull and helpful video and also your teaching methodology is out of the world please keep it up
Just what I needed!!! I was trying to learn deep learning by MIT but it required tensorflow and i don't like to read docs. You explained it from scratch which I loved the most. Awesome!!!
@AladdinPersson
3 жыл бұрын
Thank you so much for the kind words 🙏
@thevoid5181
6 ай бұрын
tensorflow has their own videos too but i think this one is much more easier to undertand and informative
Thanks for the quality videos. Really helped me out.
thank u. short and clear intro.
Awesome content. Very easy and nicely explained. Great job....
Thank you for your excellent tutorials...I searched so much for something like this and finally, it's all here!!! sorry to mention but you need to say that " x ** 5 " is NOT elementwise multiplication but rather it is " to the power of 5" for each element. I was confused at first but then I checked it with some random number and it was right.
This was awesome!
It is called delta becuase in differenatial mathematics, delta x/delta y represents differential equation and delta represents 'difference'. So difference= step
Thank you very much! you are explaining so well
great and clear explaination of the tensorflow. thank you
Sir, you are apitome of teaching tensorflow bcz I just saw many of teaching people in KZread u made me best ❤️❤️
Thank You so much for those amazing videos!! Love from India
Thanks man, this just saved me a ton of time
Thanks very clear ....add you ti my fav tutors
thank you so much for this tutorial
12:59 answer: because that is the behavior of reduce function using a sum callback (reduce a vector into a scalar representing the sum of its elements), while sum is like adding two elements or two vectors pointwise.
Great tutorial
really very very good explanation in this video
Love your intro !
the intro is just legendary :D
Nicely explained (y)
please do more such tensorflow tutorials... loved it
@AladdinPersson
3 жыл бұрын
Working on the next one as we speak! :)
@wolfisraging
3 жыл бұрын
@@AladdinPersson :)
Clear explanations
Thank you for this awesome tutorial. I have a problem with GPU limitation lines, they don't work for me. My TensorFlow version is 2.3.0. I`ll appreciate it if anyone tells me how to fix it.
Want to watch all your videos!
What is the settings of pycharm have you used it looks good
Great!
Thanks a lot
delta is denoted for 'change btw present and past values'. your tutorials are very good for us as a beginner :)
@SirenSound__
6 ай бұрын
I thought it was from the dirac-delta function or impulse function
lovely voice and content
Yeah I am 14 and when I wanted to do this I needed to first learn linear algebra. Then I could get back here.
Great video! Please con you help me guess which is your VSCode theme for the video? I notice is veeery nice and relaxing for tutorials. It would help so much,, thank you.
@epicgamer9536
8 ай бұрын
he's using PyCharm
Thank you for explaining to us this tensorflow technology. Can you elaborate a little, in your 'stddev=1, mean=0', when I tried to compute the standard deviation or mean, I cannot get the expected values of 1 or 0. Thanks.
@THEPAGMAN
2 жыл бұрын
probably because you used a small sample? try with a bigger matrix
What color scheme for the fonts are you using? It looks very subtle and pretty.
@AladdinPersson
3 жыл бұрын
Gruvbox :)
@seekwhen1848
3 жыл бұрын
@@AladdinPersson Awesome! Thanks for the reply
what are the pre-requisite of learning machine learning because I only resort to coursera do I need to re-enroll algebra, calculus and statistics I have this back in college but that was 20 years ago but I dont care about these subjects before but now I badly needed it .
owesome! I found it realy useful. How can i make a contact with you? Several questions i have with regards to neural-networks in tensorflow. Indeed, you already have made a nice video on it, but i need to run it with some extra details.
@AladdinPersson
3 жыл бұрын
I mostly respond here on KZread so ask them and I will try my best to answer
Just curious how did make your avatar picture so cool? Did you use some Neural Network logic? Thanks
Cool video. Thank you. For the normal distribution of values, this is better thought as probability I think. It is also called gaussian distribution. The mean is where in the "X axis" the max probability is, and stddev means how wide it is. mean=0, the peak is at 0 stddev=1 means that the probability for a value to be between -1 and 1 is 65%.
@harrypadarri6349
Жыл бұрын
You’re right that it has to do with probability. But it’s not the probability of a point because in case of a continuous distribution like the Gaussian a point has no probability. Think about it this way: What is the probability to sample a point from an infinite set of points(the real numbers)? The mean of a normal distribution is where the density function has its maximum (the peak of the typical bell curve) which is not the probability of the point. You get a probability by integrating over the probability density function. That’s called the cumulative density function. The Gaussian density integrates to 1 and is symmetric at the mean which you can visually see by looking at the bell curve. This means that the cumulative density function equals 1/2 at the mean. In terms of probability it means that the probability to sample a value equal to the mean or smaller is equal to 1/2. Of course you want to sample a point. You can do that by sampling a number from a uniform distribution from zero to one. Then you look up at which point the cumulative density is equal to the value which you drew from the uniform distribution. That point is the value which you sampled from the normal distribution.
@mahneh7121
Жыл бұрын
@@harrypadarri6349 I said between -1 and 1
@harrypadarri6349
Жыл бұрын
@@mahneh7121 woops, then I misunderstood. :)
@harrypadarri6349
Жыл бұрын
Was because of “mean is … where the max probability is”.
@mahneh7121
Жыл бұрын
@@harrypadarri6349 Yes that just meant where the derivative is 0, the right word is probability density maybe.
My operating system is MacBook pro, so I cannot have the Cuda library. Is it a big problem not having a Cuda library for working with TensorFlow.
@AladdinPersson
3 жыл бұрын
No, you can still learn about it just using the cpu
Thanks very much Prince Aladdin, we're waiting for next tutorial of TensorFlow :)
I think it's called delta because delta is often used to represent the change between to datapoints in an equation.
Using a VM because I'm having a hard time installing it in Windows. Are there any CPU specific operations I should run?
what about tensor representation and decomposition. please . thks
at 12:22 , could anyone please explain as to what does axes=1 exactly is representing in tf.tensordot? like in terms of row and columns
@chetankumar9463
2 жыл бұрын
It represent horizontal axis which is a row. Column axis is 0.Here it means to multiplying corresponding row elements with each other.
import tensorflow as tf d=tf.constant([3]) e=tf.constant([5]) print(d+e) Tensor("Add_5:0", shape=(), dtype=int32) it is not showing addition output ?
Where are you learning this things😐, quite an nice tutorial🙇♂️
@AladdinPersson
3 жыл бұрын
Mostly from the TensorFlow official tutorials and inofficial tutorials on Github etc. I feel that most of the guides and tutorials are quite scattered and that's also why I think these videos might be helpful for people learning TensorFlow, or for people who simply learns better from videos than from reading :)
@pankajshinde475
3 жыл бұрын
@@AladdinPersson can you please implement RNN from scratch in python it will be very helpful🙂
Delta mean change /difference between two value.
@8:03 I think the delta comes from mathematics.
Not able to install tensor flow in my system by using command ' pip install tensorflow '. could you please help me to proceed further. error message as "Unable to create process using 'C:\Users\Smriti singh\.conda\envs\tf_cpu\python.exe "C:\Users\Smriti singh\.conda\envs\tf_cpu\Scripts\pip-script.py" install tensorflow'"
Good Job ,But continue On Implementing paper on Pytorch but
Where is code ?? which is used in this Video .
tf.random.uniform, by default it gives values between 0 and 1
as simple some of the examples are, my opinion for this and the later episodes is to have source code available. Most developer learning's have source code; even a .TXT equivalent is good to have; it saves alot of mistypes.
delta means change in Greek
can not thank you enough
Is this Tensflow 1 or Tensflow 2?
@AladdinPersson
3 жыл бұрын
TF 2
@adityakarri1997
3 жыл бұрын
@@AladdinPersson Thank you!
what is shape?
@parthpatwari3174
5 ай бұрын
it states how many rows and columns are in that tensor like a rubiks cube might me 3x3x3, 4x4x4, 3x2x2 and more
Like it, just the presentation frequently interrupted by some kind of hesitations doubts question or pause cutting the flow. Feeling going to some useless points details
@AladdinPersson
3 жыл бұрын
I understand what you mean. I might've cut the video unecessarily much, will try my best to make it more smooth in future videos
why i need to call zeors?
@parthpatwari3174
5 ай бұрын
to create an empty matrix ig
at this time kzread.info/dash/bejne/eoSepLtqeJC7ZLg.htmlsi=1LuF3tB1C35rGOYO&t=791 within the video, what is the difference between doing "axes" vs "axis"? why do they return the same thing if you are calling a different kwarg (keyword arguement?). I accidentally put "axes" under both lines, for me line 41 and 42 respectively, and line 42 failed when I was supposed to put "axis". I fixed it and it worked but I want to understand why.
you sounds like Bucky
I find Tensorflow more like pytorch
You are not telling why you are using this function. please teach us every everything.
eye naming was totally nonsense
I'm trying to follow the turorial, but I get some errors. import os os.environ['TF_CCP_MIN_LOG_Level'] = '2' import tensorflow as tf x = tf.constant(1, 2, 3) y = tf.constant(9, 8, 7) z = tf.tensordot(x, y, axes=1) print(z) gives: C:\Users\andre\anaconda3\envs\tf\python.exe C:/Users/andre/PycharmProjects/our_first_project/main.py 2022-01-15 04:56:26.016768: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX AVX2 To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. 2022-01-15 04:56:26.537769: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1510] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 6007 MB memory: -> device: 0, name: NVIDIA GeForce RTX 2070 with Max-Q Design, pci bus id: 0000:01:00.0, compute capability: 7.5 Traceback (most recent call last): File "C:\Users\andre\PycharmProjects\our_first_project\main.py", line 8, in z = tf.tensordot(x, y, axes=1) File "C:\Users\andre\anaconda3\envs\tf\lib\site-packages\tensorflow\python\util\dispatch.py", line 206, in wrapper return target(*args, **kwargs) File "C:\Users\andre\anaconda3\envs\tf\lib\site-packages\tensorflow\python\ops\math_ops.py", line 5042, in tensordot ab_matmul = matmul(a_reshape, b_reshape) File "C:\Users\andre\anaconda3\envs\tf\lib\site-packages\tensorflow\python\util\dispatch.py", line 206, in wrapper return target(*args, **kwargs) File "C:\Users\andre\anaconda3\envs\tf\lib\site-packages\tensorflow\python\ops\math_ops.py", line 3654, in matmul return gen_math_ops.mat_mul( File "C:\Users\andre\anaconda3\envs\tf\lib\site-packages\tensorflow\python\ops\gen_math_ops.py", line 5695, in mat_mul _ops.raise_from_not_ok_status(e, name) File "C:\Users\andre\anaconda3\envs\tf\lib\site-packages\tensorflow\python\framework\ops.py", line 6941, in raise_from_not_ok_status six.raise_from(core._status_to_exception(e.code, message), None) File "", line 3, in raise_from tensorflow.python.framework.errors_impl.InvalidArgumentError: cannot compute MatMul as input #1(zero-based) was expected to be a double tensor but is a complex64 tensor [Op:MatMul] Process finished with exit code 1
@Ragatokk
2 жыл бұрын
It did not help to add: physical_devices = tf.config.list_physical_devices('GPU') tf.config.experimental.set_memory_growth(physical_devices[0], True)
Great !
@AladdinPersson
3 жыл бұрын
Thank you :)