Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Written by Prashant Basnet
👋 Welcome to my Signature, a space between logic and curiosity.
I’m a Software Development Engineer who loves turning ideas into systems that work beautifully.
This space captures the process: the bugs, breakthroughs, and “aha” moments that keep me building.
Tensors:
Tensor Operations:
5th Order Tensor:
Example: Brain connectivity data in neuroscience
Where i and j represent brain regions, k represents the type of connection, l represents time, and m represents the subject ID.
Weather Data Tensor:
A 4th order tensor representing temperature data:
Where weather_parameter could include temperature, humidity, pressure, etc.
Video Data:
A 4th order tensor representing a color video:
Language Model Embedding:
A 3rd order tensor representing word embeddings in a language model
This image illustrates different orders of tensors in mathematics, showing examples from 0th order (scalar) up to 4th order tensors. Let's break it down:
This progression demonstrates how tensors increase in complexity and dimensionality as their order increases. Each higher-order tensor can be thought of as an array of lower-order tensors
Tensors and Tensor-flow:
Name Tensorflow is named after tensors.
How can we implement / experiment the knowledge:
import tensorflow as tf # Creating tensors scalar = tf.constant(5) vector = tf.constant([1, 2, 3]) matrix = tf.constant([[1, 2], [3, 4]]) # Tensor operations a = tf.constant([[1, 2], [3, 4]]) b = tf.constant([[5, 6], [7, 8]]) # Element-wise addition add_result = tf.add(a, b) # Matrix multiplication matmul_result = tf.matmul(a, b) # Reshaping reshaped = tf.reshape(vector, [1, 3]) # Slicing slice_result = tf.slice(matrix, [0, 1], [2, 1]) print("Addition result:", add_result.numpy()) print("Matrix multiplication result:", matmul_result.numpy()) print("Reshaped tensor:", reshaped.numpy()) print("Sliced tensor:", slice_result.numpy()) #TensorFlow101 #TensorBasics #MachineLearning #DeepLearning #AIFundamentals #DataScience #PythonProgramming #MLBasics #TensorMath #TFLearning #NeuralNetworks #ComputationalGraphs #DataStructures