Introduction to Tensors in Mojo🔥

preview_player
Показать описание
In this video we'll take a closer look at the Tensor type in the Mojo🔥 standard library. We'll introduce the Tensor type, and go through an example where we'll implement vectorized element-wise matrix operations. We'll also show you examples of vectorized matrix-matrix, matrix-vector and matrix-scalar operations.

Chapters:
00:00 What are Tensors? Tensors in PyTorch and NumPy
00:42 Introduction to Mojo🔥 Tensors
02:02 Create your first Mojo🔥 Tensor
03:45 Using Math standard library functions on Tensors -- naive way
08:07 Implementing vectorized Math operations on Tensors ⚡️
13:16 Vectorized matrix-matrix, matrix-vector, matrix-scalar operations

Join our Community! 🚀
Рекомендации по теме
Комментарии
Автор

Really looking forward to using mojo in the future 🔥
Using a util function for something simple as printing a tensor seems very awkward. I would expect the print function to be able to do this (str/repr)

juliansteden
Автор

Please hire some free lance educators to do more beginner level tutorials like hand written character recognition

JakeSmith-bq
Автор

I see the „simd_width“ parameter being passed around a lot in the vectorized functions. As far as I understand this value is always the same in a running application because it depends on the processor architecture. In my naive mind it should be possible for the compiler to add/inject this value into the functions behind the scenes at compile time to avoid this „boilerplate“ :D ?

juliansteden
Автор

Awesome! Thanks for these demonstration videos :)

roanage
Автор

For those that encounter an error when trying to import tensorutils and tensorprint: The built in print function now supports tensors. You do not need to import tensorprint. For example, if you follow this video, "print(t)" will now work just fine.

RichBurgundy
Автор

If a matrix is 3x3, then t[0] would give the first row of the array in numpy (as if you would type t[0, ...] or t[0, :]
I think it is a bad idea if the behavior is fundamentally different already in these very basic and core functionalities

seriouce
Автор

Just a qualitative observation, the mojo documentation does not have enough examples. At the end of each doc like the random module, actually show how to use some of the random functions like randint. I'm personally having a tough time understanding how to properly use some of the functions because there are barely any examples present.

mojoloop
Автор

Why use the dunder method instead of calling str(tensor)? Seems awkward

Also overloading built-in keywords like type is never a good idea. I suggest dtype

Tferdz
Автор

When will slices be supported? as in arr[:, 3:6]?

avihalevy
Автор

Thank you for this video but I have a problem with tensorprint when I use it I don't get any error but I can't see any output.

from random import rand
from tensorutils import tensorprint
t = rand[type](3, 3)
tensorprint(t)

any solution for that I have mojo 0.3

_ABDULGHANI
Автор

i want to use mojo in my tpu hub i have with gcp. I'd like to see parallelization implemented

Bakobiibizo
Автор

when will mac and window version release?

鄭琮瀚-xj
Автор

How did you get the mojo jypiter notebook thingie going?

Clarkezoneusa
Автор

import tensorprint from tensorutils work fine after I copy the tensorutils to my workstation but when I try to import elemwise_transform I get this error:
error: Expression [33]:1:26: package 'tensorutils' does not contain 'elemwise_transform'
from tensorutils import (elemwise_transform,

Anyone know how to solve it?

_ABDULGHANI
Автор

Why the file is .ipynb instead of .mojo

TheNaive
Автор

what about arrays? Do we have arrays now?

maxkosh
Автор

Is matrix diagonalization going to be available soon?

mpmdean