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
SelfAttentionWide
# 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....
jplasser/former
SelfAttentionWide
false
15,741
[ "MIT" ]
674
7dabf7b355e94f2f0af966bd0daead539a30675a
https://github.com/jplasser/former/tree/7dabf7b355e94f2f0af966bd0daead539a30675a
L1Loss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import functools impor...
CvlabAssignment/AlignPS
L1Loss
false
13,531
[ "Apache-2.0" ]
144
297f4166921d2095f9381e38e04129a103069406
https://github.com/CvlabAssignment/AlignPS/tree/297f4166921d2095f9381e38e04129a103069406
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 import torch.nn as nn import ...
aangelopoulos/rcps
SEModule
false
14,733
[ "MIT" ]
52
b400457f7cc7261d1ed610cdf7aa2230de657c57
https://github.com/aangelopoulos/rcps/tree/b400457f7cc7261d1ed610cdf7aa2230de657c57
fpn_module
import torch import torch.nn.functional as F import torch.nn as nn class fpn_module(nn.Module): def __init__(self, numClass): super(fpn_module, self).__init__() self.toplayer = nn.Conv2d(2048, 256, kernel_size=1, stride=1, padding=0 ) self.smooth1_1 = nn.Conv2d(256, 256, 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 import torch.nn.functional as...
LOUEY233/CPS3320_python
fpn_module
false
1,113
[ "MIT" ]
0
3cc1733d91c3a8f680eeb984348e2a52ae3285ec
https://github.com/LOUEY233/CPS3320_python/tree/3cc1733d91c3a8f680eeb984348e2a52ae3285ec
SamePadConvTranspose3d
import torch import torch.nn as nn import torch.nn.functional as F class SamePadConvTranspose3d(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, stride=1, bias=True): super().__init__() if isinstance(kernel_size, int): kernel_size = (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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
pointoflight/VideoGPT
SamePadConvTranspose3d
false
7,486
[ "MIT" ]
1
85f19d8cb0d251238f295f0294e69b9299c13e21
https://github.com/pointoflight/VideoGPT/tree/85f19d8cb0d251238f295f0294e69b9299c13e21
Hidden2Discrete
# 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....
Jupaoqq/Jupaoqq_LaRL
Hidden2Discrete
false
684
[ "Apache-2.0" ]
0
ae64adda5627987d71f2948f499daa11e9f309ad
https://github.com/Jupaoqq/Jupaoqq_LaRL/tree/ae64adda5627987d71f2948f499daa11e9f309ad
MaxPool2dSamePadding
import math import torch import torch.nn as nn import torch.nn.functional as F def get_same_padding(in_size, kernel_size, stride): """'Same 'same' operation with tensorflow notice:padding=(0, 1, 0, 1) and padding=(1, 1, 1, 1) are different padding=(1, 1, 1, 1): out(H, W) = (in + [2 * padding] − k...
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 math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_siz...
Jintao-Huang/EfficientDet_PyTorch
MaxPool2dSamePadding
false
8,365
[ "Apache-2.0" ]
18
79616be397b7f57992cd43b772f65b58b5e25a8b
https://github.com/Jintao-Huang/EfficientDet_PyTorch/tree/79616be397b7f57992cd43b772f65b58b5e25a8b
APLoss_dist
import torch import numpy as np import torch.nn as nn def sim_to_dist(scores): return 1 - torch.sqrt(2.001 - 2 * scores) class APLoss(nn.Module): """ Differentiable AP loss, through quantization. From the paper: Learning with Average Precision: Training Image Retrieval with a Listwise Loss ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
dongan-beta/deep-image-retrieval
APLoss_dist
false
15,202
[ "BSD-3-Clause" ]
253
3e0885f88da328aefb7abb2fa350f8860a4bd52d
https://github.com/dongan-beta/deep-image-retrieval/tree/3e0885f88da328aefb7abb2fa350f8860a4bd52d
GlobalAttention
import torch from torch import nn class GlobalAttention(nn.Module): def __init__(self, dims): super(GlobalAttention, self).__init__() self.pool = nn.AdaptiveAvgPool2d(1) self.conv = nn.Conv2d(dims, dims, 1) def forward(self, x, y): att = torch.sigmoid(self.conv(self.pool(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 import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
StefOe/selection-masks
GlobalAttention
false
2,860
[ "BSD-2-Clause" ]
0
e59487bffe3c30bdab7a6425bed01f6adeda4f67
https://github.com/StefOe/selection-masks/tree/e59487bffe3c30bdab7a6425bed01f6adeda4f67
FinalPool
# 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.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride e...
CoraJung/end-to-end-spoken-language-understanding
FinalPool
false
5,020
[ "Apache-2.0" ]
1
d1b15dad1a8f01336bcb0adcbf95d8c6ea279d09
https://github.com/CoraJung/end-to-end-spoken-language-understanding/tree/d1b15dad1a8f01336bcb0adcbf95d8c6ea279d09
StyleMod
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn from torch.nn import functional as F import torchvision.tra...
AnimeshKoratana/blurryface
StyleMod
false
649
[ "Apache-2.0" ]
0
c6cb5feec02f6d5af3acb1678336800390715d65
https://github.com/AnimeshKoratana/blurryface/tree/c6cb5feec02f6d5af3acb1678336800390715d65
RewardModelNetwork
# 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 ...
Weiyuhong-1998/DI-engine
RewardModelNetwork
false
14,578
[ "Apache-2.0" ]
464
88658ea358298c6e61e95a454284b8853a3e9484
https://github.com/Weiyuhong-1998/DI-engine/tree/88658ea358298c6e61e95a454284b8853a3e9484
TFSamepaddingLayer
# 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C....
Srijay-lab/hover_net
TFSamepaddingLayer
false
11,891
[ "MIT" ]
0
3f28f97bc1ed892bbe00b75a06be4334743d47d5
https://github.com/Srijay-lab/hover_net/tree/3f28f97bc1ed892bbe00b75a06be4334743d47d5
HingeLoss
import torch import torch.nn as nn import torch.nn.functional as F class HingeLoss(nn.Module): """criterion for loss function y: 0/1 ground truth matrix of size: batch_size x output_size f: real number pred matrix of size: batch_size x output_size """ def __init__(self, margin=1.0, squared=True): ...
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...
slevineg/X-Transformer
HingeLoss
false
10,769
[ "BSD-3-Clause" ]
0
c7a4341e1a1835960b1c724cbfbff4b3e669e130
https://github.com/slevineg/X-Transformer/tree/c7a4341e1a1835960b1c724cbfbff4b3e669e130
_Full
import torch class _Full(torch.nn.Module): """ Simple, small fully connected model. """ def __init__(self): """ Model parameter constructor. """ super().__init__() self._f1 = torch.nn.Linear(28 * 28, 100) self._f2 = torch.nn.Linear(100, 10) def forward(self, x): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
IKACE/DifferentialByzantine-1
_Full
false
5,336
[ "MIT" ]
1
809fd6e070fedeb87a6dbff6f883e93e3c5c8e09
https://github.com/IKACE/DifferentialByzantine-1/tree/809fd6e070fedeb87a6dbff6f883e93e3c5c8e09
SeasonalityBasis
import torch import numpy as np import torch as t class SeasonalityBasis(t.nn.Module): """ Harmonic functions to model seasonality. """ def __init__(self, harmonics: 'int', backcast_size: 'int', forecast_size: 'int'): super().__init__() self.frequency = np.append(np.zeros(1, 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 import numpy as np import torch as t assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.g...
TaeniKim/nbeats_reproduce
SeasonalityBasis
false
9,545
[ "MIT" ]
0
dd9375ad3fb4bb3c6c973391e250b5dd60a219ab
https://github.com/TaeniKim/nbeats_reproduce/tree/dd9375ad3fb4bb3c6c973391e250b5dd60a219ab
CenterLoss
import torch from torch import nn class CenterLoss(nn.Module): def __init__(self, class_num, feature_num, alpha=0.5): super(CenterLoss, self).__init__() self.class_num = class_num self.feature_num = feature_num self.class_centers = nn.Parameter(torch.randn(self.class_num, 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 import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
YangXuanyue/Neural-Unaligned-Phoneme-Sequence-Prediction
CenterLoss
false
18,137
[ "BSD-3-Clause" ]
5
91ef1c95478367f5b421da125f07660cfc9bed98
https://github.com/YangXuanyue/Neural-Unaligned-Phoneme-Sequence-Prediction/tree/91ef1c95478367f5b421da125f07660cfc9bed98
LandmarkHead
import torch import torch.nn as nn from itertools import product as product class LandmarkHead(nn.Module): def __init__(self, inchannels=512, num_anchors=2): super(LandmarkHead, self).__init__() self.conv1x1 = nn.Conv2d(inchannels, num_anchors * 10, kernel_size= (1, 1), stride=1, padd...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
huigs/retinaface-pytorch
LandmarkHead
false
10,244
[ "MIT" ]
0
0d7551d5863d172c2122bdd8d2d58be36e1b10fd
https://github.com/huigs/retinaface-pytorch/tree/0d7551d5863d172c2122bdd8d2d58be36e1b10fd
Envelope
# 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...
coopersigrist/Multi-fragment-energy
Envelope
false
12,226
[ "MIT" ]
0
c21c1b884f364cf3f2ac71e393464e85ebeccb04
https://github.com/coopersigrist/Multi-fragment-energy/tree/c21c1b884f364cf3f2ac71e393464e85ebeccb04
Net
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
piyushpathak03/Facial-key-point-detection
Net
false
7,609
[ "Apache-2.0" ]
1
863eeeac50c46befb17ecf7610cd341ea0e65291
https://github.com/piyushpathak03/Facial-key-point-detection/tree/863eeeac50c46befb17ecf7610cd341ea0e65291
MultiHeadAttention
import math import torch import numpy as np def convert_pad_shape(pad_shape): """Reverse, then flatten a list of lists.""" l = pad_shape[::-1] pad_shape = [item for sublist in l for item in sublist] return pad_shape class BaseModule(torch.nn.Module): def __init__(self): super(BaseModule...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Sobsz/uberduck-ml-dev
MultiHeadAttention
false
1,092
[ "Apache-2.0" ]
0
f099238f6f2e3f600d72d89dea3c883c59d91387
https://github.com/Sobsz/uberduck-ml-dev/tree/f099238f6f2e3f600d72d89dea3c883c59d91387
CNN
# 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 ...
KIONLEE/cs224n
CNN
false
2,441
[ "MIT" ]
0
63054e187fb40d65af058673fe7aa2f22433da6e
https://github.com/KIONLEE/cs224n/tree/63054e187fb40d65af058673fe7aa2f22433da6e
Elu
# 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.fx assert_size_stride = torch._C._dynamo.guards.assert_size_stride...
NVIDIA/Torch-TensorRT
Elu
false
14,070
[ "BSD-3-Clause" ]
430
1a22204fecec690bc3c2a318dab4f57b98c57f05
https://github.com/NVIDIA/Torch-TensorRT/tree/1a22204fecec690bc3c2a318dab4f57b98c57f05
GuidedBackpropReLUasModule
from torch.autograd import Function import torch class GuidedBackpropReLU(Function): @staticmethod def forward(self, input_img): positive_mask = (input_img > 0).type_as(input_img) output = torch.addcmul(torch.zeros(input_img.size()).type_as( input_img), input_img, positive_mask) ...
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.autograd import Function assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.gu...
bei2/pytorch-grad-cam
GuidedBackpropReLUasModule
false
9,765
[ "MIT" ]
0
c7f4a6cc26638fc668738c81ca35908ed6b1845b
https://github.com/bei2/pytorch-grad-cam/tree/c7f4a6cc26638fc668738c81ca35908ed6b1845b
AttnScore
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
ZfSangkuan/ASER
AttnScore
false
14,720
[ "MIT" ]
256
c34d6f2432b181bae9f4ee4fa70ce270dbc1dee7
https://github.com/ZfSangkuan/ASER/tree/c34d6f2432b181bae9f4ee4fa70ce270dbc1dee7
PositionwiseFeedForward
import math import torch import torch.distributed import torch import torch.nn as nn def gelu(x): return 0.5 * x * (1 + torch.tanh(math.sqrt(2 / math.pi) * (x + 0.044715 * torch.pow(x, 3)))) class PositionwiseFeedForward(nn.Module): """ A two-layer Feed-Forward-Network with residual layer norm. ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import math import ...
RowitZou/CG-nAR
PositionwiseFeedForward
false
17,879
[ "MIT" ]
8
8e2debeb3170045592b3b674ea6f9b56251e71f4
https://github.com/RowitZou/CG-nAR/tree/8e2debeb3170045592b3b674ea6f9b56251e71f4
NullaryPrimitivesPredefined_v2
import math import torch from torch import nn class Normalize(nn.Module): def __init__(self, distribution=None, **kwargs): super().__init__() self.distribution = distribution self.data_ = [] if distribution is None: pass elif distribution == 'normal': ...
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 math from torch import nn assert_size_stride = torch._C._dynamo.guards.a...
C-SUNSHINE/TOQ-Nets-PyTorch-Release
NullaryPrimitivesPredefined_v2
false
17,151
[ "MIT" ]
6
05e06bf633fb3c6b610dda9a5126ecd7af1db02f
https://github.com/C-SUNSHINE/TOQ-Nets-PyTorch-Release/tree/05e06bf633fb3c6b610dda9a5126ecd7af1db02f
GlobalAttention
import torch import torch.nn as nn import torch.nn.functional as F import torch.cuda import torch.distributed def aeq(*args): """ Assert all arguments have the same value """ arguments = (arg for arg in args) first = next(arguments) assert all(arg == first for arg in arguments ), 'Not ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
ChenRocks/Distill-BERT-Textgen-ONMT
GlobalAttention
false
17,113
[ "MIT" ]
7
d83dd1a95af7513cbfae4a2768f6effc2f3a589f
https://github.com/ChenRocks/Distill-BERT-Textgen-ONMT/tree/d83dd1a95af7513cbfae4a2768f6effc2f3a589f
FactorTransfer
import torch import torch.nn as nn import torch.nn.functional as F import torch.optim class FactorTransfer(nn.Module): """Paraphrasing Complex Network: Network Compression via Factor Transfer, NeurIPS 2018""" def __init__(self, p1=2, p2=1): super(FactorTransfer, self).__init__() self.p1 = p1 ...
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...
RylanSchaeffer/RepDistiller
FactorTransfer
false
5,788
[ "BSD-2-Clause" ]
1
3612d9d8f6f913527c7aaec7e5ea557e72ed7c5e
https://github.com/RylanSchaeffer/RepDistiller/tree/3612d9d8f6f913527c7aaec7e5ea557e72ed7c5e
SpanClassifier
import torch import torch.nn as nn from torch.nn import BCELoss class SpanClassifier(nn.Module): """given the span embeddings, classify whether their relations""" def __init__(self, d_inp): super(SpanClassifier, self).__init__() self.d_inp = d_inp self.bilinear_layer = nn.Bilinear(d_i...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from torch.nn import BCELoss assert_size_stride = torch._C._dynamo.guards.assert_size_stride reinterpret_tensor = torc...
Bhaskers-Blu-Org1/superglue-mtl
SpanClassifier
false
7,771
[ "Apache-2.0" ]
15
1eb3e581c0ef3b4c261e0256ec26116d2b657c40
https://github.com/Bhaskers-Blu-Org1/superglue-mtl/tree/1eb3e581c0ef3b4c261e0256ec26116d2b657c40
PlainRefiner
import torch import torch.nn as nn class PlainRefiner(nn.Module): """Simple refiner from Deep Image Matting. Args: conv_channels (int): Number of channels produced by the three main convolutional layer. loss_refine (dict): Config of the loss of the refiner. Default: None. ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
Sardhendu/mmediting
PlainRefiner
false
9,892
[ "Apache-2.0" ]
0
623b59ac758d856abc9fab7e845beeab61074d8f
https://github.com/Sardhendu/mmediting/tree/623b59ac758d856abc9fab7e845beeab61074d8f
ActionAttention
# 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...
footoredo/pymarl
ActionAttention
false
3,504
[ "Apache-2.0" ]
0
9c62dda7a7ed984e020f2cafab93601342305af2
https://github.com/footoredo/pymarl/tree/9c62dda7a7ed984e020f2cafab93601342305af2
ToRGB
import math import torch from torch import nn from torch.nn import functional as F def fused_leaky_relu(input, bias, negative_slope=0.2, scale=2 ** 0.5): rest_dim = [1] * (input.ndim - bias.ndim - 1) input = input if input.ndim == 3: return F.leaky_relu(input + bias.view(1, *rest_dim, bias.shape[0...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math from torch import nn from torch.nn import functional as F assert_siz...
Jerry2001/StyleCLIP
ToRGB
false
662
[ "MIT" ]
0
806216b4ce7b4c001ff05d7bd707b28d20ea6191
https://github.com/Jerry2001/StyleCLIP/tree/806216b4ce7b4c001ff05d7bd707b28d20ea6191
VarifocalLoss
import torch import torch.nn.functional as F import torch.nn as nn def reduce_loss(loss, reduction): """Reduce loss as specified. Args: loss (Tensor): Elementwise loss tensor. reduction (str): Options are "none", "mean" and "sum". Return: Tensor: Reduced loss 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 from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
Huuush/deepfashion2-det
VarifocalLoss
false
11,483
[ "Apache-2.0" ]
0
46af0ada8d6f534de2de6a9c069580cd1bf609ec
https://github.com/Huuush/deepfashion2-det/tree/46af0ada8d6f534de2de6a9c069580cd1bf609ec
Pointwise
# 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_...
sfu-arch/TensorBricks
Pointwise
false
4,692
[ "MIT" ]
0
c46c60d0939b7deb65f103bf34961d47419ce571
https://github.com/sfu-arch/TensorBricks/tree/c46c60d0939b7deb65f103bf34961d47419ce571
InnerProductModel
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda reinterpret...
cuiboyuan/plato
InnerProductModel
false
15,084
[ "Apache-2.0" ]
135
260b785cbbf8588c92331d6343211ff72321f90e
https://github.com/cuiboyuan/plato/tree/260b785cbbf8588c92331d6343211ff72321f90e
VarifocalLoss
import torch import torch.distributed import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.functional import torch.utils.data import torch.optim import torch.optim.lr_scheduler def varifocal_loss(pred, target, alpha=0.75, gamma=2.0, iou_weighted=True, use_sigmoid=True): """`Varif...
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...
zhangzhengde0225/SwinTrack
VarifocalLoss
false
16,799
[ "MIT" ]
143
526be17f8ef266cb924c6939bd8dda23e9b73249
https://github.com/zhangzhengde0225/SwinTrack/tree/526be17f8ef266cb924c6939bd8dda23e9b73249
NLgate
import torch from torch import nn from typing import * class NLgate(torch.nn.Module): def __init__(self, thw_dim, c_dim, tf_dim, q_linear=None, k_linear=None, v_linear=None): super(NLgate, self).__init__() self.qli = None if q_linear is not None: self.qli = nn.Linear(q...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
HughMun/MultiBench
NLgate
false
13,812
[ "MIT" ]
148
d5712a0815a9486b0e0c76b54cd63c880188fc8e
https://github.com/HughMun/MultiBench/tree/d5712a0815a9486b0e0c76b54cd63c880188fc8e
ForegroundDTConsistency
import torch from typing import Optional import torch.utils.data import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel class ForegroundDTConsistency(nn.Module): """Consistency regularization between the binary foreground mask and signed distance transform. Args: pred1 (to...
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...
HarshSulakhe/pytorch_connectomics
ForegroundDTConsistency
false
9,857
[ "MIT" ]
0
73402e654afde69a43a5836cc90a32ef75c75dc2
https://github.com/HarshSulakhe/pytorch_connectomics/tree/73402e654afde69a43a5836cc90a32ef75c75dc2
WeightedBDiceLoss
# 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.functional import torch.nn as nn assert_size_stride = torch._C._dynamo.gu...
HelenGuohx/cv-ferattn-code
WeightedBDiceLoss
false
5,289
[ "MIT" ]
1
faa9b7850fe2a0f8c08193bb129b5fec4639d616
https://github.com/HelenGuohx/cv-ferattn-code/tree/faa9b7850fe2a0f8c08193bb129b5fec4639d616
FC1
# 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_...
Thibaud-Ardoin/Dial-a-Ride
FC1
false
5,877
[ "MIT" ]
1
7d9b3cd904d3194dccad31fec2533e2cf58cad0c
https://github.com/Thibaud-Ardoin/Dial-a-Ride/tree/7d9b3cd904d3194dccad31fec2533e2cf58cad0c
Net
import torch import torch.nn as nn import torch.nn.functional as f class Net(nn.Module): def __init__(self): super(Net, self).__init__() self.fc1 = nn.Linear(28 * 28, 1024) self.fc2 = nn.Linear(1024, 10) def forward(self, x): x = f.relu(self.fc1(x.view(-1, 28 * 28))) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
PacktPublishing/Hands-On-Computer-Vision-with-PyTorch-1.x
Net
false
17,781
[ "MIT" ]
6
bad073f7489792d3c4bc860a2d56fa133ba63617
https://github.com/PacktPublishing/Hands-On-Computer-Vision-with-PyTorch-1.x/tree/bad073f7489792d3c4bc860a2d56fa133ba63617
DotAttn
# 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...
DreamerDeo/gazp
DotAttn
false
8,013
[ "MIT" ]
18
5f823a447ffdf5176023a01516d2be7c383294d9
https://github.com/DreamerDeo/gazp/tree/5f823a447ffdf5176023a01516d2be7c383294d9
Project3D
# 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 import torch.utils.data assert_size_stride = torch._C._dyn...
Uehwan/SimVODIS
Project3D
false
14,525
[ "MIT" ]
117
288ae6f3bf37336f2c829b3a6371793990b23214
https://github.com/Uehwan/SimVODIS/tree/288ae6f3bf37336f2c829b3a6371793990b23214
D_DownBlock
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data from torchvision.transforms import * assert_size_stride ...
HamsterBiz/iSeeBetter
D_DownBlock
false
11,676
[ "MIT" ]
0
a71cee61583bdedab1f3b368e2cb7dc5ad969aed
https://github.com/HamsterBiz/iSeeBetter/tree/a71cee61583bdedab1f3b368e2cb7dc5ad969aed
ImageCleanModel
# 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_...
delldu/ImageClean
ImageCleanModel
false
1,859
[ "MIT" ]
0
ffa5b180d36afb3840c6b36c08a767c520068498
https://github.com/delldu/ImageClean/tree/ffa5b180d36afb3840c6b36c08a767c520068498
FeatureCorrelation
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
mcimpoi/ncnet
FeatureCorrelation
false
16,027
[ "MIT" ]
159
d801df77154bce9e5653090273aacb0e588fa4ea
https://github.com/mcimpoi/ncnet/tree/d801df77154bce9e5653090273aacb0e588fa4ea
StackTime
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data import torch.jit import torch.optim import torch.utils.collect_env import torch.nn.parallel im...
sharathts/training
StackTime
false
12,965
[ "Apache-2.0" ]
0
f294d135a6b1ac12a19ea68c1f0e42e8acc39401
https://github.com/sharathts/training/tree/f294d135a6b1ac12a19ea68c1f0e42e8acc39401
VectorQuantizer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
PeikeLi/pytorch-vector-quantization
VectorQuantizer
false
17,814
[ "MIT" ]
6
48ce6a74ec56b9d8c11dde2cd35b055a925c3070
https://github.com/PeikeLi/pytorch-vector-quantization/tree/48ce6a74ec56b9d8c11dde2cd35b055a925c3070
ConcatModel
# 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.functional assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._emp...
elad-c/model_optimization
ConcatModel
false
10,642
[ "Apache-2.0" ]
0
b0ecf41c3f9434008d57d7fe724ff8585e19d4cc
https://github.com/elad-c/model_optimization/tree/b0ecf41c3f9434008d57d7fe724ff8585e19d4cc
ChamferLoss
# 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...
phuochieu212/PointGLR
ChamferLoss
false
16,252
[ "MIT" ]
104
37017b1af31486aa9d516a3762725a650dca9ad1
https://github.com/phuochieu212/PointGLR/tree/37017b1af31486aa9d516a3762725a650dca9ad1
DecoderLayer
# 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....
congson1293/Transformer
DecoderLayer
false
1,759
[ "Apache-2.0" ]
0
249638f3287e0ed11c71496178fe2ceac2d758df
https://github.com/congson1293/Transformer/tree/249638f3287e0ed11c71496178fe2ceac2d758df
NoiseInjection
# 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 import device import 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...
ChristophReich1996/Multi-StyleGAN
NoiseInjection
false
17,098
[ "MIT" ]
7
988f2dfea85b3205126b40c61edfb28107eb3173
https://github.com/ChristophReich1996/Multi-StyleGAN/tree/988f2dfea85b3205126b40c61edfb28107eb3173
Similarity
import torch import torch.nn as nn class Similarity(nn.Module): """ Dot product or cosine similarity """ def __init__(self, temp): super().__init__() self.temp = temp self.cos = nn.CosineSimilarity(dim=-1) def forward(self, x, y): return self.cos(x, y) / self.temp...
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...
YJiangcm/DCPCSE
Similarity
false
18,125
[ "MIT" ]
5
698255e2e66b402325ff611e098e01d2f322743e
https://github.com/YJiangcm/DCPCSE/tree/698255e2e66b402325ff611e098e01d2f322743e
MaxPoolStride1
import torch from torch.optim.lr_scheduler import * import torch.nn.functional as F import torch.optim import torch.nn as nn import torch.utils.data import torch.utils.model_zoo class MaxPoolStride1(nn.Module): def __init__(self): super(MaxPoolStride1, self).__init__() def forward(self, x): ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch.optim.lr_scheduler import * import torch.optim import torch.nn as nn import to...
ChitienSun/NCTU_DLSR_final_project
MaxPoolStride1
false
264
[ "MIT" ]
0
9d647426c274afc7651ea4fe9a11f2a0a0fd1fba
https://github.com/ChitienSun/NCTU_DLSR_final_project/tree/9d647426c274afc7651ea4fe9a11f2a0a0fd1fba
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 from torch import nn import torch.cuda assert_size_stride = torch._C._dynamo.gua...
LoveEachDay/towhee
LandmarkHead
false
11,717
[ "Apache-2.0" ]
0
513c9c2626676cadaaf0a16ac3c828d96bec91a1
https://github.com/LoveEachDay/towhee/tree/513c9c2626676cadaaf0a16ac3c828d96bec91a1
Maxout
# 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 from typ...
HughMun/MultiBench
Maxout
false
13,810
[ "MIT" ]
148
d5712a0815a9486b0e0c76b54cd63c880188fc8e
https://github.com/HughMun/MultiBench/tree/d5712a0815a9486b0e0c76b54cd63c880188fc8e
Foo
import torch import torch.nn.functional import torch.nn.parallel import torch.utils.data import torch.optim import torch.utils.data.distributed class Foo(torch.nn.Module): def __init__(self, size): super(Foo, self).__init__() self.n = torch.nn.Parameter(torch.ones(size)) self.m = torch.nn...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn.functional import torch.nn.parallel import torch.utils.data import torch.optim import torch.utils.data.distributed assert_si...
Ella77/tacotron2_multispeaker_pytorch
Foo
false
5,121
[ "BSD-3-Clause" ]
1
859eab0a8e3bd7545e623ce47fe1563702d38442
https://github.com/Ella77/tacotron2_multispeaker_pytorch/tree/859eab0a8e3bd7545e623ce47fe1563702d38442
adaModule
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import math i...
Artem531/pytorch-unet
adaModule
false
74
[ "MIT" ]
0
a8048f88f34a59f12f7f74735f03cf3c111a8415
https://github.com/Artem531/pytorch-unet/tree/a8048f88f34a59f12f7f74735f03cf3c111a8415
ABS_disc
import torch import torch.nn as nn class ABS_disc(nn.Module): def __init__(self, weight_list=None): super(ABS_disc, self).__init__() self.weight_list = weight_list def forward(self, x, labels): loss = torch.abs(x - labels) if self.weight_list is not None: loss = 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._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
Sampson-Lee/SIB-Net
ABS_disc
false
2,798
[ "MIT" ]
0
650399082e9237327fa38168ccfc7d48153a1db5
https://github.com/Sampson-Lee/SIB-Net/tree/650399082e9237327fa38168ccfc7d48153a1db5
SimpleReciprocalModel
# 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
SimpleReciprocalModel
false
14,679
[ "Apache-2.0" ]
2,838
a13706a4239fa7eaf059c670dc573e3eb0768f86
https://github.com/YaronBenAtar/glow/tree/a13706a4239fa7eaf059c670dc573e3eb0768f86
Conv2dZeros
import torch import torch.nn as nn class Conv2dZeros(nn.Module): """Normal conv2d for reparameterize the latent variable. - weight and bias initialized to zero - scale channel-wise after conv2d """ def __init__(self, in_channels, out_channels): super(Conv2dZeros, 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.triton_helpers import math as tl_math import torch....
KyleDavisSA/pde-surrogate
Conv2dZeros
false
13,970
[ "MIT" ]
62
41ad2c9eb73c323e389174080f4b3df6cbd3c900
https://github.com/KyleDavisSA/pde-surrogate/tree/41ad2c9eb73c323e389174080f4b3df6cbd3c900
AdaIN
# 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 ...
NethraGunti/Woven-Artificial-Profile-WARP-Face-Video-Synthesis-from-Profile-and-Audio
AdaIN
false
883
[ "MIT" ]
0
231d8daa8dddfd5eda8a092eb99c5d0e59d8b3f7
https://github.com/NethraGunti/Woven-Artificial-Profile-WARP-Face-Video-Synthesis-from-Profile-and-Audio/tree/231d8daa8dddfd5eda8a092eb99c5d0e59d8b3f7
FPNHead
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data class FPNHead(nn.Module): def __init__(self, num_in, num_mid, num_out): super().__init__() self.block0 = nn.Conv2d(num_in, num_mid, kernel_size=3, padding=1, bias=False) 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 import triton_helpers import torch.nn as nn import ...
choprahetarth/DeblurGANv2
FPNHead
false
15,037
[ "BSD-3-Clause" ]
321
e36dc2fef169b8a37036abe62192b6a925fb6c81
https://github.com/choprahetarth/DeblurGANv2/tree/e36dc2fef169b8a37036abe62192b6a925fb6c81
RSoftmax
import torch import torch.nn.functional as F import torch.nn as nn import torch._C import torch.serialization class RSoftmax(nn.Module): """Radix Softmax module in ``SplitAttentionConv2d``. Args: radix (int): Radix of input. groups (int): Groups of input. """ def __init__(self, radix...
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 ...
AnonSubmission6150/submission6150
RSoftmax
false
8,989
[ "Apache-2.0" ]
0
571633d9a12b4fd7a9546947787fc068966dab04
https://github.com/AnonSubmission6150/submission6150/tree/571633d9a12b4fd7a9546947787fc068966dab04
RegularizedLinear
import torch from torch import nn class RegularizedLinear(nn.Linear): def __init__(self, *args, ar_weight=0.001, l1_weight=0.001, **kwargs): super(RegularizedLinear, self).__init__(*args, **kwargs) self.ar_weight = ar_weight self.l1_weight = l1_weight self._losses = {} def fo...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
krayyalasomayajula/inferno
RegularizedLinear
false
3,947
[ "Apache-2.0" ]
0
1c56f34ff19c69dec3d3cb6287b659345bce3492
https://github.com/krayyalasomayajula/inferno/tree/1c56f34ff19c69dec3d3cb6287b659345bce3492
UpConvNorm
import torch import torch.nn as nn def pixel_shuffle(input, scale_factor): batch_size, channels, in_height, in_width = input.size() out_channels = int(int(channels / scale_factor) / scale_factor) out_height = int(in_height * scale_factor) out_width = int(in_width * scale_factor) if scale_factor >=...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Hubert482/cainapp
UpConvNorm
false
8,244
[ "MIT" ]
18
7a74a9b186ee358168c8f050e445fbe9f91f9c47
https://github.com/Hubert482/cainapp/tree/7a74a9b186ee358168c8f050e445fbe9f91f9c47
Length
import torch from torch import nn class Length(nn.Module): def __init__(self, dim=1, keepdim=True, p='fro'): super(Length, self).__init__() self.dim = dim self.keepdim = keepdim self.p = p def forward(self, inputs): return inputs.norm(dim=self.dim, keepdim=self.keepdi...
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...
clementpoiret/3D-AGSCaps
Length
false
6,449
[ "MIT" ]
1
475eb1915bc1425cebbd0bec36e9096c9c2cb53c
https://github.com/clementpoiret/3D-AGSCaps/tree/475eb1915bc1425cebbd0bec36e9096c9c2cb53c
RelativeThreshold_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.triton_helpers import math as tl_math import torch.nn as nn import torch.nn.init assert_size_stride = torch._C....
ginobilinie/medSynthesisV1
RelativeThreshold_RegLoss
false
15,428
[ "MIT" ]
166
1fd202c5928466ef9b11cfebc4490341899312e7
https://github.com/ginobilinie/medSynthesisV1/tree/1fd202c5928466ef9b11cfebc4490341899312e7
ParsingRelationLoss
# 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.modules import torch.nn as nn assert_size_stride = torch....
wangping984/Ultra-Fast-Lane-Detection
ParsingRelationLoss
false
13,083
[ "MIT" ]
0
b7559c1469d832bf5afe5d158dd3ad63b4df9d9c
https://github.com/wangping984/Ultra-Fast-Lane-Detection/tree/b7559c1469d832bf5afe5d158dd3ad63b4df9d9c
Feedback
# 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...
IacoSimoncini/tfvaegan
Feedback
false
12,630
[ "MIT" ]
0
157b526d65d0b0d5412f4be6fed02fc7d6325827
https://github.com/IacoSimoncini/tfvaegan/tree/157b526d65d0b0d5412f4be6fed02fc7d6325827
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 import ...
RedHenLab/RedHenAnonymizer
FEM
false
5,782
[ "MIT" ]
1
3560f1ac5cd5b9c6c7ed8bf322b807d57aedc06a
https://github.com/RedHenLab/RedHenAnonymizer/tree/3560f1ac5cd5b9c6c7ed8bf322b807d57aedc06a
VGGOutputBlock
import torch import torch.nn as nn class VGGDense(nn.Module): def __init__(self, in_channels, out_channels): super(VGGDense, self).__init__() self.fc = nn.Linear(in_features=in_channels, out_features=out_channels) self.activ = nn.ReLU(inplace=True) self.dropout = nn.Dropout(p=0.5)...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
MarioMZhang/HAP-tryout
VGGOutputBlock
false
8,527
[ "MIT" ]
24
9a423f35b50766533a0d2cab8069316ccb21954b
https://github.com/MarioMZhang/HAP-tryout/tree/9a423f35b50766533a0d2cab8069316ccb21954b
Mod
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_c...
NVIDIA-AI-IOT-private/torch2trt
Mod
false
10,520
[ "MIT" ]
0
953d60039e0c81e90eea467c3df2e6e3f7040242
https://github.com/NVIDIA-AI-IOT-private/torch2trt/tree/953d60039e0c81e90eea467c3df2e6e3f7040242
AlignEA
# 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.functional as F assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards...
TMUITLab/EAFR
AlignEA
false
1,112
[ "MIT" ]
0
dadb6485d48711ccb8aa2f03760aeb437645f1ff
https://github.com/TMUITLab/EAFR/tree/dadb6485d48711ccb8aa2f03760aeb437645f1ff
HSwish
# 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 import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
BlueskyFR/determined
HSwish
false
156
[ "Apache-2.0" ]
0
ac734f0df11565333f9f37480cfc01dda011e349
https://github.com/BlueskyFR/determined/tree/ac734f0df11565333f9f37480cfc01dda011e349
AdaptiveAvgMaxPool2d
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distribute...
Ajithbalakrishnan/PyTorch-Image-Classification
AdaptiveAvgMaxPool2d
false
4,803
[ "MIT" ]
1
2a6fe541cd537d3c6412f7a38ec41ac2ead43f63
https://github.com/Ajithbalakrishnan/PyTorch-Image-Classification/tree/2a6fe541cd537d3c6412f7a38ec41ac2ead43f63
Combinator
import torch from torch import nn import torch.autograd class Combinator(nn.Module): """ The vanilla combinator function g() that combines vertical and lateral connections as explained in Pezeshki et al. (2016). The weights are initialized as described in Eq. 17 and the g() is defined in Eq. 16. ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn import torch.autograd assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dy...
Goschjann/ssltsc
Combinator
false
17,314
[ "MIT" ]
5
08d6b1bf711bb1c8f19f9bfb66a98d4e423e932e
https://github.com/Goschjann/ssltsc/tree/08d6b1bf711bb1c8f19f9bfb66a98d4e423e932e
LayerNorm
import torch import torch.nn as nn class LayerNorm(nn.Module): """Construct a layernorm module (See citation for details).""" def __init__(self, features, eps=1e-06): super(LayerNorm, self).__init__() self.a_2 = nn.Parameter(torch.ones(features)) self.b_2 = nn.Parameter(torch.zeros(fe...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
BruceWen120/neurips-reproducibility-challenge-2019
LayerNorm
false
8,952
[ "Apache-2.0" ]
0
b0635aefe83e3f895ce0991913824e861bb7d02d
https://github.com/BruceWen120/neurips-reproducibility-challenge-2019/tree/b0635aefe83e3f895ce0991913824e861bb7d02d
Net
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
ygnn123/training_extensions
Net
false
4,709
[ "Apache-2.0" ]
0
c3aeba9359b0d4e0ef9c054de777d3ec081a9892
https://github.com/ygnn123/training_extensions/tree/c3aeba9359b0d4e0ef9c054de777d3ec081a9892
SuperpointDecoder
import torch import torch.nn as nn class SuperpointDecoder(nn.Module): """ Junction decoder based on the SuperPoint architecture. """ def __init__(self, input_feat_dim=128, backbone_name='lcnn'): super(SuperpointDecoder, self).__init__() self.relu = torch.nn.ReLU(inplace=True) if back...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
B1ueber2y/SOLD2
SuperpointDecoder
false
11,271
[ "MIT" ]
0
f85ca5387ea7464314614c3fb4d07af5678a9de3
https://github.com/B1ueber2y/SOLD2/tree/f85ca5387ea7464314614c3fb4d07af5678a9de3
SplitAndConcat
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C....
newstzpz/d2go
SplitAndConcat
false
12,823
[ "Apache-2.0" ]
0
fcd511714ec4e34040d35379cb0382b70fb58c70
https://github.com/newstzpz/d2go/tree/fcd511714ec4e34040d35379cb0382b70fb58c70
BahdanauAttention
import torch import torch.nn as nn import torch.nn.functional as F class BahdanauAttention(nn.Module): """ Class performs Additive Bahdanau Attention. Source: https://arxiv.org/pdf/1409.0473.pdf """ def __init__(self, num_features, hidden_dim, output_dim=1): super(BahdanauAttention, 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 import triton_helpers from torch._inductor.runtime....
BhushanMahajan25/image-captioning
BahdanauAttention
false
16,990
[ "MIT" ]
5
c3e1db358267fbb1b8abe723542f7fd8c6b0c966
https://github.com/BhushanMahajan25/image-captioning/tree/c3e1db358267fbb1b8abe723542f7fd8c6b0c966
h_swish
import torch import torch.nn as nn import torch.nn.functional as F class h_swish(nn.Module): def __init__(self, inplace=True): super(h_swish, self).__init__() self.inplace = inplace def forward(self, x): out = F.relu6(x + 3.0, inplace=self.inplace) / 6.0 return out * x 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 from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
DandelionLau/NetworkCollections
h_swish
false
17,206
[ "Apache-2.0" ]
8
29e5cd2091f7085b3241209ed9447f2baadbce41
https://github.com/DandelionLau/NetworkCollections/tree/29e5cd2091f7085b3241209ed9447f2baadbce41
ArcMarginProduct
# 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....
aaron276h/kaggle-rcic-1st
ArcMarginProduct
false
12,031
[ "MIT" ]
0
d35e97847df3c29f548e60bc936d3fec7a0a4c08
https://github.com/aaron276h/kaggle-rcic-1st/tree/d35e97847df3c29f548e60bc936d3fec7a0a4c08
RSoftmax
import torch import torch.nn as nn import torch.nn.functional as F import torch._C import torch.serialization class RSoftmax(nn.Module): """Radix Softmax module in ``SplitAttentionConv2d``. Args: radix (int): Radix of input. groups (int): Groups of input. """ def __init__(self, radix...
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 ...
AlexanderDokuchaev/mmsegmentation
RSoftmax
false
11,171
[ "Apache-2.0" ]
0
0c443ee370cce6227661b802184072174c4e3f64
https://github.com/AlexanderDokuchaev/mmsegmentation/tree/0c443ee370cce6227661b802184072174c4e3f64
ConvBnRel
# 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.autograd.gradcheck...
HastingsGreer/mermaid
ConvBnRel
false
13,759
[ "Apache-2.0" ]
120
bd13c5fc427eb8cd9054973a8eaaeb302078182d
https://github.com/HastingsGreer/mermaid/tree/bd13c5fc427eb8cd9054973a8eaaeb302078182d
ReduceLast
import torch def sequence_length_3D(sequence: 'torch.Tensor') ->torch.Tensor: used = torch.sign(torch.amax(torch.abs(sequence), dim=2)) length = torch.sum(used, 1) length = length.int() return length class ReduceLast(torch.nn.Module): def forward(self, inputs, mask=None): batch_size = i...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math assert_size_stride = t...
carlogrisetti/ludwig
ReduceLast
false
1,638
[ "Apache-2.0" ]
0
5c0887f14867e1577e0ddc3806c5cf7a781fb665
https://github.com/carlogrisetti/ludwig/tree/5c0887f14867e1577e0ddc3806c5cf7a781fb665
LayerNorm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn from torch.nn import Parameter from torch.nn.parameter im...
chunhuililili/mt_dnn
LayerNorm
false
10,192
[ "MIT" ]
0
4c6efaf21724c7b8103a05e46b5b44d7b246225e
https://github.com/chunhuililili/mt_dnn/tree/4c6efaf21724c7b8103a05e46b5b44d7b246225e
Attention
import torch import torch.nn as nn class Attention(nn.Module): """ Applies attention mechanism on the `context` using the `query`. **Thank you** to IBM for their initial implementation of :class:`Attention`. Here is their `License <https://github.com/IBM/pytorch-seq2seq/blob/master/LICENSE>`__. ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Prasath2001/commonsense-rl
Attention
false
2,735
[ "Apache-2.0" ]
0
ef3e83270d34cf211b2d2086120cccae0621477b
https://github.com/Prasath2001/commonsense-rl/tree/ef3e83270d34cf211b2d2086120cccae0621477b
AddCoords
import torch import torch.nn as nn class AddCoords(nn.Module): def __init__(self, with_r=False): super().__init__() self.with_r = with_r def forward(self, input_tensor): """ Args: input_tensor: shape(batch, channel, x_dim, y_dim) """ batch_size, _,...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
hoseDUDEface/AdaptiveWingLoss
AddCoords
false
12,512
[ "Apache-2.0" ]
0
9185799d87567044f437147639c3999418529684
https://github.com/hoseDUDEface/AdaptiveWingLoss/tree/9185799d87567044f437147639c3999418529684
BCE_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 from torch....
YZW-explorer/EOD
BCE_LOSS
false
6,005
[ "Apache-2.0" ]
1
f10e64de86c0f356ebf5c7e923f4042eec4207b1
https://github.com/YZW-explorer/EOD/tree/f10e64de86c0f356ebf5c7e923f4042eec4207b1
KL
# 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...
Raiselimit/TorchBlocks
KL
false
5,741
[ "MIT" ]
1
a5baecb9a2470ff175087475630f2b7db3f7ef51
https://github.com/Raiselimit/TorchBlocks/tree/a5baecb9a2470ff175087475630f2b7db3f7ef51
PKT
# 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, math as tl_math fr...
bobo0810/RepDistiller
PKT
false
10,166
[ "BSD-2-Clause" ]
0
0a4cea2142221b9b31c8e995920273f5619b37f8
https://github.com/bobo0810/RepDistiller/tree/0a4cea2142221b9b31c8e995920273f5619b37f8
StepRankerLogistic3
import torch from torch import nn class StepRankerLogistic3(nn.Module): """a logistic ranker that includes a don't care token""" def __init__(self, parent_dim, child_short_dim, child_full_dim, hidden_dim ): super(StepRankerLogistic3, self).__init__() if child_full_dim is not None: ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
YilunZhou/wikihow-embedding
StepRankerLogistic3
false
18,138
[ "MIT" ]
8
bfbcaf6aca854cd7e0dedfd5ecf77627138e8425
https://github.com/YilunZhou/wikihow-embedding/tree/bfbcaf6aca854cd7e0dedfd5ecf77627138e8425
ScaledLeakyReLU
import math import torch import torch.nn as nn import torch.nn.functional as F class ScaledLeakyReLU(nn.Module): def __init__(self, negative_slope=0.2): super().__init__() self.negative_slope = negative_slope def forward(self, input): out = F.leaky_relu(input, negative_slope=self.neg...
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
ScaledLeakyReLU
false
9,398
[ "Apache-2.0" ]
0
3d4b1b41546a08a1fa3cb164ade33e319806b12b
https://github.com/AsianZeus/Diverse-Facial-Edit/tree/3d4b1b41546a08a1fa3cb164ade33e319806b12b
GlobalChannelLayerNorm
import torch import torch.nn as nn class GlobalChannelLayerNorm(nn.Module): """ Global channel layer normalization """ def __init__(self, dim, eps=1e-05, elementwise_affine=True): super(GlobalChannelLayerNorm, self).__init__() self.eps = eps self.normalized_dim = dim 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.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
c-ma13/sepTFNet
GlobalChannelLayerNorm
false
6,390
[ "MIT" ]
1
a06c89c080f9449ac2e5090f80d9645deea7f23a
https://github.com/c-ma13/sepTFNet/tree/a06c89c080f9449ac2e5090f80d9645deea7f23a
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...
AbeJLazaro/TraductorEspanolOtomi
LayerNorm
false
1,909
[ "MIT" ]
0
75e1558d3b1a7efe9beb3c7d992c3bf1d3d88d0b
https://github.com/AbeJLazaro/TraductorEspanolOtomi/tree/75e1558d3b1a7efe9beb3c7d992c3bf1d3d88d0b
MultiheadConvAttention
import torch import torch.nn.functional as F from torch import nn import torch.utils.data from torch.nn import Parameter import torch.onnx.operators import torch.optim import torch.optim.lr_scheduler class MultiheadConvAttention(nn.Module): """Multi-headed attention. See "Attention Is All You Need" for more ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
amaurySabran/fairseq
MultiheadConvAttention
false
18,291
[ "BSD-3-Clause" ]
4
e6d5dd36678224e8b06aa0e97749f7a1c20a9949
https://github.com/amaurySabran/fairseq/tree/e6d5dd36678224e8b06aa0e97749f7a1c20a9949
GCNLayer
# 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...
dogeplusplus/sandbox
GCNLayer
false
1,856
[ "MIT" ]
0
c9041c06da9454f6c3cec622abbbf918c9f13bdc
https://github.com/dogeplusplus/sandbox/tree/c9041c06da9454f6c3cec622abbbf918c9f13bdc