# PyTorch Tutorials and Examples for Beginners

## Implement Supervised Contrastive Loss in a Batch with PyTorch – PyTorch Tutorial

Supervised Contrastive Loss is widely used in text and image classification. In this tutorial, we will introduce you how to create it by pytorch.

## Difference Between torch.matmul() and torch.mm() – PyTorch Tutorial

Both torch.matmul() and torch.mm() can perform a matrix multiplication. In this tutorial, we will introduce the difference between them.

## Calculate Cosine Similarity Between Tensors in PyTorch

In this tutorial, we will introduce you how to calculate cosine similarity between two tensors in pytorch.

## Understand torch.nn.functional.normalize() with Examples – PyTorch Tutorial

PyTorch torch.nn.functional.normalize() function can allow us to compute $$L_p$$ normalization of a tensor over specified dimension.

## An Introduction to PyTorch Lightning Gradient Clipping – PyTorch Lightning Tutorial

In this tutorial, we will introduce you how to clip gradient in pytorch lightning, which is very useful when you are building a pytorch model.

## Understand transformers.get_linear_schedule_with_warmup() with Examples – PyTorch Tutorial

In this tutorial, we will use an example to show you how to use transformers.get_linear_schedule_with_warmup(). You can see the effect of it.

## An Introduction to PyTorch Scheduler last_epoch Parameter – PyTorch Tutorial

In this tutorial, we will use some example to show you the effect of pytorch scheduler last_epoch parameter.

## Understand transformers.get_cosine_schedule_with_warmup() with Examples – PyTorch Tutorial

In this tutorial, we will create an example to show the effect of transformers.get_cosine_schedule_with_warmup(), you can understand how to use this function easily.

## Implement Warm-up Scheduler in Pytorch – Pytorch Example

In this tutorial, we will create a warm-up scheduler without without package dependency in pytorch. This scheduler is very easy to use.

## Fix PyTorch RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation

In this tutorial, we will introduce you how to fix pytorch error: RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation.