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

  • @mohamadali-io8bp
    @mohamadali-io8bp3 жыл бұрын

    this guys is the best watch ads to suport him honestly thanks man

  • @debajyotimajumder472

    @debajyotimajumder472

    3 жыл бұрын

    Agreed

  • @prayashshrestha249
    @prayashshrestha2493 жыл бұрын

    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

  • @bastianknaus6556
    @bastianknaus65563 жыл бұрын

    Thank you so much! This saved me so much time. Great tutorial!

  • @sunilsharanappa7721
    @sunilsharanappa77213 жыл бұрын

    Your explanation is awesome. please keep going and create more content. Thanks for your efforts in creating amazing videos.

  • @devdew6407
    @devdew64072 жыл бұрын

    Great tutorial for beginners. Thank you so much!

  • @andresyesidmorenovilla7888
    @andresyesidmorenovilla78883 жыл бұрын

    Dude, you're so underrated, you're videos are the best!

  • @cmacompilation4649
    @cmacompilation46493 жыл бұрын

    Can I just say, youuuuuuuuuuuuuuuuuuu AAAAAAAAAAAAARRRRREEEE the best to explain TF till now, thanks man

  • @AltafHussain-gk2xe
    @AltafHussain-gk2xe3 жыл бұрын

    Sir, than you for such a worthfull and helpful video and also your teaching methodology is out of the world please keep it up

  • @SujayAmberkar
    @SujayAmberkar3 жыл бұрын

    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

    @AladdinPersson

    3 жыл бұрын

    Thank you so much for the kind words 🙏

  • @thevoid5181

    @thevoid5181

    6 ай бұрын

    tensorflow has their own videos too but i think this one is much more easier to undertand and informative

  • @jakebennett4558
    @jakebennett45583 жыл бұрын

    Thanks for the quality videos. Really helped me out.

  • @muhammadumarsotvoldiev8768
    @muhammadumarsotvoldiev8768 Жыл бұрын

    thank u. short and clear intro.

  • @parthasarathyk5476
    @parthasarathyk54762 жыл бұрын

    Awesome content. Very easy and nicely explained. Great job....

  • @shamimsasani6765
    @shamimsasani6765 Жыл бұрын

    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.

  • @Asif-Ali92
    @Asif-Ali922 ай бұрын

    This was awesome!

  • @rocksneha059
    @rocksneha0593 жыл бұрын

    It is called delta becuase in differenatial mathematics, delta x/delta y represents differential equation and delta represents 'difference'. So difference= step

  • @jeremynx
    @jeremynx2 жыл бұрын

    Thank you very much! you are explaining so well

  • @purva4752
    @purva4752Ай бұрын

    great and clear explaination of the tensorflow. thank you

  • @hemanthreddykunduru2769
    @hemanthreddykunduru27692 жыл бұрын

    Sir, you are apitome of teaching tensorflow bcz I just saw many of teaching people in KZread u made me best ❤️❤️

  • @vatsal_gamit
    @vatsal_gamit3 жыл бұрын

    Thank You so much for those amazing videos!! Love from India

  • @rahul-qo3fi
    @rahul-qo3fi2 жыл бұрын

    Thanks man, this just saved me a ton of time

  • @samthrimavithana8243
    @samthrimavithana82432 жыл бұрын

    Thanks very clear ....add you ti my fav tutors

  • @xy1293
    @xy12933 жыл бұрын

    thank you so much for this tutorial

  • @youcefsb4708
    @youcefsb47083 жыл бұрын

    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.

  • @DevsLikeUs
    @DevsLikeUs3 жыл бұрын

    Great tutorial

  • @sudhansumtripathy
    @sudhansumtripathy Жыл бұрын

    really very very good explanation in this video

  • @yoyotl80
    @yoyotl803 жыл бұрын

    Love your intro !

  • @chaosmaker781
    @chaosmaker7812 жыл бұрын

    the intro is just legendary :D

  • @KiranSharma-ey6xp
    @KiranSharma-ey6xp2 жыл бұрын

    Nicely explained (y)

  • @wolfisraging
    @wolfisraging3 жыл бұрын

    please do more such tensorflow tutorials... loved it

  • @AladdinPersson

    @AladdinPersson

    3 жыл бұрын

    Working on the next one as we speak! :)

  • @wolfisraging

    @wolfisraging

    3 жыл бұрын

    @@AladdinPersson :)

  • @alisiraj2100
    @alisiraj21003 жыл бұрын

    Clear explanations

  • @golnazra4707
    @golnazra47073 жыл бұрын

    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.

  • @jeremynx
    @jeremynx2 жыл бұрын

    Want to watch all your videos!

  • @karthikb.s.k.4486
    @karthikb.s.k.44863 жыл бұрын

    What is the settings of pycharm have you used it looks good

  • @dijkstra4678
    @dijkstra46782 жыл бұрын

    Great!

  • @adamlasry1691
    @adamlasry16912 жыл бұрын

    Thanks a lot

  • @NaqiARizvi
    @NaqiARizvi6 ай бұрын

    delta is denoted for 'change btw present and past values'. your tutorials are very good for us as a beginner :)

  • @SirenSound__

    @SirenSound__

    6 ай бұрын

    I thought it was from the dirac-delta function or impulse function

  • @nebenmensch5325
    @nebenmensch53253 жыл бұрын

    lovely voice and content

  • @professional.hacker.
    @professional.hacker. Жыл бұрын

    Yeah I am 14 and when I wanted to do this I needed to first learn linear algebra. Then I could get back here.

  • @valentinrack6028
    @valentinrack6028 Жыл бұрын

    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

    @epicgamer9536

    8 ай бұрын

    he's using PyCharm

  • @cardsigner
    @cardsigner3 жыл бұрын

    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

    @THEPAGMAN

    2 жыл бұрын

    probably because you used a small sample? try with a bigger matrix

  • @seekwhen1848
    @seekwhen18483 жыл бұрын

    What color scheme for the fonts are you using? It looks very subtle and pretty.

  • @AladdinPersson

    @AladdinPersson

    3 жыл бұрын

    Gruvbox :)

  • @seekwhen1848

    @seekwhen1848

    3 жыл бұрын

    @@AladdinPersson Awesome! Thanks for the reply

  • @carloanimationTV
    @carloanimationTV Жыл бұрын

    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 .

  • @alireza7520
    @alireza75203 жыл бұрын

    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

    @AladdinPersson

    3 жыл бұрын

    I mostly respond here on KZread so ask them and I will try my best to answer

  • @dbiswas
    @dbiswas2 жыл бұрын

    Just curious how did make your avatar picture so cool? Did you use some Neural Network logic? Thanks

  • @mahneh7121
    @mahneh7121 Жыл бұрын

    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

    @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

    @mahneh7121

    Жыл бұрын

    @@harrypadarri6349 I said between -1 and 1

  • @harrypadarri6349

    @harrypadarri6349

    Жыл бұрын

    @@mahneh7121 woops, then I misunderstood. :)

  • @harrypadarri6349

    @harrypadarri6349

    Жыл бұрын

    Was because of “mean is … where the max probability is”.

  • @mahneh7121

    @mahneh7121

    Жыл бұрын

    @@harrypadarri6349 Yes that just meant where the derivative is 0, the right word is probability density maybe.

  • @bintemamunmaliha6053
    @bintemamunmaliha60533 жыл бұрын

    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

    @AladdinPersson

    3 жыл бұрын

    No, you can still learn about it just using the cpu

  • @AhmedIqbal
    @AhmedIqbal3 жыл бұрын

    Thanks very much Prince Aladdin, we're waiting for next tutorial of TensorFlow :)

  • @notallama1868
    @notallama186810 ай бұрын

    I think it's called delta because delta is often used to represent the change between to datapoints in an equation.

  • @anonnimoose7987
    @anonnimoose798711 ай бұрын

    Using a VM because I'm having a hard time installing it in Windows. Are there any CPU specific operations I should run?

  • @yousfoss4367
    @yousfoss43672 жыл бұрын

    what about tensor representation and decomposition. please . thks

  • @manasviemmadi8072
    @manasviemmadi80722 жыл бұрын

    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

    @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.

  • @utkarshjain210
    @utkarshjain2102 жыл бұрын

    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 ?

  • @pankajshinde475
    @pankajshinde4753 жыл бұрын

    Where are you learning this things😐, quite an nice tutorial🙇‍♂️

  • @AladdinPersson

    @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

    @pankajshinde475

    3 жыл бұрын

    @@AladdinPersson can you please implement RNN from scratch in python it will be very helpful🙂

  • @sohaibshah1771
    @sohaibshah17718 ай бұрын

    Delta mean change /difference between two value.

  • @thatchessguy7072
    @thatchessguy70723 жыл бұрын

    @8:03 I think the delta comes from mathematics.

  • @user-un8gj1je5m
    @user-un8gj1je5m8 ай бұрын

    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'"

  • @haideralishuvo4781
    @haideralishuvo47813 жыл бұрын

    Good Job ,But continue On Implementing paper on Pytorch but

  • @ikhlakh3864
    @ikhlakh38642 жыл бұрын

    Where is code ?? which is used in this Video .

  • @abdelhaksaouli8802
    @abdelhaksaouli88023 жыл бұрын

    tf.random.uniform, by default it gives values between 0 and 1

  • @michaelmurphy7031
    @michaelmurphy70313 жыл бұрын

    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.

  • @timeWaster76
    @timeWaster764 ай бұрын

    delta means change in Greek

  • @alqac82
    @alqac823 жыл бұрын

    can not thank you enough

  • @adityakarri1997
    @adityakarri19973 жыл бұрын

    Is this Tensflow 1 or Tensflow 2?

  • @AladdinPersson

    @AladdinPersson

    3 жыл бұрын

    TF 2

  • @adityakarri1997

    @adityakarri1997

    3 жыл бұрын

    @@AladdinPersson Thank you!

  • @veeru840
    @veeru840 Жыл бұрын

    what is shape?

  • @parthpatwari3174

    @parthpatwari3174

    5 ай бұрын

    it states how many rows and columns are in that tensor like a rubiks cube might me 3x3x3, 4x4x4, 3x2x2 and more

  • @mysocial
    @mysocial3 жыл бұрын

    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

    @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

  • @veeru840
    @veeru840 Жыл бұрын

    why i need to call zeors?

  • @parthpatwari3174

    @parthpatwari3174

    5 ай бұрын

    to create an empty matrix ig

  • @jjghyuftydyt
    @jjghyuftydyt25 күн бұрын

    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.

  • @Jason-ru7xt
    @Jason-ru7xt3 жыл бұрын

    you sounds like Bucky

  • @deborshikashyap6745
    @deborshikashyap67459 ай бұрын

    I find Tensorflow more like pytorch

  • @saqiblatif6235
    @saqiblatif62352 жыл бұрын

    You are not telling why you are using this function. please teach us every everything.

  • @maths1637
    @maths1637 Жыл бұрын

    eye naming was totally nonsense

  • @Ragatokk
    @Ragatokk2 жыл бұрын

    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

    @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)

  • @cedricmanouan2333
    @cedricmanouan23333 жыл бұрын

    Great !

  • @AladdinPersson

    @AladdinPersson

    3 жыл бұрын

    Thank you :)