Implementation of prototype networks based on PyTorch

I modified the data processing method and evaluation based on Jay2coomzz_ As a beginner, if there is anything wrong with the model () method, please criticize and correct it. The original link is as follows: https://blog.csdn.net/weixin_38471579/article/details/102631018 Data sets and source links will be placed in the comments area 1 da ...

Posted by - - NC - - on Wed, 05 Jan 2022 10:50:28 +0100

Torch in PyTorch Use of Optim optimizer

1, Basic usage of optimizer Create optimizer instanceCycle: Empty gradientForward propagationCalculate LossBack propagationUpdate parameters Example: from torch import optim input = ..... optimizer = optim.SGD(params=net.parameters(), lr=1) # Optimizer instance optimizer.zero_grad() # Empty gradient output = net(input) # Forward propag ...

Posted by ir4z0r on Wed, 05 Jan 2022 09:14:29 +0100

Handwritten numeral recognition based on convolutional neural network and pytorch

Don't bother python course Due to the pytorch version, some knowledge needs to be found during class. The course is very good. (no money, only for sharing) definition Baidu Encyclopedia The structure of convolutional neural network is composed of convolution, activation and pooling convolution After reading too many online explanations, I f ...

Posted by rajatr on Wed, 05 Jan 2022 03:19:42 +0100

Detailed description of common input and output of Python transformer tokenizer

Tokenizer introduction and workflow Transformers and the pre training model + fine tuning mode based on BERT family have become the standard configuration in the NLP field. Tokenizer, as the main method of text data preprocessing, has become an essential tool. This article takes the AutoTokenizer used in transformers as an example to illustrat ...

Posted by Wetzut on Tue, 04 Jan 2022 16:46:24 +0100

yolov4 project record 4- test process

catalogue 1, Overview 2, Test process 1. Parameter preparation 2. Define the model 3. Obtain necessary data 4. Input model 5. Anchor frame screening ① Screening by Object Confidence ② Get type ③ Sort by Object Confidence ④ Non maximal inhibition 6. Draw the external frame 3, Code summary 1, Overview Before training, we first t ...

Posted by py343 on Mon, 03 Jan 2022 23:57:01 +0100

Li Mu's deep learning notes-04 data operation

preface 1. Hands on learning and deep learning https://zh-v2.d2l.ai/ 2. Notepad https://github.com/d2l-ai/d2l-zh 3. Data operation and data preprocessing N-dimensional array is the main data structure of machine learning and neural network Data operation Data operation implementation 1. First, import torch, which is called pytorch, but w ...

Posted by Cagez on Mon, 03 Jan 2022 06:01:55 +0100

[New Year blog / easy to] Pytorch convolutional neural network image recognition

I wrote the last blog in 2021 and the first blog in 2022 at 23:04 on December 31, 2021. This year's motto: if there is a heat and a light, it will make a firefly. You can also make a light in the dark. You don't have to wait for the torch. After that, if there is no torch, I will be the only light. Introduction A few days ago, I ...

Posted by jon2396 on Sat, 01 Jan 2022 23:47:08 +0100

Pytorch tutorials [pytorch official tutorial in Chinese and English] - 2 Tensors

[in 2021, some people see dust and others see stars, but it doesn't matter. We'll turn the page soon. -- December 31, 2021] In the article Pytorch tutorials [pytorch official tutorial in Chinese and English] - 1 Quickstart The quick introduction version is shown in. Next, let's look at the important concept in pytorch: Tensor. Original link: ...

Posted by Gazan on Sat, 01 Jan 2022 11:20:42 +0100

CBAM:Convolutional Block Attention Module

catalogue 1. Attention mechanism 2. Thesis interpretation 2.1 Channel Attention Module 2.2 Spatial attention channel  2.3 CBAM integrated with a ResBlock in ResNet 2.4 experimental results 1. Attention mechanism Generally speaking, the attention mechanism is to hope that the network can automatically learn what needs attention in ...

Posted by OniLink on Fri, 31 Dec 2021 05:22:36 +0100

pytorch learning 11: where and gather

where Where syntax: torch where(condition, x, y) Requirement: the order (shape) of condition, x and y matrices must be the same, and the return value is also a sentence of the same orderCondition: condition matrix. When the element is True, fill in the corresponding element in x; otherwise, fill in the corresponding element in yx: When the el ...

Posted by ee12csvt on Thu, 30 Dec 2021 21:36:41 +0100