entry_point
stringlengths
1
65
original_triton_python_code
stringlengths
208
619k
optimised_triton_code
stringlengths
1.15k
275k
repo_name
stringlengths
7
115
module_name
stringlengths
1
65
synthetic
bool
1 class
uuid
int64
0
18.5k
licenses
listlengths
1
6
stars
int64
0
19.8k
sha
stringlengths
40
40
repo_link
stringlengths
72
180
GroupNorm32
import torch import torch.nn as nn import torch.nn.functional as F class GroupNorm32(nn.GroupNorm): def __init__(self, num_groups, num_channels, swish, eps=1e-05): super().__init__(num_groups=num_groups, num_channels=num_channels, eps=eps) self.swish = swish def forward(self, x):...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
johnpaulbin/glide-text2im
GroupNorm32
false
12,625
[ "MIT" ]
0
4897050c4c540316dfb1ec7e6ff95698bcb20487
https://github.com/johnpaulbin/glide-text2im/tree/4897050c4c540316dfb1ec7e6ff95698bcb20487
Classifier
import torch import torch.nn as nn class Classifier(nn.Module): def __init__(self, latent_size, output_size): super().__init__() self.fc1 = nn.Linear(latent_size, 100) self.relu1 = nn.LeakyReLU(0.2) self.fc2 = nn.Linear(100, 50) self.relu2 = nn.LeakyReLU(0.2) self....
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
BruceWen120/neurips-reproducibility-challenge-2019
Classifier
false
8,955
[ "Apache-2.0" ]
0
b0635aefe83e3f895ce0991913824e861bb7d02d
https://github.com/BruceWen120/neurips-reproducibility-challenge-2019/tree/b0635aefe83e3f895ce0991913824e861bb7d02d
BridgeFeatLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice from torch import nn from to...
Luxios22/IDM
BridgeFeatLoss
false
2,602
[ "MIT" ]
0
8d51103b7c252e6304e2a361976e16ed4b523944
https://github.com/Luxios22/IDM/tree/8d51103b7c252e6304e2a361976e16ed4b523944
ConvertPointsToHomogeneous
import torch import torch.nn as nn def convert_points_to_homogeneous(points): """Function that converts points from Euclidean to homogeneous space. See :class:`~torchgeometry.ConvertPointsToHomogeneous` for details. Examples:: >>> input = torch.rand(2, 4, 3) # BxNx3 >>> output = tgm.co...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
Paultool/frankmocap
ConvertPointsToHomogeneous
false
14,151
[ "BSD-3-Clause" ]
1,612
b8bb7b587c0841b9292edb147729de581c66054c
https://github.com/Paultool/frankmocap/tree/b8bb7b587c0841b9292edb147729de581c66054c
TorchGloVeLoss
import torch import torch.nn as nn import torch.utils.data class TorchGloVeLoss(nn.Module): def __init__(self): super().__init__() self.reduction = 'sum' def forward(self, diffs, weights): return torch.sum(0.5 * torch.mul(weights, diffs ** 2)) def get_inputs(): return [torch.ra...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dynamo.guard...
atticusg/cs224u
TorchGloVeLoss
false
1,491
[ "Apache-2.0" ]
0
66e0f2714e246dcb8836f706ae9ff5613c51ed34
https://github.com/atticusg/cs224u/tree/66e0f2714e246dcb8836f706ae9ff5613c51ed34
Router
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
ppvalluri09/annotated_deep_learning_paper_implementations
Router
false
11,117
[ "MIT" ]
0
387b6dfd1ef1f6d295e9394c24b5798071d9a3e4
https://github.com/ppvalluri09/annotated_deep_learning_paper_implementations/tree/387b6dfd1ef1f6d295e9394c24b5798071d9a3e4
ScaledDotProductAttention
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
ygnn123/training_extensions
ScaledDotProductAttention
false
4,687
[ "Apache-2.0" ]
0
c3aeba9359b0d4e0ef9c054de777d3ec081a9892
https://github.com/ygnn123/training_extensions/tree/c3aeba9359b0d4e0ef9c054de777d3ec081a9892
MLPSoftQNetwork
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
SAMMiCA/DL_based_E2E_Driving
MLPSoftQNetwork
false
17,886
[ "MIT" ]
4
01f7d74a0db7ed745cf27b9a1ebab0246015ecbd
https://github.com/SAMMiCA/DL_based_E2E_Driving/tree/01f7d74a0db7ed745cf27b9a1ebab0246015ecbd
AdaptiveCatAvgMaxPool2d
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torchvision import datasets as datasets import torch.nn as nn import torch.nn.functi...
Alibaba-MIIL/ZS_SDL
AdaptiveCatAvgMaxPool2d
false
8,041
[ "MIT" ]
20
769fe4f57d2d458a7c4b5468a6395c9b296b1dad
https://github.com/Alibaba-MIIL/ZS_SDL/tree/769fe4f57d2d458a7c4b5468a6395c9b296b1dad
Spatial_Attention_layer
import torch import torch.utils.data import torch.nn.functional as F import torch.nn as nn class Spatial_Attention_layer(nn.Module): """ compute spatial attention scores """ def __init__(self, DEVICE, in_channels, num_of_vertices, num_of_timesteps): super(Spatial_Attention_layer, self).__init...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
kevin-xuan/Traffic-Benchmark
Spatial_Attention_layer
false
15,836
[ "MIT" ]
120
b9f8e40b4df9b58f5ad88432dc070cbbbcdc0228
https://github.com/kevin-xuan/Traffic-Benchmark/tree/b9f8e40b4df9b58f5ad88432dc070cbbbcdc0228
ConvBlockFixup
import torch from torch import nn class ConvBlockFixup(nn.Module): def __init__(self, filter_width, input_filters, nb_filters, dilation): super(ConvBlockFixup, self).__init__() self.filter_width = filter_width self.input_filters = input_filters self.nb_filters = nb_filters ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_s...
OmarNajdi/dl-for-har
ConvBlockFixup
false
934
[ "MIT" ]
0
5e1b7c29caf2b41fcba106cd901c45d8f2d18429
https://github.com/OmarNajdi/dl-for-har/tree/5e1b7c29caf2b41fcba106cd901c45d8f2d18429
SqueezeExcite
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
a1004123217/pytorch-mobile
SqueezeExcite
false
1,349
[ "MIT" ]
0
97974af3259a2073efbc334d57841efbd3eaadfb
https://github.com/a1004123217/pytorch-mobile/tree/97974af3259a2073efbc334d57841efbd3eaadfb
PixelSort
import torch from torch import nn class PixelSort(nn.Module): """The inverse operation of PixelShuffle Reduces the spatial resolution, increasing the number of channels. Currently, scale 0.5 is supported only. Later, torch.nn.functional.pixel_sort may be implemented. Reference: http://pyto...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
pshn111/803-Project
PixelSort
false
12,903
[ "MIT" ]
0
19430f25d91b31e4b9a7f1d864e2aa2851dcddf0
https://github.com/pshn111/803-Project/tree/19430f25d91b31e4b9a7f1d864e2aa2851dcddf0
FocalLoss
import torch import torch.nn as nn from torch.nn.functional import binary_cross_entropy class FocalLoss(nn.Module): """ Focal Loss for Dense Object Detection [https://arxiv.org/abs/1708.02002] Digest the paper as below: α, balances the importance of positive/negative examples γ, focusing p...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
Luoxd1996/Rank2nuclearSegmentation
FocalLoss
false
17,623
[ "MIT" ]
5
bd85ac13eec7ce18c286efd521a27486483da904
https://github.com/Luoxd1996/Rank2nuclearSegmentation/tree/bd85ac13eec7ce18c286efd521a27486483da904
Autoencoder
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
LongerVision/oidn
Autoencoder
false
5,629
[ "Apache-2.0" ]
1
2f9e59f8b747b217f78c5c274f4f2bff347a03a7
https://github.com/LongerVision/oidn/tree/2f9e59f8b747b217f78c5c274f4f2bff347a03a7
Decoder
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
bicv/POLO
Decoder
false
6,333
[ "MIT" ]
1
b8d4f9014796a4eb24c178d8be611a0b3b4c44df
https://github.com/bicv/POLO/tree/b8d4f9014796a4eb24c178d8be611a0b3b4c44df
Actor
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
MIMUW-RL/spp-rl
Actor
false
17,647
[ "MIT" ]
7
86b96cdd220cc4eae86f7cfd26924c69b498dcc6
https://github.com/MIMUW-RL/spp-rl/tree/86b96cdd220cc4eae86f7cfd26924c69b498dcc6
ChannelWiseLayerNorm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
intflow/FullSubNet
ChannelWiseLayerNorm
false
12,537
[ "MIT" ]
0
193091acac4c747730db5ace33fd1b8870e7c735
https://github.com/intflow/FullSubNet/tree/193091acac4c747730db5ace33fd1b8870e7c735
EuclideanDistance
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data.dataloader from torch import nn import torch.nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
adriensas/flair
EuclideanDistance
false
9,756
[ "MIT" ]
0
f01b0e7ff9a87d3862acae50aeaffdc8e8b8ac21
https://github.com/adriensas/flair/tree/f01b0e7ff9a87d3862acae50aeaffdc8e8b8ac21
LossyRGB
import torch import torch.nn.parallel import torch.utils.data from torch import nn import torch.fft class LossyRGB(nn.Module): def forward(self, ycbcr: 'torch.Tensor'): return torch.cat([ycbcr[:, 0:1] + 1.402 * ycbcr[:, 2:3], ycbcr[:, 0 :1] - 0.34413 * ycbcr[:, 1:2] - 0.71414 * ycbcr[:, 2:3],...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn.parallel import torch.utils.data from torch import nn import torch.fft assert_size_stride = torch._C._dynamo.guards.assert_s...
KazutakaYamanouchi/bachelor-study
LossyRGB
false
2,625
[ "Apache-2.0" ]
0
a5b8392459e7649cb8a35d09e65bd269d13b5297
https://github.com/KazutakaYamanouchi/bachelor-study/tree/a5b8392459e7649cb8a35d09e65bd269d13b5297
ScaledDotProductAttention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Nitin-Mane/External-Attention-pytorch
ScaledDotProductAttention
false
14,117
[ "MIT" ]
4,466
1ceda306c41063af11c956334747763444a4d83f
https://github.com/Nitin-Mane/External-Attention-pytorch/tree/1ceda306c41063af11c956334747763444a4d83f
PositionAttentionModule
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
LiChengChen666/DetectDee
PositionAttentionModule
false
9,875
[ "Apache-2.0" ]
0
1e6aaa0d15b1fc12d1342d8a922004e372b5f437
https://github.com/LiChengChen666/DetectDee/tree/1e6aaa0d15b1fc12d1342d8a922004e372b5f437
PairwiseNetwork
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
HardiRathod/table-linker
PairwiseNetwork
false
8,217
[ "MIT" ]
21
5d0542608cdba72b0d7d8afc58c27f27b8a59192
https://github.com/HardiRathod/table-linker/tree/5d0542608cdba72b0d7d8afc58c27f27b8a59192
LinearCaps
import math import torch from torch import nn import torch.nn.functional as F from torch.nn.parameter import Parameter class LinearCaps(nn.Module): def __init__(self, in_features, num_C, num_D, bias=False, eps=0.0001): super(LinearCaps, self).__init__() self.in_features = in_features self...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import math from to...
WdBlink/AugMix-3DOCUNet-Brats2019
LinearCaps
false
5,964
[ "MIT" ]
1
125c6c8682b51a550eeac9173d13d0a211576abc
https://github.com/WdBlink/AugMix-3DOCUNet-Brats2019/tree/125c6c8682b51a550eeac9173d13d0a211576abc
FCDiscriminator_low
import torch from torch import nn class FCDiscriminator_low(nn.Module): def __init__(self, inplanes, planes=64): super(FCDiscriminator_low, self).__init__() self.conv1 = nn.Conv2d(inplanes, planes, kernel_size=3, stride=2, padding=1) self.conv2 = nn.Conv2d(planes, planes * 2, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_s...
seabearlmx/PA-DAN
FCDiscriminator_low
false
4,298
[ "MIT" ]
0
bdd1200396d102e68acdd265db9d22ddb83b6404
https://github.com/seabearlmx/PA-DAN/tree/bdd1200396d102e68acdd265db9d22ddb83b6404
EqualizedWeight
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math import numpy as np from torch import nn import torch.utils.data from typing import List import torch.nn.functional import torch....
techthiyanes/annotated_deep_learning_paper_implementations
EqualizedWeight
false
16,550
[ "MIT" ]
3,714
8af24da2dd39a9a87482a4d18c2dc829bbd3fd47
https://github.com/techthiyanes/annotated_deep_learning_paper_implementations/tree/8af24da2dd39a9a87482a4d18c2dc829bbd3fd47
PatchEmbed
import torch from torch import nn class PatchEmbed(nn.Module): """ Image to Patch Embedding """ def __init__(self, img_size=224, patch_size=16, in_chans=3, embed_dim=768): super().__init__() num_patches = img_size // patch_size * (img_size // patch_size) self.img_size = img_size ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
EscVM/EscVM_YT
PatchEmbed
false
8,068
[ "Apache-2.0" ]
19
0ff1c47d7604d2452d7c9c2edd9b2db66781670a
https://github.com/EscVM/EscVM_YT/tree/0ff1c47d7604d2452d7c9c2edd9b2db66781670a
Quantize
import torch from torch import nn from torch.nn import functional as F class Quantize(nn.Module): """ Discretization bottleneck part of the VQ-VAE. Inputs: - n_e : number of embeddings - e_dim : dimension of embedding - beta : commitment cost used in loss term, beta * ||z_e(x)-sg[e]||^2 ""...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn from torch.nn import functional as F assert_size_stride = t...
jkulhanek/viewformer
Quantize
false
15,728
[ "MIT" ]
87
9ad2c5a2f7abe4b7ff490ced0132bf3d2f07e29c
https://github.com/jkulhanek/viewformer/tree/9ad2c5a2f7abe4b7ff490ced0132bf3d2f07e29c
SeeInDark
import torch import torch.nn as nn class SeeInDark(nn.Module): def __init__(self, num_classes=10): super(SeeInDark, self).__init__() self.conv1_1 = nn.Conv2d(4, 32, kernel_size=3, stride=1, padding=1) self.conv1_2 = nn.Conv2d(32, 32, kernel_size=3, stride=1, padding=1) self.pool1 ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
hyeokjae-choi/pytorch-Learning-to-See-in-the-Dark
SeeInDark
false
10,220
[ "MIT" ]
0
b32bf991072decb3aea348d8cd59acbf34d5da2c
https://github.com/hyeokjae-choi/pytorch-Learning-to-See-in-the-Dark/tree/b32bf991072decb3aea348d8cd59acbf34d5da2c
SeparableConvBlock
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math import torch.nn.functional as F import torch.utils.data from itertoo...
WFDetector/WFDetection
SeparableConvBlock
false
2,957
[ "Apache-2.0" ]
0
b16d35b3a3a5de62de9e0bac83eccd21b6358b53
https://github.com/WFDetector/WFDetection/tree/b16d35b3a3a5de62de9e0bac83eccd21b6358b53
Upsample
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
DRL-CASIA/Perception
Upsample
false
7,935
[ "MIT" ]
39
a0e7d3957267ce92a82b03ab3eca96916d22c4f2
https://github.com/DRL-CASIA/Perception/tree/a0e7d3957267ce92a82b03ab3eca96916d22c4f2
LayerNormalization
import torch import torch.nn as nn class LayerNormalization(nn.Module): def __init__(self, hidden_size, eps=1e-05): super(LayerNormalization, self).__init__() self.eps = eps self.a2 = nn.Parameter(torch.ones(1, hidden_size), requires_grad=True) self.b2 = nn.Parameter(torch.zeros(1...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert...
NLP-Discourse-SoochowU/rst_dp2019Bottom2Up
LayerNormalization
false
5,633
[ "MIT" ]
1
ac1624127c9c8a3301685193ac8239357e01f6ca
https://github.com/NLP-Discourse-SoochowU/rst_dp2019Bottom2Up/tree/ac1624127c9c8a3301685193ac8239357e01f6ca
RBF
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
maet3608/torchy
RBF
false
3,966
[ "Apache-2.0" ]
0
8c73732a1d4631bd97bfafdc18e52a22ff5410f7
https://github.com/maet3608/torchy/tree/8c73732a1d4631bd97bfafdc18e52a22ff5410f7
ChannelNorm2D
import torch import torch.nn as nn class ChannelNorm2D(nn.Module): """ Similar to default Torch instanceNorm2D but calculates moments over channel dimension instead of spatial dims. Expects input_dim in format (B,C,H,W) """ def __init__(self, input_channels, momentum=0.1, eps=0.001, affine=T...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
ahmedfgad/high-fidelity-generative-compression
ChannelNorm2D
false
6,118
[ "Apache-2.0" ]
1
f3c6aa3472e3c629cbc35eefb0957119c913054a
https://github.com/ahmedfgad/high-fidelity-generative-compression/tree/f3c6aa3472e3c629cbc35eefb0957119c913054a
Linear
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math from torch import Tensor from torch.nn import Parameter import torch...
douglasrizzo/pytorch_geometric
Linear
false
12,294
[ "MIT" ]
0
effc617c6ad6daad506038bb79e4407082e74740
https://github.com/douglasrizzo/pytorch_geometric/tree/effc617c6ad6daad506038bb79e4407082e74740
Model
import torch import torch.nn as nn import torch.nn.functional as F class Model(nn.Module): def __init__(self): super(Model, self).__init__() self.linear1 = nn.Linear(28 * 28, 32) self.linear2 = nn.Linear(32, 10) def forward(self, inputs): x = inputs.view(-1, 28 * 28) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
emirojaseng/pytorch-meta-optimizer
Model
false
15,311
[ "MIT" ]
298
3641981c990150ceb6c55d25a05ba76388f9ec69
https://github.com/emirojaseng/pytorch-meta-optimizer/tree/3641981c990150ceb6c55d25a05ba76388f9ec69
KernelConv
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
xenbaloch/efficientderain
KernelConv
false
16,788
[ "MIT" ]
109
d5646815fd14a5a03c859102ecd2f298db7e53be
https://github.com/xenbaloch/efficientderain/tree/d5646815fd14a5a03c859102ecd2f298db7e53be
LayerNormConv2d
import torch from torch import nn import torch.nn class LayerNormConv2d(nn.Module): def __init__(self, num_features, eps=1e-05, affine=True): super().__init__() self.num_features = num_features self.affine = affine self.eps = eps if self.affine: self.gamma = nn...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn import torch.nn assert_size_stride = torch._C._dynamo.guar...
Jack12xl/scene-representation-networks
LayerNormConv2d
false
599
[ "MIT" ]
0
2691b23c956cf188a1fe4c84a888b19871cac8f4
https://github.com/Jack12xl/scene-representation-networks/tree/2691b23c956cf188a1fe4c84a888b19871cac8f4
CircleLoss
import torch from torch import Tensor from torch import nn from torchvision.transforms import * class CircleLoss(nn.Module): def __init__(self, m: 'float', gamma: 'float') ->None: super(CircleLoss, self).__init__() self.m = m self.gamma = gamma self.soft_plus = nn.Softplus() ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math from torch ...
TxuanYu/Person_reID_baseline_pytorch
CircleLoss
false
14,523
[ "MIT" ]
3,358
10574b17cc8fd1fc8ade88f134679e281fdb01cc
https://github.com/TxuanYu/Person_reID_baseline_pytorch/tree/10574b17cc8fd1fc8ade88f134679e281fdb01cc
MaxPool3x3
import torch import torch.nn as nn import torch.utils.data class MaxPool3x3(nn.Module): """3x3 max pool with no subsampling.""" def __init__(self, in_channels, out_channels, kernel_size=3, stride=1, padding=1): super(MaxPool3x3, self).__init__() self.maxpool = nn.MaxPool2d(kernel_size...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dynamo.guard...
mc-nya/unnas
MaxPool3x3
false
7,189
[ "MIT" ]
1
f778bb743144cf56ce2a48ccca20e9f3a97a7b84
https://github.com/mc-nya/unnas/tree/f778bb743144cf56ce2a48ccca20e9f3a97a7b84
MultiheadAttention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
muqiaoy/dl_signal
MultiheadAttention
false
16,135
[ "MIT" ]
54
3a30d14982016644bfc96a7d1ca0109b441f17fd
https://github.com/muqiaoy/dl_signal/tree/3a30d14982016644bfc96a7d1ca0109b441f17fd
InstanceNormLayer
import torch import torch.nn as nn class InstanceNormLayer(nn.Module): """Implements instance normalization layer.""" def __init__(self, epsilon=1e-08): super().__init__() self.eps = epsilon def forward(self, x): if len(x.shape) != 4: raise ValueError( ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
huaji0353/higan
InstanceNormLayer
false
12,511
[ "MIT" ]
0
a082dc2be8651725d38b8d48d7e1c7261740013d
https://github.com/huaji0353/higan/tree/a082dc2be8651725d38b8d48d7e1c7261740013d
SinkhornKnopp
import torch class SinkhornKnopp(torch.nn.Module): def __init__(self, num_iters=3, epsilon=0.05): super().__init__() self.num_iters = num_iters self.epsilon = epsilon @torch.no_grad() def forward(self, logits): Q = torch.exp(logits / self.epsilon).t() B = Q.shape[...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_str...
DonkeyShot21/UNO
SinkhornKnopp
false
13,639
[ "MIT" ]
87
7613d3f8c58e5f16ee0d68fdd803ef442d819af4
https://github.com/DonkeyShot21/UNO/tree/7613d3f8c58e5f16ee0d68fdd803ef442d819af4
Pooler
import torch import torch.nn as nn import torch.utils.data import torchvision.transforms.functional as F import torch.nn.functional as F from torch.nn.modules.linear import Linear import torch.nn.init as init from torch.nn.parameter import Parameter from torch.nn import Parameter class Pooler(nn.Module): """Poole...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
ExtremeViscent/ColossalAI-Examples
Pooler
false
2,658
[ "Apache-2.0" ]
0
98ced2435d8d814f06740ab10d3e277ca91a83c7
https://github.com/ExtremeViscent/ColossalAI-Examples/tree/98ced2435d8d814f06740ab10d3e277ca91a83c7
Actor
import torch import torch.nn as nn import torch.nn.functional as F class Actor(nn.Module): def __init__(self, state_dim, action_dim, max_action): super(Actor, self).__init__() self.l1 = nn.Linear(state_dim, 256) self.l2 = nn.Linear(256, 256) self.l3 = nn.Linear(256, action_dim) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
ChristianLin0420/DeepRL
Actor
false
2,105
[ "MIT" ]
0
143a9bfebd264229d9d26fcdc070065225774e04
https://github.com/ChristianLin0420/DeepRL/tree/143a9bfebd264229d9d26fcdc070065225774e04
CoSirenModule
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import math a...
qway/nerfmeshes
CoSirenModule
false
16,303
[ "MIT" ]
113
d983dcbbcfec1337c9f2040969213c6d1ea0c39e
https://github.com/qway/nerfmeshes/tree/d983dcbbcfec1337c9f2040969213c6d1ea0c39e
ResidualConvUnit
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
Northshoot/3d-photo-inpainting
ResidualConvUnit
false
11,768
[ "MIT" ]
0
49dd36ce4a277929831f09d978721b3fdb87eb25
https://github.com/Northshoot/3d-photo-inpainting/tree/49dd36ce4a277929831f09d978721b3fdb87eb25
NormKLLoss
import torch import torch.utils.checkpoint import torch as th from torch.nn.modules.loss import _Loss import torch.jit class NormKLLoss(_Loss): def __init__(self, unit_average=False): super(NormKLLoss, self).__init__() self.unit_average = unit_average def forward(self, recog_mu, recog_logvar...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.utils.checkpoint from torch.nn.modules.loss import _Loss imp...
RoderickGu/Pretraining_GPT
NormKLLoss
false
17,853
[ "Apache-2.0" ]
4
0a3ecd38116dc271e273f57490b9b45b660bf401
https://github.com/RoderickGu/Pretraining_GPT/tree/0a3ecd38116dc271e273f57490b9b45b660bf401
TimeIntervalTransformerLayer
import torch import numpy as np import torch.nn as nn import torch.distributions class TimeIntervalMultiHeadAttention(nn.Module): def __init__(self, d_model, n_heads, kq_same=False, bias=True): super().__init__() """ It also needs position and interaction (time interval) key/value input. ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Yingting-dev/ReChorus
TimeIntervalTransformerLayer
false
2,997
[ "MIT" ]
0
a16bc1e42f3e90e889133d7476c52ada44db573b
https://github.com/Yingting-dev/ReChorus/tree/a16bc1e42f3e90e889133d7476c52ada44db573b
NoiseNet
import torch import torch.nn as nn import torch.nn.functional as F class NoiseNet(nn.Module): def __init__(self, channels=3, kernel_size=5): super(NoiseNet, self).__init__() self.kernel_size = kernel_size self.channels = channels to_pad = int((self.kernel_size - 1) / 2) se...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
GuYuanjie/DeepFusionPrior
NoiseNet
false
5,242
[ "MIT" ]
1
a7126e073ed8c49b6a9a662492b64aaeee56cc01
https://github.com/GuYuanjie/DeepFusionPrior/tree/a7126e073ed8c49b6a9a662492b64aaeee56cc01
IOUloss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
Chris-hughes10/YOLOX
IOUloss
false
5,003
[ "Apache-2.0" ]
1
981df30285839469a23cb925ed0a0f3714e46514
https://github.com/Chris-hughes10/YOLOX/tree/981df30285839469a23cb925ed0a0f3714e46514
MaxSpatialPoolP4
import torch class MaxSpatialPoolP4(torch.nn.Module): def __init__(self, kernel_size, stride=None, padding=0): super().__init__() self.inner = torch.nn.MaxPool2d(kernel_size, stride, padding) def forward(self, x): y = x.view(x.size(0), -1, x.size(3), x.size(4)) y = self.inner...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
claudio-unipv/groupcnn
MaxSpatialPoolP4
false
12,222
[ "MIT" ]
0
2b1514f5a0fb9a78c6f646e1c075e5c3d5af9c0c
https://github.com/claudio-unipv/groupcnn/tree/2b1514f5a0fb9a78c6f646e1c075e5c3d5af9c0c
ContrastivePairwiseEmbeddingLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
pokidyshev/catalyst
ContrastivePairwiseEmbeddingLoss
false
16,264
[ "Apache-2.0" ]
46
bfe2cc2af7b02bd954fb0b4a0cae8b350f56789a
https://github.com/pokidyshev/catalyst/tree/bfe2cc2af7b02bd954fb0b4a0cae8b350f56789a
MyActivation
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
CaichaoGitHub/model_optimization_demo
MyActivation
false
11,279
[ "Apache-2.0" ]
0
b3bca3ad4a1b972fe069049f9efd7365a22733c6
https://github.com/CaichaoGitHub/model_optimization_demo/tree/b3bca3ad4a1b972fe069049f9efd7365a22733c6
InstanceNormLayer
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
Hsintien-Ng/idinvert_pytorch-reproduced
InstanceNormLayer
false
8,253
[ "MIT" ]
20
cf3302510573138cf16202add06feae7c93624ea
https://github.com/Hsintien-Ng/idinvert_pytorch-reproduced/tree/cf3302510573138cf16202add06feae7c93624ea
Spatial_Attention_layer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
abcdefg-dev-dd/asxdcvfg
Spatial_Attention_layer
false
6,056
[ "Apache-2.0" ]
1
83421d4a133810968d6e04b256a9312895452941
https://github.com/abcdefg-dev-dd/asxdcvfg/tree/83421d4a133810968d6e04b256a9312895452941
MuSigmaEncoder
import torch from torch import nn class MuSigmaEncoder(nn.Module): """ Maps a representation r to mu and sigma which will define the normal distribution from which we sample the latent variable z. Parameters ---------- r_dim : int Dimension of output representation r. z_dim : int...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_s...
benjaminalt/neural-processes
MuSigmaEncoder
false
14,946
[ "MIT" ]
170
03d4f921fe0598c77787eecc53cbed23e326a5f5
https://github.com/benjaminalt/neural-processes/tree/03d4f921fe0598c77787eecc53cbed23e326a5f5
BertPredictionHeadTransform
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import math import ...
RoshanTanisha/TVCaption
BertPredictionHeadTransform
false
1,903
[ "MIT" ]
0
8b14a340134ec69ed87426ee1f0e93e53f6456e5
https://github.com/RoshanTanisha/TVCaption/tree/8b14a340134ec69ed87426ee1f0e93e53f6456e5
CosNorm_Classifier
import math import torch from torch import nn from torch.nn.parameter import Parameter class CosNorm_Classifier(nn.Module): def __init__(self, in_dims, out_dims, scale=16, margin=0.5, init_std=0.001 ): super(CosNorm_Classifier, self).__init__() self.in_dims = in_dims self.out_dims...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import math from to...
MathematicalModels/OpenLongTailRecognition-OLTR
CosNorm_Classifier
false
14,029
[ "BSD-3-Clause" ]
765
bd2a3d8adc271d1ffd6d6787353ae77f3d7fdfeb
https://github.com/MathematicalModels/OpenLongTailRecognition-OLTR/tree/bd2a3d8adc271d1ffd6d6787353ae77f3d7fdfeb
ArcFace
from torch.nn import Module import math import torch from torch.nn import Parameter import torch.nn.functional as F import torch._utils from itertools import product as product import torch.utils.data.distributed class ArcFace(Module): """Implementation for "ArcFace: Additive Angular Margin Loss for Deep Face Rec...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
wangxianliang/FaceX-Zoo
ArcFace
false
13,092
[ "Apache-2.0" ]
0
b0555c88a0350fa7b59c317f3a171f551fef4e6e
https://github.com/wangxianliang/FaceX-Zoo/tree/b0555c88a0350fa7b59c317f3a171f551fef4e6e
ExpNormalSmearing
import math import torch from torch import nn class CosineCutoff(nn.Module): def __init__(self, cutoff_lower=0.0, cutoff_upper=5.0): super(CosineCutoff, self).__init__() self.cutoff_lower = cutoff_lower self.cutoff_upper = cutoff_upper def forward(self, distances): if self.cu...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import math from torch import nn assert_size_stride = torch._C._dynamo.gu...
lsnty5190/torchmd-net
ExpNormalSmearing
false
15,964
[ "MIT" ]
51
0bedf43801f0c7d38900d8e1db778fe69f3a4d01
https://github.com/lsnty5190/torchmd-net/tree/0bedf43801f0c7d38900d8e1db778fe69f3a4d01
Similarity
import torch import torch.nn as nn import torch.nn.functional as F class Similarity(nn.Module): def __init__(self, cuda, mem_dim, hidden_dim, num_classes): super(Similarity, self).__init__() self.cudaFlag = cuda self.mem_dim = mem_dim self.hidden_dim = hidden_dim self.num_...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
zhu-y11/multilingual_treelstm
Similarity
false
13,180
[ "MIT" ]
0
39c211f3c03db733f776aa8fe73cd615aaa47465
https://github.com/zhu-y11/multilingual_treelstm/tree/39c211f3c03db733f776aa8fe73cd615aaa47465
L2Norm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import...
ephrem-git/inference
L2Norm
false
12,345
[ "Apache-2.0" ]
0
bfbda5fc419364c3f71b5b1640f6c00e7675b212
https://github.com/ephrem-git/inference/tree/bfbda5fc419364c3f71b5b1640f6c00e7675b212
SimpleSumModule
import torch import torch.jit import torch.onnx import torch.nn class SimpleSumModule(torch.nn.Module): def __init__(self, dtype=None): super(SimpleSumModule, self).__init__() self.dtype = dtype def forward(self, a): b = a + a return torch.sum(b, dtype=self.dtype) def get_i...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.jit import torch.onnx import torch.nn assert_size_stride = torch._C._dynamo....
andreas-hommel/glow
SimpleSumModule
false
3,354
[ "Apache-2.0" ]
0
2bbbf8188a2a941e85677c83f2146bbd076a262e
https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e
NoiseNet
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
GuYuanjie/Deep-Retinex-fusion
NoiseNet
false
17,351
[ "MIT" ]
5
ffa2a1689fd512c8820fd87cbf665c09bcb142b4
https://github.com/GuYuanjie/Deep-Retinex-fusion/tree/ffa2a1689fd512c8820fd87cbf665c09bcb142b4
AFMLayer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
dulvqingyunLT/DeepCTR-Torch
AFMLayer
false
10,424
[ "Apache-2.0" ]
0
f40cf08f3469aa471f9ca69e44c5de51180341cc
https://github.com/dulvqingyunLT/DeepCTR-Torch/tree/f40cf08f3469aa471f9ca69e44c5de51180341cc
TensorCumsum
import torch class TensorCumsum(torch.nn.Module): def __init__(self, dim=1): super().__init__() self.dim = dim def forward(self, input): return torch.cumsum(input, dim=self.dim) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
Minyus/pipelinex
TensorCumsum
false
14,031
[ "Apache-2.0" ]
188
f35c524ec9c50751ee27d9a42d98317e16f1c544
https://github.com/Minyus/pipelinex/tree/f35c524ec9c50751ee27d9a42d98317e16f1c544
TargetContextGate
import torch import torch.nn as nn import torch.cuda class ContextGate(nn.Module): """Implement up to the computation of the gate""" def __init__(self, embeddings_size, decoder_size, attention_size, output_size): super(ContextGate, self).__init__() input_size = embeddings_size + decod...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
AngusGLChen/qg
TargetContextGate
false
4,871
[ "MIT" ]
1
3ebc5b94348a4c313829a6c71705fbc9dadd8181
https://github.com/AngusGLChen/qg/tree/3ebc5b94348a4c313829a6c71705fbc9dadd8181
ScaledDotProductAttention
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Sha-Lab/CASTLE
ScaledDotProductAttention
false
8,752
[ "MIT" ]
13
212cb7aaad1bfae7041c90143220286bde24db33
https://github.com/Sha-Lab/CASTLE/tree/212cb7aaad1bfae7041c90143220286bde24db33
CMDS_Loss
import torch from torch import nn from sklearn.preprocessing import scale as scale def Covariance(m, bias=False, rowvar=True, inplace=False): """ Estimate a covariance matrix given data(tensor). Covariance indicates the level to which two variables vary together. If we examine N-dimensional samples, `X = ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import n...
CyprienGille/Supervised-Autoencoder
CMDS_Loss
false
2,455
[ "MIT" ]
0
fc8a3002d5b06319750601be586c7ca160f2189e
https://github.com/CyprienGille/Supervised-Autoencoder/tree/fc8a3002d5b06319750601be586c7ca160f2189e
outconv
import torch from torch import nn class outconv(nn.Module): def __init__(self, in_ch, out_ch): super(outconv, self).__init__() self.conv = nn.Conv2d(in_ch, out_ch, 1) def forward(self, x): x = self.conv(x) return x def get_inputs(): return [torch.rand([4, 4, 4, 4])] d...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
BloodAxe/segmentation-networks-benchmark
outconv
false
7,862
[ "MIT" ]
34
2e3feb560102230be9369ab442b4a59cc86dff61
https://github.com/BloodAxe/segmentation-networks-benchmark/tree/2e3feb560102230be9369ab442b4a59cc86dff61
BertLayerNormNoVar
import torch import torch.nn as nn class BertLayerNormNoVar(nn.Module): def __init__(self, hidden_size, eps=1e-12): super(BertLayerNormNoVar, self).__init__() self.weight = nn.Parameter(torch.ones(hidden_size)) self.bias = nn.Parameter(torch.zeros(hidden_size)) self.variance_epsil...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
jiachens/auto_LiRPA
BertLayerNormNoVar
false
10,286
[ "BSD-3-Clause" ]
0
cc1ff18e8fbc938953b20ae6a030a25761cb0b78
https://github.com/jiachens/auto_LiRPA/tree/cc1ff18e8fbc938953b20ae6a030a25761cb0b78
SpatialMeanAndStd
import torch import torch.nn.functional import torch.nn as nn import torch.nn.init import torch.onnx class SpatialMeanAndStd(nn.Module): def __init__(self, shape, eps=0.0001, half_size=1.0): super(SpatialMeanAndStd, self).__init__() p = torch.empty((2, shape[0], shape[1]), dtype=torch.float32) ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn.functional import torch.nn as nn import torch.nn.init import to...
opentrack/neuralnet-tracker-traincode
SpatialMeanAndStd
false
4,110
[ "ISC", "CC0-1.0", "Unlicense" ]
0
688ada0f46cb407d1809b50c11a136a239290123
https://github.com/opentrack/neuralnet-tracker-traincode/tree/688ada0f46cb407d1809b50c11a136a239290123
ToRGB
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math from torch import nn from torch.nn import functional as F assert_siz...
ishine/GANsNRoses
ToRGB
false
15,634
[ "MIT" ]
969
414e9e77c3df47d4ecf7941b5dcfdffec67403ee
https://github.com/ishine/GANsNRoses/tree/414e9e77c3df47d4ecf7941b5dcfdffec67403ee
DeepQNetwork
import torch import torch as T import torch.nn as nn import torch.nn.functional as F import torch.optim as optim class DeepQNetwork(nn.Module): def __init__(self, ALPHA): super(DeepQNetwork, self).__init__() self.conv1 = nn.Conv2d(1, 32, 8, stride=4, padding=1) self.conv2 = nn.Conv2d(32, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch as T import torc...
SuperSaiyan-God/Reinforcement-Learning
DeepQNetwork
false
4,435
[ "MIT" ]
0
b43a2997e28ec3bf437c37d060637f6deecf89c6
https://github.com/SuperSaiyan-God/Reinforcement-Learning/tree/b43a2997e28ec3bf437c37d060637f6deecf89c6
SEModule
import torch import torch.nn as nn import torch.nn.parallel class FastAvgPool2d(nn.Module): def __init__(self, flatten=False): super(FastAvgPool2d, self).__init__() self.flatten = flatten def forward(self, x): if self.flatten: in_size = x.size() return x.view(...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
aangelopoulos/rcps
SEModule
false
14,733
[ "MIT" ]
52
b400457f7cc7261d1ed610cdf7aa2230de657c57
https://github.com/aangelopoulos/rcps/tree/b400457f7cc7261d1ed610cdf7aa2230de657c57
PositionalEmbedding
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_str...
Yuran-Zhao/THUMT
PositionalEmbedding
false
14,697
[ "BSD-3-Clause" ]
422
10f0433c1f2fe3f992d26ccb6f4f8dec457ce695
https://github.com/Yuran-Zhao/THUMT/tree/10f0433c1f2fe3f992d26ccb6f4f8dec457ce695
Attention
import math import torch from torch import nn class Attention(nn.Module): """A generic attention module for a decoder in seq2seq""" def __init__(self, dim, use_tanh=False, C=10): super(Attention, self).__init__() self.use_tanh = use_tanh self.project_query = nn.Linear(dim, dim) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import math from to...
rdjdejong/attention-learn-to-route
Attention
false
16,312
[ "MIT" ]
540
3b6bbdad677a36df53eabad98b48f436be298ac8
https://github.com/rdjdejong/attention-learn-to-route/tree/3b6bbdad677a36df53eabad98b48f436be298ac8
TensorClamp
import torch class TensorClamp(torch.nn.Module): def forward(self, x): return x.clamp(-0.1, 0.1) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
bunderhi/torch2trt
TensorClamp
false
1,603
[ "MIT" ]
0
fa5e31e742a0f0c9a9ee38909a6fa56bb07ba96d
https://github.com/bunderhi/torch2trt/tree/fa5e31e742a0f0c9a9ee38909a6fa56bb07ba96d
LargeMarginCosLoss
import torch from torch import nn def cosine_sim(x1, x2, dim=1, eps=1e-08): ip = torch.mm(x1, x2.t()) w1 = torch.norm(x1, 2, dim) w2 = torch.norm(x2, 2, dim) return ip / torch.ger(w1, w2).clamp(min=eps) class LargeMarginCosLoss(nn.Module): """ CosFace: Large Margin Cosine Loss for Deep Face ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
alexalex222/classification_loss
LargeMarginCosLoss
false
6,168
[ "MIT" ]
1
a61617e0c0d5ecf6e0ff388305dd9f3eaa5cbf94
https://github.com/alexalex222/classification_loss/tree/a61617e0c0d5ecf6e0ff388305dd9f3eaa5cbf94
my_BinaryCross
from _paritybench_helpers import _mock_config import torch import torch.nn as nn class my_BinaryCross(nn.Module): def __init__(self, args): super(my_BinaryCross, self).__init__() self.args = args def forward(self, output, target, beat): modif_beat = 1.0 / torch.exp(beat) * 10 ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
carsault/chord_extraction_prediction_lib
my_BinaryCross
false
3,399
[ "MIT" ]
0
6de09eef9f2852b56b04874d2e42eb504c96d33f
https://github.com/carsault/chord_extraction_prediction_lib/tree/6de09eef9f2852b56b04874d2e42eb504c96d33f
Perceptron
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
dbradf/nlp-pytorch
Perceptron
false
3,400
[ "Apache-2.0" ]
0
957e3c5a1edf1f2ae9a8e281729395bed886bc87
https://github.com/dbradf/nlp-pytorch/tree/957e3c5a1edf1f2ae9a8e281729395bed886bc87
ATLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
seanswyi/R-BERT
ATLoss
false
4,294
[ "Apache-2.0" ]
0
4a4aeab3a9314307ce4458bd2b943d94aaf4a706
https://github.com/seanswyi/R-BERT/tree/4a4aeab3a9314307ce4458bd2b943d94aaf4a706
EqualLinear
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch.autograd import Function import math import torch.utils.data from tor...
WoojunePark/BasicSR
EqualLinear
false
18,113
[ "Apache-2.0" ]
9
e0910b022b924bb913045fc412a5470dc2242cf0
https://github.com/WoojunePark/BasicSR/tree/e0910b022b924bb913045fc412a5470dc2242cf0
StateInitZero
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn from torchvision import models as models import torch.onnx import torch.nn assert_size_stride = torch._C._dynamo.guards...
krodyush/training_extensions
StateInitZero
false
10,982
[ "Apache-2.0" ]
0
542f4004dfbc6fc62a622065367ba4f85a703dd3
https://github.com/krodyush/training_extensions/tree/542f4004dfbc6fc62a622065367ba4f85a703dd3
CosLoss
import torch import torch.nn as nn import torch.nn.functional as F class CosLoss(nn.Module): def __init__(self): super().__init__() def forward(self, state_S, state_T, mask=None): """ This is the loss used in DistilBERT :param state_S: Tensor of shape (batch_size, length, h...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert...
lonePatient/TorchBlocks
CosLoss
false
15,936
[ "MIT" ]
82
4a65d746cc8a396cb7df73ed4644d97ddf843e29
https://github.com/lonePatient/TorchBlocks/tree/4a65d746cc8a396cb7df73ed4644d97ddf843e29
TLU
import torch from torch import nn from torch.nn import Parameter from torch.nn.parameter import Parameter class TLU(nn.Module): def __init__(self, num_features): """max(y, tau) = max(y - tau, 0) + tau = ReLU(y - tau) + tau""" super(TLU, self).__init__() self.num_features = num_features ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn from torch.nn import Parameter from torch.nn.parameter import Parame...
gmt710/fast-reid
TLU
false
12,444
[ "Apache-2.0" ]
0
44a609280013eb6928f67c418c7212d67e40fb5d
https://github.com/gmt710/fast-reid/tree/44a609280013eb6928f67c418c7212d67e40fb5d
FeaturePyramidNetwork
import torch import torch.nn as nn class FeaturePyramidNetwork(nn.Module): def __init__(self, C3_feature, C4_feature, C5_feature, feature_size=256): super(FeaturePyramidNetwork, self).__init__() self.P5_1 = nn.Conv2d(C5_feature, feature_size, kernel_size=1, stride=1, padding=0) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
kiyohiro8/SemanticReasoningNetworks
FeaturePyramidNetwork
false
12,697
[ "MIT" ]
0
9dc20706a2234511789a7a2fa07cc3b77c64bf81
https://github.com/kiyohiro8/SemanticReasoningNetworks/tree/9dc20706a2234511789a7a2fa07cc3b77c64bf81
TransposedConv3d
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
Cogito2012/OpenTAL
TransposedConv3d
false
7,898
[ "BSD-3-Clause" ]
16
a7ab938a52b3fb82163eb1ba5403888359eb7e6a
https://github.com/Cogito2012/OpenTAL/tree/a7ab938a52b3fb82163eb1ba5403888359eb7e6a
MultiheadSimilarity
import torch import torch.utils.data from torch import nn class MultiheadSimilarity(nn.Module): def __init__(self, d_model, num_head, seq_len): super().__init__() self.num_head = num_head self.seq_len = seq_len self.d_head = d_model // num_head self.q_in_proj = nn.Linear(d...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data from torch import nn assert_size_stride = torch._C._dyna...
bearcatt/SimpleBaseline
MultiheadSimilarity
false
3,179
[ "MIT" ]
0
9ae38f289688c0e671efb50985d3b8fe2da47d69
https://github.com/bearcatt/SimpleBaseline/tree/9ae38f289688c0e671efb50985d3b8fe2da47d69
ResNetV2
import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.model_zoo import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed from collections import OrderedDict def conv1x1(cin, cout, stride=1, bias=False): return StdConv2d(cin, cout, kern...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
HelenR6/imagenet-r
ResNetV2
false
14,853
[ "MIT" ]
155
0bf04f2bf5d60d1098fc9a78f4e8c042e434eb69
https://github.com/HelenR6/imagenet-r/tree/0bf04f2bf5d60d1098fc9a78f4e8c042e434eb69
ALL_CNN_C
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_s...
EIDOSlab/Delving-in-the-loss-landscape-to-embed-robust-watermarks-into-neural-networks
ALL_CNN_C
false
9,059
[ "MIT" ]
0
020ea57d48c192cec03c69e66938480cf898b8f2
https://github.com/EIDOSlab/Delving-in-the-loss-landscape-to-embed-robust-watermarks-into-neural-networks/tree/020ea57d48c192cec03c69e66938480cf898b8f2
SelectiveMarginLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data...
Dogacel/mmfashion
SelectiveMarginLoss
false
11,411
[ "Apache-2.0" ]
0
e49613245c8501042edd7aeeaa8fb93e5ea13238
https://github.com/Dogacel/mmfashion/tree/e49613245c8501042edd7aeeaa8fb93e5ea13238
MLP
import torch class MLP(torch.nn.Module): def __init__(self, ni, no, nhidden, nlayers): super().__init__() self.nlayers = nlayers for i in range(nlayers): if i == 0: setattr(self, 'linear%d' % i, torch.nn.Linear(ni, nhidden, bias=False)) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice assert_size_stride ...
ElementAI/beyond-trivial-explanations
MLP
false
17,260
[ "Apache-2.0" ]
3
c517d7bdbab68b6a26f74cee4d15e948b3b47238
https://github.com/ElementAI/beyond-trivial-explanations/tree/c517d7bdbab68b6a26f74cee4d15e948b3b47238
BasicModel2
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
Europium248/captum
BasicModel2
false
416
[ "BSD-3-Clause" ]
0
ac02fae2651b8d68a44bcb9d03b91cbb3959f2fc
https://github.com/Europium248/captum/tree/ac02fae2651b8d68a44bcb9d03b91cbb3959f2fc
FocalLossBinary
import torch import torch.jit import torch.nn.functional as F import torch.nn.functional import torch.nn from functools import partial from torch.nn.modules.loss import _Loss def reduced_focal_loss(outputs: 'torch.Tensor', targets: 'torch.Tensor', threshold: 'float'=0.5, gamma: 'float'=2.0, reduction='mean'): ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
Gitsamshi/nnUNet-1
FocalLossBinary
false
8,194
[ "Apache-2.0" ]
28
5341684211e6d91dab6ad76a7595a95addff23be
https://github.com/Gitsamshi/nnUNet-1/tree/5341684211e6d91dab6ad76a7595a95addff23be
FlowHead
import torch import torch.nn as nn class FlowHead(nn.Module): """ Applies two 2D convolutions over an input feature map to generate a flow tensor of shape N x 2 x H x W. Parameters ---------- input_dim : int, default: 128 Number of input dimensions. hidden_dim : int, default: 256 ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
NeelayS/ezflow
FlowHead
false
14,101
[ "MIT" ]
94
b93a48c4adf5021f7eacbfc43220c7efa5ae55cd
https://github.com/NeelayS/ezflow/tree/b93a48c4adf5021f7eacbfc43220c7efa5ae55cd
Baz
import torch import torch.onnx import torch.nn class Baz(torch.nn.Module): def __init__(self, x): super(Baz, self).__init__() self.x = x def forward(self, a, b): return a + b * self.x def get_inputs(): return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])] def get_init_i...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.onnx import torch.nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guar...
geoffberry/glow
Baz
false
12,417
[ "Apache-2.0" ]
0
24b2827c830eb58af56a0704e899968026832e9c
https://github.com/geoffberry/glow/tree/24b2827c830eb58af56a0704e899968026832e9c
TripletLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
knifefield/uda-reid-contest
TripletLoss
false
7,058
[ "MIT" ]
1
8b642cb4c5e63bb1dbfb07d0ac6dacdc26729e91
https://github.com/knifefield/uda-reid-contest/tree/8b642cb4c5e63bb1dbfb07d0ac6dacdc26729e91
EALSTM
import torch from typing import Tuple import torch.nn as nn class EALSTM(nn.Module): """Implementation of the Entity-Aware-LSTM (EA-LSTM) TODO: Include paper ref and latex equations Parameters ---------- input_size_dyn : int Number of dynamic features, which are those, passed to the LSTM...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
danielsuo/toy_flood
EALSTM
false
15,128
[ "MIT" ]
49
471d3c4091d86d4a00fbf910937d4e60fdaf79a1
https://github.com/danielsuo/toy_flood/tree/471d3c4091d86d4a00fbf910937d4e60fdaf79a1