Module introduction in pytorch

1. Module class pytorch can define the instantiation of the model by inheriting the module class, instantiate the internally defined module, and then adjust the servant sub module through forward calculation, so as to complete the construction of the deep learning model. import torch.nn as nn class Model(nn.Module): def __init__(self, .. ...

Added by jaygattis on Mon, 03 Jan 2022 18:40:45 +0200

Learning record -12.27

python os.path() module Rookie tutorial os. The path module is mainly used to obtain the attributes of the file. os.path.isfile(path) determines whether the path is a file os.path.join(path1[, path2[, ...]]) Combine the directory and file name into a path Save dictionary in python pickle format Use the dump() function of the pickle mo ...

Added by wizzard81 on Mon, 03 Jan 2022 16:01:28 +0200

[source code analysis] PyTorch distributed elastic training - start & single node process

[source code analysis] PyTorch distributed elastic training (2) - start & single node process 0x00 summary In the previous article, we have learned the basic distributed modules of PyTorch and introduced several official examples. Next, we will introduce the elastic training of PyTorch. This article is the second, focusing on how to s ...

Added by AbeFroman on Mon, 03 Jan 2022 15:14:35 +0200

Introduction and practice of PyTorch advanced convolutional neural network (GoogLeNet, ResNet)

From Mr. Liu Er of station B PyTorch deep learning practice P11 My study notes GoogLeNet one × 1 convolution Last We know that the number of convolutions depends on the number of channels of the input image. one × Convolution can fuse features, change the number of channels and reduce the amount of computation. It is called ...

Added by id10t on Mon, 03 Jan 2022 05:05:07 +0200

Ptorch cifar10 image classification LeNet5

Ptorch cifar10 image classification LeNet5 Here is a summary: Summary 4. Define network (LeNet5) Handwritten font recognition model LeNet5 was born in 1994 and is one of the earliest convolutional neural networks. Through ingenious design, LeNet5 uses convolution, parameter sharing, pooling and other operations to extract features, avoid ...

Added by bongbong on Sun, 02 Jan 2022 23:59:21 +0200

Tensor operation in pytorch

In deep learning, we often need to do four rules, linear transformation and activation of tensors. 1. Function operation of single tensor t = torch.rand(2, 2) # Generate a 3x3 tensor print(t) print(t.sqrt()) # Square root of tensor, tensor internal method print(torch.sqrt(t)) # Square root of tensor, functional form print(t.sqrt_()) # Squ ...

Added by tyrnt on Sun, 02 Jan 2022 21:08:50 +0200

Graduation project records -yolov5 the whole process of training your own data set (from data set annotation to final picture test)

2022.1.2 records: 1. Dimension dataset The software I use to label the dataset here is labelImg, labellmg download link I put down the latest version. Originally, I wanted to mark 1000 pieces yesterday, but I was so tired. I marked 50 pieces for each signal, a total of 200 pieces. Before labeling, you need to create two folders like this ...

Added by kubak on Sun, 02 Jan 2022 20:40:12 +0200

Basic functions of processing tensors in 5 PyTorch

Basic functions of processing tensors in 5 PyTorchEvery beginner of deep learning should know these five basic functions of pytoch.Being able to construct neural networks in an accurate and effective way is one of the most sought after skills of recruiters in deep learning engineers. PyTorch is a Python library mainly used for deep learning. On ...

Added by Floodboy on Sun, 02 Jan 2022 11:42:08 +0200

Lesson notes of PyTorch deep learning practice Lesson4 use PyTorch to realize simple linear regression

1. Basic steps for pytorch to realize linear regression Construct data setDefine Model function moduleConstruct the forward() function in the function module (that is, calculate y_pred)Calculate loss valueSelect optimization methodTraining cycle iteration 2. Several optimization methods of pytorch AdagradAdamAdamaxASGDLBFGSRMSpropRpr ...

Added by ferhanz on Sun, 02 Jan 2022 08:24:05 +0200

[source code analysis] PyTorch distributed elastic training - monitoring / fault tolerance

[source code analysis] PyTorch distributed elastic training (6) - monitoring / fault tolerance 0x00 summary As for PyTorch elastic training, we have introduced Agent and rendezous respectively so far, but some parts are not in-depth, such as monitoring. This paper unifies them and logically combs the elastic training as a whole. The flex ...

Added by running_out_of_imagination on Sun, 02 Jan 2022 07:51:34 +0200