import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
import torchvision
import torchvision.datasets as dset
import torchvision.transforms as T
import numpy as np
torch.autograd.set_detect_anomaly(True) # for debug stacktrace
Quickstart - PyTorch Tutorials 1.13.0+cu117 documentation
Learning PyTorch with Examples - PyTorch Tutorials 1.13.0+cu117 documentation
build computation graph on the fly
Caffe2: https://caffe2.ai/
Tensor
: Like a numpy array, but can run on GPU
nn.parameter.Parameter
: subclass of Tensor that can be registered into Modules’ parameters()
iterator when being assigned as attributes. If no any, then all Tensors attributes will be registered.
Automatic Differentiation with torch.autograd - PyTorch Tutorials 1.13.0+cu117 documentation