Interpretation of longform code structure
While longformer extends maxlen, there are many structural difficulties, which are gradually analyzed here.
_ sliding_ chunks_ query_ key_ Structural transformation in matmul function
The hardest thing to understand here is these sentences
query_size = list(query.size())
query_size[1] = query_size[1]*2-1
query_stride = list(query.stride( ...
Added by throx on Sat, 12 Feb 2022 16:54:24 +0200
[machine learning] WGAN theory and code analysis based on pytoch
catalogue
1. There is a problem with the original GAN
2 WGAN principle
3 code understanding
GitHub source code
Reference article: Amazing Wasserstein GAN - Zhihu (zhihu.com)
1. There is a problem with the original GAN
In practical training, GAN has some problems, such as difficult training, the loss of generator and discriminator can no ...
Added by kristo5747 on Sat, 12 Feb 2022 15:40:29 +0200
Reading and visualization of dicom,mhd and raw files in medical imaging
Medical imaging
Medical image refers to the technology and processing process of obtaining internal tissue image of human body or part of human body in a non-invasive way for medical treatment or medical research.
At present, the main processing methods include: X-ray imaging (X-ray), computed tomography (CT ...
Added by Leadwing on Sat, 12 Feb 2022 14:36:31 +0200
pytorch learning record III
1. Neural network: build small actual combat and use Sequential
Take CIFAR10 model as an example
import torch
import torchvision
from tensorboardX import SummaryWriter
from torch import nn
from torch.nn import ReLU, Sigmoid, Linear, Conv2d, MaxPool2d, Flatten
from torch.utils.data import DataLoader
class test_cifar(nn.Module):
def _ ...
Added by jmcall10 on Sat, 12 Feb 2022 02:04:20 +0200
Engineering landing competition - TIPC and Serving support examples
General introduction
The project is mainly based on github project Introduce how to access TIPC and how to support serving. For more information about the original project, please see readme Understand MD. In addition, you can also refer to the official TIPC and Serving To connect your own model to TIPC and serve support.
TIPC basic chain
&c ...
Added by Agtronic on Fri, 11 Feb 2022 23:58:22 +0200
Word2vec (skip gram and CBOW) - PyTorch
Word vector is a vector used to express the meaning of words, and can also be regarded as the feature vector of words. The technology of mapping words to real vectors is called word embedding.
1, Word embedding (Word2vec)
The unique heat vector can not accurately express the similarity between different words. word2vec is proposed to so ...
Added by j0n on Fri, 11 Feb 2022 13:14:28 +0200
8 Python libraries that can improve the efficiency of data science and save valuable time
In data science, you may waste a lot of time coding and waiting for the computer to run something. So I chose some Python libraries that can help you save valuable time.1,OptunaOptuna is an open source hyperparametric optimization framework, which can automatically find the best hyperparameters for machine learning models.The most basic (and po ...
Added by Horatiu on Fri, 11 Feb 2022 08:29:27 +0200
Word2vec of recommendation system
Word2vec of recommendation system
Objective: in the tasks related to natural language processing, we should hand over the natural language to the algorithm in machine learning. Usually, we need to mathematicize the language, because the machine is not a human, and the machine only recognizes mathematical symbols. Vectors are things that people ...
Added by TheMayhem on Fri, 11 Feb 2022 07:41:59 +0200
PaddleX model, C + + deployment, python/c + + interaction
After the PaddleX model is deployed in C + +, Python calls and reads the data returned from the dll
Tip: you can add the directories of all articles in the series here. You need to add the directories manually For example: the first chapter is the use of pandas, an introduction to Python machine learning
Tip: after writing the article, the ...
Added by cueball2000uk on Fri, 11 Feb 2022 05:45:05 +0200
Machine learning - Case Study 1: happiness prediction
Case 1 (happiness prediction)
Background introduction
Happiness involves philosophy, psychology, sociology, economics and other disciplines. At the same time, it is closely related to everyone's life. Everyone has his own measurement standard for happiness. If we can find the commonalities that affect happiness and find the policy factors tha ...
Added by fuji on Fri, 11 Feb 2022 01:25:45 +0200