A small framework mimics PyTorch using CuPy or NumPy

CuPyTorch是一个小型PyTorch,名字来源于: 不同于已有的几个使用NumPy实现PyTorch的开源项目,本项目通过CuPy支持cuda计算 发音与Cool PyTorch接近,因为使用不超过1000行纯Python代码实现PyTorch确实很cool CuPyTorch支持numpy和cupy两种计算后端,实现大量PyTorch常用功能,力求99%兼容PyTorch语法语义,并能轻松扩展,以下列出已经完成的功能: cloc的代码统计结果: Language files blank comment code Python 22 353 27 992 自动微分示例:

Read more

Code release for ConvNeXt model

Official PyTorch implementation of ConvNeXt, from the following paper: A ConvNet for the 2020s. arXiv 2022.Zhuang Liu, Hanzi Mao, Chao-Yuan Wu, Christoph Feichtenhofer, Trevor Darrell and Saining XieFacebook AI Research, UC Berkeley We propose ConvNeXt, a pure ConvNet model constructed entirely from standard ConvNet modules. ConvNeXt is accurate, efficient, scalable and very simple in design. Catalog ImageNet-1K Training Code ImageNet-22K Pre-training Code ImageNet-1K Fine-tuning Code Downstream Transfer (Detection, Segmentation) Code Results and Pre-trained Models ImageNet-1K trained models name resolution [email protected] […]

Read more

Sparse Progressive Distillation: Resolving Overfitting under Pretrain-and-Finetune Paradigm

This is the Pytorch implementation for sparse progressive distillation (SPD). For more details about the motivation, techniques and experimental results, refer to our paper here. Environment Preparation (using python3) pip install -r requirements.txt Dataset Preparation The original GLUE dataset could be downloaded here. We use finetuned BERT_base as the teacher. For each task of GLUE benchmark, we obtain the finetuned model using the original huggingface transformers code with the following script.

Read more

unofficial pytorch implement of “Squareplus: A Softplus-Like Algebraic Rectifier”

unofficial pytorch implement of “Squareplus: A Softplus-Like Algebraic Rectifier” SquarePlus Squareplus is a Softplus-Like activation function. It is a very simple smooth approximation of ReLU. The form of squareplus is very simple. It only uses addition, multiplication, division and square root: b>0 in this form. When b=0, it degenerates to ReLU(x)=max(x,0) The original paper pointed out that since only addition, multiplication, division and square root are used, the speed of squareplus (mainly on the CPU) will be faster than SoftPlus […]

Read more

Attention for PyTorch with Linear Memory Footprint

Unofficially implements https://arxiv.org/abs/2112.05682 to get Linear Memory Cost on Attention (+ some sidekick speedup on the GPU when compared to reference implementation in JAX) Usage: git clone https://github.com/CHARM-Tx/linear_mem_attention-pytorch cd linear_mem_attention_pytorch python setup.py install Usage: High Level from linear_mem_attention_torch.

Read more

Unofficial PyTorch implementation of Guided Dropout

This is a simple implementation of Guided Dropout for research.We try to reproduce the algorithm according to the paper published in AAA-19, but we can’t guarantee the performance reported in the paper.We will list some experiment results soon. TODO Release the reproduced code list experiment results … Setup pip install -r requirements.txt Run Run Guided Dropout on CIFAR10 Dataset (mlp 3 hidden layers with 1024 nodes) python mainpro.py –dataset CIFAR10 –arc mlp –mlp-depth 3 –hidden-dim 1024 -e    

Read more

Pytorch based library to rank predicted bounding boxes using text/image user’s prompts

Pytorch based library to rank predicted bounding boxes using text/image user’s prompts. Usually, object detection models trains to detect common classes of objects such as “car”, “person”, “cup”, “bottle”. But sometimes we need to detect more complex classes such as “lady in the red dress”, “bottle of whiskey”, or “where is my red cup” instead of “person”, “bottle”, “cup” respectively. One way to solve this problem is to train more complex detectors that can detect more complex classes, but we […]

Read more

STAR: A Structure-aware Lightweight Transformer for Real-time Image Enhancement

STAR-pytorch Implementation for paper “STAR: A Structure-aware Lightweight Transformer for Real-time Image Enhancement” (ICCV 2021). CVF (pdf) STAR-DCE The pytorch implementation of low light enhancement with STAR on Adobe-MIT FiveK dataset. You can find it in STAR-DCE directory. Here we adopt the pipleline of Zero-DCE ( paper | code ), just replacing the CNN backbone with STAR. In Zero-DCE, for each image the network will regress a group of curves, which will then applied on the source image iteratively. You […]

Read more

Exploring Simple Siamese Representation Learning

A PyTorch implementation which refers to repo for the paper Exploring Simple Siamese Representation Learning by Xinlei Chen & Kaiming He Additional functionals support graph data additional graph augmentations is added Training training gcn on ciaw datasetCUDA_VISIBLE_DEVICES=0 python train_ciaw.py –data_dir ../Data/ –log_dir ./logs/ -c configs/simsiam_ciaw.yaml –ckpt_dir ~/.cache/ –hide_progress GitHub View Github    

Read more
1 2 3 4 5 6 14