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
MSE
import torch import torch.nn as nn from torch.optim import * class MSE(nn.Module): def __init__(self): super().__init__() def forward(self, outputs, target, *args): val_pixels = (target > 0.001).float() loss = target * val_pixels - outputs * val_pixels return loss ** 2 def ...
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.optim import * assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._...
kakaxi314/GuideNet
MSE
false
15,776
[ "MIT" ]
142
9f53b4086d707e94d48a47bbac7dd87aaba9fdea
https://github.com/kakaxi314/GuideNet/tree/9f53b4086d707e94d48a47bbac7dd87aaba9fdea
NoiseInjection
import torch import torch.nn as nn class NoiseInjection(nn.Module): def __init__(self): super().__init__() self.weight = nn.Parameter(torch.zeros(1)) def forward(self, image, noise=None): if noise is None: batch, _, height, width = image.shape noise = image.ne...
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...
AsianZeus/Diverse-Facial-Edit
NoiseInjection
false
9,406
[ "Apache-2.0" ]
0
3d4b1b41546a08a1fa3cb164ade33e319806b12b
https://github.com/AsianZeus/Diverse-Facial-Edit/tree/3d4b1b41546a08a1fa3cb164ade33e319806b12b
PartialConv
import math import torch import torch.nn as nn import torch.nn.parallel import torch.utils.data def weights_init(init_type='gaussian'): def init_fun(m): classname = m.__class__.__name__ if (classname.find('Conv') == 0 or classname.find('Linear') == 0 ) and hasattr(m, '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 import math import torch.nn as nn import torch.nn.parallel import torch.utils.da...
labcontext/image-inpainting-oldpaper
PartialConv
false
3,879
[ "Apache-2.0" ]
0
da4683a2c58d662e443ea24ab93fd9d8fcb96bda
https://github.com/labcontext/image-inpainting-oldpaper/tree/da4683a2c58d662e443ea24ab93fd9d8fcb96bda
InvConvNear
import torch import torch.cuda from torch.nn import functional as F from torch import nn import torch.distributed import torch.utils.data import torch.optim class InvConvNear(nn.Module): def __init__(self, channels, n_split=4, no_jacobian=False, **kwargs): super().__init__() assert n_split % 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.cuda from torch import nn import torch.distributed import torch.uti...
Oreoluwa1234/NeMo
InvConvNear
false
9,725
[ "Apache-2.0" ]
0
b01e3ceed34efe31fd43866685dbdd19a6b30928
https://github.com/Oreoluwa1234/NeMo/tree/b01e3ceed34efe31fd43866685dbdd19a6b30928
GCN
import math import torch from torch import nn from torch.nn import 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, bias=True): super(GraphConvolution, 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....
Shadowalker1995/Tutorial-Resource
GCN
false
14,396
[ "Apache-2.0" ]
362
71fe3d521cf9971f708fa9978e9c685c0dda6ba6
https://github.com/Shadowalker1995/Tutorial-Resource/tree/71fe3d521cf9971f708fa9978e9c685c0dda6ba6
ChannelAttentionBlock
# 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....
iMED-Lab/ROSE
ChannelAttentionBlock
false
15,567
[ "Apache-2.0" ]
64
8d99a2a06fc645410b1d388193b3148404e61230
https://github.com/iMED-Lab/ROSE/tree/8d99a2a06fc645410b1d388193b3148404e61230
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...
chennnnnnnnn/face_detection
ClassHead
false
3,348
[ "MIT" ]
0
77d5a9098d9e1a65ac5093a23620ed5d99dc0723
https://github.com/chennnnnnnnn/face_detection/tree/77d5a9098d9e1a65ac5093a23620ed5d99dc0723
ExgLayer
# 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...
ayyyq/T-LSTM
ExgLayer
false
6,301
[ "MIT" ]
1
36dbc88ac710d3925851cd87c2368ecfc7061b70
https://github.com/ayyyq/T-LSTM/tree/36dbc88ac710d3925851cd87c2368ecfc7061b70
GTConv_2
import torch import torch.nn.functional as F from torch import nn import torch.utils.data import torch.onnx.operators import torch.optim import torch.optim.lr_scheduler class GTConv_2(nn.Module): def __init__(self, in_channels, out_channels): super(GTConv_2, self).__init__() self.in_channels = in...
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...
verashira/TSPNet
GTConv_2
false
16,670
[ "MIT" ]
83
ee454165dcc61cdbbff19565364e2221727ed2b8
https://github.com/verashira/TSPNet/tree/ee454165dcc61cdbbff19565364e2221727ed2b8
GELU_
import math import torch import torch.nn as nn import torch.utils.data import torch.onnx.operators import torch.optim import torch.optim.lr_scheduler class GELU_(nn.Module): def forward(self, x): return 0.5 * x * (1 + torch.tanh(math.sqrt(2 / math.pi) * (x + 0.044715 * torch.pow(x, 3)))) d...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import torch.utils.data import torch.onnx.operators impor...
CUMLSec/stateformer
GELU_
false
7,911
[ "MIT" ]
41
87cb3c906c43fcff42b2ca820eb6e7fd918d0a1c
https://github.com/CUMLSec/stateformer/tree/87cb3c906c43fcff42b2ca820eb6e7fd918d0a1c
BinaryFocalLoss
import torch class BinaryFocalLoss(torch.nn.Module): """ from https://github.com/qubvel/segmentation_models""" def __init__(self, gamma=2.0, alpha=0.25, eps=1e-07): super().__init__() self.gamma = gamma self.alpha = alpha self.eps = eps def forward(self, pr, gt): ...
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...
kungfuai/d3m-segmentation-research
BinaryFocalLoss
false
7,059
[ "MIT" ]
1
5bc44ddd0e8522fb2b369866ad47aa62a24a8f63
https://github.com/kungfuai/d3m-segmentation-research/tree/5bc44ddd0e8522fb2b369866ad47aa62a24a8f63
SelfAttn
import torch import torch as th import torch.nn as nn import torch.nn.functional as F class SelfAttn(nn.Module): def __init__(self, hidden_size): super(SelfAttn, self).__init__() self.query = nn.Linear(hidden_size, 1) def forward(self, keys, values, attn_mask=None): """ :para...
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....
Jupaoqq/Jupaoqq_LaRL
SelfAttn
false
692
[ "Apache-2.0" ]
0
ae64adda5627987d71f2948f499daa11e9f309ad
https://github.com/Jupaoqq/Jupaoqq_LaRL/tree/ae64adda5627987d71f2948f499daa11e9f309ad
LayerNormChannel
import torch import torch.nn as nn class LayerNormChannel(nn.Module): """ LayerNorm only for Channel Dimension. Input: tensor in shape [B, C, H, W] """ def __init__(self, num_channels, eps=1e-05): super().__init__() self.weight = nn.Parameter(torch.ones(num_channels)) self...
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_...
TranNhiem/MVAR_SSL
LayerNormChannel
false
5,918
[ "MIT" ]
1
339964db4d40f06a92866675ff99ef67cd968cca
https://github.com/TranNhiem/MVAR_SSL/tree/339964db4d40f06a92866675ff99ef67cd968cca
BCEFocalLoss
# 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...
CCChenhao997/CCL2020-Humor-Computation
BCEFocalLoss
false
17,014
[ "MIT" ]
7
700e539588904da40a9db899668437188a6b4613
https://github.com/CCChenhao997/CCL2020-Humor-Computation/tree/700e539588904da40a9db899668437188a6b4613
FC_Layer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
WorksApplications/omni_torch
FC_Layer
false
1,225
[ "Apache-2.0" ]
0
10b689d794c8f485e38c765303ef018da17bc641
https://github.com/WorksApplications/omni_torch/tree/10b689d794c8f485e38c765303ef018da17bc641
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...
samxu0823/anfis-pytorch
GaussMembFunc
false
4,261
[ "MIT" ]
0
b4ec3f0e8259963800e9e0a2904a580d1e56cc1c
https://github.com/samxu0823/anfis-pytorch/tree/b4ec3f0e8259963800e9e0a2904a580d1e56cc1c
Curiosity
# 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_...
VasaKiDD/TD3-deep-rl-research
Curiosity
false
2,939
[ "Apache-2.0" ]
0
f75b2f86f3b7969a82fc4b7f9ea2b62de3616217
https://github.com/VasaKiDD/TD3-deep-rl-research/tree/f75b2f86f3b7969a82fc4b7f9ea2b62de3616217
AsymmetricLoss
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed class AsymmetricLoss(nn.Module): def __init__(self, gamma_neg=4, gamma_pos=1, clip=0.05, eps=1e-08, disable_torch_grad_focal_loss=False): super(AsymmetricLoss...
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...
ChangeTheWorld20191008/query2labels
AsymmetricLoss
false
2,135
[ "MIT" ]
0
cdca1f3519f75cc91ef2aa166c2534691016f04f
https://github.com/ChangeTheWorld20191008/query2labels/tree/cdca1f3519f75cc91ef2aa166c2534691016f04f
NetVLAD
# 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....
DanielPollithy/UncertainToDayGAN
NetVLAD
false
480
[ "BSD-2-Clause" ]
0
bd16fa1a34878dbdc765d548169b7058a56864ff
https://github.com/DanielPollithy/UncertainToDayGAN/tree/bd16fa1a34878dbdc765d548169b7058a56864ff
CharbonnierLoss
import functools import torch import torch.utils.data from torch.nn import functional as F from torch.utils import data as data import torch.nn as nn from torch.nn import init as init from torchvision.models import vgg as vgg from torch import autograd as autograd def reduce_loss(loss, reduction): """Reduce 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 from torch._inductor.runtime.triton_helpers import libdevice import functools import torc...
BCV-Uniandes/RSR
CharbonnierLoss
false
8,083
[ "zlib-acknowledgement" ]
14
dad60eedd3560f2655e3d1ed444153ed2616af2e
https://github.com/BCV-Uniandes/RSR/tree/dad60eedd3560f2655e3d1ed444153ed2616af2e
QuickGELU
import torch from torch import nn class QuickGELU(nn.Module): def forward(self, x: 'torch.Tensor'): return x * torch.sigmoid(1.702 * 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 from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
Artanic30/RentalPrediction
QuickGELU
false
1,972
[ "MIT" ]
0
5804ab9b453d2a40bce2bb304c31efc98a803ed8
https://github.com/Artanic30/RentalPrediction/tree/5804ab9b453d2a40bce2bb304c31efc98a803ed8
ResidualConvUnit
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn import t...
Minerva-J/Pytorch-Segmentation-multi-models
ResidualConvUnit
false
14,014
[ "Apache-2.0" ]
84
0845b54d4fbc8d38c70f158054b7ab1be2b3ceb9
https://github.com/Minerva-J/Pytorch-Segmentation-multi-models/tree/0845b54d4fbc8d38c70f158054b7ab1be2b3ceb9
ReRegualizedLinearNACLayer
# 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 math import torch.util...
CUMLSec/stateformer
ReRegualizedLinearNACLayer
false
7,919
[ "MIT" ]
41
87cb3c906c43fcff42b2ca820eb6e7fd918d0a1c
https://github.com/CUMLSec/stateformer/tree/87cb3c906c43fcff42b2ca820eb6e7fd918d0a1c
MNIST_CNN
import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data class MNIST_CNN(nn.Module): """ Hand-tuned architecture for MNIST. Weirdness I've noticed so far with this architecture: - adding a linear layer after the mean-pool in features hurts RotatedMNIST-100 gen...
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....
AllenPu/mbdg
MNIST_CNN
false
7,677
[ "MIT" ]
27
243f53a57dcf4bfb6e717c0c9f64a839cff8d548
https://github.com/AllenPu/mbdg/tree/243f53a57dcf4bfb6e717c0c9f64a839cff8d548
MultiHeadAttention
import torch import torch.nn as nn class MultiHeadAttention(nn.Module): def __init__(self, hidden_size, attention_dropout_rate, num_heads): super(MultiHeadAttention, self).__init__() self.num_heads = num_heads self.att_size = att_size = hidden_size // num_heads self.scale = att_si...
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....
ChantalMP/Graphormer
MultiHeadAttention
false
8,934
[ "MIT" ]
0
5c384d0f2840afc88ee88aeb874f4b1f41d760bf
https://github.com/ChantalMP/Graphormer/tree/5c384d0f2840afc88ee88aeb874f4b1f41d760bf
Actor
import torch import torch.nn as nn import torch.nn.functional as F class Actor(nn.Module): def __init__(self, n_obs, output_dim, hidden_size, init_w=0.003): super(Actor, self).__init__() self.linear1 = nn.Linear(n_obs, hidden_size) self.linear2 = nn.Linear(hidden_size, 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 import triton_helpers from torch._inductor.runtime....
KhalilWong/Learn-RL
Actor
false
2,452
[ "MIT" ]
0
9f63c5adafab1413362366d28d8711096ce6648c
https://github.com/KhalilWong/Learn-RL/tree/9f63c5adafab1413362366d28d8711096ce6648c
LayerNorm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
dumpmemory/uniformer-pytorch
LayerNorm
false
15,278
[ "MIT" ]
71
756c4edb7ab0947dc202c145f7c95571848e0594
https://github.com/dumpmemory/uniformer-pytorch/tree/756c4edb7ab0947dc202c145f7c95571848e0594
SkipLastTargetChannelWrapper
import torch from torch import nn as nn from torch.nn import MSELoss class SkipLastTargetChannelWrapper(nn.Module): """ Loss wrapper which removes additional target channel """ def __init__(self, loss, squeeze_channel=False): super(SkipLastTargetChannelWrapper, self).__init__() self.l...
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 as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._emp...
PerceptionComputingLab/PARSE2022
SkipLastTargetChannelWrapper
false
9,427
[ "Apache-2.0" ]
0
a34886ed9d06b424bc93953f1b2f79540ad9ebf6
https://github.com/PerceptionComputingLab/PARSE2022/tree/a34886ed9d06b424bc93953f1b2f79540ad9ebf6
PolynomialEnvelope
# 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...
Irlirion/ocp
PolynomialEnvelope
false
13,839
[ "MIT", "BSD-3-Clause" ]
242
6fb3e794eef31559db990300198eca20f41d8f37
https://github.com/Irlirion/ocp/tree/6fb3e794eef31559db990300198eca20f41d8f37
ClassificationModel
import torch import torch.nn as nn import torch.utils.data class ClassificationModel(nn.Module): def __init__(self, num_features_in, num_anchors=9, num_classes=80, prior=0.01, feature_size=256): super(ClassificationModel, self).__init__() self.num_classes = num_classes self.num_an...
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
DiceLoss
# 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...
MichalBusta/OpenCitiesAIC
DiceLoss
false
17,719
[ "MIT" ]
7
2358118a782edde27a588d6adaf79941cbd90de6
https://github.com/MichalBusta/OpenCitiesAIC/tree/2358118a782edde27a588d6adaf79941cbd90de6
JSDLoss
# 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 a...
mirmohammad/IFT6135-TP3
JSDLoss
false
4,010
[ "MIT" ]
0
70453b4ea695313837ab88243b0206552eb50632
https://github.com/mirmohammad/IFT6135-TP3/tree/70453b4ea695313837ab88243b0206552eb50632
BetaMish
import torch import torch.nn as nn class BetaMish(nn.Module): def __init__(self): super().__init__() def forward(self, x): beta = 1.5 return x * torch.tanh(torch.log(torch.pow(1 + torch.exp(x), beta))) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs():...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.gu...
dcrmg/Efficient-Segmentation-Networks
BetaMish
false
3,429
[ "MIT" ]
0
e2f2d90d69e4e9af464678b0f02bc754c28f643d
https://github.com/dcrmg/Efficient-Segmentation-Networks/tree/e2f2d90d69e4e9af464678b0f02bc754c28f643d
Switch
# 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 numpy as np ...
TaoMiner/eesc
Switch
false
5,881
[ "Apache-2.0" ]
1
fa0ca532333cad2262d20707899f97a6c8a99cfb
https://github.com/TaoMiner/eesc/tree/fa0ca532333cad2262d20707899f97a6c8a99cfb
SmoothL1Loss
import torch import torch.nn as nn class SmoothL1Loss(nn.Module): def __init__(self, beta=1.0, reduction='mean'): super().__init__() self.beta = beta self.reduction = reduction def forward(self, pred, target, weight=None): assert pred.size() == target.size() and target.numel(...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
liuhuaijjin/rpn_rois_proposals_layers
SmoothL1Loss
false
7,106
[ "MIT" ]
1
c5f9f09b3ae8c52e4b6fa3fda391f993cb7d42c1
https://github.com/liuhuaijjin/rpn_rois_proposals_layers/tree/c5f9f09b3ae8c52e4b6fa3fda391f993cb7d42c1
RobertaClassificationHead
# 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...
INK-USC/expl-refinement
RobertaClassificationHead
false
18,385
[ "MIT" ]
7
815a7892a8d4c42fb429856746212a44f67d2547
https://github.com/INK-USC/expl-refinement/tree/815a7892a8d4c42fb429856746212a44f67d2547
GradientLoss
import torch import torch.nn as nn def gradient(input): input0 = input[..., :-1, :-1] didy = input[..., 1:, :-1] - input0 didx = input[..., :-1, 1:] - input0 return torch.cat((didy, didx), -3) class GradientLoss(nn.Module): def forward(self, input, target): return torch.abs(gradient(inp...
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 ...
LongerVision/oidn
GradientLoss
false
5,557
[ "Apache-2.0" ]
1
2f9e59f8b747b217f78c5c274f4f2bff347a03a7
https://github.com/LongerVision/oidn/tree/2f9e59f8b747b217f78c5c274f4f2bff347a03a7
ConditionalBatchNorm2d
import torch import torch.nn as nn import torch.nn.parallel import torch.utils.data from torch.nn import Parameter def l2normalize(v, eps=0.0001): return v / (v.norm() + eps) class SpectralNorm(nn.Module): def __init__(self, module, name='weight', power_iterations=1): super(SpectralNorm, self).__in...
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 ...
AnonymousGFR/wbgan.pytorch
ConditionalBatchNorm2d
false
4,879
[ "MIT" ]
1
d75cb6599852e901df0136db87520e3314f8ca71
https://github.com/AnonymousGFR/wbgan.pytorch/tree/d75cb6599852e901df0136db87520e3314f8ca71
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....
shampooma/segmenter
Attention
false
16,411
[ "MIT" ]
418
b08fd481da6758e37d108ba28676229b62f757aa
https://github.com/shampooma/segmenter/tree/b08fd481da6758e37d108ba28676229b62f757aa
GumbelSoftmaxLayer
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from torch.distributions import RelaxedOneHotCategorical import torch.nn.parallel import torch.utils.data import torch...
vengalraoguttha/EGG
GumbelSoftmaxLayer
false
16,664
[ "MIT" ]
254
e4f8412f197543ec7f1f00cf89b5a364b038dc57
https://github.com/vengalraoguttha/EGG/tree/e4f8412f197543ec7f1f00cf89b5a364b038dc57
DiscrimNet
import torch import torch.nn as nn from torch.nn.init import kaiming_uniform_ def weight_init(m): if m.__class__.__name__ == 'Linear': m.weight.data.copy_(kaiming_uniform_(m.weight.data)) m.bias.data.fill_(0) class DiscrimNet(nn.Module): def __init__(self, ob_space, ac_space, h1=32, h2=32):...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
ven-kyoshiro/PILCO-1
DiscrimNet
false
10,956
[ "MIT" ]
0
61c4ef18a6bbecbeb6a10784a7925d31f46dd23b
https://github.com/ven-kyoshiro/PILCO-1/tree/61c4ef18a6bbecbeb6a10784a7925d31f46dd23b
BoundaryDiscriminator
# 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...
JACKYLUO1991/DCBNet
BoundaryDiscriminator
false
17,468
[ "MIT" ]
6
b797584b66ad99fe984f58268befb12ec60ccfae
https://github.com/JACKYLUO1991/DCBNet/tree/b797584b66ad99fe984f58268befb12ec60ccfae
UNet
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
frankgu968/learning-to-see-in-the-dark-pytorch
UNet
false
3,564
[ "MIT" ]
0
6a59fc64d1f152a2410b9128a6a51687a9b179d1
https://github.com/frankgu968/learning-to-see-in-the-dark-pytorch/tree/6a59fc64d1f152a2410b9128a6a51687a9b179d1
LeNet300
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_s...
EIDOSlab/pruning-validation
LeNet300
false
2,176
[ "BSD-3-Clause" ]
0
bd8e83cf6f564def0e193a4be0f753c768fe9e75
https://github.com/EIDOSlab/pruning-validation/tree/bd8e83cf6f564def0e193a4be0f753c768fe9e75
Conv2d
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch.autograd import Function import numpy as np import torch.nn as nn imp...
chen-hao-chao/dlsm
Conv2d
false
3,289
[ "Apache-2.0" ]
0
aea88aa7e59a02fe44f25f4de9d6f2eaf044093b
https://github.com/chen-hao-chao/dlsm/tree/aea88aa7e59a02fe44f25f4de9d6f2eaf044093b
IBertLMHead
from _paritybench_helpers import _mock_config import math import torch from torch import nn import torch.utils.checkpoint def gelu(x): return 0.5 * x * (1 + torch.tanh(math.sqrt(2 / math.pi) * (x + 0.044715 * torch.pow(x, 3)))) class IBertLMHead(nn.Module): """I-BERT Head for masked language modelin...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import math from to...
jxhe/unify-parameter-efficient-tuning
IBertLMHead
false
15,767
[ "Apache-2.0" ]
101
3222ce2c0079566a28043e22380eb4ab6ad14389
https://github.com/jxhe/unify-parameter-efficient-tuning/tree/3222ce2c0079566a28043e22380eb4ab6ad14389
QuickGELU
# 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...
Jinsu-L/KELIP
QuickGELU
false
5,401
[ "Apache-2.0" ]
1
d3261cbb9ba3c3ad474dd560a5add8b69ed78477
https://github.com/Jinsu-L/KELIP/tree/d3261cbb9ba3c3ad474dd560a5add8b69ed78477
Delta
# 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.nn as nn from torchaudio import transforms assert_size_stride = tor...
czlwang/s3prl
Delta
false
12,282
[ "Apache-2.0" ]
0
81d4bb8d051cee20fa87c083b8478999e1766172
https://github.com/czlwang/s3prl/tree/81d4bb8d051cee20fa87c083b8478999e1766172
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...
akimotty877/mmediting
MSECompositionLoss
false
3,065
[ "Apache-2.0" ]
0
cae872d6f3e867ba144c7c0dbc29a0ee1a29e5a6
https://github.com/akimotty877/mmediting/tree/cae872d6f3e867ba144c7c0dbc29a0ee1a29e5a6
Conv
# 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.utils.data from ...
CenIII/pose-ae-train
Conv
false
13,446
[ "BSD-3-Clause" ]
250
8780ba9f3d80ca3a724bbee7b815073adc3d3e6e
https://github.com/CenIII/pose-ae-train/tree/8780ba9f3d80ca3a724bbee7b815073adc3d3e6e
SimpleNet
# 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 ...
P403n1x87/AI-Feynman
SimpleNet
false
2,710
[ "MIT" ]
0
73398ad1b739d02b4cb8d9648b208e76d0a9085d
https://github.com/P403n1x87/AI-Feynman/tree/73398ad1b739d02b4cb8d9648b208e76d0a9085d
ThreeLayerNet_tanh
import torch class ThreeLayerNet_tanh(torch.nn.Module): def __init__(self, D_in, H_1, H_2, D_out): super(ThreeLayerNet_tanh, self).__init__() self.linear1 = torch.nn.Linear(D_in, H_1) self.tanh = torch.nn.Tanh() self.linear2 = torch.nn.Linear(H_1, H_2) self.linear3 = torch...
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 ...
PanosAntoniadis/pattern_recognition-ntua
ThreeLayerNet_tanh
false
17,782
[ "MIT" ]
6
6dca44de77f0ca94221980fc789446a2e10410a4
https://github.com/PanosAntoniadis/pattern_recognition-ntua/tree/6dca44de77f0ca94221980fc789446a2e10410a4
HeatmapLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_...
seeinggreen/pyslr
HeatmapLoss
false
4,374
[ "BSD-3-Clause" ]
0
17009582f70aed09a9174ce47f9414f715173018
https://github.com/seeinggreen/pyslr/tree/17009582f70aed09a9174ce47f9414f715173018
SimpleSoftmaxModel
# 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.jit impor...
briancoutinho/glow
SimpleSoftmaxModel
false
12,591
[ "Apache-2.0" ]
0
4c919d60b3c33296c4109aec8020a1733c98f5b5
https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5
Block
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import n...
seunghyukcho/vdvae
Block
false
12,966
[ "MIT" ]
0
3a552d80351d670fdbde8302c556a6e668d33762
https://github.com/seunghyukcho/vdvae/tree/3a552d80351d670fdbde8302c556a6e668d33762
Flatten
# 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...
DebugVBZ/pixel2style2pixel
Flatten
false
8,943
[ "MIT" ]
0
e884c0cf471ad9ee09b8743d7ffd532283a638e5
https://github.com/DebugVBZ/pixel2style2pixel/tree/e884c0cf471ad9ee09b8743d7ffd532283a638e5
DiceLoss
import torch import torch.nn as nn class DiceLoss(nn.Module): """Sørensen–Dice coefficient loss to calculate the mean loss over a batch of data.This loss mainly calculates the similarity between two samples. To know more about this loss check this link: https://en.wikipedia.org/wiki/S%C3%B8rensen%...
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...
g-freire/Brain-Tumor-Segmentation
DiceLoss
false
15,379
[ "MIT" ]
156
e4f258feb64c11815570e295c58bda78afd21ab9
https://github.com/g-freire/Brain-Tumor-Segmentation/tree/e4f258feb64c11815570e295c58bda78afd21ab9
GramMatrix
# 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.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Holmes-Alan/Photo2Sketch
GramMatrix
false
536
[ "MIT" ]
0
43a0ca6bb8a8e645b35a2ab23d11ed5efe117e09
https://github.com/Holmes-Alan/Photo2Sketch/tree/43a0ca6bb8a8e645b35a2ab23d11ed5efe117e09
ResnetBlock
import torch from torch import nn import torch.nn.parallel import torch.utils.data import torch.utils def actvn(x): out = nn.functional.leaky_relu(x, 0.2) return out class ResnetBlock(nn.Module): def __init__(self, fin, fout, fhidden=None, is_bias=True): super(ResnetBlock, 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 import nn import torch.nn.parallel import torch.utils.data import tor...
IdanAzuri/MixMatch-pytorch
ResnetBlock
false
596
[ "MIT" ]
0
b8de2bc30c09e1256b92e0394403487fc4f90135
https://github.com/IdanAzuri/MixMatch-pytorch/tree/b8de2bc30c09e1256b92e0394403487fc4f90135
CharbonnierLoss
# 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 import functools import torc...
BCV-Uniandes/RSR
CharbonnierLoss
false
8,083
[ "zlib-acknowledgement" ]
14
dad60eedd3560f2655e3d1ed444153ed2616af2e
https://github.com/BCV-Uniandes/RSR/tree/dad60eedd3560f2655e3d1ed444153ed2616af2e
net_nvidia_featshift_pytorch
# 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....
YuShen0118/SAAP_Auto-driving_Platform
net_nvidia_featshift_pytorch
false
18,209
[ "MIT" ]
4
785f899fb3b3ad92075318f9fcb69b8e09597202
https://github.com/YuShen0118/SAAP_Auto-driving_Platform/tree/785f899fb3b3ad92075318f9fcb69b8e09597202
HadamardProduct
import torch import torch.nn as nn import torch.distributed import torch.optim.lr_scheduler import torch.utils.data class HadamardProduct(nn.Module): def __init__(self, idim_1, idim_2, hdim): super(HadamardProduct, self).__init__() self.fc_1 = nn.Linear(idim_1, hdim) self.fc_2 = nn.Linear...
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 ...
CFM-MSG/SDN
HadamardProduct
false
193
[ "MIT" ]
0
f309602dc2bb73117355003f3744f8e5450dbccc
https://github.com/CFM-MSG/SDN/tree/f309602dc2bb73117355003f3744f8e5450dbccc
Bottleneck
import torch from torch import nn from collections import OrderedDict class Bottleneck(nn.Module): def __init__(self, in_channels, out_channels): super(Bottleneck, self).__init__() m = OrderedDict() m['conv1'] = nn.Conv2d(in_channels, out_channels, kernel_size=1, bias=False) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn from col...
nivedk/SPANet
Bottleneck
false
10,621
[ "BSD-3-Clause" ]
0
1bd84ae67732f9885af65dcbd286075008d46e91
https://github.com/nivedk/SPANet/tree/1bd84ae67732f9885af65dcbd286075008d46e91
LabelBilinear
import torch from torch import nn import torch.utils.data class LabelBilinear(nn.Module): """helper module for Biaffine Dependency Parser predicting label """ def __init__(self, in1_features, in2_features, num_label, bias=True): super(LabelBilinear, self).__init__() self.bilinear = nn.Bil...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn import torch.utils.data assert_size_stride = torch._C._dyna...
LindaCY/fastNLP
LabelBilinear
false
17,618
[ "Apache-2.0" ]
4
3fa95b6cfc31211453bc21792e3eef87948858da
https://github.com/LindaCY/fastNLP/tree/3fa95b6cfc31211453bc21792e3eef87948858da
MulMCFC
# 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....
hoedt/stable-nalu
MulMCFC
false
3,635
[ "MIT" ]
0
64b3d240db8bff4da857d955f213ef3c7e38e035
https://github.com/hoedt/stable-nalu/tree/64b3d240db8bff4da857d955f213ef3c7e38e035
GRUCell
import torch import numpy as np import torch.nn.functional as F from torch import nn class GRUCell(nn.Module): def __init__(self, input_size, hidden_size, bias=True): super(GRUCell, self).__init__() self.input_size = input_size self.hidden_size = hidden_size self.bias = 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 libdevice import numpy as np ...
deutschmn/PM2.5-GNN
GRUCell
false
3,413
[ "MIT" ]
0
82e3fe2f25465451cbbdd6350c91a0242ecaa1c1
https://github.com/deutschmn/PM2.5-GNN/tree/82e3fe2f25465451cbbdd6350c91a0242ecaa1c1
ResidualBlockNoBN
# 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...
LasseWolter/laughter-detection
ResidualBlockNoBN
false
9,266
[ "MIT" ]
0
f0a37f8e991fc57e8bbc846695fc4dea84d60af5
https://github.com/LasseWolter/laughter-detection/tree/f0a37f8e991fc57e8bbc846695fc4dea84d60af5
RobertaClassificationHead
from _paritybench_helpers import _mock_config import torch import torch.nn as nn class RobertaClassificationHead(nn.Module): """Head for sentence-level classification tasks.""" def __init__(self, config): super().__init__() self.dense = nn.Linear(config.hidden_size * 2, 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 import torch.nn as ...
Masum06/CodeXGLUE
RobertaClassificationHead
false
4,731
[ "CC0-1.0", "MIT" ]
0
bf1ab8c8878f978bd4ef3cb5e030e52f03e92854
https://github.com/Masum06/CodeXGLUE/tree/bf1ab8c8878f978bd4ef3cb5e030e52f03e92854
FirstNet
# 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_...
PacktPublishing/Designing-Models-for-Responsible-AI
FirstNet
false
932
[ "MIT" ]
0
36b60f1e3e9db8b3d2db3ace873dbdee1b076b74
https://github.com/PacktPublishing/Designing-Models-for-Responsible-AI/tree/36b60f1e3e9db8b3d2db3ace873dbdee1b076b74
HyperConv2d
import torch import torch.nn as nn import torch.nn.functional as F def weights_init(m): classname = m.__class__.__name__ if classname.find('Linear') != -1 or classname.find('Conv') != -1: nn.init.constant_(m.weight, 0) nn.init.normal_(m.bias, 0, 0.01) class HyperConv2d(nn.Module): def _...
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...
D-hash-code/ffjord-rnode-finalweek-mnist
HyperConv2d
false
2,149
[ "MIT" ]
0
4cabcbadda79c68df53ec25f1f8fe03cfeee78f9
https://github.com/D-hash-code/ffjord-rnode-finalweek-mnist/tree/4cabcbadda79c68df53ec25f1f8fe03cfeee78f9
MSE
# 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...
j1a0m0e4sNTU/MachineLearning2019
MSE
false
3,682
[ "MIT" ]
0
44a7a3387837e53134bcf5eb8fcf95daf4dff48d
https://github.com/j1a0m0e4sNTU/MachineLearning2019/tree/44a7a3387837e53134bcf5eb8fcf95daf4dff48d
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....
Brikwerk/learn2learn
LinearBlock
false
13,722
[ "MIT" ]
1,774
7997c13c26ec627d13ce77ba98427260df78ada8
https://github.com/Brikwerk/learn2learn/tree/7997c13c26ec627d13ce77ba98427260df78ada8
FrobeniusNormLoss
# 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 import torch.nn as nn assert...
grofit/traiNNer
FrobeniusNormLoss
false
15,470
[ "Apache-2.0" ]
78
12d006fd44ed304e4178839c53b1f3d95ca25dcb
https://github.com/grofit/traiNNer/tree/12d006fd44ed304e4178839c53b1f3d95ca25dcb
LocalNet
import torch import torch.nn as nn class LocalNet(nn.Module): def forward(self, x_in): """Double convolutional block :param x_in: image features :returns: image features :rtype: Tensor """ x = self.lrelu(self.conv1(self.refpad(x_in))) x = self.lrelu(self....
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch....
ZombaSY/DeepLPF
LocalNet
false
1,345
[ "BSD-3-Clause" ]
0
adce64ae01bc9e32f465a354cb1f6534f0d13597
https://github.com/ZombaSY/DeepLPF/tree/adce64ae01bc9e32f465a354cb1f6534f0d13597
MetaAconC
# 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...
HarryPham0123/FPT_data_centric_competition
MetaAconC
false
5,290
[ "Apache-2.0" ]
1
3fa1e0ac48fdae2649b639229d9a74f75e461878
https://github.com/HarryPham0123/FPT_data_centric_competition/tree/3fa1e0ac48fdae2649b639229d9a74f75e461878
CustomReLU
# 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...
charlesmackin/tiny
CustomReLU
false
1,655
[ "Apache-2.0" ]
0
bf8afc5cfc15e12efdd3bca0d559adfdfc435981
https://github.com/charlesmackin/tiny/tree/bf8afc5cfc15e12efdd3bca0d559adfdfc435981
statm_loss
import torch import torch.nn as nn class statm_loss(nn.Module): def __init__(self, eps=2): super(statm_loss, self).__init__() self.eps = eps def forward(self, x, y): x = x.view(x.size(0), x.size(1), -1) y = y.view(y.size(0), y.size(1), -1) x_mean = x.mean(dim=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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
COMP6248-Reproducability-Challenge/KD_SRRL
statm_loss
false
7,817
[ "MIT" ]
27
958c8f9fbeb7893f9bd866aff5b065b2bde87f23
https://github.com/COMP6248-Reproducability-Challenge/KD_SRRL/tree/958c8f9fbeb7893f9bd866aff5b065b2bde87f23
PositionwiseFeedForward
import torch import torch.nn as nn class LayerNorm(nn.Module): """ Layer Normalization class """ 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(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 from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Fengyee/ASER
PositionwiseFeedForward
false
11,433
[ "MIT" ]
0
c284b507ee268a8275456a969b944895cacc54b8
https://github.com/Fengyee/ASER/tree/c284b507ee268a8275456a969b944895cacc54b8
QuantizableHSwish
import torch import torch.nn as nn import torch.quantization class QuantizableHSigmoid(nn.Module): """Hard Sigmoid for quantization.""" def __init__(self, inplace: 'bool'=True) ->None: """Initialize.""" super(QuantizableHSigmoid, self).__init__() self.relu6 = nn.ReLU6(inplace=inplace)...
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.quantization assert_size_stride = torch._C._dynamo.gua...
HwangJohn/model_compression
QuantizableHSwish
false
13,834
[ "MIT" ]
216
1df40c8a531313cc9e79255f4477f39d66d9b849
https://github.com/HwangJohn/model_compression/tree/1df40c8a531313cc9e79255f4477f39d66d9b849
CharbonnierLoss
# 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 import functools import torc...
Juggernaut93/mmediting
CharbonnierLoss
false
13,898
[ "Apache-2.0" ]
1,884
8ef46ace29756dd2df1d92f2f73a33646e33e007
https://github.com/Juggernaut93/mmediting/tree/8ef46ace29756dd2df1d92f2f73a33646e33e007
NeuralNetPartialNoGradModel
# 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 import torch....
thilow/onnxruntime
NeuralNetPartialNoGradModel
false
11,022
[ "MIT" ]
0
1a3ddf0714e1bdf9b807a342eee5f6e160ad1ec9
https://github.com/thilow/onnxruntime/tree/1a3ddf0714e1bdf9b807a342eee5f6e160ad1ec9
HyperpriorSynthesisDLMM
# 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 ...
ali-zafari/high-fidelity-generative-compression
HyperpriorSynthesisDLMM
false
9,784
[ "Apache-2.0" ]
0
37ab8d6727df48f8ebf4577db0986ccd0ffe404b
https://github.com/ali-zafari/high-fidelity-generative-compression/tree/37ab8d6727df48f8ebf4577db0986ccd0ffe404b
SubSample
import torch import torch.nn as nn class SubSample(nn.Module): def __init__(self, in_channels, out_channels, types='Pool', stride=[2, 1], sub_norm='nn.LayerNorm', act=None): super().__init__() self.types = types if types == 'Pool': self.avgpool = nn.AvgPool2d(kernel_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 import triton_helpers from torch._inductor.runtime....
verages/PaddleOCR2Pytorch
SubSample
false
4,670
[ "Apache-2.0" ]
0
201f0d5d6007f49620c49af7d222c3b220eb3e70
https://github.com/verages/PaddleOCR2Pytorch/tree/201f0d5d6007f49620c49af7d222c3b220eb3e70
TransformerLayer
import torch import torch.nn as nn import torch.utils.data class TransformerLayer(nn.Module): def __init__(self, c, num_heads): super().__init__() self.q = nn.Linear(c, c, bias=False) self.k = nn.Linear(c, c, bias=False) self.v = nn.Linear(c, c, bias=False) self.ma = nn.Mu...
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....
Arui66/FPSAutomaticAiming
TransformerLayer
false
13,320
[ "Apache-2.0" ]
129
87674385d42b065b984b38a2ff59e7f2d4f07dc9
https://github.com/Arui66/FPSAutomaticAiming/tree/87674385d42b065b984b38a2ff59e7f2d4f07dc9
BayesConv2d
from torch.nn import Module import math import torch from torch.nn import Parameter import torch.nn.functional as F from torch.nn.modules.utils import _pair class _BayesConvNd(Module): """ Applies Bayesian Convolution Arguments: prior_mu (Float): mean of prior normal distribution. prior_s...
import torch from torch import device 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...
Harry24k/bayesian-neural-network-pytorch
BayesConv2d
false
13,769
[ "MIT" ]
178
d2272f09e0d08c1abe1f53ce6df56b31494d7020
https://github.com/Harry24k/bayesian-neural-network-pytorch/tree/d2272f09e0d08c1abe1f53ce6df56b31494d7020
SharedAgent
# 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_...
mpgussert/fundamentalRL
SharedAgent
false
7,280
[ "MIT" ]
1
4f45436226e0823c21cac316dec8bbf1df697467
https://github.com/mpgussert/fundamentalRL/tree/4f45436226e0823c21cac316dec8bbf1df697467
Bicubic
from torch.nn import Module import torch import torch.nn.functional as F class Bicubic(Module): def __init__(self, scale_factor): super().__init__() self.scale_factor = scale_factor def forward(self, x): return F.interpolate(x, scale_factor=self.scale_factor, mode='bicubic') def ge...
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.nn import Module ...
ShivanshuPurohit/Diffusion
Bicubic
false
1,057
[ "MIT" ]
0
9a190d9aa4ed9767cf223e4ef57d0c31690f92cc
https://github.com/ShivanshuPurohit/Diffusion/tree/9a190d9aa4ed9767cf223e4ef57d0c31690f92cc
StyleLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
andreweskeclarke/style-transfer
StyleLoss
false
1,451
[ "MIT" ]
0
e4b18f4cdb3f473bf946f12cc39447b2f6bb15ca
https://github.com/andreweskeclarke/style-transfer/tree/e4b18f4cdb3f473bf946f12cc39447b2f6bb15ca
ChannelAttentionModule
# 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....
LeftAttention/Attention-Codebase
ChannelAttentionModule
false
17,596
[ "Apache-2.0" ]
6
348ec66233a7c0f95a3cb5f0f11641e2a7a9b9c3
https://github.com/LeftAttention/Attention-Codebase/tree/348ec66233a7c0f95a3cb5f0f11641e2a7a9b9c3
MutiLevelEnhance
import torch import torch.nn as nn import torch.nn.functional as F import torch.distributed import torch.optim.lr_scheduler import torch.utils.data class MutiLevelEnhance(nn.Module): def __init__(self, idim, odim, nhead=1, use_bias=True): super(MutiLevelEnhance, self).__init__() self.idim = idim ...
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....
CFM-MSG/SDN
MutiLevelEnhance
false
206
[ "MIT" ]
0
f309602dc2bb73117355003f3744f8e5450dbccc
https://github.com/CFM-MSG/SDN/tree/f309602dc2bb73117355003f3744f8e5450dbccc
Critic
import torch import torch.nn as nn import torch.nn.functional as F class Critic(nn.Module): def __init__(self, state_dim): super(Critic, self).__init__() self.fc1 = nn.Linear(state_dim, 256) self.fc2 = nn.Linear(256, 256) self.fc3 = nn.Linear(256, 1) def forward(self, x): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
fengzhengyong-github/Deep-reinforcement-learning-with-pytorch
Critic
false
6,685
[ "MIT" ]
1
3c56b601d14b0b0c8cde4b6bc6df5c1e8f298c7b
https://github.com/fengzhengyong-github/Deep-reinforcement-learning-with-pytorch/tree/3c56b601d14b0b0c8cde4b6bc6df5c1e8f298c7b
SpatialSELayer3D
import torch import torch.nn as nn import torch.nn.functional as F class SpatialSELayer3D(nn.Module): """ 3D Re-implementation of SE block -- squeezing spatially and exciting channel-wise described in: *Roy et al., Concurrent Spatial and Channel Squeeze & Excitation in Fully Convolutional Networks, M...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
HiLab-git/PyMIC
SpatialSELayer3D
false
13,781
[ "Apache-2.0" ]
147
abf5c43de43668b85f4c049c95a8f1b7cf1d9f16
https://github.com/HiLab-git/PyMIC/tree/abf5c43de43668b85f4c049c95a8f1b7cf1d9f16
softmax_with_multiuse_input
import torch import torch.nn as nn import torch.cuda import torch.backends.cudnn import torch.backends.mkl class softmax_with_multiuse_input(torch.nn.Module): def __init__(self): super().__init__() def forward(self, x): x1 = nn.Softmax(dim=-1)(x) x2 = x + x1 return x1, x2 d...
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.cuda impo...
JudeDavis1/intel-extension-for-pytorch
softmax_with_multiuse_input
false
2,593
[ "Apache-2.0" ]
0
364e34cb4917a709f5108c07d4005bf82f3d5067
https://github.com/JudeDavis1/intel-extension-for-pytorch/tree/364e34cb4917a709f5108c07d4005bf82f3d5067
LinearFeedforward
import torch from torch import nn from torch.nn import functional as F import torch.utils.data class Linear(nn.Linear): def forward(self, x): size = x.size() return super().forward(x.contiguous().view(-1, size[-1])).view(* size[:-1], -1) class Feedforward(nn.Module): def __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 import nn from tor...
cristipp/decaNLP
LinearFeedforward
false
12,230
[ "BSD-3-Clause" ]
0
db64df36bf2b1b2ca6946aacf0ee7463ac80c4cb
https://github.com/cristipp/decaNLP/tree/db64df36bf2b1b2ca6946aacf0ee7463ac80c4cb
SpatialCrossMapLRN
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import torch.nn.parallel import torch.optim import torch....
shubham1206agra/pretrained-models.pytorch
SpatialCrossMapLRN
false
12,979
[ "BSD-3-Clause" ]
0
a2940f79dd65656eabe5a0cd6d5d014ef1fc2523
https://github.com/shubham1206agra/pretrained-models.pytorch/tree/a2940f79dd65656eabe5a0cd6d5d014ef1fc2523
ProtectedMultiheadAttention
import torch import torch.nn.functional as F import torch.nn as nn import torch.utils.data from torch.nn import Parameter import torch.onnx.operators import torch.optim import torch.optim.lr_scheduler class ProtectedMultiheadAttention(nn.Module): """Multi-headed attention. See "Attention Is All You Need" for...
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....
laiguokun/fairseq
ProtectedMultiheadAttention
false
7,082
[ "MIT" ]
1
6c01c91aac81eb2e3173add4463dfa45c404ffa5
https://github.com/laiguokun/fairseq/tree/6c01c91aac81eb2e3173add4463dfa45c404ffa5
LocationLayer
import torch import torch.utils.data import torch import torch.nn as nn class Linear(nn.Module): def __init__(self, in_features, out_features, bias=True, init_gain='linear' ): super(Linear, self).__init__() self.linear_layer = nn.Linear(in_features, out_features, bias=bias) self._...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data import torch import torch.nn as nn assert_size_stride = ...
aidiary/tacotron-pytorch
LocationLayer
false
3,109
[ "MIT" ]
0
8ea9b1bb61bf753a64ff611b441326ea8c001d20
https://github.com/aidiary/tacotron-pytorch/tree/8ea9b1bb61bf753a64ff611b441326ea8c001d20
TdnnAffine
import torch import torch.nn.functional as F import torch.nn def to_device(device_object, tensor): """ Select device for non-parameters tensor w.r.t model or tensor which has been specified a device. """ if isinstance(device_object, torch.nn.Module): next(device_object.parameters()).device ...
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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride ...
fancyliumeng/asv-subtools
TdnnAffine
false
6,683
[ "Apache-2.0" ]
1
56a13484472e7ae6eb00d762c00d57e581e78eb4
https://github.com/fancyliumeng/asv-subtools/tree/56a13484472e7ae6eb00d762c00d57e581e78eb4
TorchGloVeLoss
# 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...
tayfuntuna/cs224u
TorchGloVeLoss
false
4,407
[ "Apache-2.0" ]
0
4368090c679d869f21ed2393b9ca0ef217b5c404
https://github.com/tayfuntuna/cs224u/tree/4368090c679d869f21ed2393b9ca0ef217b5c404
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 from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
NJUVISION/AWnet
ResBlock
false
8,575
[ "MIT" ]
16
f47a1692819a778b513b882d36ed727f7732d37b
https://github.com/NJUVISION/AWnet/tree/f47a1692819a778b513b882d36ed727f7732d37b