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
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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
bcahlit/MP-DQN
Actor
false
1,526
[ "MIT" ]
0
d80d34680e20192134f39e5b7c43abbc6bff3ba1
https://github.com/bcahlit/MP-DQN/tree/d80d34680e20192134f39e5b7c43abbc6bff3ba1
UpBlock
# 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_...
Whatsetsthisend/mmocr
UpBlock
false
11,966
[ "Apache-2.0" ]
0
6444b3226a10162378b5ed3109991cc618e89fa4
https://github.com/Whatsetsthisend/mmocr/tree/6444b3226a10162378b5ed3109991cc618e89fa4
ContrastiveLoss
import torch import torch.nn as nn import torch.nn.functional as F class ContrastiveLoss(nn.Module): def __init__(self, margin=1.5): super(ContrastiveLoss, self).__init__() self.margin = margin def forward(self, output1, output2, weight): pairdist = F.pairwise_distance(output1, outpu...
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...
kvswim/kv_jhu_cv
ContrastiveLoss
false
3,864
[ "MIT" ]
0
2ddf7a9d497aef116a7c043157b8631cea45000d
https://github.com/kvswim/kv_jhu_cv/tree/2ddf7a9d497aef116a7c043157b8631cea45000d
FocalLoss
import torch import torch.nn as nn import torch.nn.functional as F class FocalLoss(nn.Module): def __init__(self, gamma=1, weight=None, balance=0.75): super(FocalLoss, self).__init__() self.gamma = gamma self.weight = weight self.balance = balance return def forward(s...
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...
quqixun/ECG-MLC
FocalLoss
false
10,731
[ "MIT" ]
0
582d68200b79e3b2ac322c1ed17630727e283605
https://github.com/quqixun/ECG-MLC/tree/582d68200b79e3b2ac322c1ed17630727e283605
PatchEmbed
import torch import torch.nn as nn class PatchEmbed(nn.Module): def __init__(self, img_size, patch_size, in_c=3, embed_dim=512): super(PatchEmbed, self).__init__() self.img_size = img_size self.patch_size = patch_size self.n_patches = (img_size // patch_size) ** 2 self.pro...
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...
AgamChopra/WGAN-GP
PatchEmbed
false
1,926
[ "MIT" ]
0
cbe15f4d2ef2ebaef477524103cbda0741098186
https://github.com/AgamChopra/WGAN-GP/tree/cbe15f4d2ef2ebaef477524103cbda0741098186
GHMR
# 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...
ChHanXiao/mmdetection
GHMR
false
9,156
[ "Apache-2.0" ]
0
324aa5a042857a9b57abe37385e1210709a20d02
https://github.com/ChHanXiao/mmdetection/tree/324aa5a042857a9b57abe37385e1210709a20d02
series_decomp_multi
import math import torch import torch.nn as nn class moving_avg(nn.Module): """ Moving average block to highlight the trend of time series """ def __init__(self, kernel_size, stride): super(moving_avg, self).__init__() self.kernel_size = kernel_size self.avg = nn.AvgPool1d(ker...
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....
MAZiqing/FEDformer
series_decomp_multi
false
17,652
[ "MIT" ]
7
7914d39df829494a8172afb9676982c3789d491d
https://github.com/MAZiqing/FEDformer/tree/7914d39df829494a8172afb9676982c3789d491d
NormalizationLayer
import torch import torch.nn as nn class NormalizationLayer(nn.Module): def __init__(self): super(NormalizationLayer, self).__init__() def forward(self, x, epsilon=1e-08): return x * ((x ** 2).mean(dim=1, keepdim=True) + epsilon).rsqrt() def get_inputs(): return [torch.rand([4, 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.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
AnetaKaczynska/video-GAN
NormalizationLayer
false
30
[ "BSD-3-Clause" ]
0
e30e54c18265c658a65b1b26b57b4f499b58bfc6
https://github.com/AnetaKaczynska/video-GAN/tree/e30e54c18265c658a65b1b26b57b4f499b58bfc6
LinearWithConstraint
import torch import torch.nn as nn class LinearWithConstraint(nn.Linear): def __init__(self, *args, max_norm=1, **kwargs): self.max_norm = max_norm super(LinearWithConstraint, self).__init__(*args, **kwargs) def forward(self, x): self.weight.data = torch.renorm(self.weight.data, p=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.triton_helpers import libdevice import torch.nn as ...
jiuney/XAI606-EEGNet
LinearWithConstraint
false
6,967
[ "MIT" ]
1
45ff28630ed1b09d0853f2cfb148a5dd2693e5ab
https://github.com/jiuney/XAI606-EEGNet/tree/45ff28630ed1b09d0853f2cfb148a5dd2693e5ab
IBNbResInitBlock
import torch import torch.nn as nn import torch.utils.data def ibnb_conv7x7_block(in_channels, out_channels, stride=1, padding=3, bias =False, activate=True): """ 7x7 version of the IBN(b)-ResNet specific convolution block. Parameters: ---------- in_channels : int Number of input chan...
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....
earhian/imgclsmob
IBNbResInitBlock
false
6,629
[ "MIT" ]
1
c87c0942420876941868c016211073dec4392e4d
https://github.com/earhian/imgclsmob/tree/c87c0942420876941868c016211073dec4392e4d
decoder6
# 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....
Holmes-Alan/RefVAE
decoder6
false
8,304
[ "MIT" ]
13
836b8f1168f1b0f923b609a48e202ace7806f79c
https://github.com/Holmes-Alan/RefVAE/tree/836b8f1168f1b0f923b609a48e202ace7806f79c
LinearBlock
import torch from scipy.stats import truncnorm def truncated_normal_(tensor, mean=0.0, std=1.0): values = truncnorm.rvs(-2, 2, size=tensor.shape) values = mean + std * values tensor.copy_(torch.from_numpy(values)) return tensor def fc_init_(module): if hasattr(module, 'weight') and module.weight...
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....
aylagulcu/TripletMAML
LinearBlock
false
9,904
[ "MIT" ]
0
98cb4a23847ec24937963292cd6f162bcbf724ba
https://github.com/aylagulcu/TripletMAML/tree/98cb4a23847ec24937963292cd6f162bcbf724ba
Hflip
import torch import torch.nn as nn def hflip(input: 'torch.Tensor') ->torch.Tensor: return torch.flip(input, [-1]) class Hflip(nn.Module): """Horizontally flip a tensor image or a batch of tensor images. Input must be a tensor of shape (C, H, W) or a batch of tensors :math:`(*, C, H, W)`. Args: ...
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...
ChristophReich1996/kornia
Hflip
false
277
[ "ECL-2.0", "Apache-2.0" ]
0
35f955b46e8015da1cb9faa28c6943ec2b09cc2a
https://github.com/ChristophReich1996/kornia/tree/35f955b46e8015da1cb9faa28c6943ec2b09cc2a
L1Loss
# 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 ...
atoaiari/mmpose
L1Loss
false
6,280
[ "Apache-2.0" ]
1
256a9117767008e8c33b4038a346aca12233e300
https://github.com/atoaiari/mmpose/tree/256a9117767008e8c33b4038a346aca12233e300
NormalLoss
# 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.triton_helpers import libdevice import torch.nn as ...
Khoronus/MonoDepth-FPN-PyTorch
NormalLoss
false
719
[ "MIT" ]
0
6e41e297723d1490c537e04afff905c61d6f0ff8
https://github.com/Khoronus/MonoDepth-FPN-PyTorch/tree/6e41e297723d1490c537e04afff905c61d6f0ff8
TorchSub
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
PogChamper/torch2trt
TorchSub
false
14,225
[ "MIT" ]
3,363
43b12627ec0de4d212efb6d02b07570205085ccc
https://github.com/PogChamper/torch2trt/tree/43b12627ec0de4d212efb6d02b07570205085ccc
Encoder
import torch import torch.nn as nn import torch.nn.functional as F class Scaled_Dot_Product_Attention(nn.Module): """Scaled Dot-Product Attention """ def __init__(self): super(Scaled_Dot_Product_Attention, self).__init__() def forward(self, Q, K, V, scale=None): """ Args: ...
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
Encoder
false
8,641
[ "Apache-2.0" ]
20
b12a264a0ea64b2f8b46fafd5383ef0a8025ef2f
https://github.com/NTDXYG/Text-Classify-based-pytorch/tree/b12a264a0ea64b2f8b46fafd5383ef0a8025ef2f
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....
evelynmitchell/rasp
SelfAttention
false
6,665
[ "MIT" ]
1
9b33bbf911e6c4ff018c9883c39eb698c0abe803
https://github.com/evelynmitchell/rasp/tree/9b33bbf911e6c4ff018c9883c39eb698c0abe803
NegativeScaledDotProduct
# 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 import torch.utils.data.dataloader import torch.nn assert_size_stride = torch._C...
adriensas/flair
NegativeScaledDotProduct
false
9,742
[ "MIT" ]
0
f01b0e7ff9a87d3862acae50aeaffdc8e8b8ac21
https://github.com/adriensas/flair/tree/f01b0e7ff9a87d3862acae50aeaffdc8e8b8ac21
HanoiEnvEncoder
import torch import torch.nn.functional as F import torch.nn as nn class HanoiEnvEncoder(nn.Module): """ Implement an encoder (f_enc) specific to the List environment. It encodes observations e_t into vectors s_t of size D = encoding_dim. """ def __init__(self, observation_dim, encoding_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 import torch.nn as nn assert_...
geektoni/AlphaNPI
HanoiEnvEncoder
false
3,535
[ "MIT" ]
0
ab48cb9cfb74f3960e264da4f3eb2d6917bfb9c9
https://github.com/geektoni/AlphaNPI/tree/ab48cb9cfb74f3960e264da4f3eb2d6917bfb9c9
FCLayer
import torch import torch.nn as nn class FCLayer(nn.Module): def __init__(self, input_dim, output_dim, dropout_rate=0.0, use_activation=True): super().__init__() self.use_activation = use_activation self.dropout = nn.Dropout(dropout_rate) self.linear = nn.Linear(input_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 torch.nn as ...
alexandre-do/r-bert
FCLayer
false
12,071
[ "Apache-2.0" ]
0
4e35bcbb0fe0602e708e18010e2394ebbfb074c4
https://github.com/alexandre-do/r-bert/tree/4e35bcbb0fe0602e708e18010e2394ebbfb074c4
ScalingFactor
# 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 logging assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_c...
Open-Catalyst-Project/baselines
ScalingFactor
false
17,799
[ "MIT" ]
10
89948582edfb8debb736406d54db9813a5f2c88d
https://github.com/Open-Catalyst-Project/baselines/tree/89948582edfb8debb736406d54db9813a5f2c88d
MaxPool
import torch import torch.nn as nn import torch.optim import torch.utils.data class MaxPool(nn.Module): def __init__(self, kernel_size, stride=1, padding=1, zero_pad=False): super(MaxPool, self).__init__() self.zero_pad = nn.ZeroPad2d((1, 0, 1, 0)) if zero_pad else None self.pool = nn.Max...
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.optim import torch.utils.data assert_size_stride = tor...
LongKt7/Face_Recognize_Pytorch
MaxPool
false
5,559
[ "MIT" ]
1
baa02e633d379abe1001c8b8acb942617177329c
https://github.com/LongKt7/Face_Recognize_Pytorch/tree/baa02e633d379abe1001c8b8acb942617177329c
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...
Latterlig96/DCUnet
IoULoss
false
8,489
[ "MIT" ]
11
87d1c137a60177d6daf1dfff0483678d5580fda0
https://github.com/Latterlig96/DCUnet/tree/87d1c137a60177d6daf1dfff0483678d5580fda0
LayerNorm
import torch import torch.nn as nn class LayerNorm(nn.Module): """Construct a layernorm module (See citation for details).""" def __init__(self, features, eps=1e-06): super(LayerNorm, self).__init__() self.a_2 = nn.Parameter(torch.ones(features)) self.b_2 = nn.Parameter(torch.zeros(fe...
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_...
Aminah92/saint
LayerNorm
false
16,890
[ "MIT" ]
7
e18f5d5d093dce458c7d427eed4a375021c05bb9
https://github.com/Aminah92/saint/tree/e18f5d5d093dce458c7d427eed4a375021c05bb9
MyGroupNorm
import torch from torch import nn class AffineChannelwise(nn.Module): def __init__(self, num_channels): super().__init__() self.num_channels = num_channels self.register_parameter('weight', nn.Parameter(torch.ones( num_channels))) self.register_parameter('bias', nn.Par...
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 assert_size_stride = torch._C._dynamo.guards.assert_size_s...
dniku/dl-norms
MyGroupNorm
false
6,583
[ "MIT" ]
1
0f1eef942bd318ac988ec7dfa9caea300d17e82a
https://github.com/dniku/dl-norms/tree/0f1eef942bd318ac988ec7dfa9caea300d17e82a
MetaBilinear
# 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 re import warnings import torch.nn as nn from collections import OrderedDict assert_size_stride = torch._C._dynamo.guards.assert_size...
Steffen-Wolf/pytorch-meta
MetaBilinear
false
9,554
[ "MIT" ]
0
d2dfb902cfa49574eac898045c8e9cf64ce29f96
https://github.com/Steffen-Wolf/pytorch-meta/tree/d2dfb902cfa49574eac898045c8e9cf64ce29f96
ClassHead
# 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 from itertools import product as product assert_size_strid...
FacePerceiver/facer
ClassHead
false
8,143
[ "MIT" ]
12
cbb01dc457f3713050e89af7b2c9c0d98663842c
https://github.com/FacePerceiver/facer/tree/cbb01dc457f3713050e89af7b2c9c0d98663842c
ModMSELoss
# 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...
HeosSacer/saliency_web_mapper
ModMSELoss
false
11,485
[ "MIT" ]
0
a2fd744b821086dc1a0af0498361207f7bcddee6
https://github.com/HeosSacer/saliency_web_mapper/tree/a2fd744b821086dc1a0af0498361207f7bcddee6
NormedLinear
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch import torch.nn.functional as F from torch.nn import Parameter class NormedLinear(nn.Module): def __init__(self, in_features, out_features): super(NormedLinear, self).__init__() 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....
caisarl76/LDAM-DRW
NormedLinear
false
9,871
[ "MIT" ]
0
f3d7e98ec40bfbf2c9a806387764a54c5a31d22d
https://github.com/caisarl76/LDAM-DRW/tree/f3d7e98ec40bfbf2c9a806387764a54c5a31d22d
Conv2dWS
# 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 from torch import n...
cooked-sashimi/Yet-Another-YOLOv4-Pytorch
Conv2dWS
false
15,083
[ "MIT" ]
133
c884ef8849987a75b0e17eba1b739c22d3782e90
https://github.com/cooked-sashimi/Yet-Another-YOLOv4-Pytorch/tree/c884ef8849987a75b0e17eba1b739c22d3782e90
C3
# 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 from co...
xxchenxx/otdd
C3
false
13,132
[ "MIT" ]
0
e63d1d170fed36957052b7bb0a0af1553b980381
https://github.com/xxchenxx/otdd/tree/e63d1d170fed36957052b7bb0a0af1553b980381
pHAbsModel
import torch import numpy as np from torch import nn class pHAbsLayer(nn.Module): """Custom pHAbs Layer: Amax/(1+e^(pKa-pH)/phi)""" def __init__(self): super().__init__() weights = np.random.normal([1, 7.6, 0.5], [0.2, 0.5, 0.1]) weights = torch.from_numpy(weights) self.weight...
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 numpy as np from torch import nn assert_size_stride = torch._C._dy...
rokapre/Nonlinear_Regression
pHAbsModel
false
12,944
[ "MIT" ]
0
d705f6a010fc0bf000531c967ffcf8ed79a5f92e
https://github.com/rokapre/Nonlinear_Regression/tree/d705f6a010fc0bf000531c967ffcf8ed79a5f92e
LogSumExpPool
import torch from torch import nn class LogSumExpPool(nn.Module): def __init__(self, gamma): super(LogSumExpPool, self).__init__() self.gamma = gamma def forward(self, feat_map): """ Numerically stable implementation of the operation Arguments: feat_map(Te...
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 import nn a...
DavidChenL/Chexpert
LogSumExpPool
false
13,569
[ "Apache-2.0" ]
202
0300057d3a51301cff35a65f79729436678b4a79
https://github.com/DavidChenL/Chexpert/tree/0300057d3a51301cff35a65f79729436678b4a79
LossPredLoss
import torch import torch.nn as nn class LossPredLoss(nn.Module): def __init__(self): super().__init__() def forward(self, pred_loss, target_loss): pred_loss = (pred_loss - pred_loss.flip(0))[:len(pred_loss) // 2] target_loss = (target_loss - target_loss.flip(0))[:len(target_loss) //...
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...
KMU-AELAB/Active_Learning
LossPredLoss
false
2,449
[ "MIT" ]
0
bc569c16b5f12b58989a8f3db59b7eb4e35cce1b
https://github.com/KMU-AELAB/Active_Learning/tree/bc569c16b5f12b58989a8f3db59b7eb4e35cce1b
AdaptiveSin
import torch from torch.nn.parameter import Parameter class AdaptiveSin(torch.nn.Module): """ Implementation of soft exponential activation. Shape: - Input: (N, *) where * means, any number of additional dimensions - Output: (N, *), same shape as the input Parameters: ...
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 from torch.nn.parameter import Parameter assert_size_stride = torch._C._d...
ndem0/PINA
AdaptiveSin
false
10,720
[ "MIT" ]
0
1812ddb8d96a9c8aeb80ce35002dbd115e7d7931
https://github.com/ndem0/PINA/tree/1812ddb8d96a9c8aeb80ce35002dbd115e7d7931
LogisticLoss
# 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 assert_size_stride = t...
brainsqueeze/Kaggle-competitions
LogisticLoss
false
3,244
[ "MIT" ]
0
e734ca71303619fd2c9a6f10aaf98b2c0a800758
https://github.com/brainsqueeze/Kaggle-competitions/tree/e734ca71303619fd2c9a6f10aaf98b2c0a800758
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 from torch._inductor.runtime....
AhmetTavli/Olivetti-CNN
Net
false
11,237
[ "MIT" ]
0
174747382f17e02c0e5f964d08a449429ac6fbd8
https://github.com/AhmetTavli/Olivetti-CNN/tree/174747382f17e02c0e5f964d08a449429ac6fbd8
QNetwork
# 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_...
luiz-rocha94/navigation
QNetwork
false
10,414
[ "MIT" ]
0
fd5e00d8b9051e82dfe15793e53f8d1f86e8ecbe
https://github.com/luiz-rocha94/navigation/tree/fd5e00d8b9051e82dfe15793e53f8d1f86e8ecbe
DenseGraphConv
# 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.nn import Parameter import torch.utils.data assert_size_s...
CFF-Dream/pytorch_geometric
DenseGraphConv
false
2,031
[ "MIT" ]
0
7c19ad74957409ee9e07314ce81524b3113b9c84
https://github.com/CFF-Dream/pytorch_geometric/tree/7c19ad74957409ee9e07314ce81524b3113b9c84
TVLoss
# 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.optim import torch.utils.data from torch.nn.init import * assert_size_stride = torch._C._dynamo.guards.as...
EVA4-RS-Group/Phase2
TVLoss
false
383
[ "Apache-2.0" ]
0
7c551e3894979cc425dd51baeddbfa5a51b7878d
https://github.com/EVA4-RS-Group/Phase2/tree/7c551e3894979cc425dd51baeddbfa5a51b7878d
RGAN_D
# 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....
COMP6248-Reproducability-Challenge/Reproducible-Or-Not-Reproducible-That-Is-The-Question
RGAN_D
false
4,954
[ "MIT" ]
1
7e2e632189a3669397f67efa99c8de4924967968
https://github.com/COMP6248-Reproducability-Challenge/Reproducible-Or-Not-Reproducible-That-Is-The-Question/tree/7e2e632189a3669397f67efa99c8de4924967968
PureUpsampling
# 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...
vlbthambawita/polyp-inpainting
PureUpsampling
false
4,502
[ "MIT" ]
0
f1d754f8ffb3f6d991206b2a661933ff32de0d7a
https://github.com/vlbthambawita/polyp-inpainting/tree/f1d754f8ffb3f6d991206b2a661933ff32de0d7a
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....
zwc662/SequentialAttack
Actor
false
16,844
[ "MIT" ]
116
677b19c51ea76d794939ee126fccd75ffa0e6fe6
https://github.com/zwc662/SequentialAttack/tree/677b19c51ea76d794939ee126fccd75ffa0e6fe6
CNN_small
import torch import torch.nn as nn from torch.nn import functional as F import torch.utils.data class CNN_small(nn.Module): def __init__(self, num_classes=10): super(CNN_small, self).__init__() self.conv1 = nn.Conv2d(3, 6, 5) self.pool = nn.MaxPool2d(2, 2) self.conv2 = nn.Conv2d(6...
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 ...
JiarunLiu/Co-correcting
CNN_small
false
8,361
[ "Apache-2.0" ]
19
4e3ca4951de5d73ca812bbbcfe666273082ff2fd
https://github.com/JiarunLiu/Co-correcting/tree/4e3ca4951de5d73ca812bbbcfe666273082ff2fd
TVLoss
import torch import torch.nn as nn import torch.optim import torch.utils.data from torch.nn.init import * class TVLoss(nn.Module): def __init__(self, tv_loss_weight=1): super(TVLoss, self).__init__() self.tv_loss_weight = tv_loss_weight def forward(self, x): batch_size = x.size()[0] ...
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.optim import torch.utils.data from torch.nn.init import * assert_size_stride = torch._C._dynamo.guards.as...
EVA4-RS-Group/Phase2
TVLoss
false
383
[ "Apache-2.0" ]
0
7c551e3894979cc425dd51baeddbfa5a51b7878d
https://github.com/EVA4-RS-Group/Phase2/tree/7c551e3894979cc425dd51baeddbfa5a51b7878d
WeightNet
import torch import torch.nn as nn class WeightNet(nn.Module): """WeightNet in Temporal interlace module. The WeightNet consists of two parts: one convolution layer and a sigmoid function. Following the convolution layer, the sigmoid function and rescale module can scale our output to the range (0, 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
VisualAnalysisOfHumans/LOVEU_TRACK1_TOP3_SUBMISSION
WeightNet
false
5,933
[ "MIT" ]
1
6f4d1c7e6883d6b0664fcd04265f437247afab54
https://github.com/VisualAnalysisOfHumans/LOVEU_TRACK1_TOP3_SUBMISSION/tree/6f4d1c7e6883d6b0664fcd04265f437247afab54
Classifier
# 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.utils.data assert_size_stride = torch._C._dyn...
VinAIResearch/mDSDI
Classifier
false
18,035
[ "Apache-2.0" ]
9
8ec49085d8389ab490ec633c3ae4bf66be085366
https://github.com/VinAIResearch/mDSDI/tree/8ec49085d8389ab490ec633c3ae4bf66be085366
stack_pool
import torch import torch.nn as nn class stack_pool(nn.Module): def __init__(self): super(stack_pool, self).__init__() self.pool2 = nn.MaxPool2d(2, stride=2) self.pool2s1 = nn.MaxPool2d(2, stride=1) self.pool3s1 = nn.MaxPool2d(3, stride=1, padding=1) self.padding = nn.Repl...
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...
siyuhuang/crowdcount-stackedpool
stack_pool
false
16,477
[ "MIT" ]
93
bbba3d9e91a5a89642b4bd3638ae8e68801ea7bf
https://github.com/siyuhuang/crowdcount-stackedpool/tree/bbba3d9e91a5a89642b4bd3638ae8e68801ea7bf
CNN
import torch import torch.nn as nn import torch.nn.functional as F class CNN(nn.Module): def __init__(self, in_channels, output): super(CNN, self).__init__() self.conv1 = nn.Conv2d(in_channels=in_channels, out_channels=20, kernel_size=3, stride=1, padding=1) self.pool1 = nn.Ma...
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....
Sheriff-A/CNN
CNN
false
9,478
[ "MIT" ]
0
59fc187e7cdf92379f52c4f942424d3a5042bf3e
https://github.com/Sheriff-A/CNN/tree/59fc187e7cdf92379f52c4f942424d3a5042bf3e
ConvD
# 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....
ieee820/BraTS2018-tumor-segmentation
ConvD
false
15,602
[ "MIT" ]
157
22e1a22909a0c21503b5ef5fc6860a1e1131e851
https://github.com/ieee820/BraTS2018-tumor-segmentation/tree/22e1a22909a0c21503b5ef5fc6860a1e1131e851
Net
import torch import torch.nn as nn class Net(nn.Module): def __init__(self, input_size, hidden_size, dropout_rate, out_size): super(Net, self).__init__() self.fc1 = nn.Linear(input_size, hidden_size) self.fc2 = nn.Linear(hidden_size, hidden_size) self.fc3 = nn.Linear(hidden_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.triton_helpers import libdevice import torch.nn as ...
PatWalters/yamc
Net
false
17,785
[ "MIT" ]
7
8fcde09305d6600fdea6211d0941977bb2cff65b
https://github.com/PatWalters/yamc/tree/8fcde09305d6600fdea6211d0941977bb2cff65b
SigmoidDeepLiftModel
import torch import torch.nn as nn class SigmoidDeepLiftModel(nn.Module): """ Model architecture from: https://medium.com/coinmonks/create-a-neural-network-in -pytorch-and-make-your-life-simpler-ec5367895199 """ def __init__(self, num_in, num_hidden, num_out) ->None: super().__ini...
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_...
LMdeLiangMi/captum
SigmoidDeepLiftModel
false
5,480
[ "BSD-3-Clause" ]
1
8bd9686013fe0ba8996e9b1cbeb0ea8e91512787
https://github.com/LMdeLiangMi/captum/tree/8bd9686013fe0ba8996e9b1cbeb0ea8e91512787
Decoder
# 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....
J-zin/Semantic-Hashing-Models
Decoder
false
5,365
[ "MIT" ]
1
2e4a2348bc8399a9739016e1a1a5e25a77babbbd
https://github.com/J-zin/Semantic-Hashing-Models/tree/2e4a2348bc8399a9739016e1a1a5e25a77babbbd
ClassificationModel
# 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 ...
DerekGloudemans/3D-detector-trials
ClassificationModel
false
2,186
[ "MIT" ]
0
480274567eaa84c5c883260ef62f150c7a23ffd3
https://github.com/DerekGloudemans/3D-detector-trials/tree/480274567eaa84c5c883260ef62f150c7a23ffd3
ResnetBlock
import torch class ResnetBlock(torch.nn.Module): def __init__(self, num_filter, kernel_size=3, stride=1, padding=1, bias =True): super(ResnetBlock, self).__init__() self.conv1 = torch.nn.Conv2d(num_filter, num_filter, kernel_size, stride, padding, bias=bias) self.conv2...
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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cu...
Holmes-Alan/RefVAE
ResnetBlock
false
8,264
[ "MIT" ]
13
836b8f1168f1b0f923b609a48e202ace7806f79c
https://github.com/Holmes-Alan/RefVAE/tree/836b8f1168f1b0f923b609a48e202ace7806f79c
ConvLayer
# 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 assert_size_s...
Chandan-h-509/ignite
ConvLayer
false
8,972
[ "BSD-3-Clause" ]
0
f8c39828cb1dac49b6ef358cdf77865bf2430106
https://github.com/Chandan-h-509/ignite/tree/f8c39828cb1dac49b6ef358cdf77865bf2430106
mean_norm
import torch class mean_norm(torch.nn.Module): def __init__(self): super(mean_norm, self).__init__() def forward(self, x): col_mean = x.mean(dim=0) x = x - col_mean return x 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...
ngohienduong/Deep_GCN_Benchmarking
mean_norm
false
16,171
[ "MIT" ]
70
3ee57a265bbfd62d8e6f3ee6e3e9062dd5a44633
https://github.com/ngohienduong/Deep_GCN_Benchmarking/tree/3ee57a265bbfd62d8e6f3ee6e3e9062dd5a44633
Net
import torch import torch.nn as tnn class Net(tnn.Module): def __init__(self): super(Net, self).__init__() self.conv1 = tnn.Conv2d(3, 6, 5) self.pool = tnn.MaxPool2d(2, 2) self.conv2 = tnn.Conv2d(6, 16, 5) self.fc1 = tnn.Linear(16 * 5 * 5, 120) self.fc2 = tnn.Linea...
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 tnn assert...
Exusial/jittor
Net
false
13,674
[ "Apache-2.0" ]
2,571
eca21d5bba5098bce4f492fa44908677b6e76588
https://github.com/Exusial/jittor/tree/eca21d5bba5098bce4f492fa44908677b6e76588
Whitening2d
import torch import torch.nn as nn from torch.cuda.amp import custom_fwd from torch.nn.functional import conv2d class Whitening2d(nn.Module): def __init__(self, output_dim: 'int', eps: 'float'=0.0): """Layer that computes hard whitening for W-MSE using the Cholesky decomposition. Args: ...
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...
TranNhiem/solo-learn
Whitening2d
false
1,151
[ "MIT" ]
0
7539732b68d153087d09a26a23e1edfdc49bc086
https://github.com/TranNhiem/solo-learn/tree/7539732b68d153087d09a26a23e1edfdc49bc086
FeaturePyramidNetwork
# 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...
kiyohiro8/SemanticReasoningNetworks
FeaturePyramidNetwork
false
12,697
[ "MIT" ]
0
9dc20706a2234511789a7a2fa07cc3b77c64bf81
https://github.com/kiyohiro8/SemanticReasoningNetworks/tree/9dc20706a2234511789a7a2fa07cc3b77c64bf81
Block
import torch import torch.nn as nn import torch._C import torch.serialization class DropPath(nn.Module): """Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks). Args: drop_prob (float): Drop rate for paths of model. Dropout rate has to be between 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 from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
CuttlefishXuan/mmsegmentation-1
Block
false
13,573
[ "Apache-2.0" ]
789
13771312da1a66d5cd642df6aa370affd3f5ceac
https://github.com/CuttlefishXuan/mmsegmentation-1/tree/13771312da1a66d5cd642df6aa370affd3f5ceac
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.triton_helpers import libdevice import torch.nn as ...
amy12xx/lets-do-irl
Actor
false
14,840
[ "MIT" ]
408
fd469e9fb7426e41b07c83ce4b87962ac3543b1e
https://github.com/amy12xx/lets-do-irl/tree/fd469e9fb7426e41b07c83ce4b87962ac3543b1e
FCN8_VGG16
import torch import numpy as np import torch.nn as nn import torch.utils.model_zoo as model_zoo def conv3x3(in_planes, out_planes, stride=1, padding=1): """3x3 convolution with padding""" return nn.Conv2d(in_planes, out_planes, kernel_size=(3, 3), stride=( stride, stride), padding=(padding, padding)) ...
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 numpy as np import tor...
rdbadra/LCFCN
FCN8_VGG16
false
4,752
[ "Apache-2.0" ]
0
85ba21abb5de443d36d414fb7f732a3672d82c67
https://github.com/rdbadra/LCFCN/tree/85ba21abb5de443d36d414fb7f732a3672d82c67
L2Norm
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_c...
RiyaoDong/HGSL
L2Norm
false
2,778
[ "Apache-2.0" ]
0
19fa984b3bfde0e3b7acbce87dd40177cd64f9b0
https://github.com/RiyaoDong/HGSL/tree/19fa984b3bfde0e3b7acbce87dd40177cd64f9b0
MLP_g
from _paritybench_helpers import _mock_config import torch import torch.nn as nn def weights_init(m): classname = m.__class__.__name__ if classname.find('Linear') != -1: m.weight.data.normal_(0.0, 0.02) m.bias.data.fill_(0) elif classname.find('BatchNorm') != -1: m.weight.data.norm...
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...
tasfia/BMCoGAN
MLP_g
false
13,113
[ "MIT" ]
0
0d400c2c71dbfb69af422afc487f65afb98de8af
https://github.com/tasfia/BMCoGAN/tree/0d400c2c71dbfb69af422afc487f65afb98de8af
ChainCRF
import torch import torch.nn as nn from torch.nn.parameter import Parameter def logsumexp(x, dim=None): """ Args: x: A pytorch tensor (any dimension will do) dim: int or None, over which to perform the summation. `None`, the default, performs over all axes. Returns: The result...
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 from torch.nn.parameter import Parameter assert_size_strid...
shabnam-b/crosslingual-nlp
ChainCRF
false
16,398
[ "MIT" ]
64
ccd91baaea23004eab9c4d871910945ca3e61ab7
https://github.com/shabnam-b/crosslingual-nlp/tree/ccd91baaea23004eab9c4d871910945ca3e61ab7
LogSumPenalty
from torch.nn import Module import torch class LogSumPenalty(Module): def __init__(self, epsilon=1): super(LogSumPenalty, self).__init__() self.epsilon = epsilon def forward(self, input): return torch.sum(torch.log(torch.abs(input) + self.epsilon)) def eta_hat(self, w): ...
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 import M...
dlej/adaptive-dropout
LogSumPenalty
false
10,067
[ "MIT" ]
0
0540b2d06f1f97eb5861c6917eec6c086d33dfa8
https://github.com/dlej/adaptive-dropout/tree/0540b2d06f1f97eb5861c6917eec6c086d33dfa8
Brightness
# 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...
Hayoung93/UDA
Brightness
false
980
[ "Apache-2.0" ]
0
a587b01c76141d64e7cead55b62e0f3ed75890bf
https://github.com/Hayoung93/UDA/tree/a587b01c76141d64e7cead55b62e0f3ed75890bf
MegatronFastGelu
# 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 import torch.onnx assert_size_stride = torch._C._dynamo.guards....
RyanUnderhill/onnxruntime
MegatronFastGelu
false
11,824
[ "MIT" ]
0
6df4e293ffbb47d739d2dedfbb87fa6234b8c37c
https://github.com/RyanUnderhill/onnxruntime/tree/6df4e293ffbb47d739d2dedfbb87fa6234b8c37c
GeneralizedMeanPooling
# 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 assert_...
hfyer/NAIC2020_ReID_R1
GeneralizedMeanPooling
false
6,806
[ "Apache-2.0" ]
1
240f0c9f65e482e6b0090f01d9f9e3373a337033
https://github.com/hfyer/NAIC2020_ReID_R1/tree/240f0c9f65e482e6b0090f01d9f9e3373a337033
Adversarial_Loss
# 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 ...
ducviet00/HMER
Adversarial_Loss
false
6,616
[ "MIT" ]
1
0fa322ed35412737a24ec3955c9a3d96d1989bd4
https://github.com/ducviet00/HMER/tree/0fa322ed35412737a24ec3955c9a3d96d1989bd4
Readout
from torch.nn import Module import torch import torch.utils.data def aggregate(x, dim, aggr='add', mask=None, keepdim=False): """ Args: x: (..., A, ..., F), Features to be aggregated. mask: (..., A, ...) Returns: (..., , ..., F), if keepdim == False (..., 1, ..., F), if...
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.nn import Module import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = tor...
LichenYang-Jeffrey/GAT-for-COVID-19
Readout
false
5,520
[ "MIT" ]
1
91cc6048f14856f3ef9dfebf2db45e2a36975159
https://github.com/LichenYang-Jeffrey/GAT-for-COVID-19/tree/91cc6048f14856f3ef9dfebf2db45e2a36975159
PixelNormLayer
import torch import torch.utils.data import torch from torch import nn class PixelNormLayer(nn.Module): """Implements pixel-wise feature vector normalization layer.""" def __init__(self, epsilon=1e-08): super().__init__() self.eps = epsilon def forward(self, x): return x / torch....
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.utils.data import torch from torch import nn assert_size_stride = ...
IVRL/BIGPrior
PixelNormLayer
false
578
[ "MIT" ]
0
6bf3b18fcbbd3c58bad7a792a8d28b017abb2411
https://github.com/IVRL/BIGPrior/tree/6bf3b18fcbbd3c58bad7a792a8d28b017abb2411
Conv1dBlock
# 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...
DK-Jang/human_motion_manifold
Conv1dBlock
false
7,918
[ "MIT" ]
23
dd3b603b892d66685204909c8818f3e1621ab7dc
https://github.com/DK-Jang/human_motion_manifold/tree/dd3b603b892d66685204909c8818f3e1621ab7dc
MultiLayerPerceptron
import torch import torch.utils.data import torch.optim class MultiLayerPerceptron(torch.nn.Module): """ A simple MLP that can either be used independently or put on top of pretrained models (such as BERT) and act as a classifier. Args: hidden_size (int): the size of each layer num_cla...
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....
ShantanuNair/NeMo
MultiLayerPerceptron
false
17,901
[ "Apache-2.0" ]
10
d01b7bbc3fdb1bbf14789f71b8f368cf0aa8f86b
https://github.com/ShantanuNair/NeMo/tree/d01b7bbc3fdb1bbf14789f71b8f368cf0aa8f86b
ExampleBackbone
import torch import torch.nn as nn import torch._C import torch.serialization class ExampleBackbone(nn.Module): def __init__(self): super(ExampleBackbone, self).__init__() self.conv = nn.Conv2d(3, 3, 3) def init_weights(self, pretrained=None): pass 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 import torch.nn as nn import torch._C import torch.serialization assert_size_str...
CVIU-CSU/M2MRF-Lesion-Segmentation
ExampleBackbone
false
17,054
[ "Apache-2.0" ]
10
13af87927f4cdeca70e35d570edd1aec43b387b6
https://github.com/CVIU-CSU/M2MRF-Lesion-Segmentation/tree/13af87927f4cdeca70e35d570edd1aec43b387b6
TwoLayerFCBodyWithAction
import torch import torch.nn as nn import torch.nn.functional as F def layer_init(layer, w_scale=1.0): nn.init.orthogonal_(layer.weight.data) layer.weight.data.mul_(w_scale) nn.init.constant_(layer.bias.data, 0) return layer class TwoLayerFCBodyWithAction(nn.Module): def __init__(self, state_di...
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 ...
RaviTej310/mrpvf
TwoLayerFCBodyWithAction
false
11,835
[ "MIT" ]
0
f026b4704f26b85161de26ada5d6390ab549fbbd
https://github.com/RaviTej310/mrpvf/tree/f026b4704f26b85161de26ada5d6390ab549fbbd
AUGRUCell
# 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 ...
Ahren09/RecBole
AUGRUCell
false
1,936
[ "MIT" ]
0
b3921818dfbc1b81f9eda8d5e9f05bc9d9114089
https://github.com/Ahren09/RecBole/tree/b3921818dfbc1b81f9eda8d5e9f05bc9d9114089
GeLU
# 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_...
Blind-Aid/sentiment-discovery
GeLU
false
13,397
[ "BSD-3-Clause" ]
1,093
081c7c855e00864b52e97cac0b0e097cc86d9731
https://github.com/Blind-Aid/sentiment-discovery/tree/081c7c855e00864b52e97cac0b0e097cc86d9731
GRUGatingUnit
import torch import torch.nn as nn import torch.utils.data class GRUGatingUnit(torch.nn.Module): """ Overview: GRU Gating Unit used in GTrXL. """ def __init__(self, input_dim: 'int', bg: 'float'=2.0): """ Arguments: - input_dim: (:obj:`int`): dimension of 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.triton_helpers import libdevice import torch.nn as ...
L-Net-1992/DI-engine
GRUGatingUnit
false
5,491
[ "Apache-2.0" ]
1
06803b4e18fa64bbed0fd1d44952242c0c063b0f
https://github.com/L-Net-1992/DI-engine/tree/06803b4e18fa64bbed0fd1d44952242c0c063b0f
ProteinResNetPooler
from _paritybench_helpers import _mock_config import torch from torch import nn class ProteinResNetPooler(nn.Module): def __init__(self, config): super().__init__() self.attention_weights = nn.Linear(config.hidden_size, 1) self.dense = nn.Linear(config.hidden_size, config.hidden_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.triton_helpers import libdevice, math as tl_math fr...
IC-hub/ProteinLM
ProteinResNetPooler
false
15,190
[ "Apache-2.0" ]
59
58fbf1f674569cf814becf32f71dd0d8f0c592fa
https://github.com/IC-hub/ProteinLM/tree/58fbf1f674569cf814becf32f71dd0d8f0c592fa
Projection
from _paritybench_helpers import _mock_config import torch import torch.nn as nn class TimeDistributed(nn.Module): def __init__(self, layer, activation='relu'): super().__init__() self.layer = layer self.activation = self.select_activation(activation) def forward(self, x): 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....
tndls9304/chatspace
Projection
false
13,044
[ "Apache-2.0" ]
0
42cb4bd9bd3b553706d9ac227150329103d681aa
https://github.com/tndls9304/chatspace/tree/42cb4bd9bd3b553706d9ac227150329103d681aa
MultiHeadAttention
import torch import torch.nn.functional as F import torch.nn as nn class ScaledDotProductAttention(nn.Module): """ Scaled Dot-Product Attention """ def __init__(self, temperature, attn_dropout=0.1): super().__init__() self.temperature = temperature self.dropout = nn.Dropout(attn_dropo...
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....
AbubakrHassan/attention-is-all-you-need-pytorch
MultiHeadAttention
false
11,200
[ "MIT" ]
0
2bf9a477dea6271b082556069f3665ffed2745cd
https://github.com/AbubakrHassan/attention-is-all-you-need-pytorch/tree/2bf9a477dea6271b082556069f3665ffed2745cd
InnerProductDecoder
# 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.fx import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynam...
JinheonBaek/pytorch_geometric
InnerProductDecoder
false
17,501
[ "MIT" ]
4
dfd32d08a3d8191d6290e53458d4eda515d04fd6
https://github.com/JinheonBaek/pytorch_geometric/tree/dfd32d08a3d8191d6290e53458d4eda515d04fd6
DiffLoss
# 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.triton_helpers import libdevice import torch.utils....
Prathyusha-Akundi/Adversarial-Continual-Learning
DiffLoss
false
14,239
[ "MIT" ]
237
edf4bbd2c4c61f1cc20818793702ef8c6cf4e0df
https://github.com/Prathyusha-Akundi/Adversarial-Continual-Learning/tree/edf4bbd2c4c61f1cc20818793702ef8c6cf4e0df
CoordConvSinAct
# 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 torch....
justinjohn0306/CIPS-3D
CoordConvSinAct
false
7,004
[ "MIT" ]
1
69a910a7841846419a6b5e03182c8cf061a82584
https://github.com/justinjohn0306/CIPS-3D/tree/69a910a7841846419a6b5e03182c8cf061a82584
PixelwiseLossL1
import torch from torch import nn class PixelwiseLossL1(nn.Module): """ L1 loss function Args: alpha (default: int=1): Coefficient by which loss will be multiplied """ def __init__(self, alpha=1): super().__init__() self.alpha = alpha self.criterion = nn.L1Loss() ...
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 import nn a...
akanametov/pathgan
PixelwiseLossL1
false
18,304
[ "MIT" ]
8
d93464a9c2490532afdf7bbc0f60decdf2d0767d
https://github.com/akanametov/pathgan/tree/d93464a9c2490532afdf7bbc0f60decdf2d0767d
CQAttention
# 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....
dcy2018/QANA
CQAttention
false
3,517
[ "MIT" ]
0
69d1e4ff408a56317479e22ecc854c91fc0f420f
https://github.com/dcy2018/QANA/tree/69d1e4ff408a56317479e22ecc854c91fc0f420f
ConvMeanPool
# 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...
kolchinski/humanception-score
ConvMeanPool
false
12,682
[ "MIT" ]
0
da8880eec3be39574718409cfe8ca303f41c64e6
https://github.com/kolchinski/humanception-score/tree/da8880eec3be39574718409cfe8ca303f41c64e6
BERTMultSelfOutput
from _paritybench_helpers import _mock_config import torch import torch.nn as nn class BERTLayerNorm(nn.Module): def __init__(self, config, multi_params=None, variance_epsilon=1e-12): """Construct a layernorm module in the TF style (epsilon inside the square root). """ super(BERTLayerNorm...
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_...
DAQuestionAnswering/Bert-n-Pals
BERTMultSelfOutput
false
6,464
[ "MIT" ]
1
d5a288b9ac62259e70c249635108ba3906e19f00
https://github.com/DAQuestionAnswering/Bert-n-Pals/tree/d5a288b9ac62259e70c249635108ba3906e19f00
ListNetLoss
# 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 ...
Pepijnnn/MasterThesis
ListNetLoss
false
938
[ "MIT" ]
0
7ec831f5e55f5f181e0196fa78284e2846ce2e26
https://github.com/Pepijnnn/MasterThesis/tree/7ec831f5e55f5f181e0196fa78284e2846ce2e26
pixel_attention
# 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....
SCUT-AILab/AFA
pixel_attention
false
17,889
[ "BSD-3-Clause" ]
7
acfb42236ce0114d63f22a821fc5954c8c149f45
https://github.com/SCUT-AILab/AFA/tree/acfb42236ce0114d63f22a821fc5954c8c149f45
TransformerFFN
from _paritybench_helpers import _mock_config import torch from torch import nn class BertLayerNorm(nn.Module): def __init__(self, hidden_size, eps=1e-05): """Construct a layernorm module in the TF style (epsilon inside the square root). """ super(BertLayerNorm, self).__init__() 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 from torch import n...
katsura-jp/generate-syosetu-title
TransformerFFN
false
7,014
[ "MIT" ]
1
f1db8f87d6ebd58117df1e7c0b76a4fe92cae810
https://github.com/katsura-jp/generate-syosetu-title/tree/f1db8f87d6ebd58117df1e7c0b76a4fe92cae810
BasicLinearReLULinear
# 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_...
dkrako/captum
BasicLinearReLULinear
false
10,031
[ "BSD-3-Clause" ]
0
b5297bacbaec4e37f353a27de5e728bc2cbc1694
https://github.com/dkrako/captum/tree/b5297bacbaec4e37f353a27de5e728bc2cbc1694
MSECompositionLoss
import functools import torch import torch.nn as nn from torch.nn import functional as F def reduce_loss(loss, reduction): """Reduce loss as specified. Args: loss (Tensor): Elementwise loss tensor. reduction (str): Options are "none", "mean" and "sum". Returns: Tensor: Reduced lo...
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 functools import torch.nn as nn from torch.nn import functional as F assert_size_s...
Juggernaut93/mmediting
MSECompositionLoss
false
13,909
[ "Apache-2.0" ]
1,884
8ef46ace29756dd2df1d92f2f73a33646e33e007
https://github.com/Juggernaut93/mmediting/tree/8ef46ace29756dd2df1d92f2f73a33646e33e007
MultiplicationComposition
import torch from torch import nn from abc import abstractmethod import torch.utils.data class Composition(nn.Module): """A base class for compositions.""" @abstractmethod def forward(self, x: 'torch.Tensor', y: 'torch.Tensor') ->torch.Tensor: """ Compose two batches vectors. .....
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 abc import abstractmethod import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride ...
DimitrisAlivas/StarQE
MultiplicationComposition
false
7,965
[ "MIT" ]
11
c17676e5f1e3f19c0c4c117a50abe2ce22ffef28
https://github.com/DimitrisAlivas/StarQE/tree/c17676e5f1e3f19c0c4c117a50abe2ce22ffef28
SoftEntropy
# 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 from torch import nn f...
ChienHsuan/MMT
SoftEntropy
false
13,478
[ "MIT" ]
425
fe4a559b8af3ec93242b24acb4c8e962a00a1248
https://github.com/ChienHsuan/MMT/tree/fe4a559b8af3ec93242b24acb4c8e962a00a1248
CentralizedCritic
# 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_...
AYUSHKABIRVERMA/Multi-agent-reinforcement-learning
CentralizedCritic
false
13,278
[ "MIT" ]
62
cd7c13d723cd74dc278939d81d5dd1b0906cee7c
https://github.com/AYUSHKABIRVERMA/Multi-agent-reinforcement-learning/tree/cd7c13d723cd74dc278939d81d5dd1b0906cee7c
PoolingF
import torch import torch.utils.data import torch import torch.nn as nn class Normalize(nn.Module): def __init__(self, power=2): super(Normalize, self).__init__() self.power = power def forward(self, x): norm = x.pow(self.power).sum(1, keepdim=True).pow(1.0 / self.power) out ...
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.utils.data impo...
a11isonliu/contrastive-unpaired-translation
PoolingF
false
9,846
[ "BSD-3-Clause" ]
0
67651ed9877cae121d9398f46094ce8dbc678802
https://github.com/a11isonliu/contrastive-unpaired-translation/tree/67651ed9877cae121d9398f46094ce8dbc678802