![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
pytorch
文章平均质量分 82
总是叫xtq别人都知道我是谁啦
这个作者很懒,什么都没留下…
展开
-
新手入门pytorch
去看pytorch.org 的tutorial!!!I'd say that the official tutorials are a great start (Welcome to PyTorch Tutorials). There you have a lot of examples of all the things you'll probably run into when trying to design an architecture and train it: dataloaders, N转载 2022-01-03 17:37:10 · 72 阅读 · 0 评论 -
THE FUNDAMENTALS OF AUTOGRAD
What Do We Need Autograd For?A machine learning model is afunction, with inputs and outputs. For this discussion, we’ll treat the inputs a as ani-dimensional vector\vec{x}x, with elementsx_{i}xi. We can then express the model,M, as a vector-valued ...转载 2022-01-03 17:25:21 · 50 阅读 · 0 评论 -
TORCHVISION OBJECT DETECTION FINETUNING TUTORIAL
For this tutorial, we will be finetuning a pre-trainedMask R-CNNmodel in thePenn-Fudan Database for Pedestrian Detection and Segmentation. It contains 170 images with 345 instances of pedestrians, and we will use it to illustrate how to use the new feat...转载 2021-12-21 17:10:17 · 87 阅读 · 0 评论 -
Optimizing model Parameters
HyperparametersHyperparameters are adjustable parameters that let you control the model optimization process. Different hyperparameter values can impact model training and convergence rates (read moreabout hyperparameter tuning)We define the following.转载 2021-12-21 15:40:47 · 92 阅读 · 0 评论 -
Build the NN & auto.grad
nn.FlattenWe initialize thenn.Flattenlayer to convert each 2D 28x28 image into a contiguous array of 784 pixel values ( the minibatch dimension (at dim=0) is maintained)nn.Sequentialnn.Sequentialis an ordered container of modules. The data is pa...转载 2021-12-21 15:13:34 · 69 阅读 · 0 评论 -
Datasets & Dataloaders
PyTorch provides two data primitives:torch.utils.data.DataLoaderandtorch.utils.data.Datasetthat allow you to use pre-loaded datasets as well as your own data.Datasetstores the samples and their corresponding labels, andDataLoaderwraps an iterable a...转载 2021-12-21 13:24:06 · 99 阅读 · 0 评论 -
Pytorch.org/tutorials Tensor
Initializing a tensortorch.tensortorch.from_numpyInput tensortorch.ones_like()retain the shapetorch.rand_like() retain the shapeInput the shapetorch.rand()torch.ones()torch.zeros()tensor.attributetensor.shapetensor.dtypeten.转载 2021-12-21 12:59:10 · 75 阅读 · 0 评论 -
Pytorch.org QuickStart
import torch, torchvisionmodel = torchvision.models.resnet18(pretrained=True)data = torch.rand(1, 3, 64, 64)labels = torch.rand(1, 1000)prediction = model(data) # forward passloss = (prediction - labels).sum()loss.backward() # backward passloss .转载 2021-12-21 00:49:52 · 119 阅读 · 0 评论