Perceptron Statistical Learning Method Chapter 2, numpy primitive form and dual form, torch implementation

Perceptron Perceporn Theory "Statistical Learning Methods" Chapter 2 Perceptron Code numpy version && torch version Python3.7 %matplotlib inline Model The linear classification model of binary classification aims to find a hyperplane to linearly divide all instances into positive examples and negative examples, a ...

Posted by dbrown on Fri, 27 Jan 2023 14:27:42 +0300

pytorch study notes - tensorboard use

The use of tensorboard (1) The use of the .add_scalar() method in the SummaryWriter class (you can hold down Ctrl and click add_scalar to view the function of this method). First install tensorboard with pip, and execute the following command to draw an image with y=2x. from torch.utils.tensorboard import SummaryWriter writer = SummaryWri ...

Posted by pvraja on Fri, 20 Jan 2023 10:18:36 +0300

Comparison of PyTorch's Dataset and TorchData API

Deep neural networks take a long time to train. Training speed is affected by factors such as model complexity, batch size, GPU, size of training dataset, etc.In PyTorch, torch.utils.data.Dataset and torch.utils.data.DataLoader are commonly used to load datasets and generate batches. But starting with version 1.11, PyTorch introduces the TorchD ...

Posted by psychowolvesbane on Tue, 27 Dec 2022 05:47:13 +0300

libtorch study notes - MNIST combat

MNIST libtorch practical exercise Ready to work First download the MNIST database, http://yann.lecun.com/exdb/mnist/ After downloading, do not decompress it with software such as winrar. For example, t10k-images-idx3-ubyte is decompressed into t10k-images.idx3-ubyte. It is best to decompress it with tar in Linux environment. Suppose you unzip t ...

Posted by chrys on Wed, 25 May 2022 15:51:55 +0300

pytorch on GPU - training neural network with CUDA (pytorch series-30)

Running PyTorch code on GPU - neural network programming guide In this episode, we will learn how to use GPU and PyTorch. We will see how to use the general methods of GPU, and we will see how to apply these general techniques to train our neural networks. Deep learning using GPU If you haven't seen the episode about why deep learning and neur ...

Posted by bmbc on Mon, 23 May 2022 12:42:05 +0300

Using Docker to run HuggingFace massive model

This article will share how to quickly run the interesting model on Hugging Face locally through Docker. Run the model with less code and less time cost than the original project. If you are familiar with Python, most model projects can be deployed and run locally in about 10 minutes. Write in front In order to facilitate the display, I chos ...

Posted by besa on Sat, 21 May 2022 01:07:42 +0300

[PyTorch] Note 02: Autograd auto derivation

From PyTorch 1.4 tutorial Outline Tensor torch.autograd.backward If the result node is scalar If the result node is a vector [PyTorch] Note 02: Autograd auto derivation In PyTorch, the core of all neural networks is autograd package 1 Tensor torch.Tensor is the core class of this autograd A Tensor tensor usually records the following ...

Posted by rusbb on Thu, 19 May 2022 21:17:09 +0300

weibu's in-depth learning chapter: pytorch -- utils Data and torch vision

Overview of data processing toolbox Pytoch involves data processing (data loading, data preprocessing, data enhancement, etc.), and the main toolkits and related relationships are as follows: Overview of pytorch data processing toolkit torch.utils.data Toolkit 1) Dataset: abstract class. Other datasets should inherit this class and contain ...

Posted by sid on Sun, 15 May 2022 05:28:39 +0300

[pytorch] code implementation of ECA-NET attention mechanism applied to ResNet

1, Foreword Introduction to ECA-NET(CVPR 2020): Thesis title:ECA-Net: Effificient Channel Attention for Deep Convolutional Neural NetworksThesis address:https://arxiv.org/abs/1910.03151Open source code:https://github.com/BangguWu/ECANet As a lightweight attention mechanism, ECA net is actually an implementation form of channel attention mecha ...

Posted by phpflixnewbie on Sun, 15 May 2022 01:47:39 +0300

CASIA-HWDB2.x (offline) data set is merged into page type and marked with row-level bbox

Recently, I will do line-level handwritten document detection work, merge CASIA-HWDB2.x (offline) data, and generate a page-level dataset with corresponding bbox. If you want to exchange ocr-related work, you can join the group (at the end of the article): CASIA-HWDB2.x (offline) data set download address: http://www.nlpr.ia.ac.cn/databases/ha ...

Posted by nwoeddie23 on Sat, 14 May 2022 10:42:27 +0300