vault dweller

Veni, Vidi, Coded.


Blog 01: Scientists Shaping India’s Future

A Nation Fueled by Passion

Modern Scientists Shaping India’s Future Scientific progress is not merely about equations and laboratories; it is driven by visionaries who push boundaries and transform the world. India has long been a cradle of innovation, and its modern scientists continue to elevate the nation’s global standing. Their contributions extend beyond discoveries—they solve pressing challenges, enhance lives, and inspire future generations. Below, we highlight some of India’s most influential scientists shaping the country’s future.

Read more...

PyTorch 07: Workflow Fundamentals

Getting Data Ready

The core principle of machine learning and deep learning lies in leveraging historical data to develop algorithms, such as neural networks, that identify underlying patterns within the data. These identified patterns are then utilized to make predictions about future outcomes. Numerous approaches exist to accomplish this, and innovative methods are continually emerging in the field. However, for the sake of simplicity, let us begin with a fundamental concept: a straight line.

Read more...

PyTorch 06: a range and tensors like

Using torch.arange(), torch.zeros_like() and torch.ones_like()

Sometimes you might want a range of numbers and for that you can use torch.arange(start, end, step): # Create a range of numbers from 1 to 9 with a step of 1 range = torch.arange(start = 1, end = 10, step = 1) range tensor([1, 2, 3, 4, 5, 6, 7, 8, 9]) # You can simplify the call by omitting parameter names torch.arange(1, 10, 1) Let’s move on to another concept called tensor like.

Read more...

PyTorch 05: Zeros and Ones

Using torch.zeros() and torch.ones()

PyTorch provides two useful functions, torch.zeros and torch.ones, to create tensors filled entirely with zeros or ones, respectively. These functions are commonly used for initializing tensors in machine learning and deep learning tasks. Zero initialization is primarily utilized for defining biases or placeholders in machine learning models, providing a neutral starting point that does not affect initial computations. Conversely, ones initialization is valuable in scaling operations or additive computations, offering consistency and ensuring predictable behavior during the process.

Read more...

PyTorch 04: Random Tensors

Using torch.rand() and passing size() parameter

torch.rand is a function in PyTorch used to generate a tensor filled with random numbers sampled from a uniform distribution over the interval [0, 1). It is useful when you need random values for initialization or stochastic processes (discussed later) in machine learning and deep learning applications. Let’s create a matrix using size() parameter. # creating a random tensor of size --> (3, 3) random_matrix = torch.rand(size = (3, 3)) random_matrix, random_matrix.

Read more...

PyTorch 02: Matrices

Implementing matrix, and using size()

A matrix has two dimensions, which means… yep, you guessed it, two square brackets! Now, Let’s start by creating a matrix. MATRIX = torch.tensor([[3, 4],[4, 5]]) MATRIX tensor([[3, 4], [4, 5]]) Let’s check its the size : MATRIX.size() torch.Size([2, 2]) The output torch.Size([2, 2]) indicates that the matrix is two elements deep and two elements wide.

PyTorch 01: Basics

Importing PyTorch, creating tensors, and using ndim, item(), and size()

Importing PyTorch Let’s start by importing PyTorch and checking the version we’re using. import torch torch.__version__ 2.5.1+cu121 It looks like we’ve got PyTorch 2.5.1+. Introduction to Tensors Tensors are multi-dimensional arrays with a uniform type. In machine learning, the term tensor informally refers to two different concepts : a way of organizing data, a multilinear (tensor) transformation. Data may be organized in a multidimensional array (M-way array). For example, you could represent an image as a tensor with shape [3, 224, 224] which could mean [colour_channels, height, width].

Read more...

What exactly is PyTorch ?

PyTorch overview, key features, GPU support, and deep learning applications

PyTorch is an open-source deep learning framework that’s known for its flexibility and ease of use. This is enabled in part by its compatibility with the popular Python high-level programming language favored by machine learning developers and data scientists. PyTorch is a fully featured framework for building deep learning models, which is a type of machine learning that’s commonly used in applications like image recognition️ and language processing. Written in Python, it’s relatively easy for most machine learning developers to learn and use.

Read more...
1 of 1