Two-Dimensional Tensors in Pytorch

Two-dimensional tensors are analogous to two-dimensional metrics. Like a two-dimensional metric, a two-dimensional tensor also has $n$ number of rows and columns.

Let’s take a gray-scale image as an example, which is a two-dimensional matrix of numeric values, commonly known as pixels. Ranging from ‘0’ to ‘255’, each number represents a pixel intensity value. Here, the lowest intensity number (which is ‘0’) represents black regions in the image while the highest intensity number (which is ‘255’) represents white regions in the image. Using the PyTorch framework, this two-dimensional image or matrix can be converted to a two-dimensional tensor.

In the previous post, we learned about one-dimensional tensors in PyTorch and applied some useful tensor operations. In this tutorial,

 

 

To finish reading, please visit source site