發表文章

PyTorch - Packages in torch & torchvision

Packages in torch PyTorch Documentation: https://pytorch.org/docs/stable/index.html To learn how to use PyTorch, we can start from knowing what does it contain. Here we list out modules in torch package and torchvision package. torch package contain data structure and mathematical operations for multi-dimensional tensors. Some useful utilities are also included (random & sampling, serialization, get/set basic config in parallelism, disable/enable gradient computation). Tensor Multi-dimensional matrix containing elements of a single data type. (It contains not only data structure for tensor but also many tensor attributes and type information) sparse (experimental API) Spare tensor in Coordinate Format (COO). https://scipy-lectures.org/advanced/scipy_sparse/coo_matrix.html cuda Support for CUDA tensor types Storage Contiguous 1D array of single data type. nn Neural network modules (parameters, containers, layers, utilities). nn.functional Common ...

Test

Here is some testing code. for(int i = 0; i < 10; ++i) printf("%d\n", i); Einstein's most famous equation is $E=mc^2$. $$e^{i\pi}+1=0$$