pytorch collate_fn function to realize variable length batch - Dynamic padding

Note: batch here refers to mini batch Two methods to realize sequence (text, log) batch processing Fixed length batches (uniform length batches) All batch sequences have the same length. For example, seqs = [[1,2,3,3,4,5,6,7], [1,2,3], [2,4,1,2,3], [1,2,4,1]] batch_size = 2 Then the maximum sequence length is 8. If it is less than 8, fill it ...

Posted by sonic_2k_uk on Sat, 14 May 2022 05:21:32 +0300

Complete CAM based on cifar10 data set

preface In the previous blog, we simply completed the pseudo code of CAM algorithm, address: https://blog.csdn.net/qq_43534932/article/details/107425740 Without real operation, we use the small data set cifar10 to complete the realization of the basic functions of CAM. cifar10 data set: it is a data set collected by CIFAR(Candian Institute For ...

Posted by brownca on Fri, 13 May 2022 11:57:46 +0300

Introduction to OpenCV -- image smoothing technology

About image sampling There are many ways to obtain digital images. Usually, image sampling can be used to digitize continuous images. The collection relationship between sampling points is the grid, and the infinitesimal sampling points between grids correspond to the pixels in the image. Sampling on image transformation is the process of cha ...

Posted by rimelta on Fri, 13 May 2022 03:46:16 +0300

Model quantization: static quantization and dynamic quantization of paddy model

Transferred from AI Studio, original link: Model quantization (2): static and dynamic quantization of Paddle model - Propeller AI Studio 1. Introduction The previous article briefly introduced the basic principle and simple examples of model quantization This time, we will continue the previous content, combined with the tool library Paddle ...

Posted by billli on Fri, 13 May 2022 01:27:08 +0300

TF-IDF model for NLP text keyword extraction: epidemic text data analysis based on stuttering word segmentation and wordcloud

TF-IDF model: analysis of epidemic text data based on stuttering word segmentation and wordcloud Recently, we have made a text data analysis of China's policy on the COVID-19. Let's introduce the relevant knowledge to summarize and consolidate, and hope to help more people. 1, TF IDF: keyword extraction Stop words: stop words are words o ...

Posted by Dasndan on Fri, 13 May 2022 00:46:36 +0300

[deep learning experiment] the second time: analysis and prediction of influencing factors of fiscal revenue

Relevant knowledge Set variable X ( 0 ) = { X ( ...

Posted by Alecdude on Fri, 13 May 2022 00:36:23 +0300

[PyTorch learning notes] 1.2 introduction to tensor

thumbnail: https://image.zhangxiann.com/...toc: truedate: 2020/2/5 20:39:20disqusId: zhangxiancategories: PyTorch tags: AI Deep Learning Code of this chapter: https://github.com/zhangxiann/PyTorch_Practice/blob/master/lesson1/tensor_introduce1.py https://github.com/zhangxiann/PyTorch_Practice/blob/master/lesson1/tensor_introduce1.py Tensor c ...

Posted by sean14592 on Wed, 11 May 2022 06:42:57 +0300

Master 20 knowledge points of Pandas time series analysis

Author | Soner Y ı ld ı r ı mCompile VKSource: towards Data Science There are many definitions of time series data, which represent the same meaning in different ways. A simple definition is that time series data is a data point containing a sequence timestamp. The source of time series data is periodic measurement or observation. We observed ...

Posted by alexk1781 on Tue, 10 May 2022 03:32:07 +0300

Handwritten digit picture recognition - convolutional neural network

import dependencies from tensorflow import keras from matplotlib import pyplot as plt from tensorflow.keras.layers import Conv2D, MaxPool2D, Flatten, Dense   Download dataset The mnist dataset is a public handwritten digit dataset. There are a total of 7W 28*28 pixel 0-9 handwritten digit pictures and labels, of which 6W are training sets and ...

Posted by SuperTini on Sun, 08 May 2022 07:16:41 +0300

Play with PerfDogService Demo analysis from scratch

1.Demo folder After downloading PerfDogService, the folder looks like this. Document description: PerfDogService.exe: Service startup file. Generally, it does not need to be started manually. The automatic script will automatically start this program.perfdog. Proto: definition file of grpc interface and protobuf structureDemo / Python: the dem ...

Posted by mtb211 on Sun, 08 May 2022 01:57:51 +0300