...

Artificial Intelligence - Tensorflow

Back to Course

Lesson Description


Lession - #1006 Tensorflow mathematical


Mathematical Foundation

Prior to developing a fundamental TensorFlow program, it's basic to get a handle on the numerical thoughts expected for TensorFlow. Any AI calculation's center is viewed as arithmetic. A technique or answer for a specific AI calculation is laid out with the guide of key numerical standards. How about we jump into the numerical groundworks of TensorFlow.

Scalar
A scalar is an actual amount with no course that is completely described by its extent. Scalars are vectors with only one aspect.


import tensorflow as tf
  
scalar = tf.constant(7>
scalar
check diamension

scalar.ndim

Vector
A vector is a two-layered object with both extent and bearing. we can decipher vector mathematically as a coordinated line portion with a bolt showing the course and a length of the line equivalent to the greatness of the vector. the following is an instance of making a vector in TensorFlow.


import tensorflow as tf
  
vector = tf.constant([10, 10]>
# checking the dimensions of vector vector.ndim

Matrix
Matrix is a term that alludes to multi-layered exhibits that are coordinated in lines and segments. The line and segment lengths decide the size of the grid. Whenever a grid has "a" lines and "b" segments, the Matrix is addressed as an "a*b" framework, which additionally determines the length of the lattice.


import tensorflow as tf
  
matrix = tf.constant([[1, 2], [3, 4]]>
print(matrix>
print('the number of dimensions of a matrix is :\ '+str(matrix.ndim>
>


How do you transpose in Tensorflow?
transpose(x, perm=[1, 0]>
.

TensorFlow - Wikipedia
click