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
AdaptiveAvgMaxPool2d
# 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.utils.data assert_size_stride = torch._C._dynamo.guard...
RichardDominik/AIC21-MTMC
AdaptiveAvgMaxPool2d
false
14,320
[ "MIT" ]
63
f69f63f9c40e2dc98e98c7af1cebe3d5605307ee
https://github.com/RichardDominik/AIC21-MTMC/tree/f69f63f9c40e2dc98e98c7af1cebe3d5605307ee
Embedder
import math import torch from torch import nn import torch.nn import torch.optim class Embedder(nn.Module): def __init__(self, dim_in, dim_out): super().__init__() self.dim_in = dim_in self.dim_out = dim_out self.linear = nn.Linear(self.dim_in, self.dim_out) def forward(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 import nn import torch.nn import torch.optim assert_size_stride = tor...
BerenLuthien/ReAgent
Embedder
false
13,384
[ "BSD-3-Clause" ]
1,156
52f666670a7fa03206812ef48949f6b934d400f7
https://github.com/BerenLuthien/ReAgent/tree/52f666670a7fa03206812ef48949f6b934d400f7
MLP
# 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 import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
Genevievekim/segformer
MLP
false
17,326
[ "MIT" ]
10
4a0800746ade51101ec2573c683b06eccadb9683
https://github.com/Genevievekim/segformer/tree/4a0800746ade51101ec2573c683b06eccadb9683
BasicModel4_MultiArgs
import torch import torch.nn as nn import torch.nn.functional as F class BasicModel4_MultiArgs(nn.Module): """ Slightly modified example model from the paper https://arxiv.org/pdf/1703.01365.pdf f(x1, x2) = RELU(ReLU(x1 - 1) - ReLU(x2) / x3) """ def __init__(self): super()...
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
BasicModel4_MultiArgs
false
419
[ "BSD-3-Clause" ]
0
ac02fae2651b8d68a44bcb9d03b91cbb3959f2fc
https://github.com/Europium248/captum/tree/ac02fae2651b8d68a44bcb9d03b91cbb3959f2fc
Normalization
import torch from torch import nn class Normalization(nn.Module): def __init__(self, mean=torch.zeros(3), std=torch.ones(3)): super(Normalization, self).__init__() self.mean = nn.Parameter(mean.view(-1, 1, 1), requires_grad=False) self.std = nn.Parameter(std.view(-1, 1, 1), requires_grad=...
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...
asjir/adain
Normalization
false
6,265
[ "MIT" ]
1
1d0f70f161e485ce61ea57ab619d66e8f4ccadde
https://github.com/asjir/adain/tree/1d0f70f161e485ce61ea57ab619d66e8f4ccadde
EncoderLayer
# 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....
aim-uofa/DyCo3D
EncoderLayer
false
14,774
[ "BSD-2-Clause" ]
100
17d22c2d839c0a1043fb72df301e3935af5ca0e9
https://github.com/aim-uofa/DyCo3D/tree/17d22c2d839c0a1043fb72df301e3935af5ca0e9
ScaledDotProductAttention
import torch import numpy as np import torch.nn as nn class ScaledDotProductAttention(nn.Module): def __init__(self, d_k): super(ScaledDotProductAttention, self).__init__() self.d_k = d_k def forward(self, Q, K, V, attn_mask=None): scores = torch.matmul(Q, K.transpose(-1, -2)) / np.s...
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 torch....
limhj159/NewsRecommendation
ScaledDotProductAttention
false
15,898
[ "MIT" ]
125
5d19566b63b6cf35b5be0c2b175c5050e51f57b8
https://github.com/limhj159/NewsRecommendation/tree/5d19566b63b6cf35b5be0c2b175c5050e51f57b8
ResidualBlock
import torch class ConvLayer(torch.nn.Module): def __init__(self, in_channels, out_channels, kernel_size, stride): super(ConvLayer, self).__init__() reflection_padding = kernel_size // 2 self.reflection_pad = torch.nn.ReflectionPad2d(reflection_padding) self.conv2d = torch.nn.Conv...
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....
Chandan-h-509/ignite
ResidualBlock
false
8,982
[ "BSD-3-Clause" ]
0
f8c39828cb1dac49b6ef358cdf77865bf2430106
https://github.com/Chandan-h-509/ignite/tree/f8c39828cb1dac49b6ef358cdf77865bf2430106
AttentionSortNet
# 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....
blizda/sinkhorn-transformer
AttentionSortNet
false
9,839
[ "MIT" ]
0
4b626a40759010e4cb1752f22387fdbda438f37c
https://github.com/blizda/sinkhorn-transformer/tree/4b626a40759010e4cb1752f22387fdbda438f37c
ResidualBlockNoBN
import torch import torch.nn as nn from torch.nn import init as init from torch.nn.modules.batchnorm import _BatchNorm @torch.no_grad() def default_init_weights(module_list, scale=1, bias_fill=0, **kwargs): """Initialize network weights. Args: module_list (list[nn.Module] | nn.Module): Modules to be ...
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 from to...
ljzycmd/SimDeblur
ResidualBlockNoBN
false
15,979
[ "MIT" ]
190
dd2f60c41176b75c4eaf80d740f547c206aa8227
https://github.com/ljzycmd/SimDeblur/tree/dd2f60c41176b75c4eaf80d740f547c206aa8227
UNet
# 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_...
mhakyash/UNet-MNIST-denoising
UNet
false
10,664
[ "MIT" ]
0
0e3c20cbb3f34af575e33209425ae4d7cb0bcd82
https://github.com/mhakyash/UNet-MNIST-denoising/tree/0e3c20cbb3f34af575e33209425ae4d7cb0bcd82
EncoderLayer
# 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....
MichiganCOG/Video-Grounding
EncoderLayer
false
8,552
[ "MIT" ]
41
3e0ec0b69578a59be583911590354fe77d357cab
https://github.com/MichiganCOG/Video-Grounding/tree/3e0ec0b69578a59be583911590354fe77d357cab
NsKlCriterion
import torch import torch.nn.functional as F from torch.nn.modules.loss import _Loss from torch.optim.lr_scheduler import * def stable_kl(logit, target, epsilon=1e-06, reduce=True): logit = logit.view(-1, logit.size(-1)).float() target = target.view(-1, target.size(-1)).float() bs = logit.size(0) 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 math as tl_math import torch.nn.functi...
kiminh/mt-dnn
NsKlCriterion
false
7,031
[ "MIT" ]
1
133884b380244dbe74acc4d7507e551b2c5035b3
https://github.com/kiminh/mt-dnn/tree/133884b380244dbe74acc4d7507e551b2c5035b3
Residual
# 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...
FenryrMKIII/objectDetection-lightnet
Residual
false
2,242
[ "MIT" ]
0
3a1fa7b77227210060714a9e22d7d241888b36b4
https://github.com/FenryrMKIII/objectDetection-lightnet/tree/3a1fa7b77227210060714a9e22d7d241888b36b4
MemoryWriter
import torch import torch.nn as nn class MemoryWriter(nn.Module): def __init__(self, state_size, memory_size, device): super(MemoryWriter, self).__init__() self.device = device self.state_size = state_size self.memory_size = memory_size self.fc_r = nn.Linear(state_size + m...
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 ...
rchavan10/Multiple-Intersection-Traffic-Control-using-Reinforcement-Learning
MemoryWriter
false
10,742
[ "MIT" ]
0
3663a1c7a89fe18974d13c9dc78ac7a99dac2300
https://github.com/rchavan10/Multiple-Intersection-Traffic-Control-using-Reinforcement-Learning/tree/3663a1c7a89fe18974d13c9dc78ac7a99dac2300
_MCLSTMCell
# 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....
rro2q2/transfer-learning-aaai21
_MCLSTMCell
false
10,952
[ "BSD-3-Clause" ]
0
f1960540d0608ce1e4d1d64bb4abd29d953f250f
https://github.com/rro2q2/transfer-learning-aaai21/tree/f1960540d0608ce1e4d1d64bb4abd29d953f250f
DenseSynthesizer
import torch import torch.nn as nn class DenseSynthesizer(nn.Module): def __init__(self, head_dim, n_heads, n_tokens, big=True): super().__init__() h = max(head_dim, n_tokens) if big else min(head_dim, n_tokens) w1 = torch.empty(n_heads, head_dim, h) b1 = torch.empty(n_heads, h) ...
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_...
llucid-97/dfa-scales-to-modern-deep-learning
DenseSynthesizer
false
15,945
[ "MIT" ]
63
66efb4b4ef8a378bf01ea0e5e6794d6bb4380c97
https://github.com/llucid-97/dfa-scales-to-modern-deep-learning/tree/66efb4b4ef8a378bf01ea0e5e6794d6bb4380c97
OutputLayer
# 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...
mi-exwzd/Open3D-ML
OutputLayer
false
16,044
[ "MIT" ]
447
d58b24edd37de7889446360164cd5500e0bde060
https://github.com/mi-exwzd/Open3D-ML/tree/d58b24edd37de7889446360164cd5500e0bde060
ResBlock2
# 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....
chiukin/RANet
ResBlock2
false
15,036
[ "Apache-2.0" ]
267
681a47d9b1f114653290678f02f2d3ecdf4010bc
https://github.com/chiukin/RANet/tree/681a47d9b1f114653290678f02f2d3ecdf4010bc
AE_2D_v1000
# 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 torch.nn as ...
gitter-badger/HEPAutoencoders
AE_2D_v1000
false
12,448
[ "Apache-2.0" ]
0
43010cd66fa4335a04b30b87926148e1c8d92de9
https://github.com/gitter-badger/HEPAutoencoders/tree/43010cd66fa4335a04b30b87926148e1c8d92de9
MaskedMSELoss
import torch import torch.nn as nn class MaskedMSELoss(nn.Module): def __init__(self): super(MaskedMSELoss, self).__init__() self.loss = nn.BCEWithLogitsLoss(reduction='sum') def forward(self, pred, target, mask): """ pred -> batch*seq_len target -> batch*seq_len ...
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...
shrx11/M2H2-dataset
MaskedMSELoss
false
16,430
[ "MIT" ]
206
8be80041fc0de04f2a6113e305f09f3b8d6279f4
https://github.com/shrx11/M2H2-dataset/tree/8be80041fc0de04f2a6113e305f09f3b8d6279f4
MolDQN
# 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_...
iamchosenlee/MolDQN-pytorch
MolDQN
false
3,655
[ "MIT" ]
0
66bd1e067e439e49abc77d21089d3baf065317d4
https://github.com/iamchosenlee/MolDQN-pytorch/tree/66bd1e067e439e49abc77d21089d3baf065317d4
AvgPool2d
import torch import torch.nn as nn import torch.nn.functional as F def keep_variance_fn(x): return x + 0.001 class AvgPool2d(nn.Module): def __init__(self, keep_variance_fn=None, kernel_size=2): super(AvgPool2d, self).__init__() self._keep_variance_fn = keep_variance_fn self.kernel_...
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...
collector-m/LiDAR-MOS
AvgPool2d
false
15,063
[ "MIT" ]
268
7ccbb63b4ee7c40195b35dd0dddd71473fae25b1
https://github.com/collector-m/LiDAR-MOS/tree/7ccbb63b4ee7c40195b35dd0dddd71473fae25b1
DPSLTMAdapter
import math import torch from torch import Tensor import torch.nn as nn import torch.utils.data import torch.utils.data.distributed import torch.nn.parallel from typing import Tuple from typing import List from typing import Optional from typing import Dict from typing import Union from torch.nn.modules.module import _...
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...
adriansarstedt/opacus
DPSLTMAdapter
false
12,097
[ "Apache-2.0" ]
0
a6c89e3d6a3a4e3e4b82bc8c68d53265a9a7cba1
https://github.com/adriansarstedt/opacus/tree/a6c89e3d6a3a4e3e4b82bc8c68d53265a9a7cba1
Detector
# 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....
ksivaman/observer-networks
Detector
false
7,065
[ "MIT" ]
1
a0cd540c762751c5500f714dc3979d3a62b9ea77
https://github.com/ksivaman/observer-networks/tree/a0cd540c762751c5500f714dc3979d3a62b9ea77
stage_n_block
import torch import torch.nn as nn from torch.nn import init class conv(nn.Module): """ n*n conv with relu """ def __init__(self, in_dim, out_dim, kernal_size, stride, padding): super(conv, self).__init__() self.con_layer = nn.Conv2d(in_dim, out_dim, kernal_size, stride, p...
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 from to...
H-Liu1997/Pytorch_Pose_Estimation_Framework
stage_n_block
false
5,271
[ "MIT" ]
1
06616b3459ff639f8486e6ea4f93922597788b2a
https://github.com/H-Liu1997/Pytorch_Pose_Estimation_Framework/tree/06616b3459ff639f8486e6ea4f93922597788b2a
FreqEncoder
# 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
VCAT19/torch-ngp
FreqEncoder
false
14,528
[ "MIT" ]
262
dcbfe061b30808875a80f12a10a383b51b35f121
https://github.com/VCAT19/torch-ngp/tree/dcbfe061b30808875a80f12a10a383b51b35f121
PcamPool
# 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...
C3-ASV-Team/torchxrayvision
PcamPool
false
4,930
[ "Apache-2.0" ]
1
7e53f0606986562f17a1ffd9f31d006756eff78d
https://github.com/C3-ASV-Team/torchxrayvision/tree/7e53f0606986562f17a1ffd9f31d006756eff78d
FocalLoss
# 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, math as tl_math import torc...
kivanctezoren/mmclassification
FocalLoss
false
15,829
[ "Apache-2.0" ]
1,190
5c73d4b29f61c47d379bbec4621a465099e64bd7
https://github.com/kivanctezoren/mmclassification/tree/5c73d4b29f61c47d379bbec4621a465099e64bd7
last_fc
import torch import torch.nn as nn import torch.nn.functional as F class last_fc(nn.Linear): def __init__(self, in_features, out_features, bias=True): super(last_fc, self).__init__(in_features, out_features, bias) self.layer_type = 'LFC' self.transform = None def forward(self, 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 import triton_helpers from torch._inductor.runtime....
RuiLin0212/BATMANN
last_fc
false
17,857
[ "MIT" ]
6
5c5cc3334090fc0442bfd2ffdd41bdcab88cbea2
https://github.com/RuiLin0212/BATMANN/tree/5c5cc3334090fc0442bfd2ffdd41bdcab88cbea2
RPNHead
import torch import torch.nn.functional as F from torch import nn class RPNHead(nn.Module): def __init__(self, in_channels, num_anchors): super().__init__() self.conv = nn.Conv2d(in_channels, in_channels, 3, 1, 1) self.cls_logits = nn.Conv2d(in_channels, num_anchors, 1) self.bbox_...
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...
Jaramies/PyTorch-Simple-MaskRCNN
RPNHead
false
5,371
[ "MIT" ]
1
21e6c6983b34061800280573ebe705ae17212972
https://github.com/Jaramies/PyTorch-Simple-MaskRCNN/tree/21e6c6983b34061800280573ebe705ae17212972
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....
SeungoneKim/Transformer_implementation
MultiHeadAttention
false
1,043
[ "Apache-2.0" ]
0
a52bf552eb645fc9bfb812cc26842fc147d6c008
https://github.com/SeungoneKim/Transformer_implementation/tree/a52bf552eb645fc9bfb812cc26842fc147d6c008
CustomizedLoss
import torch import torch.nn as nn class CustomizedLoss(nn.Module): def __init__(self): super().__init__() def forward(self, output, y): return -torch.mean(torch.sum(output * y, dim=1)) def get_inputs(): return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])] def get_init_inputs(...
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...
yanxurui/portfolio
CustomizedLoss
false
4,601
[ "MIT" ]
0
032cf47ccac1c5815fd4827bf0d5f3cf43cec990
https://github.com/yanxurui/portfolio/tree/032cf47ccac1c5815fd4827bf0d5f3cf43cec990
Position_wise_Feed_Forward
import torch import torch.nn as nn import torch.nn.functional as F class Position_wise_Feed_Forward(nn.Module): def __init__(self, dim_model, hidden, dropout=0.0): super(Position_wise_Feed_Forward, self).__init__() self.fc1 = nn.Linear(dim_model, hidden) self.fc2 = nn.Linear(hidden, dim_m...
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....
NTDXYG/Text-Classify-based-pytorch
Position_wise_Feed_Forward
false
8,577
[ "Apache-2.0" ]
20
b12a264a0ea64b2f8b46fafd5383ef0a8025ef2f
https://github.com/NTDXYG/Text-Classify-based-pytorch/tree/b12a264a0ea64b2f8b46fafd5383ef0a8025ef2f
MSEGradLoss
import torch import torch.nn as nn import torch.utils.data class MSEGradLoss(nn.Module): def __init__(self, grad=False): super(MSEGradLoss, self).__init__() self.grad = grad def forward(self, input, target): err = input - target loss = err.norm(p=2).pow(2).div(err.numel()) ...
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...
alsgkals2/SRResCGAN
MSEGradLoss
false
14,816
[ "MIT" ]
81
a71201a93e1819045f9c7711743812546d3a1f31
https://github.com/alsgkals2/SRResCGAN/tree/a71201a93e1819045f9c7711743812546d3a1f31
UpConvNorm
# 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...
Hubert482/cainapp
UpConvNorm
false
8,244
[ "MIT" ]
18
7a74a9b186ee358168c8f050e445fbe9f91f9c47
https://github.com/Hubert482/cainapp/tree/7a74a9b186ee358168c8f050e445fbe9f91f9c47
GRULRCell
# 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 torch.nn as ...
Shenzhen-Cloudatawalk-Technology-Co-Ltd/EdgeML
GRULRCell
false
14,422
[ "MIT" ]
719
ef9f8a77f096acbdeb941014791f8eda1c1bc35b
https://github.com/Shenzhen-Cloudatawalk-Technology-Co-Ltd/EdgeML/tree/ef9f8a77f096acbdeb941014791f8eda1c1bc35b
AsymmetricLossOptimized
import torch import torch.nn as nn class AsymmetricLossOptimized(nn.Module): """ Notice - optimized version, minimizes memory allocation and gpu uploading, favors inplace operations""" def __init__(self, gamma_neg=4, gamma_pos=1, clip=0.05, eps=1e-08, disable_torch_grad_focal_loss=False): ...
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...
FrankFundel/BAT
AsymmetricLossOptimized
false
11,429
[ "MIT" ]
0
70c422d9af093a5c5e4d7486f7a206bc87478a9e
https://github.com/FrankFundel/BAT/tree/70c422d9af093a5c5e4d7486f7a206bc87478a9e
SEBlock
import torch class SEBlock(torch.nn.Module): def __init__(self, inplanes, redr, poolflag='avg'): super(SEBlock, self).__init__() if poolflag == 'max': self.pool = torch.nn.AdaptiveMaxPool2d((1, 1)) if poolflag == 'avg': self.pool = torch.nn.AdaptiveAvgPool2d((1, 1)...
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 assert_size_stride = torch._C...
Knight825/models-pytorch
SEBlock
false
8,418
[ "Apache-2.0" ]
16
133559eebb8795d78a32fa44d49408d0c5167ae9
https://github.com/Knight825/models-pytorch/tree/133559eebb8795d78a32fa44d49408d0c5167ae9
Block
# 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 torch.nn as ...
ashesh-0/vdvae
Block
false
9,740
[ "MIT" ]
0
a1ed5dfaf01a88af750413f5fcb907a5b73833a5
https://github.com/ashesh-0/vdvae/tree/a1ed5dfaf01a88af750413f5fcb907a5b73833a5
Upsample
import torch import torch.nn as M class Upsample(M.Module): def __init__(self, in_channels, out_channels): super(Upsample, self).__init__() self.upsample = M.Upsample(scale_factor=2, mode='bilinear', align_corners=True) self.ordinaryConv = M.Conv2d(in_channels=in_channels, out...
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 M assert_s...
SuperbTUM/RAW-image-denoising
Upsample
false
17,972
[ "MIT" ]
4
9f81be8da6a576f641022707d98b8c37f5c599ab
https://github.com/SuperbTUM/RAW-image-denoising/tree/9f81be8da6a576f641022707d98b8c37f5c599ab
ResNetV2
import torch import torch.nn as nn import torch.nn.functional as F from collections import OrderedDict import torch.utils.data def conv1x1(cin, cout, stride=1, bias=False): return StdConv2d(cin, cout, kernel_size=1, stride=stride, padding=0, bias=bias) def conv3x3(in_planes, out_planes, stride=1): r...
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....
matsuolab/DomainBed
ResNetV2
false
7,630
[ "MIT" ]
1
00e0e3d183b36fd4d0c50442012149794a6504c2
https://github.com/matsuolab/DomainBed/tree/00e0e3d183b36fd4d0c50442012149794a6504c2
UnaryMinModule
# 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.jit import torch.onnx import torch.nn assert_size_stride = torch._C._dynamo....
mciprian13/glow
UnaryMinModule
false
4,000
[ "Apache-2.0" ]
0
90f88205d9bf8baff8df5bbda51c9d138e3e668b
https://github.com/mciprian13/glow/tree/90f88205d9bf8baff8df5bbda51c9d138e3e668b
SE
# 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 itertools import chain a...
Drill-D/SlowFast
SE
false
2,180
[ "Apache-2.0" ]
0
d55ae1cf30a9415858a9bd5da983790a2b418653
https://github.com/Drill-D/SlowFast/tree/d55ae1cf30a9415858a9bd5da983790a2b418653
NormKLLoss
import torch import torch.utils.data import torch.nn.init import torch as th from torch.nn.modules.loss import _Loss 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.data import torch.nn.init from torch.nn.modules.loss i...
ChrisGeishauser/ConvLab-2
NormKLLoss
false
2,234
[ "Apache-2.0" ]
0
8f55d033c6e2453fdc092c4f504be3973a55e7ea
https://github.com/ChrisGeishauser/ConvLab-2/tree/8f55d033c6e2453fdc092c4f504be3973a55e7ea
A2CNet
import torch import torch.nn as nn from torch.nn import functional as F class A2CNet(nn.Module): """Double heads actor + critic network.""" def __init__(self, obs_size, act_size, hid_size=128): super().__init__() self.fc1 = nn.Linear(obs_size, hid_size) self.policy = nn.Linear(hid_siz...
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_...
ayjabri/DeepRL
A2CNet
false
1,509
[ "MIT" ]
0
0be095e3a3d04f60b4cdc97ed330dffc17b3024a
https://github.com/ayjabri/DeepRL/tree/0be095e3a3d04f60b4cdc97ed330dffc17b3024a
Encoder
# 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 import t...
Adwaver4157/WorldModel_for_FinRL
Encoder
false
4,797
[ "MIT" ]
1
0aa0a984aadffe0f6f2e83e55678c0e9304fba05
https://github.com/Adwaver4157/WorldModel_for_FinRL/tree/0aa0a984aadffe0f6f2e83e55678c0e9304fba05
TensorLog
# 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...
Minyus/kedex
TensorLog
false
9,682
[ "Apache-2.0" ]
0
92f952eed3cb6109bc783f449051f2bd13579d2a
https://github.com/Minyus/kedex/tree/92f952eed3cb6109bc783f449051f2bd13579d2a
idct_8x8
import itertools import torch import numpy as np import torch.nn as nn class idct_8x8(nn.Module): """ Inverse discrete Cosine Transformation Input: dcp(tensor): batch x height x width Output: image(tensor): batch x height x width """ def __init__(self): super(idct_8x8, sel...
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 itertools import numpy as np import torch.nn as nn assert_size_stride = t...
mlomnitz/DifferentiableJPEG
idct_8x8
false
16,112
[ "MIT" ]
86
a5767feba955a1bcb78600135a09c36a806f6249
https://github.com/mlomnitz/DifferentiableJPEG/tree/a5767feba955a1bcb78600135a09c36a806f6249
BCE
# 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, math as tl_math import torc...
LiubovSobolevskaya/hpa-single-cell
BCE
false
17,603
[ "MIT" ]
6
ebe6d046b651a1c45095f26e99cfb13adefb63d9
https://github.com/LiubovSobolevskaya/hpa-single-cell/tree/ebe6d046b651a1c45095f26e99cfb13adefb63d9
MLP
# 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.utils.data.dataloader import torch.nn as nn import torch.nn assert_...
Dadmatech/DadmaTools
MLP
false
7,990
[ "Apache-2.0" ]
25
c1b7add5c33544f69c1ba1c5250a5ea07caf9aa2
https://github.com/Dadmatech/DadmaTools/tree/c1b7add5c33544f69c1ba1c5250a5ea07caf9aa2
UpsamplingPixelShuffle
import torch from torch import nn from torchvision import models as models import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed import torch.onnx class shuffle(nn.Module): def __init__(self, ratio): super(shuffle, self).__init__() self.ratio = ra...
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 torchvision import models as models import torch.nn.pa...
JinYAnGHe/openvino_training_extensions
UpsamplingPixelShuffle
false
2,713
[ "Apache-2.0" ]
0
a0b4456a3c9fe6c1b7eabc9d5eb4e74d01453dee
https://github.com/JinYAnGHe/openvino_training_extensions/tree/a0b4456a3c9fe6c1b7eabc9d5eb4e74d01453dee
GatedDense
# 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_...
dendisuhubdy/flow_synthesizer
GatedDense
false
15,172
[ "MIT" ]
93
1561e8ce2520258acb3d228beebbb626a8abc04f
https://github.com/dendisuhubdy/flow_synthesizer/tree/1561e8ce2520258acb3d228beebbb626a8abc04f
HardSwish
import torch import torch.nn as nn class HardSwish(nn.Module): def __init__(self, inplace=False): super(HardSwish, self).__init__() self.act = nn.ReLU6(inplace) """forward""" def forward(self, x): return x * self.act(x + 3) / 6 def get_inputs(): return [torch.rand([4, 4, 4,...
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...
SegmentationBLWX/sssegmentation
HardSwish
false
14,380
[ "MIT" ]
411
0b2e3ff5abd7b97e15ac8daf63ea214688c26541
https://github.com/SegmentationBLWX/sssegmentation/tree/0b2e3ff5abd7b97e15ac8daf63ea214688c26541
my_Layernorm
# 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_...
thuml/Autoformer
my_Layernorm
false
16,590
[ "MIT" ]
263
6bf300d0bf3e7f3cb4d795dd8ed14ede2000a9ab
https://github.com/thuml/Autoformer/tree/6bf300d0bf3e7f3cb4d795dd8ed14ede2000a9ab
EntmaxBisect
# 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.autograd import F...
roholazandie/entmax
EntmaxBisect
false
7,629
[ "MIT" ]
1
657374e6a792ec6840b6f78bc759cc1f51570aad
https://github.com/roholazandie/entmax/tree/657374e6a792ec6840b6f78bc759cc1f51570aad
GlobalAvgPool2d
import torch from torch import nn class GlobalAvgPool2d(nn.Module): """Performs global average pooling over the entire height and width of a batched 2D tensor # Arguments input: Input tensor """ def forward(self, input): return nn.functional.avg_pool2d(input, kernel_size=input.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 import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
Shadowalker1995/few-shot
GlobalAvgPool2d
false
9,436
[ "MIT" ]
0
68026f4d5d092b9cb7cc3b50ba8d28ca1b70ade9
https://github.com/Shadowalker1995/few-shot/tree/68026f4d5d092b9cb7cc3b50ba8d28ca1b70ade9
PreNet
# 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 ...
anh/ForwardTacotron
PreNet
false
3,112
[ "MIT" ]
0
a58d9244844b4512f5655e154f08f934760c88b3
https://github.com/anh/ForwardTacotron/tree/a58d9244844b4512f5655e154f08f934760c88b3
Attention
import torch from torch import nn class Attention(nn.Module): def __init__(self, in_channels): super(Attention, self).__init__() self.out_channels = int(in_channels / 2) self.conv1 = nn.Conv2d(in_channels, self.out_channels, kernel_size= 3, padding=1, stride=1) self.re...
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...
createnewdemo/SPANet
Attention
false
15,080
[ "BSD-3-Clause" ]
177
86cfb05d1778cf30142ef30692e995a5b7b59bb8
https://github.com/createnewdemo/SPANet/tree/86cfb05d1778cf30142ef30692e995a5b7b59bb8
SpatialAttention
# 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...
rushirajsherlocked/External-Attention-pytorch
SpatialAttention
false
4,216
[ "MIT" ]
0
7d6814b2d90909adf81c62f3f8a89e30a59d6481
https://github.com/rushirajsherlocked/External-Attention-pytorch/tree/7d6814b2d90909adf81c62f3f8a89e30a59d6481
ResidualAttentionBlock
# 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....
FacePerceiver/FaRL
ResidualAttentionBlock
false
8,198
[ "MIT" ]
23
38f1d32f4e63940fae524e9f501b88a947ec09cd
https://github.com/FacePerceiver/FaRL/tree/38f1d32f4e63940fae524e9f501b88a947ec09cd
PixelNorm
# 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 import torch.utils.cpp_extension import torch.utils.data....
Pragyanstha/SummerCamp2021
PixelNorm
false
4,480
[ "MIT" ]
0
caa8bba64020ba52bdef2b23a7a54de93e93b8af
https://github.com/Pragyanstha/SummerCamp2021/tree/caa8bba64020ba52bdef2b23a7a54de93e93b8af
PredictionHead
import torch import torch.nn as nn import torch.onnx class PredictionHead(nn.Module): def __init__(self, in_channels, num_classes, num_anchors): super(PredictionHead, self).__init__() self.classification = nn.Conv2d(in_channels, num_classes * num_anchors, kernel_size=1) self.r...
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 import torch.onnx assert_size_stride = torch._C._dynamo.gu...
danshirron/inference
PredictionHead
false
10,018
[ "Apache-2.0" ]
0
31ae9b30ca5b1081a2d35f73ffcde10ae1fdaf41
https://github.com/danshirron/inference/tree/31ae9b30ca5b1081a2d35f73ffcde10ae1fdaf41
ResidualFeedFowardBlock
import torch class ResidualFeedFowardBlock(torch.nn.Module): """Block of two feed-forward layer with a reisdual connection: f(W1^T x + b1) f(W2^T h1 + b2 ) h2 + x x ------------------> h1 --------------------> h2 ----------> y | ...
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 ...
bolajiy/beer
ResidualFeedFowardBlock
false
14,976
[ "MIT" ]
46
6fe968c7ca4864437890aa6bd705755c2580696e
https://github.com/bolajiy/beer/tree/6fe968c7ca4864437890aa6bd705755c2580696e
LayerNorm
# 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 import torch.utils.data assert_size_stride = torch._C._dy...
AndrewPaulChester/sage-code
LayerNorm
false
32
[ "MIT" ]
0
9fe676bfbcbc6f642eca29b30a1027fba2a426a0
https://github.com/AndrewPaulChester/sage-code/tree/9fe676bfbcbc6f642eca29b30a1027fba2a426a0
Gaussian_Distance
import torch from torch import nn class Gaussian_Distance(nn.Module): def __init__(self, kern=1): super(Gaussian_Distance, self).__init__() self.kern = kern self.avgpool = nn.AvgPool2d(kernel_size=kern, stride=kern) def forward(self, mu_a, logvar_a, mu_b, logvar_b): mu_a = se...
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 ...
FupingWu90/VarDA
Gaussian_Distance
false
8,170
[ "MIT" ]
14
cfea269a4f608128bb5b13a778619b17d7123bfa
https://github.com/FupingWu90/VarDA/tree/cfea269a4f608128bb5b13a778619b17d7123bfa
NALU
from torch.nn import Module import torch from torch.nn.parameter import Parameter from torch.nn import functional from torch.nn import init from torch.nn.modules import Module import torch.utils.data class NAC(Module): def __init__(self, n_in, n_out): super().__init__() self.W_hat = Parameter(tor...
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, math as tl_math fr...
Caerisse/deep_focus
NALU
false
200
[ "MIT" ]
0
a6549e0b222a01569b224fb651666ef5dbb5072f
https://github.com/Caerisse/deep_focus/tree/a6549e0b222a01569b224fb651666ef5dbb5072f
DilatedModel
import torch from torch import nn import torch.nn.functional as F class DilatedModel(nn.Module): def __init__(self, k=16): super(DilatedModel, self).__init__() self.conv1 = nn.Conv2d(1, k, 3, stride=1, dilation=1, padding=1) self.conv2 = nn.Conv2d(k, k, 3, stride=1, dilation=1, padding=1)...
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...
JulianYu123456/icnn
DilatedModel
false
13,913
[ "Apache-2.0" ]
258
0aaf4b5cd13d71d98b0d05f367e1f71657ea6eb8
https://github.com/JulianYu123456/icnn/tree/0aaf4b5cd13d71d98b0d05f367e1f71657ea6eb8
BoundNeg
from _paritybench_helpers import _mock_config import math import torch import numpy as np import torch.nn as nn import torch.nn.functional as F from numbers import Number from torch.nn import MSELoss def isnan(x): if isinstance(x, Patches): return False return torch.isnan(x).any() class Perturbation...
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 import torch.nn as nn import torch.nn.functional as F from numbers import Number assert_size_stride = torch._...
Mahoumaru/auto_LiRPA
BoundNeg
false
13,221
[ "BSD-3-Clause" ]
0
b03a6c36eb1b921726778359d6d2b94e0cd7e480
https://github.com/Mahoumaru/auto_LiRPA/tree/b03a6c36eb1b921726778359d6d2b94e0cd7e480
Conv1d
import torch import torch.nn as nn import torch.nn.functional as F class Conv1d(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding='same'): """ inputs: [N, T, C_in] outputs: [N, T, C_out] """ super().__init__() if paddi...
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...
Sala7efelninja/GST-Tacotron
Conv1d
false
11,853
[ "MIT" ]
0
e69a5663832a2c3639d4afbb85092a35be621380
https://github.com/Sala7efelninja/GST-Tacotron/tree/e69a5663832a2c3639d4afbb85092a35be621380
Greedy
# 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 from matplotlib.font_manager import * assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cu...
zifeiyu0531/TSP_DRL_PtrNet
Greedy
false
4,685
[ "MIT" ]
0
c62fab73347556173d301c1561edf927e6fbe1d7
https://github.com/zifeiyu0531/TSP_DRL_PtrNet/tree/c62fab73347556173d301c1561edf927e6fbe1d7
ContextPooler
from _paritybench_helpers import _mock_config import math import torch from torch import nn def get_mask(input, local_context): if not isinstance(local_context, DropoutContext): dropout = local_context mask = None else: dropout = local_context.dropout dropout *= local_context.s...
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...
Stochastic-Adventure/ClinicalTransformerRelationExtraction
ContextPooler
false
14,448
[ "MIT" ]
78
eef956bbfbd64b008014ef7cac5f818087816725
https://github.com/Stochastic-Adventure/ClinicalTransformerRelationExtraction/tree/eef956bbfbd64b008014ef7cac5f818087816725
BertSelfAttention
from _paritybench_helpers import _mock_config import math import torch import torch.nn as nn import torch.nn.functional as F class BertSelfAttention(nn.Module): def __init__(self, config): super().__init__() self.num_attention_heads = config.num_attention_heads self.attention_head_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._inductor.runtime import triton_helpers from torch._inductor.runtime....
Abhimanyu08/minbert-assignment
BertSelfAttention
false
11,806
[ "Apache-2.0" ]
0
1610364213b1aab2d5446175dffabd7e1742833b
https://github.com/Abhimanyu08/minbert-assignment/tree/1610364213b1aab2d5446175dffabd7e1742833b
ScaleReLU
# 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
CuongNguyen218/ObjectDetection-OneStageDet
ScaleReLU
false
339
[ "MIT" ]
0
60efe8b0ee6782b2aea20a32264b2ce1fc21901f
https://github.com/CuongNguyen218/ObjectDetection-OneStageDet/tree/60efe8b0ee6782b2aea20a32264b2ce1fc21901f
Scale
# 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 torch.nn import * assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._d...
jlubars/autonomous-learning-library
Scale
false
10,295
[ "MIT" ]
0
5d2d2e1ee9e0876614d7113e26f026f126a3899f
https://github.com/jlubars/autonomous-learning-library/tree/5d2d2e1ee9e0876614d7113e26f026f126a3899f
DilateContourLoss
# 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 numpy as np import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.ass...
chexqi/Tube_Contour_Detection
DilateContourLoss
false
6,433
[ "MIT" ]
1
d629c992022f22fb3338b6436fcaadab438f8bfb
https://github.com/chexqi/Tube_Contour_Detection/tree/d629c992022f22fb3338b6436fcaadab438f8bfb
BerHuLoss
# 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 ...
pection/packnet-sfm
BerHuLoss
false
7,444
[ "MIT" ]
1
d5673567b649e6bfda292c894cacdeb06aa80913
https://github.com/pection/packnet-sfm/tree/d5673567b649e6bfda292c894cacdeb06aa80913
AdaptiveCatAvgMaxPool2d
import torch from torch import nn import torch.onnx import torch.utils.data import torchvision.transforms.functional as F import torch.nn.functional as F import torch.nn.parallel from torch import optim as optim def adaptive_catavgmax_pool2d(x, output_size=1): x_avg = F.adaptive_avg_pool2d(x, output_size) x_m...
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 import torch.onnx import torch.utils.data import torchvision.transfo...
cagery/pytorch-image-models
AdaptiveCatAvgMaxPool2d
false
9,903
[ "Apache-2.0" ]
0
9211b0bd368cecf970165cfad81770dc14e25d45
https://github.com/cagery/pytorch-image-models/tree/9211b0bd368cecf970165cfad81770dc14e25d45
TemporalEmbedding
# 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 math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guar...
MAZiqing/FEDformer
TemporalEmbedding
false
17,646
[ "MIT" ]
7
7914d39df829494a8172afb9676982c3789d491d
https://github.com/MAZiqing/FEDformer/tree/7914d39df829494a8172afb9676982c3789d491d
FeatureExtractionBlock
import math import torch import torch.utils.data import torch import torch.nn as nn class Conv2dSame(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, stride=1, dilation=1): super(Conv2dSame, self).__init__() self.F = kernel_size self.S = stride self.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._inductor.runtime import triton_helpers import math import torch.util...
adityamehta00/HIDeGAN
FeatureExtractionBlock
false
3,039
[ "BSD-3-Clause" ]
0
91a0674e092ccde2784a82bf927dfefd8673eb4c
https://github.com/adityamehta00/HIDeGAN/tree/91a0674e092ccde2784a82bf927dfefd8673eb4c
Gram
import torch import torch.nn as nn class Gram(nn.Module): def __init__(self): super(Gram, self).__init__() def forward(self, input): a, b, c, d = input.size() feature = input.view(a * b, c * d) gram = torch.mm(feature, feature.t()) gram /= a * b * c * d return...
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...
L1aoXingyu/neural-transfer
Gram
false
8,404
[ "MIT" ]
45
bed445791d823872d9a40ea8927681d8cc99e8df
https://github.com/L1aoXingyu/neural-transfer/tree/bed445791d823872d9a40ea8927681d8cc99e8df
squeeze
# 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 import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C....
XinZhang525/fGAIL
squeeze
false
18,104
[ "MIT" ]
4
682d70286685612558e072d9a1668779b8ae325b
https://github.com/XinZhang525/fGAIL/tree/682d70286685612558e072d9a1668779b8ae325b
Policy
import torch import torch.nn as nn import torch.nn.functional as F class Policy(nn.Module): def __init__(self): super(Policy, self).__init__() self.affine1 = nn.Linear(4, 128) self.affine2 = nn.Linear(128, 2) self.saved_log_probs = [] self.rewards = [] def forward(sel...
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....
Bartolo1024/ignite
Policy
false
4,900
[ "BSD-3-Clause" ]
1
b087fef0bc5f97cda415c1c56f1cd589383c54be
https://github.com/Bartolo1024/ignite/tree/b087fef0bc5f97cda415c1c56f1cd589383c54be
BasicModel_ConvNet_MaxPool1d
# 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....
Europium248/captum
BasicModel_ConvNet_MaxPool1d
false
457
[ "BSD-3-Clause" ]
0
ac02fae2651b8d68a44bcb9d03b91cbb3959f2fc
https://github.com/Europium248/captum/tree/ac02fae2651b8d68a44bcb9d03b91cbb3959f2fc
FreqUpsample
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
JinmingChe/DeepFilterNet
FreqUpsample
false
5,396
[ "ECL-2.0", "Apache-2.0", "MIT" ]
1
0e35a24c33c091b4c34afb3599f2945bf5e87adf
https://github.com/JinmingChe/DeepFilterNet/tree/0e35a24c33c091b4c34afb3599f2945bf5e87adf
DeiTOutput
# 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 import nn import torch.utils.checkpoint assert_size_stride = torch._C...
Clemens123/transformers
DeiTOutput
false
11,814
[ "Apache-2.0" ]
0
22abe7bbc587c16ec30f9d1aa549dcbeba6e9e26
https://github.com/Clemens123/transformers/tree/22abe7bbc587c16ec30f9d1aa549dcbeba6e9e26
AdaptiveAvgPool3dOutSize1
import torch from typing import Tuple import torch.nn as nn from abc import abstractmethod import torch.utils.data import torch.nn class EfficientBlockBase(nn.Module): """ PyTorchVideo/accelerator provides a set of efficient blocks that have optimal efficiency for each target hardware device. Each ef...
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 typing import Tuple import torch.nn as nn from abc import abstractmethod import torch.utils.data import torch.nn assert_size_stride = t...
kevinmtian/pytorchvideo
AdaptiveAvgPool3dOutSize1
false
15,819
[ "Apache-2.0" ]
2,391
168e16859a6029ef8ebeb476f9163bebb6c6b87d
https://github.com/kevinmtian/pytorchvideo/tree/168e16859a6029ef8ebeb476f9163bebb6c6b87d
CrossEntropyLoss
import torch from torch.nn.modules.loss import _Loss import torch.optim import torch._utils import torch.nn class CrossEntropyLoss(_Loss): def __init__(self, loss_weight=1.0): super().__init__() self.ce_loss = torch.nn.CrossEntropyLoss() self.loss_weight = loss_weight def forward(sel...
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 from torch.nn.modules....
ModelTC/EOD
CrossEntropyLoss
false
14,059
[ "Apache-2.0" ]
196
164bff80486e9ae6a095a97667b365c46ceabd86
https://github.com/ModelTC/EOD/tree/164bff80486e9ae6a095a97667b365c46ceabd86
AgentA2C
import torch import torch.nn as nn class AgentA2C(nn.Module): def __init__(self, state_shape, n_actions): super().__init__() self.name = 'a2c' self.n_actions = n_actions self.state_shape = state_shape self.hidden1 = nn.Linear(self.state_shape, 100) self.act1 = nn.R...
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_...
onimaru/Reinforcement_Learning
AgentA2C
false
7,363
[ "MIT" ]
1
4c45b51a095cb0cb3c18f6a1542befdcab8a58a4
https://github.com/onimaru/Reinforcement_Learning/tree/4c45b51a095cb0cb3c18f6a1542befdcab8a58a4
down_right_shifted_conv2d
# 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 torch.nn as ...
VahidZee/PixelCnnPP
down_right_shifted_conv2d
false
2,942
[ "MIT" ]
0
b0d7bffb3cc18263e55d7851f60f5682ba09e5c2
https://github.com/VahidZee/PixelCnnPP/tree/b0d7bffb3cc18263e55d7851f60f5682ba09e5c2
ExpandingBlock
# 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....
diegushko/CycleGAN
ExpandingBlock
false
12,283
[ "MIT" ]
0
630d1cd00cef3f09f036d3c734d31c772cc0a786
https://github.com/diegushko/CycleGAN/tree/630d1cd00cef3f09f036d3c734d31c772cc0a786
GlobalAttentionGeneral
import torch import torch.nn as nn import torch.nn.parallel def conv1x1(in_planes, out_planes, bias=False): """1x1 convolution with padding""" return nn.Conv2d(in_planes, out_planes, kernel_size=1, stride=1, padding=0, bias=bias) class GlobalAttentionGeneral(nn.Module): def __init__(self, idf, ...
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....
FiroshV/TTI
GlobalAttentionGeneral
false
5,169
[ "MIT" ]
1
4d5a40b0ec69a47faf5256caa6d731e95d1f7b9a
https://github.com/FiroshV/TTI/tree/4d5a40b0ec69a47faf5256caa6d731e95d1f7b9a
SimpleATanModule
# 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.jit import torch.onnx import torch.nn assert_size_stride = torch._...
andreas-hommel/glow
SimpleATanModule
false
3,318
[ "Apache-2.0" ]
0
2bbbf8188a2a941e85677c83f2146bbd076a262e
https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e
LSGanLoss
import torch from torch import nn import torch.optim class LSGanLoss(nn.Module): def __init__(self, layer=3): super(LSGanLoss, self).__init__() self.layer = layer def forward(self, real, fake): loss_G = 0 loss_D = 0 for i in range(self.layer): loss_G = los...
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 import torch.optim assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynam...
ForrestPi/faceSwapProjects
LSGanLoss
false
17,286
[ "MIT" ]
5
daf2649a2791a25aa541c4d6d3b7e1d6552be5d7
https://github.com/ForrestPi/faceSwapProjects/tree/daf2649a2791a25aa541c4d6d3b7e1d6552be5d7
VectorQuantizer
# 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...
adammoss/vae
VectorQuantizer
false
1,383
[ "Apache-2.0" ]
0
52f0f56492e3ac7c8b866ae99d5333b4281a371f
https://github.com/adammoss/vae/tree/52f0f56492e3ac7c8b866ae99d5333b4281a371f
SegmentationNet
import torch import torch.nn as nn import torch.nn.functional as F class SegmentationNet(nn.Module): def __init__(self, feature, hidden1, hidden2, output): """ Initialize a class NeuralNet. :param batch_size: int :param hidden: int """ super(SegmentationNet, 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....
jinyu-hou/medium-blog-scripts
SegmentationNet
false
10,278
[ "MIT" ]
0
a645d544a4bd1c937e4ff99dca0d6e98b3abb7f9
https://github.com/jinyu-hou/medium-blog-scripts/tree/a645d544a4bd1c937e4ff99dca0d6e98b3abb7f9
GC3d
# 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 import torch.nn assert_size_stride = torch._C._dynamo.guar...
Schmiddo/d2conv3d
GC3d
false
8,756
[ "MIT" ]
16
9b330be56f0dfb9657a63e3fb3394ab36b35a67b
https://github.com/Schmiddo/d2conv3d/tree/9b330be56f0dfb9657a63e3fb3394ab36b35a67b
D_GCN
import math import torch from torch import nn import torch.nn.functional as F class D_GCN(nn.Module): """ Neural network block that applies a diffusion graph convolution to sampled location """ def __init__(self, in_channels, out_channels, orders, activation='relu'): """ :param in_cha...
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 math from torch import...
mpourhoma/PWWB-London
D_GCN
false
12,820
[ "MIT" ]
0
cfe7a6e3d92ff6b1f18bb5d5bc6a86334e9509d8
https://github.com/mpourhoma/PWWB-London/tree/cfe7a6e3d92ff6b1f18bb5d5bc6a86334e9509d8
Net
# 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_...
afozk95/chess-dataset
Net
false
12,081
[ "MIT" ]
0
08de7b251f67cb8553a5ee66f6fd76cefeb14bb4
https://github.com/afozk95/chess-dataset/tree/08de7b251f67cb8553a5ee66f6fd76cefeb14bb4
SelfAttention
# 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....
Ensembl/gene_pcp
SelfAttention
false
5,143
[ "Apache-2.0" ]
1
121be9895d414da3f13b5c8ec7588754e03336e1
https://github.com/Ensembl/gene_pcp/tree/121be9895d414da3f13b5c8ec7588754e03336e1