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
LandmarkHead
# 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...
ai18435136351/facenet-retinaface-pytorch
LandmarkHead
false
14,784
[ "MIT" ]
48
f228969e46d7402170b708798a210de552879d16
https://github.com/ai18435136351/facenet-retinaface-pytorch/tree/f228969e46d7402170b708798a210de552879d16
ReLU
import torch import numpy as np import torch.nn as nn from numbers import Number def keep_variance_fn(x): return x + 0.001 def normcdf(value, mu=0.0, stddev=1.0): sinv = 1.0 / stddev if isinstance(stddev, Number) else stddev.reciprocal() return 0.5 * (1.0 + torch.erf((value - mu) * sinv / np.sqrt(2.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 from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import numpy as np import torch.nn as nn from numbers import N...
THAKAORI/SalsaNext
ReLU
false
11,919
[ "MIT" ]
0
855cd7e9ebb83ee62538ba4753a011ada7bbfb6c
https://github.com/THAKAORI/SalsaNext/tree/855cd7e9ebb83ee62538ba4753a011ada7bbfb6c
BasicModel
# 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...
YNNEKUW/captum
BasicModel
false
11,979
[ "BSD-3-Clause" ]
0
c8b5357b21f2ddf440e5f0ce25635977292aa5d1
https://github.com/YNNEKUW/captum/tree/c8b5357b21f2ddf440e5f0ce25635977292aa5d1
MyEntropy
import torch import torch.nn as nn class MyEntropy(nn.Module): def __init__(self): super(MyEntropy, self).__init__() def forward(self, predictions, target): b_size = predictions.size(0) lsm_func = nn.LogSoftmax(dim=1) logsoftmax = lsm_func(predictions) loss = -logsoft...
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 ...
atimashov/object_detection
MyEntropy
false
3,135
[ "MIT" ]
0
922cd88f429156fa4668c7d718b2665e4ab875fd
https://github.com/atimashov/object_detection/tree/922cd88f429156fa4668c7d718b2665e4ab875fd
BCEWithLogitsLoss
# 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...
albanie/collaborative-experts
BCEWithLogitsLoss
false
14,780
[ "Apache-2.0" ]
237
b41defc4fb8de451809014c970ccbe518621909f
https://github.com/albanie/collaborative-experts/tree/b41defc4fb8de451809014c970ccbe518621909f
RemoveChannelMeanStd
import torch class RemoveChannelMeanStd(torch.nn.Module): def forward(self, x): x2 = x.view(x.size(0), x.size(1), -1) mean = x2.mean(dim=2).view(x.size(0), x.size(1), 1, 1) std = x2.std(dim=2).view(x.size(0), x.size(1), 1, 1) return (x - mean) / std def get_inputs(): return ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_c...
cadurosar/graph_kd_dense_cifar100
RemoveChannelMeanStd
false
1,624
[ "MIT" ]
0
84054ab4f8f61c9db3460993661ba7bf1d951b36
https://github.com/cadurosar/graph_kd_dense_cifar100/tree/84054ab4f8f61c9db3460993661ba7bf1d951b36
TokenEmbedding
import torch import torch.nn as nn class TokenEmbedding(nn.Module): def __init__(self, c_in, d_model): super(TokenEmbedding, self).__init__() padding = 1 if torch.__version__ >= '1.5.0' else 2 self.tokenConv = nn.Conv1d(in_channels=c_in, out_channels=d_model, kernel_size=3, pa...
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...
TheaperDeng/Informer2020
TokenEmbedding
false
14,475
[ "Apache-2.0" ]
2,296
90e080593e9c345f5f9676359bb3d1618e9aa735
https://github.com/TheaperDeng/Informer2020/tree/90e080593e9c345f5f9676359bb3d1618e9aa735
AttentionBlock
import math import torch from torch.nn import functional as F from torch import nn import torch.utils.data import torch.optim def convert_pad_shape(pad_shape): """ Used to get arguments for F.pad """ l = pad_shape[::-1] pad_shape = [item for sublist in l for item in sublist] return pad_shape ...
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....
Royeqiu/Nemo_ASR
AttentionBlock
false
17,861
[ "Apache-2.0" ]
10
12b91b06dc5e4d0aa29d43bc7e701a93ee5eec4e
https://github.com/Royeqiu/Nemo_ASR/tree/12b91b06dc5e4d0aa29d43bc7e701a93ee5eec4e
GCN
import torch import torch.nn as nn import torch.nn.functional as F class GraphConvolution(nn.Module): """ Simple GCN layer, similar to https://arxiv.org/abs/1609.02907 """ def __init__(self, in_features, out_features, dropout=0.3): super(GraphConvolution, self).__init__() self.in_feat...
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 ...
ayyyq/T-LSTM
GCN
false
6,299
[ "MIT" ]
1
36dbc88ac710d3925851cd87c2368ecfc7061b70
https://github.com/ayyyq/T-LSTM/tree/36dbc88ac710d3925851cd87c2368ecfc7061b70
Cat
# 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...
yifanpu001/PytorchToCaffe
Cat
false
4,702
[ "MIT" ]
0
37c1ebfc3547e93b1c174721036d03c831c60e48
https://github.com/yifanpu001/PytorchToCaffe/tree/37c1ebfc3547e93b1c174721036d03c831c60e48
DiceLoss
import torch import torch.nn as nn class DiceLoss(nn.Module): def __init__(self, eps: 'float'=1e-09): super(DiceLoss, self).__init__() self.smooth = 1.0 self.eps = eps def forward(self, y_pred, y_true): num = y_true.size(0) probability = torch.sigmoid(y_pred) ...
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...
Yukei7/Multimodal-Segmentation-Network
DiceLoss
false
1,277
[ "MIT" ]
0
0a38aa8bbd2eb87e28209c810438248c0464a240
https://github.com/Yukei7/Multimodal-Segmentation-Network/tree/0a38aa8bbd2eb87e28209c810438248c0464a240
ConvNet
import torch import torch.nn as nn class ConvNet(nn.Module): def __init__(self): super(ConvNet, self).__init__() self.conv1 = nn.Conv2d(in_channels=3, out_channels=32, kernel_size= 5, padding=2) self.conv2 = nn.Conv2d(in_channels=32, out_channels=32, kernel_size =3...
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_...
agriyakhetarpal/dffml
ConvNet
false
14,771
[ "MIT" ]
171
f76f2ce94c3972634053377b00e7c16530f7f0a4
https://github.com/agriyakhetarpal/dffml/tree/f76f2ce94c3972634053377b00e7c16530f7f0a4
RegLoss
# 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 ...
Ssong24/CenterNet_Custom
RegLoss
false
9,544
[ "MIT" ]
0
526ec70f8dfabf9fb9179c9be28ce50fb2a7961c
https://github.com/Ssong24/CenterNet_Custom/tree/526ec70f8dfabf9fb9179c9be28ce50fb2a7961c
Biaffine
import torch import torch.nn as nn class Biaffine(nn.Module): def __init__(self, n_in, n_out=1, bias_x=True, bias_y=True): super(Biaffine, self).__init__() self.n_in = n_in self.n_out = n_out self.bias_x = bias_x self.bias_y = bias_y self.weight = nn.Parameter(torc...
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...
icewing1996/biaffine-parser
Biaffine
false
6,851
[ "MIT" ]
1
f5a4ece7ba9a087d81b76dd6a8ea6aa7d90c6c82
https://github.com/icewing1996/biaffine-parser/tree/f5a4ece7ba9a087d81b76dd6a8ea6aa7d90c6c82
kernelPredictor
# 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_...
qbhan/pathembed
kernelPredictor
false
7,515
[ "MIT" ]
1
c21823529840593bf606e10696f5879e5adb51b2
https://github.com/qbhan/pathembed/tree/c21823529840593bf606e10696f5879e5adb51b2
FactorizedReduce
import torch import torch.nn as nn import torch.utils.data import torch.utils from matplotlib import cm as cm from torch.nn.parallel import * from torchvision.models import * from torchvision.datasets import * def get_norm_layer(norm, C): if norm in [None, '', 'none']: norm_layer = nn.Identity() elif ...
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....
CrispyHarder/ppuda
FactorizedReduce
false
704
[ "MIT" ]
0
15950ba297188163eaadd8ab69268ee7f6ffcf2a
https://github.com/CrispyHarder/ppuda/tree/15950ba297188163eaadd8ab69268ee7f6ffcf2a
Encoder
import torch import torch.nn as nn import torch.nn.functional as F class Encoder(nn.Module): def __init__(self, out_dim=64): super(Encoder, self).__init__() self.conv1 = nn.Conv2d(3, 16, kernel_size=3, stride=1, padding=1) self.conv2 = nn.Conv2d(16, 32, kernel_size=3, stride=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 import torch.nn as nn assert_...
YoniSchirris/SimCLR
Encoder
false
1,300
[ "MIT" ]
0
a99b7f7d0fdbc5a9747abf70a8b216b328608796
https://github.com/YoniSchirris/SimCLR/tree/a99b7f7d0fdbc5a9747abf70a8b216b328608796
SmoothPinballLoss
# 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, math as tl_math from torch import nn assert_size_stride = torch._C._dynamo.gua...
Javicadserres/wind-production-forecast
SmoothPinballLoss
false
630
[ "MIT" ]
0
903fbf53d2ea34dc1a63e89cee252e76d6c25876
https://github.com/Javicadserres/wind-production-forecast/tree/903fbf53d2ea34dc1a63e89cee252e76d6c25876
disparityregression
from _paritybench_helpers import _mock_config import torch import numpy as np from torch import nn import torch.utils.data from torch.autograd import Variable import torch.nn.parallel import torch.utils.data.distributed class disparityregression(nn.Module): def __init__(self, maxdisp, cfg): super(dispari...
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 numpy as np from torch import nn import torch.utils.data from torch.autograd import Variable import torch.nn.parallel import torch.ut...
Sarah20187/X-StereoLab
disparityregression
false
14,453
[ "MIT" ]
192
9ae8c1413307e7df91b14a7f31e8a95f9e5754f9
https://github.com/Sarah20187/X-StereoLab/tree/9ae8c1413307e7df91b14a7f31e8a95f9e5754f9
Attention
import math import torch import torch.nn.functional as F import torch.utils.data def restricted_softmax(src, dim=-1, margin=0): src_max = torch.clamp(src.max(dim=dim, keepdim=True)[0], min=0) out = (src - src_max).exp() out = out / (out.sum(dim=dim, keepdim=True) + (margin - src_max).exp()) return 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 from torch._inductor.runtime....
cshjin/pytorch_geometric
Attention
false
1,753
[ "MIT" ]
0
8dd0e76beb72135949a275edd851f80f7b97648f
https://github.com/cshjin/pytorch_geometric/tree/8dd0e76beb72135949a275edd851f80f7b97648f
Transition
import torch import torch.nn as nn import torch.nn.parallel class Transition(nn.Module): def __init__(self, in_features, out_features, act_layer=nn.GELU): super(Transition, self).__init__() self.act = act_layer() self.linear = nn.Linear(in_features, out_features) 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.triton_helpers import libdevice import torch.nn as ...
druzhkov-paul/T2T-ViT
Transition
false
12,324
[ "BSD-3-Clause-Clear" ]
0
819c3ddc4cb6f464d4a9866d8713c7ace42ebf6c
https://github.com/druzhkov-paul/T2T-ViT/tree/819c3ddc4cb6f464d4a9866d8713c7ace42ebf6c
DenseAtt
import torch import torch.nn as nn import torch.optim import torch.nn.modules.loss class DenseAtt(nn.Module): def __init__(self, in_features, dropout): super(DenseAtt, self).__init__() self.dropout = dropout self.linear = nn.Linear(2 * in_features, 1, bias=True) self.in_features =...
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.optim import torch.nn.modules.loss assert_siz...
RingBDStack/ACE-HGNN
DenseAtt
false
17,846
[ "MIT" ]
5
afc610dd838951dcd6c3910795b472566f0c23ca
https://github.com/RingBDStack/ACE-HGNN/tree/afc610dd838951dcd6c3910795b472566f0c23ca
MatrixTree
# 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 import torch.cuda import torch.distributed assert_s...
SivilTaram/dialogue-utterance-rewriter-pytorch
MatrixTree
false
2,956
[ "MIT" ]
0
92c2254958b7a1ee9199836f7f2236575270983f
https://github.com/SivilTaram/dialogue-utterance-rewriter-pytorch/tree/92c2254958b7a1ee9199836f7f2236575270983f
G_Large
# 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_...
RQuispeC/pytorch-ACSCP
G_Large
false
8,766
[ "MIT" ]
25
c83f08632012c2245250ff9c5140814461db575c
https://github.com/RQuispeC/pytorch-ACSCP/tree/c83f08632012c2245250ff9c5140814461db575c
TransformerEncoderPostNormLayer
# 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....
JDBumgardner/stone_ground_hearth_battles
TransformerEncoderPostNormLayer
false
8,309
[ "Apache-2.0" ]
20
9fe095651fab60e8ddbf563f0b9b7f3e723d5f4f
https://github.com/JDBumgardner/stone_ground_hearth_battles/tree/9fe095651fab60e8ddbf563f0b9b7f3e723d5f4f
AutoEncoder
import torch from torch import nn class Encoder(nn.Module): def __init__(self, latent_channel_dim): super(Encoder, self).__init__() self.conv1 = nn.Conv2d(in_channels=3, out_channels=16, kernel_size= (3, 3), stride=(1, 1), padding=(1, 1)) self.conv2 = nn.Conv2d(in_channels=16,...
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...
quickgrid/CodeLab
AutoEncoder
false
10,718
[ "MIT" ]
0
710ebf107b7938f09c055e806c1fed5574d91308
https://github.com/quickgrid/CodeLab/tree/710ebf107b7938f09c055e806c1fed5574d91308
WeightedBCELoss
import torch class WeightedBCELoss(torch.nn.Module): def __init__(self, neg_scale=-1, bce_sum=False): super(WeightedBCELoss, self).__init__() self.log_sigmoid = torch.nn.LogSigmoid() self.neg_scale = neg_scale self.bce_sum = bce_sum def forward(self, logits, targets, target_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 libdevice, math as tl_math assert_size...
HKUST-KnowComp/MLMET
WeightedBCELoss
false
8,181
[ "MIT" ]
10
ae1188a929a5ca6a8e087bb091853b328ea2c7e7
https://github.com/HKUST-KnowComp/MLMET/tree/ae1188a929a5ca6a8e087bb091853b328ea2c7e7
DentReLU
import torch import torch.nn as nn class DentReLUFunction(torch.autograd.Function): @staticmethod def forward(ctx, input, p): ctx.save_for_backward(input) ctx.p = p output = input.clone() mask1 = p <= input mask2 = input <= 0 output[mask1 & mask2] = 0 r...
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...
bfeng/pytorch-cifar
DentReLU
false
6,329
[ "MIT" ]
1
6de257bb4b489429785502d487044c55bec62aae
https://github.com/bfeng/pytorch-cifar/tree/6de257bb4b489429785502d487044c55bec62aae
SEModule
# 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 torchvision import datas...
jasonnoy/COMP5329
SEModule
false
10,324
[ "MIT" ]
0
fc17c80b1ac41d788cc0a92d3a033dbe2f9b8b81
https://github.com/jasonnoy/COMP5329/tree/fc17c80b1ac41d788cc0a92d3a033dbe2f9b8b81
Policy
import copy import torch import numpy as np import torch.nn as nn import torch.nn.functional as F def square(a): return torch.pow(a, 2.0) class Policy(nn.Module): def __init__(self, num_inputs, num_outputs): super(Policy, self).__init__() self.affine1 = nn.Linear(num_inputs, 64) 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.triton_helpers import libdevice, math as tl_math im...
tpbarron/pytorch-ppo
Policy
false
16,616
[ "MIT" ]
47
f73226865e34443f93dbec58939329c9278828e8
https://github.com/tpbarron/pytorch-ppo/tree/f73226865e34443f93dbec58939329c9278828e8
Normalize
import torch import torch.nn as nn import torch.optim import torch.nn.parallel 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) ...
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.optim import torch.nn.parallel assert_size_s...
abeSanchez/FeatureDecoupling
Normalize
false
9,655
[ "MIT" ]
0
2a5ace5d057714b0b8657c75f1cff41e779b0ba4
https://github.com/abeSanchez/FeatureDecoupling/tree/2a5ace5d057714b0b8657c75f1cff41e779b0ba4
TwoHiddenLayerFc
import torch import torch.nn as nn import torch.nn.functional as F class TwoHiddenLayerFc(nn.Module): def __init__(self, input_shape, out_dim): super(TwoHiddenLayerFc, self).__init__() self.fc1 = nn.Linear(input_shape, 200) self.fc2 = nn.Linear(200, 200) self.fc3 = nn.Linear(200, ...
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_...
bokunwang/fedavgpy
TwoHiddenLayerFc
false
9,799
[ "MIT" ]
0
22f2fae287f15025e953ab595aa6fd6faedf83d2
https://github.com/bokunwang/fedavgpy/tree/22f2fae287f15025e953ab595aa6fd6faedf83d2
Scale
# 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 torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
CuongNguyen218/ObjectDetection-OneStageDet
Scale
false
359
[ "MIT" ]
0
60efe8b0ee6782b2aea20a32264b2ce1fc21901f
https://github.com/CuongNguyen218/ObjectDetection-OneStageDet/tree/60efe8b0ee6782b2aea20a32264b2ce1fc21901f
ImgPatches
# 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...
zoosecretbase/TransGAN
ImgPatches
false
13,184
[ "MIT" ]
0
f2546aec5b80bdddb2c8621a6e011532df3e2d73
https://github.com/zoosecretbase/TransGAN/tree/f2546aec5b80bdddb2c8621a6e011532df3e2d73
MultiHeadAttention
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.functional import torch.nn.parallel import torch.utils.data import torch.optim import torch.utils.data.distributed class MultiHeadAttention(nn.Module): """ input: query [N, T_q, query_dim] key [N, T_k, key_dim...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Ella77/tacotron2_multispeaker_pytorch
MultiHeadAttention
false
5,133
[ "BSD-3-Clause" ]
1
859eab0a8e3bd7545e623ce47fe1563702d38442
https://github.com/Ella77/tacotron2_multispeaker_pytorch/tree/859eab0a8e3bd7545e623ce47fe1563702d38442
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....
SHIVOH/DeepReinforcementLearning-DDPG-for-RoboticsControl
Actor
false
11,901
[ "MIT" ]
0
f3e811a3ae3eb603173c2475bbfe1de91074ecdc
https://github.com/SHIVOH/DeepReinforcementLearning-DDPG-for-RoboticsControl/tree/f3e811a3ae3eb603173c2475bbfe1de91074ecdc
ZeroConv2d
import torch from torch import nn from torch.nn import functional as F class ZeroConv2d(nn.Module): def __init__(self, in_channel, out_channel, padding=1): super().__init__() self.conv = nn.Conv2d(in_channel, out_channel, 3, padding=0) self.conv.weight.data.zero_() self.conv.bias....
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 from torch im...
hologerry/glow-pytorch-1
ZeroConv2d
false
3,616
[ "MIT" ]
0
9d3f95f4ff7f0a1361796a9b2554e3c229aad9b7
https://github.com/hologerry/glow-pytorch-1/tree/9d3f95f4ff7f0a1361796a9b2554e3c229aad9b7
Dropout2d
import torch import torch.backends import torch.nn.functional as F from torch.nn.modules.dropout import _DropoutNd class Dropout2d(_DropoutNd): """Randomly zero out entire channels (a channel is a 2D feature map, e.g., the :math:`j`-th channel of the :math:`i`-th sample in the batched input is a 2D tensor...
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.backends from torch.nn.modules.dropout import _DropoutNd assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_...
ThierryJudge/baal
Dropout2d
false
11,971
[ "Apache-2.0" ]
0
8c1b1e2a47e5dd6c6b75d57b8c2152a00ba6b323
https://github.com/ThierryJudge/baal/tree/8c1b1e2a47e5dd6c6b75d57b8c2152a00ba6b323
ConvNet
# 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_...
SGeetansh/dffml
ConvNet
false
5,810
[ "MIT" ]
1
04647bdcadef2f7e7b59cdd8ac1e89f17ef1095b
https://github.com/SGeetansh/dffml/tree/04647bdcadef2f7e7b59cdd8ac1e89f17ef1095b
NormalizeScale
import torch import torch.nn as nn import torch.nn.functional as F class NormalizeScale(nn.Module): def __init__(self, dim, init_norm=20): super(NormalizeScale, self).__init__() self.init_norm = init_norm self.weight = nn.Parameter(torch.ones(1, dim) * init_norm) def forward(self, bo...
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...
sibeiyang/sgmn
NormalizeScale
false
16,436
[ "MIT" ]
130
00731b4f2202246d40a36d2a6727c599e6e649aa
https://github.com/sibeiyang/sgmn/tree/00731b4f2202246d40a36d2a6727c599e6e649aa
HingeDiscriminatorLossCutMix
# 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...
ChristophReich1996/Multi-StyleGAN
HingeDiscriminatorLossCutMix
false
17,112
[ "MIT" ]
7
988f2dfea85b3205126b40c61edfb28107eb3173
https://github.com/ChristophReich1996/Multi-StyleGAN/tree/988f2dfea85b3205126b40c61edfb28107eb3173
MultiAccuracy
# 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...
namiyousef/ml-utils
MultiAccuracy
false
12,813
[ "MIT" ]
0
b67611e9e112f8bbc004a083ce4c9fcd8c1949fa
https://github.com/namiyousef/ml-utils/tree/b67611e9e112f8bbc004a083ce4c9fcd8c1949fa
GDL
import torch import numpy as np from torch import nn import torch.jit import torch.nn.functional def sum_tensor(inp, axes, keepdim=False): axes = np.unique(axes).astype(int) if keepdim: for ax in axes: inp = inp.sum(int(ax), keepdim=True) else: for ax in sorted(axes, reverse=Tr...
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 numpy as np from torch import nn import torch.jit import torch.nn.functional assert_size_stride = torch._C._dynamo.guards.assert_size...
CamilaGL/nnUNet
GDL
false
207
[ "Apache-2.0" ]
0
471ab73a6e4f67fc72d476183b5344be4cccf7ca
https://github.com/CamilaGL/nnUNet/tree/471ab73a6e4f67fc72d476183b5344be4cccf7ca
GaussMembFunc
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_str...
GradyKurpasi/anfis-pytorch
GaussMembFunc
false
9,089
[ "MIT" ]
0
4cce596193a8bc65e632405ca66d116c771033d7
https://github.com/GradyKurpasi/anfis-pytorch/tree/4cce596193a8bc65e632405ca66d116c771033d7
ShortWave
import torch import torch.nn as nn import torch.nn.functional as F class CausalConv1d(nn.Conv1d): def __init__(self, input_size, hidden_size, kernel_size, stride=1, dilation=1, groups=1, bias=True, sigmoid=None, tanh=None): self.left_padding = (kernel_size - 1) * dilation super(CausalConv...
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.functional as F assert_size_stride = torch...
jpeg729/pytorch-bits
ShortWave
false
15,736
[ "MIT" ]
73
5d107094042c27472dfb7dee77506b603f5d3e45
https://github.com/jpeg729/pytorch-bits/tree/5d107094042c27472dfb7dee77506b603f5d3e45
ComplexConv
# 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...
ishine/multiASR
ComplexConv
false
3,683
[ "Apache-2.0" ]
0
991ea2b12ea8ea4a4beeeba42c156e632c389062
https://github.com/ishine/multiASR/tree/991ea2b12ea8ea4a4beeeba42c156e632c389062
NextSentencePrediction
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data from itertools import chain as chain import torch.hub class NextSentencePrediction(nn.Module): """ 2-class classification model : is_next, is_not_next """ def __init__(self, hidden): """ ...
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....
EddieMG/LateTemporalModeling3DCNN
NextSentencePrediction
false
2,284
[ "MIT" ]
0
94c87dc1d31d09bc310d0e735a2e55453976cb0d
https://github.com/EddieMG/LateTemporalModeling3DCNN/tree/94c87dc1d31d09bc310d0e735a2e55453976cb0d
FakeReLUM
# 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...
GeoffNN/robustness
FakeReLUM
false
479
[ "MIT" ]
0
2cefabb5b0ceab62a77e0572f209144d7124cc9f
https://github.com/GeoffNN/robustness/tree/2cefabb5b0ceab62a77e0572f209144d7124cc9f
GMoF
import torch import torch.nn as nn class GMoF(nn.Module): def __init__(self, rho=1): super(GMoF, self).__init__() self.rho = rho def extra_repr(self): return 'rho = {}'.format(self.rho) def forward(self, residual): squared_res = residual ** 2 dist = torch.div(squ...
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...
MoyGcc/hpcwild
GMoF
false
14,068
[ "MIT" ]
47
8ed35c3f188284af2a4dd0d68b09fbceb105c2ba
https://github.com/MoyGcc/hpcwild/tree/8ed35c3f188284af2a4dd0d68b09fbceb105c2ba
CE_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 from torch import nn i...
Little0o0/FedML
CE_Loss
false
5,552
[ "Apache-2.0" ]
1
720015c90fcfec88d465a81b1e8fb45676dce9fb
https://github.com/Little0o0/FedML/tree/720015c90fcfec88d465a81b1e8fb45676dce9fb
BboxHead
# 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...
ai18435136351/facenet-retinaface-pytorch
BboxHead
false
14,765
[ "MIT" ]
48
f228969e46d7402170b708798a210de552879d16
https://github.com/ai18435136351/facenet-retinaface-pytorch/tree/f228969e46d7402170b708798a210de552879d16
Cosine
# 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 from torch.optim.lr...
johnson7788/mt-dnn
Cosine
false
3,897
[ "MIT" ]
0
26e5c4a5bfdbf1a1dd1c903e606db1c070568237
https://github.com/johnson7788/mt-dnn/tree/26e5c4a5bfdbf1a1dd1c903e606db1c070568237
PairwiseBCELoss
# 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 from abc im...
OatsProduction/flair
PairwiseBCELoss
false
11,761
[ "MIT" ]
0
1cf2c9a9ae487e279dce9f6b92c41fa32c4563cf
https://github.com/OatsProduction/flair/tree/1cf2c9a9ae487e279dce9f6b92c41fa32c4563cf
Upsample
import torch import torch.nn as nn class Upsample(nn.Module): def __init__(self, n_channels, with_conv=True): super(Upsample, self).__init__() self.with_conv = with_conv self.n_channels = n_channels self.conv = nn.Conv2d(self.n_channels, self.n_channels, 3, stride=1, 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
FengNiMa/pytorch_diffusion_model_celebahq
Upsample
false
8,107
[ "MIT" ]
17
b81e57453066e05d71feb8451bbff766df401386
https://github.com/FengNiMa/pytorch_diffusion_model_celebahq/tree/b81e57453066e05d71feb8451bbff766df401386
HighwayLayer
import torch import torch.nn.functional as F import torch.nn as nn import torch.onnx.operators class HighwayLayer(nn.Module): def __init__(self, input_dim, transform_activation=F.relu, gate_activation=F.softmax, gate_bias=-2): super().__init__() self.highway_transform_activation = transfo...
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....
gardenia22/translate
HighwayLayer
false
6,725
[ "BSD-3-Clause" ]
1
0be57c8f55b52fc9d39197efa02e05d1c1cda024
https://github.com/gardenia22/translate/tree/0be57c8f55b52fc9d39197efa02e05d1c1cda024
cnn_4layer_LeakyRelu
import torch import torch.nn as nn import torch.nn.functional as F class cnn_4layer_LeakyRelu(nn.Module): def __init__(self, in_ch, in_dim, width=2, linear_size=256, alpha=0.1): super(cnn_4layer_LeakyRelu, self).__init__() self.conv1 = nn.Conv2d(in_ch, 4 * width, 4, stride=2, padding=1) 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Mahoumaru/auto_LiRPA
cnn_4layer_LeakyRelu
false
11,686
[ "BSD-3-Clause" ]
0
b03a6c36eb1b921726778359d6d2b94e0cd7e480
https://github.com/Mahoumaru/auto_LiRPA/tree/b03a6c36eb1b921726778359d6d2b94e0cd7e480
BCEDiceLoss
# 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 from torch ...
oskarnatan/RGBDVS-fusion
BCEDiceLoss
false
7,425
[ "MIT" ]
1
5e560f54442d387a86e3a469107cf65859693987
https://github.com/oskarnatan/RGBDVS-fusion/tree/5e560f54442d387a86e3a469107cf65859693987
AffinityLoss
# 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...
RMeli/gnina-torch
AffinityLoss
false
17,827
[ "MIT" ]
5
eb57e2a62628d39f2a66e7fa1748e80705366761
https://github.com/RMeli/gnina-torch/tree/eb57e2a62628d39f2a66e7fa1748e80705366761
ReLUDeepLiftModel
# 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...
ngduduong/captum
ReLUDeepLiftModel
false
4,076
[ "BSD-3-Clause" ]
0
6fe5f0f23ea975e73e0c0dee79bdc01b4223d283
https://github.com/ngduduong/captum/tree/6fe5f0f23ea975e73e0c0dee79bdc01b4223d283
GCN
import math import torch import torch.nn as nn import torch.nn.functional as F class Linear(nn.Module): def __init__(self, in_features, out_features, dropout, bias=False): super(Linear, self).__init__() self.dropout = dropout self.in_features = in_features self.out_features = 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 from torch._inductor.runtime....
DongHande/PT_propagation_then_training
GCN
false
7,996
[ "MIT" ]
21
3f346ff161d2a0b807e3c0269ad26a7266305cc3
https://github.com/DongHande/PT_propagation_then_training/tree/3f346ff161d2a0b807e3c0269ad26a7266305cc3
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...
HT-hlf/mmdetection_miner-2.22.0
SpatialAttention
false
2,311
[ "Apache-2.0" ]
0
76eb94d6547f9f95cd58f41bb5c91941e82322b9
https://github.com/HT-hlf/mmdetection_miner-2.22.0/tree/76eb94d6547f9f95cd58f41bb5c91941e82322b9
FEM
# 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 ma...
juanmed/FaceDetection-DSFD
FEM
false
10,328
[ "Apache-2.0" ]
0
23650ca492444f9f052ca9b8db8b068a9be5bc68
https://github.com/juanmed/FaceDetection-DSFD/tree/23650ca492444f9f052ca9b8db8b068a9be5bc68
AttentionModule
# 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 assert_size_stride ...
cloudcjf/SG_PR
AttentionModule
false
15,043
[ "MIT" ]
105
1339d00811ea3c4c18963efa24bf6fc778e15794
https://github.com/cloudcjf/SG_PR/tree/1339d00811ea3c4c18963efa24bf6fc778e15794
TranspConv3DBlock
import torch import torch.nn as nn class TranspConv3DBlock(nn.Module): def __init__(self, in_planes, out_planes): super().__init__() self.block = nn.ConvTranspose3d(in_planes, out_planes, kernel_size= 2, stride=2, padding=0, output_padding=0) def forward(self, x): 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...
Siyuan89/self-attention-cv
TranspConv3DBlock
false
14,427
[ "MIT" ]
759
b39cde2fb68e05351bf3bc8048f4af13bbab256a
https://github.com/Siyuan89/self-attention-cv/tree/b39cde2fb68e05351bf3bc8048f4af13bbab256a
Oracle
# 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 ...
yanxurui/portfolio
Oracle
false
4,605
[ "MIT" ]
0
032cf47ccac1c5815fd4827bf0d5f3cf43cec990
https://github.com/yanxurui/portfolio/tree/032cf47ccac1c5815fd4827bf0d5f3cf43cec990
ChanNorm
# 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 from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Netruk44/stylegan2-deepspeed
ChanNorm
false
5,651
[ "MIT" ]
1
d6efe64a2f8cdfa9477d2229652c5e1a2348d52d
https://github.com/Netruk44/stylegan2-deepspeed/tree/d6efe64a2f8cdfa9477d2229652c5e1a2348d52d
MaskedTemporalPooling
import torch from typing import Optional import torch.utils.data import torch.nn class MaskedTemporalPooling(torch.nn.Module): """ Applies temporal pooling operations on masked inputs. For each pooling operation all masked values are ignored. """ def __init__(self, method: 'str'): """ ...
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.utils.data import torch.nn assert_size_stride = torch._C._dynamo.guards.asse...
zijian-hu/pytorchvideo
MaskedTemporalPooling
false
4,703
[ "Apache-2.0" ]
0
51589b100437af2285c56ce2ccc7ccecb7f9b18b
https://github.com/zijian-hu/pytorchvideo/tree/51589b100437af2285c56ce2ccc7ccecb7f9b18b
ResBlock
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cu...
Gregory-Eales/mban
ResBlock
false
5,233
[ "Apache-2.0" ]
1
d8b35db51c7e601b1db777d9a80343600374250b
https://github.com/Gregory-Eales/mban/tree/d8b35db51c7e601b1db777d9a80343600374250b
SimpleClampModel
# 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....
briancoutinho/glow
SimpleClampModel
false
12,556
[ "Apache-2.0" ]
0
4c919d60b3c33296c4109aec8020a1733c98f5b5
https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5
MultiheadAttention
import torch import torch.nn as nn class MultiheadAttention(nn.Module): """A warpper for torch.nn.MultiheadAttention. This module implements MultiheadAttention with residual connection, and positional encoding used in DETR is also passed as input. Args: embed_dims (int): The embedding dimens...
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....
CityU-AIM-Group/HTD
MultiheadAttention
false
17,123
[ "MIT" ]
5
0be9fd844118c275abc6053b3cbd5ffb589e62ee
https://github.com/CityU-AIM-Group/HTD/tree/0be9fd844118c275abc6053b3cbd5ffb589e62ee
GELayerv1
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel import torch.utils.data.distributed class GELayerv1(nn.Module): def __init__(self): super(GELayerv1, self).__init__() self.avg_pool = nn.AvgPool2d(kernel_size=(15, 15), stride=8) self.sigmod = nn.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 import torch.nn as nn import torch.nn.parallel import torch.utils.data.distributed assert...
SSusantAchary/OctaveConv_pytorch
GELayerv1
false
14,340
[ "MIT" ]
633
079f7da29d55c2eeed8985d33f0b2f765d7a469e
https://github.com/SSusantAchary/OctaveConv_pytorch/tree/079f7da29d55c2eeed8985d33f0b2f765d7a469e
Net
import torch import torch.nn as nn import torch.nn.functional as F class Net(nn.Module): def __init__(self): super().__init__() self.conv1 = nn.Conv2d(1, 32, 5) self.conv2 = nn.Conv2d(32, 64, 5) self.conv3 = nn.Conv2d(64, 128, 5) x = torch.randn(50, 50).view(-1, 1, 50, 50)...
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....
Nijaoui-Wassim/Omrika
Net
false
6,052
[ "Apache-2.0" ]
1
526d466d10e8461f4b23b42308d3e77607ea9812
https://github.com/Nijaoui-Wassim/Omrika/tree/526d466d10e8461f4b23b42308d3e77607ea9812
SelfAttentionLayer
import torch from torch import nn from torch.nn import functional as F class SelfAttentionLayer(nn.Module): def __init__(self, dim, da, alpha=0.2, dropout=0.5): super(SelfAttentionLayer, self).__init__() self.dim = dim self.da = da self.alpha = alpha self.dropout = dropout...
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....
yuka1369/KBRD
SelfAttentionLayer
false
13,147
[ "MIT" ]
0
fc0f723c448299f00eef6daabff675640a930c26
https://github.com/yuka1369/KBRD/tree/fc0f723c448299f00eef6daabff675640a930c26
Generator
import torch import torch.nn.functional as F from torch import nn from torch.autograd import * class Generator(nn.Module): """Define standard linear + softmax generation step.""" def __init__(self, d_model, vocab): super(Generator, self).__init__() self.proj = nn.Linear(d_model, vocab) 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 from torch._inductor.runtime....
GeorgeKostenkov/ImageCaptioning.pytorch
Generator
false
11,443
[ "MIT" ]
0
8f17433fdaba2f89774e45ad5a3a88b880932ee6
https://github.com/GeorgeKostenkov/ImageCaptioning.pytorch/tree/8f17433fdaba2f89774e45ad5a3a88b880932ee6
LanguageModelCriterion
import torch import torch.nn as nn from torch.autograd import * class LanguageModelCriterion(nn.Module): def __init__(self): super(LanguageModelCriterion, self).__init__() def forward(self, input, target, mask): if target.ndim == 3: target = target.reshape(-1, target.shape[2]) ...
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 torch.autograd import * assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
helloMickey/self-critical.pytorch
LanguageModelCriterion
false
10,177
[ "MIT" ]
0
3a26111012099e13daeb688136fea45186127935
https://github.com/helloMickey/self-critical.pytorch/tree/3a26111012099e13daeb688136fea45186127935
MY_NGM_FFNN
import random import torch import torch.nn as nn from collections import defaultdict import torch.nn.functional as F import torch.optim as optim class MY_NGM_FFNN(nn.Module): def __init__(self, alpha, input_dim, hidden1_dim, hidden2_dim, output_dim, device=torch.device('cpu')): super(MY_NGM_FFNN,...
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....
calpoly-bioinf/knowledge_driven_modeling
MY_NGM_FFNN
false
1,644
[ "MIT" ]
0
dbe55d5bb07f7c5a1834a21fde8833f295e3ac96
https://github.com/calpoly-bioinf/knowledge_driven_modeling/tree/dbe55d5bb07f7c5a1834a21fde8833f295e3ac96
SimpleMulModule
# 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.jit import torch.onnx import torch.nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
YaronBenAtar/glow
SimpleMulModule
false
14,668
[ "Apache-2.0" ]
2,838
a13706a4239fa7eaf059c670dc573e3eb0768f86
https://github.com/YaronBenAtar/glow/tree/a13706a4239fa7eaf059c670dc573e3eb0768f86
gen_ba_cf
import torch from torch import nn import torch.nn.functional as F class gen_ba_cf(nn.Module): def __init__(self): super().__init__() self.d1 = nn.Conv2d(in_channels=3, out_channels=8, kernel_size=3, stride=1, padding=1) self.d2 = nn.Conv2d(in_channels=8, out_channels=16, kerne...
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....
layel2/layyer-lib
gen_ba_cf
false
3,903
[ "MIT" ]
0
db48b5c38098ee93d2d34693d98e5ef4d319d919
https://github.com/layel2/layyer-lib/tree/db48b5c38098ee93d2d34693d98e5ef4d319d919
RingLoss
import torch import warnings import torch.nn as nn from torchvision.transforms import * class RingLoss(nn.Module): """Ring loss. Reference: Zheng et al. Ring loss: Convex Feature Normalization for Face Recognition. CVPR 2018. """ def __init__(self): super(RingLoss, self).__init__() ...
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 warnings import torch.nn as nn from torchvision.transforms import * asse...
DRACOyu/deep-person-reid
RingLoss
false
5,195
[ "MIT" ]
1
8ca8be28c204dbc37cff76e77691f29045773aa2
https://github.com/DRACOyu/deep-person-reid/tree/8ca8be28c204dbc37cff76e77691f29045773aa2
ScoreCap
import torch from torch import nn import torch.nn import torch.optim class ScoreCap(nn.Module): def __init__(self, cap: 'float'): super().__init__() self.cap = cap def forward(self, input): return torch.clip(input, max=self.cap) 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 import triton_helpers from torch import nn import torch.nn import torch.optim assert_size_stride = torch._C._dy...
mcx/ReAgent
ScoreCap
false
4,113
[ "BSD-3-Clause" ]
0
57b58a8b3a6b74bb87a197b73a6cd108ddad895e
https://github.com/mcx/ReAgent/tree/57b58a8b3a6b74bb87a197b73a6cd108ddad895e
SelfAttentionLayer
# 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....
yuka1369/KBRD
SelfAttentionLayer
false
13,147
[ "MIT" ]
0
fc0f723c448299f00eef6daabff675640a930c26
https://github.com/yuka1369/KBRD/tree/fc0f723c448299f00eef6daabff675640a930c26
CosineBasisLinear
import torch import numpy as np from torch import nn def cosine_basis_functions(x, n_basis_functions=64): """Cosine basis functions used to embed quantile thresholds. Args: x (torch.Tensor): Input. n_basis_functions (int): Number of cosine basis functions. Returns: ndarray: Embed...
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 numpy ...
KtechB/pfrl
CosineBasisLinear
false
2,471
[ "MIT" ]
0
9be4726d327b7ce32d9008c40119c98c93febad5
https://github.com/KtechB/pfrl/tree/9be4726d327b7ce32d9008c40119c98c93febad5
cha_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 libdevice, math as tl_math import torc...
Weepingchestnut/OVSR
cha_loss
false
1,203
[ "Apache-2.0" ]
0
11554a3b1072d50a8c88cf59b4b986df1fda73f9
https://github.com/Weepingchestnut/OVSR/tree/11554a3b1072d50a8c88cf59b4b986df1fda73f9
GE2ELoss
import torch import torch.nn as nn import torch.nn.functional as F from torch.functional import F from torch.nn import functional as F import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed import torch.distributions class GE2ELoss(nn.Module): def __init__(self, i...
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....
greenstar1151/pytorch-benchmark
GE2ELoss
false
10,464
[ "BSD-3-Clause" ]
0
8b7808d3be6b7ca1d57f1812e35fd2df5e470f8b
https://github.com/greenstar1151/pytorch-benchmark/tree/8b7808d3be6b7ca1d57f1812e35fd2df5e470f8b
InnerProductModel
import torch class InnerProductModel(torch.nn.Module): @staticmethod def is_valid_model_type(model_type): raise NotImplementedError @staticmethod def get_model_from_type(model_type): raise NotImplementedError @property def loss_criterion(self): return torch.nn.MSELos...
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 reinterpret...
SheepiesLab/plato
InnerProductModel
false
12,079
[ "Apache-2.0" ]
0
9f5bbfa4b6952d1b3af24be409982d303d54a169
https://github.com/SheepiesLab/plato/tree/9f5bbfa4b6952d1b3af24be409982d303d54a169
CausalAttentionSortNet
import torch from torch.nn import functional as F from torch import nn def bucket(buckets, t, dim=1): shape = list(t.shape) shape[dim:dim + 1] = [buckets, -1] return t.reshape(*shape) def differentiable_topk(x, k, temperature=1.0): *_, n, dim = x.shape topk_tensors = [] for i in range(k): ...
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....
lucidrains/sinkhorn-transformer
CausalAttentionSortNet
false
15,994
[ "MIT" ]
216
531bdbe46dfc2abd20183dbcede669bc9df567c6
https://github.com/lucidrains/sinkhorn-transformer/tree/531bdbe46dfc2abd20183dbcede669bc9df567c6
TransformerEncoderLayer
# 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....
Shawn-Guo-CN/EGG
TransformerEncoderLayer
false
2,892
[ "MIT" ]
0
0a5b258108e2cd1c873d7f67e8c92551bb3d809c
https://github.com/Shawn-Guo-CN/EGG/tree/0a5b258108e2cd1c873d7f67e8c92551bb3d809c
ArcFaceLoss
# 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 math...
i-pan/kaggle-melanoma
ArcFaceLoss
false
15,586
[ "MIT" ]
68
caaec0d7e9cafc7b405eb86e7fdf00107d89e1d9
https://github.com/i-pan/kaggle-melanoma/tree/caaec0d7e9cafc7b405eb86e7fdf00107d89e1d9
SE
import torch import torch.nn as nn import torch.nn.functional as F class SE(nn.Module): """Squeeze-and-Excitation block.""" def __init__(self, in_planes, se_planes): super(SE, self).__init__() self.se1 = nn.Conv2d(in_planes, se_planes, kernel_size=1, bias=True) self.se2 = nn.Conv2d(se...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
BXuan694/basemodel-pytorch
SE
false
4,892
[ "MIT" ]
1
a36c96904580be902e323db17eebbe2ea1f54176
https://github.com/BXuan694/basemodel-pytorch/tree/a36c96904580be902e323db17eebbe2ea1f54176
PretrainedUNet
import torch import torchvision class Block(torch.nn.Module): def __init__(self, in_channels, mid_channel, out_channels, batch_norm=False ): super().__init__() self.conv1 = torch.nn.Conv2d(in_channels=in_channels, out_channels= mid_channel, kernel_size=3, padding=1) se...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torchvision assert_siz...
amrane99/lung-segmentation
PretrainedUNet
false
12,991
[ "MIT" ]
0
ab29db75ac78918da5cbf66b830acaf36cf7b44a
https://github.com/amrane99/lung-segmentation/tree/ab29db75ac78918da5cbf66b830acaf36cf7b44a
RMSE
import torch import torch.nn as nn from torch.optim import * class RMSE(nn.Module): def __init__(self): super().__init__() def forward(self, outputs, target, *args): val_pixels = (target > 0.001).float() err = (target * val_pixels - outputs * val_pixels) ** 2 loss = torch.sum...
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 from torch.optim import * assert_size_stride = torch._C._...
kakaxi314/GuideNet
RMSE
false
15,778
[ "MIT" ]
142
9f53b4086d707e94d48a47bbac7dd87aaba9fdea
https://github.com/kakaxi314/GuideNet/tree/9f53b4086d707e94d48a47bbac7dd87aaba9fdea
MyUpsample2
# 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.nn.parallel import torch.optim import torch.utils.data.distributed assert_size_stride = torch._C._dynamo....
Dou-Yiming/YouRefIt_ERU
MyUpsample2
false
7,989
[ "MIT" ]
13
2a8e849380ed2d253c467b1af744a514bc171372
https://github.com/Dou-Yiming/YouRefIt_ERU/tree/2a8e849380ed2d253c467b1af744a514bc171372
Critic
# 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 ...
Barisimre/TD3-Generative
Critic
false
4,895
[ "MIT" ]
1
434419b020b88010f09f194c40feac1d420b2086
https://github.com/Barisimre/TD3-Generative/tree/434419b020b88010f09f194c40feac1d420b2086
SurfaceClassifier
# 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...
KORguy/PIFu_Part
SurfaceClassifier
false
9,299
[ "MIT" ]
0
bd199d439a94f8bc8b4036898b0f1ec01e56ab9e
https://github.com/KORguy/PIFu_Part/tree/bd199d439a94f8bc8b4036898b0f1ec01e56ab9e
GlobalAvgPool
# 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...
bjuncek/video_feature_extractor
GlobalAvgPool
false
12,168
[ "Apache-2.0" ]
0
cac06b450d1164beb3f3710d5018c19091bce348
https://github.com/bjuncek/video_feature_extractor/tree/cac06b450d1164beb3f3710d5018c19091bce348
BatchNorm2D_noparam
# 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...
ericlearning/General-I2I
BatchNorm2D_noparam
false
6,652
[ "MIT" ]
1
ba7c5d6a582bdf2e7b53c0e20c31e9097b1883a9
https://github.com/ericlearning/General-I2I/tree/ba7c5d6a582bdf2e7b53c0e20c31e9097b1883a9
BertLayer
from _paritybench_helpers import _mock_config import math import torch import torch.utils.data import torch.nn as nn import torch import torch.nn.parallel def gelu(x): """Implementation of the gelu activation function. For information: OpenAI GPT"s gelu is slightly different (and gives slightly different ...
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....
IsmaelElsharkawi/new_pororo_repo
BertLayer
false
8,820
[ "MIT" ]
19
4617083b420615b8a3eb0f44d02e4e91a8f407f7
https://github.com/IsmaelElsharkawi/new_pororo_repo/tree/4617083b420615b8a3eb0f44d02e4e91a8f407f7
VideoAttText
import torch from torch import nn import torch.utils.checkpoint from collections import OrderedDict class LayerNorm(nn.Module): def __init__(self, hidden_size, eps=1e-12): """Construct a layernorm module in the TF style (epsilon inside the square root). """ super(LayerNorm, 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....
jiazheng-xing/Swin_Multimodal
VideoAttText
false
10,341
[ "MIT" ]
0
7bc41977fe7d8d4f0091852c63a6a32a0fada0fb
https://github.com/jiazheng-xing/Swin_Multimodal/tree/7bc41977fe7d8d4f0091852c63a6a32a0fada0fb
DDPGConvBody
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 DDPGConvBody(nn.Module): def __init__(self, in_channels=4): ...
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 ...
Fieps1/p3-tennis
DDPGConvBody
false
512
[ "MIT" ]
0
29f3dab5810d7cd7f84120416a615956d266c256
https://github.com/Fieps1/p3-tennis/tree/29f3dab5810d7cd7f84120416a615956d266c256
GAE
import torch import numpy as np import torch.nn as nn import torch.nn.functional as F class GAE(nn.Module): def __init__(self, num_inputs, num_outputs): super(GAE, self).__init__() self.num_inputs = num_inputs self.num_outputs = num_outputs self.fc = nn.Linear(num_inputs, 128) ...
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....
g6ling/Pytorch-Cartpole
GAE
false
15,392
[ "MIT" ]
116
ecb7b622cfefe825ac95388cceb6752413d90a2a
https://github.com/g6ling/Pytorch-Cartpole/tree/ecb7b622cfefe825ac95388cceb6752413d90a2a