6.2: TensorFlow.js: Tensors - Intelligence and Learning

Sdílet
Vložit
  • Äas pÅ™idán 28. 08. 2024
  • In this video I cover the foundation of the TensorFlow.js core API: tensors (tensor1d, tensor2d, tensor3d, generic tensor).
    🎥 Next Video: • 6.3: TensorFlow.js: Va...
    🔗 TensorFlow.js: js.tensorflow....
    🔗 What is a tensor?: js.tensorflow....
    🔗 ITP's ml5 library: ml5js.org
    🎥 Machine Learning in JavaScript (TensorFlow Dev Summit 2018): • Machine Learning in Ja...
    🚂 The Coding Train website: thecodingtrain....
    💖 Support this channel on Patreon: / codingtrain
    🛒 To buy Coding Train merchandise: www.designbyhu...
    📚 Book recommendations: www.amazon.com...
    💻 github.com/Cod...
    🎥 For More Intelligence and Learning videos: • Intelligence and Learning
    🎥 For More Coding Challenges: • Coding Challenges
    🔗 p5js.org/
    🔗 processing.org
    📄 Code of Conduct: github.com/Cod...

Komentáře • 112

  • @federicofusco9735
    @federicofusco9735 PÅ™ed 3 lety +5

    Daniel is the only person on youtube who can explain these things in such a way that a 5 year old could understand them comprehensively.

    • @webgpu
      @webgpu PÅ™ed 11 mÄ›síci

      Federico knows exactly how a 5 yo kid thinks ðŸ‘

  • @BlueyMcPhluey
    @BlueyMcPhluey PÅ™ed 4 lety +3

    I've seen many tutorials about TensorFlow but this is the first one I've seen that actually explains what's going on

  • @bluegtturbo
    @bluegtturbo PÅ™ed 5 lety +1

    I'm a farmer who wants to use TensorFlow for image recognition (weeds!) and this is my introduction to it. Thanks Daniel - you're a wonderful teacher!

    • @TheCodingTrain
      @TheCodingTrain  PÅ™ed 5 lety

      Oh how interesting! I'd love to learn more about what you are doing! (daniel@thecodingtrain.com)

  • @matrixzoo8434
    @matrixzoo8434 PÅ™ed 6 lety +4

    There aren't any good tutorials on tensorflow.js on youtube except for this one, this is really helpful, and it'll be awesome if you could uplode content about this framework more frequently because I'm planning to build a project in javascript using this framework, and I want to learn how to use it as quickly as possible.

    • @TheCodingTrain
      @TheCodingTrain  PÅ™ed 6 lety +2

      Thank you for the feedback, I'm doing my best!

  • @Fcovvb
    @Fcovvb PÅ™ed 6 lety +3

    Hi Daniel, I think that your job doing this videos that allows us to learn and train our brains it's amazing. Please keep going with this project :)

  • @aetheralldev
    @aetheralldev PÅ™ed 6 lety +4

    CONST IS FINALLY HERE !!
    don't let const be reassign as vscode did ;)
    superProTip: use 'const' everywhere, wait for the error to write 'let'
    for (const item of array){
    console.log(item) // works fine scince item only exists in the scope of the current iteration
    }
    By the way, this tensorflow.js adventure will make my summer even sunnier
    Thanks Dan :D

    • @aetheralldev
      @aetheralldev PÅ™ed 6 lety

      also: the ultraloop
      let i = 10
      while(i--){
      console.log('loop')
      }
      // prints 'loop' 10 times

    • @cnstntn32
      @cnstntn32 PÅ™ed 6 lety +1

      But the var "i" has a more scope than it should. There are better options and more readable. Its cool but I doubt it's used on professional code specially in js. Correct me if I'm wrong.

    • @aetheralldev
      @aetheralldev PÅ™ed 6 lety +1

      you're right, this is for fast prototyping
      there is not many cases in professional code where you have to loop a known amount of times ( at least in my field )

  • @Saturos02
    @Saturos02 PÅ™ed 6 lety +13

    Excellent! Really looking forward to the rest of this series!

  • @clipsus_clips
    @clipsus_clips PÅ™ed 6 lety +3

    Im still learning js and it's nice to watch all the different videos you made!

  • @Rightlime7923
    @Rightlime7923 PÅ™ed 6 lety

    the reason I love this guy's channel is that he gives everything for free .... just like nature gives us air to breathe .... greatest things in the world will always be free
    thanks Dan ........

  • @callmebiz
    @callmebiz PÅ™ed 6 lety +35

    Is it weird that half the time I watch these videos it's strictly for enjoyment? Lol

    • @arpandhatt6011
      @arpandhatt6011 PÅ™ed 6 lety +1

      you are not alone

    • @sixty502
      @sixty502 PÅ™ed 6 lety

      I do two

    • @ALiJ4LIFE
      @ALiJ4LIFE PÅ™ed 5 lety

      No. You are perfectly normal.

    • @trashAndNoStar
      @trashAndNoStar PÅ™ed 5 lety

      I totally do. Watching this one while cooking lunch at the moment.

    • @charlesbaldo
      @charlesbaldo PÅ™ed 5 lety

      True, but i often pick up things that help me in other areas of my development that is relative. By watching for enjoyment i also keep up on what is new, exciting and being used elsewhere.

  • @johanverm90
    @johanverm90 PÅ™ed 6 lety

    You bring joy to the people Dan .Programming isn't boring anymore..Thanks..

  • @manjubgvf
    @manjubgvf PÅ™ed 3 lety

    Your train journey made my day

  • @_DeProgrammer
    @_DeProgrammer PÅ™ed 6 lety

    iOS developer here. TensorFlow just adopted the swift lang so I'm going to learn TensorFlow here and ill have a good understanding when the alpha is released very shortly. Thank you for this series Daniel!

  • @daniilparokonnyy7980
    @daniilparokonnyy7980 PÅ™ed 6 lety +1

    EXCELLENT! I started to understand neural network in practice, thank you, Daniel â¤â¤â¤

  • @stefan-haas
    @stefan-haas PÅ™ed 6 lety

    I just love the way your channel is going to become with machine learning. Thank you so much!

  • @pablo199014
    @pablo199014 PÅ™ed 6 lety

    loving where this is turning to; me he comprado un ordenador portatil solo para aprender a programar de ti.

  • @coby1kenobii
    @coby1kenobii PÅ™ed 4 lety

    I'm really considering NYU CS because of you!!

  • @coby1kenobii
    @coby1kenobii PÅ™ed 4 lety

    I'm so glad I found this

  • @atrumluminarium
    @atrumluminarium PÅ™ed 6 lety +20

    We need a 10hr version of Dan dancing and singing "we made a tensor, we made a tensor" from 5:27

    • @TheCodingTrain
      @TheCodingTrain  PÅ™ed 6 lety +3

      I think I went on for longer in the original live stream if anyone wants to dig up that timecode?

    • @pa7war
      @pa7war PÅ™ed 6 lety

      1:12:32

  • @fgdou
    @fgdou PÅ™ed 5 lety

    I'm not very good at english, but waou, it's so easy to understand the thinks that you explain! thanks to you, this is so interesting

  • @MukhtarXIII
    @MukhtarXIII PÅ™ed 6 lety

    although i'm not interested in js but indeed i do respect u man , and i do really appreciate ur hardworking to teach other what u have learned , sorry my english kinda bad

    • @jasonw519
      @jasonw519 PÅ™ed 5 lety

      actually, it is the best tutoria for ML from my potin of view.

  • @devorrahtester5439
    @devorrahtester5439 PÅ™ed 6 lety +2

    another great lesson. Can't wait for the next one!

  • @Musfiq77
    @Musfiq77 PÅ™ed 5 lety +2

    thank u so much .. respect from my heart

  • @Hunar1997
    @Hunar1997 PÅ™ed 6 lety

    This is awesome, both Tensorflow.js and your tutorials

  • @exxzxxe
    @exxzxxe PÅ™ed 4 lety

    You are an excellent teacher!

  • @SpokHuman
    @SpokHuman PÅ™ed 6 lety +2

    Thanks you Dan for this tutorial !

  • @AMANKUMAR-fc1yp
    @AMANKUMAR-fc1yp PÅ™ed 6 lety

    Loved this one. Please make some videos on three.js

  • @shaunakgokhale1880
    @shaunakgokhale1880 PÅ™ed 5 lety

    This person is downright amazingg.

  • @MecegguemMohamed
    @MecegguemMohamed PÅ™ed 3 lety

    i really enjoy ur videos

  • @MinecraftLetstime
    @MinecraftLetstime PÅ™ed 6 lety +1

    Loving this series!

  • @MachoSheri
    @MachoSheri PÅ™ed 6 lety

    I really really enjoy watching your videos. Thanks for your contribution. :-)

  • @c0mpuipf
    @c0mpuipf PÅ™ed 6 lety

    This is epic!! Hope to learn a ton as always. Go deep Dan

  • @pinch-of-salt
    @pinch-of-salt PÅ™ed 5 lety +1

    Why is it written as tf.tensor when you never initialized the tf object?

  • @nkemer
    @nkemer PÅ™ed 5 lety

    for 9:20. if you "console.log(data)" you'll get complex tensor. but if you "console.log('some text'+data)" then you would get the tensor directly. Nice. (I've discovered this totally by an accident. :-))

  • @zboinek
    @zboinek PÅ™ed 6 lety

    Where is the rest of the series? :D People demanding next movies about tensorflow! :D Great work mate

    • @TheCodingTrain
      @TheCodingTrain  PÅ™ed 6 lety

      coming tomorrow (actually it's there now if you check the playlist 😀)

  • @geoffwagner4935
    @geoffwagner4935 PÅ™ed 11 mÄ›síci

    o-m-gawd, the ml5 stuff coming up is NYU's?

  • @MubashirAR
    @MubashirAR PÅ™ed 6 lety

    turned on notifications. dont wanna miss any of this :D

  • @keremduran5077
    @keremduran5077 PÅ™ed 4 lety

    You must uppercase the const variable names folks, and use underscore between separate words.

  • @kosmic000
    @kosmic000 PÅ™ed 6 lety

    so looking forward for more vids

  • @AbhishekKumar-mq1tt
    @AbhishekKumar-mq1tt PÅ™ed 6 lety

    Thank u for this awesome video and series

  • @sarvagyasingh4518
    @sarvagyasingh4518 PÅ™ed 3 lety

    3:26 i think instead of saying x,y,z it should he (dir,magnitudes)

  • @zjelco
    @zjelco PÅ™ed 6 lety

    Loving this AI series!

  • @tigranav.3960
    @tigranav.3960 PÅ™ed 4 lety

    i have a question. how do you change the value of const. you’ve written const than in loop you’ve added values

  • @chimuanyaibecheozor4832
    @chimuanyaibecheozor4832 PÅ™ed rokem

    any idea how to use or implement pad_sequences in tensorflowjs in node

  • @12mkamran
    @12mkamran PÅ™ed 5 lety

    Can you have different types of data as your input? Say a float input and a boolean

  • @arpandhatt6011
    @arpandhatt6011 PÅ™ed 6 lety

    Will you also get into loading pretrained networks and stuff? If anyone were to use TF.JS, pretrained models are the way to go.

  • @MrJatinder44
    @MrJatinder44 PÅ™ed 5 lety

    how would be using console.table to printing values of tensor? it would prettier to read.

  • @cooperwolfden
    @cooperwolfden PÅ™ed 6 lety +1

    How is he able to assign values to the const array using a for loop? Is it fine to do that if it isn't already assigned?

    • @doominic77
      @doominic77 PÅ™ed 6 lety +4

      Cooper Wolfden He can do this because when dealing with arrays (and also objects), what is actually constant is the reference to the array. This means that he couldn't define that variable to be a different array entirely. However he is still allowed to change the array that is already in there however he wants.

  • @michaelhunt6313
    @michaelhunt6313 PÅ™ed 5 lety

    Your awesome!

  • @codeforest9027
    @codeforest9027 PÅ™ed 5 lety

    I don't think TF floors the value but truncates it. So, imagine a piece of paper with the float, and then someone cuts the dot and the decimal values after it. So we are left with just an integer.

  • @ArifMustaffa
    @ArifMustaffa PÅ™ed 4 lety

    Is it magic happened? Why your script is run properly, since you didn't even call the ''setup()'' function? Anyway, I really love your videos. I am trying to self-learn ML and these videos are really helping.

  • @incivileluca3134
    @incivileluca3134 PÅ™ed 6 lety

    How do i use strings , chars .
    ASCII Code?
    or is there a easyer way

  • @abishekpss7254
    @abishekpss7254 PÅ™ed 4 lety

    Does tensorflow.js support all DL models like MobileNet, ResNet, ResNeXt to name a few ?

  • @DirtySocrates
    @DirtySocrates PÅ™ed 6 lety

    Hello everyone, Great video! Glad I found your channel. I am going back through all of your videos now. Any idea when v2 of your book will be released? I'd love to get a copy.
    Also, is anyone using VSCode for writing JS? Is there a way to get linting/autocomplete for libraries that are imported in the index.html?

    • @TheCodingTrain
      @TheCodingTrain  PÅ™ed 6 lety

      I'm hoping to finish it by the end of the summer.

  • @Dariwinxd
    @Dariwinxd PÅ™ed 6 lety

    Thanks for the video😉

  • @siimmy808
    @siimmy808 PÅ™ed 6 lety

    Thank you

  • @Eitrii
    @Eitrii PÅ™ed 5 lety

    LMAO 6:12 Thanks for always making it enjoyable to watch

  • @dragonskyymaster6695
    @dragonskyymaster6695 PÅ™ed 6 lety +1

    This is javascript?
    ( new to coding and i want to choose a language)

    • @TheCodingTrain
      @TheCodingTrain  PÅ™ed 6 lety +2

      Indeed, this playlist will start you from the beginning: czcams.com/users/shiffmanplaylists?view=50&shelf_id=14&sort=dd

  • @jp-Kool
    @jp-Kool PÅ™ed 6 lety

    So a tensor is a data structure?

  • @luisrd4295
    @luisrd4295 PÅ™ed 6 lety

    I could not find usable Tensor.js files. It seems everybody is using the CDN. Can anybody assist where are the raw js files?
    Could not find it in github.

  • @EDreyer
    @EDreyer PÅ™ed 6 lety

    Please do some stuff with images please, like image recognition.

  • @rained23JMTi
    @rained23JMTi PÅ™ed 5 lety

    is that spooky music generated by your ML ? can you link the spooky music thanks.

  • @CarelessMiss
    @CarelessMiss PÅ™ed 6 lety

    How do I open that local port so I can do stuff in it?

    • @TheCodingTrain
      @TheCodingTrain  PÅ™ed 6 lety

      This workflow video might help:
      czcams.com/video/HZ4D3wDRaec/video.html
      Also:
      sublime text: czcams.com/video/UCHzlUiDD10/video.html
      atom editor: czcams.com/video/d3OcFexe9Ik/video.html
      brackets: czcams.com/video/nmZbhManVcY/video.html
      codepen: czcams.com/video/5gfUgNpS6kY/video.html

  • @danielribes5433
    @danielribes5433 PÅ™ed 6 lety

    And when I'm using this code for the index.html file I get this error:
    SyntaxError: Expected an operand but found const


    body {padding: 0; margin: 0;}

  • @Pompiduskus
    @Pompiduskus PÅ™ed 6 lety

    Thx

  • @paragjagtap9220
    @paragjagtap9220 PÅ™ed 6 lety

    Plz you conduct the online courses for computer beginner.

    • @TheCodingTrain
      @TheCodingTrain  PÅ™ed 6 lety

      Try either of these playlists to start from scratch!
      czcams.com/users/shiffmanplaylists?view=50&shelf_id=14&sort=dd
      czcams.com/users/shiffmanplaylists?view=50&shelf_id=2&sort=dd

  • @Olixis
    @Olixis PÅ™ed 6 lety

    how can you edit these 1h videos so smoothly?

    • @TheCodingTrain
      @TheCodingTrain  PÅ™ed 6 lety +1

      I work with a very talented and creative editor! twitter.com/mathblank

  • @Apchenail
    @Apchenail PÅ™ed 6 lety

    Moooooooooooooore!

  • @kikefontan
    @kikefontan PÅ™ed 6 lety +1

    Now I know about tensors, but... What about flow? ðŸ˜

  • @jackwong0411
    @jackwong0411 PÅ™ed 5 lety

    May I ask a stupid question: how to setup the Environment for programming JavaScript or TF.js? I wanna find a video here, but I fail😂😂

    • @TheCodingTrain
      @TheCodingTrain  PÅ™ed 5 lety

      Is this what you are looking for? czcams.com/play/PLRqwX-V7Uu6Zu_uqEA6NqhLzKLACwU74X.html

  • @danielribes5433
    @danielribes5433 PÅ™ed 6 lety

    Hi Dan,
    I get an error when I;m trying to use this index.html with Processing:
    "p5jsMode uses a specially crafted index.html to work properly.
    Use Sketch > Show Sketch Folder and rename index.html to something else.
    The index.html file will be re-created to work with p5jsMode,
    and if necessary, copy parts of your old index.html to the new one."

    Tensorflow.js XOR



    What do you think is the reason?
    Thanks
    Daniel

    • @TheCodingTrain
      @TheCodingTrain  PÅ™ed 6 lety

      Would you mind asking at discourse.processing.org/! It's a better platform for Processing and p5.js related code questions. You can share code there easily! Feel free to link from here to your post.

  • @paragjagtap9220
    @paragjagtap9220 PÅ™ed 6 lety

    Make code for chess game

  • @codytremblay8986
    @codytremblay8986 PÅ™ed 6 lety

    Why cant you explain all this in java?

    • @codytremblay8986
      @codytremblay8986 PÅ™ed 6 lety

      He started using java programing which I was interested in then he jumped to javascript when he went to the multilayer. If was going to do the ia in javascript he should done even the beginning one in js instead of starting it in java.

  • @voxelrifts
    @voxelrifts PÅ™ed 3 lety

    Just watched Daniel Butcher my first name 😂

  • @xiaomengli8681
    @xiaomengli8681 PÅ™ed 6 lety

    Just got a new Macbook Pro. Kind of forgetting how to setting Javascript environment on local machine :)

  • @wiscatbijles
    @wiscatbijles PÅ™ed 6 lety

    const!

  • @danielribes5433
    @danielribes5433 PÅ™ed 6 lety

    It's really frustrating

  • @rturan1287
    @rturan1287 PÅ™ed 6 lety

    vaov

  • @informathemachine3.147
    @informathemachine3.147 PÅ™ed 6 lety

    2nd comment!Please continue your videos!

  • @vasyapupkin9338
    @vasyapupkin9338 PÅ™ed 6 lety

    O BOI haha

  • @manojtgn
    @manojtgn PÅ™ed 6 lety

    No one is watching your video . Make some fantastic next ! . Because iam a huge fan of you in coding js

  • @cnstntn32
    @cnstntn32 PÅ™ed 6 lety

    don't use semicolons pleeaaaaasee T_T

  • @bigyote
    @bigyote PÅ™ed 4 lety

    OK...BUT... I gave a thumbs-up and subscribed as the content is important, but the presentation really stinks. Do yourself and your audience a favor and drop the asinine over-caffeinated shtick, buy a actual shirt instead of wearing rags. Other than that... good scoop.