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
period_L1
import torch import numpy as np import torch.nn as nn class period_L1(nn.Module): def __init__(self, reduction='sum'): """ periodic Squared Error """ super().__init__() self.reduction = reduction def forward(self, theta_pred, theta_gt): dt = theta_pred - theta...
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...
flytocc/RAPiD
period_L1
false
15,368
[ "MIT" ]
142
92e6a44b8a0107def055e93c971d78fd548562f8
https://github.com/flytocc/RAPiD/tree/92e6a44b8a0107def055e93c971d78fd548562f8
TripletLoss
import torch import torch.nn as nn import torch.nn.functional as F class TripletLoss(nn.Module): """ Triplet loss Takes embeddings of an anchor sample, a positive sample and a negative sample """ def __init__(self, margin=1.0): super(TripletLoss, self).__init__() self.margin = mar...
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...
awesome-archive/CAIL2019
TripletLoss
false
14,912
[ "MIT" ]
300
31e917752676ad77d247a47e04f17a8f9ea68721
https://github.com/awesome-archive/CAIL2019/tree/31e917752676ad77d247a47e04f17a8f9ea68721
DoubleAttention
import torch from torch import nn from torch.nn import init from torch.nn import functional as F class DoubleAttention(nn.Module): def __init__(self, in_channels, c_m, c_n, reconstruct=True): super().__init__() self.in_channels = in_channels self.reconstruct = reconstruct self.c_m...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
LiChengChen666/DetectDee
DoubleAttention
false
9,811
[ "Apache-2.0" ]
0
1e6aaa0d15b1fc12d1342d8a922004e372b5f437
https://github.com/LiChengChen666/DetectDee/tree/1e6aaa0d15b1fc12d1342d8a922004e372b5f437
AGRUCell
# 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 ...
MIracleyin/RecBole-notebook
AGRUCell
false
9,581
[ "MIT" ]
0
ef32b3e57a297ff4889dec1f63c7984f8f901a23
https://github.com/MIracleyin/RecBole-notebook/tree/ef32b3e57a297ff4889dec1f63c7984f8f901a23
FocalLossBinary
# 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...
Magnety/nnUNet
FocalLossBinary
false
9,593
[ "Apache-2.0" ]
0
f07e6fdf191377550c57bcdc8859798486f60443
https://github.com/Magnety/nnUNet/tree/f07e6fdf191377550c57bcdc8859798486f60443
ToRGB
from torch.autograd import Function import math import torch from torch import nn from torch.nn import functional as F from torch.nn.functional import leaky_relu def fused_leaky_relu(input_, bias, negative_slope=0.2, scale=2 ** 0.5): return scale * leaky_relu(input_ + bias[:input_.shape[1]], negative_slop...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import 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 math from torch import nn from torch....
jchetboun/anycost-gan
ToRGB
false
10,395
[ "MIT" ]
0
7e0005e50b915e2dfeb90fe7a9846c5df38d7c06
https://github.com/jchetboun/anycost-gan/tree/7e0005e50b915e2dfeb90fe7a9846c5df38d7c06
EqualConv2d
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math from torch import nn assert_size_stride = torch._C._dynamo.guards.as...
jchetboun/anycost-gan
EqualConv2d
false
10,389
[ "MIT" ]
0
7e0005e50b915e2dfeb90fe7a9846c5df38d7c06
https://github.com/jchetboun/anycost-gan/tree/7e0005e50b915e2dfeb90fe7a9846c5df38d7c06
RouterGAPwithDoubleConv
# 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 warnings import torch....
yulinfeng000/AdaptiveNeuralTrees
RouterGAPwithDoubleConv
false
13,161
[ "MIT" ]
0
bbcb381b9cb0c91ae1af33ce43b43f352055041c
https://github.com/yulinfeng000/AdaptiveNeuralTrees/tree/bbcb381b9cb0c91ae1af33ce43b43f352055041c
Pool
import torch import torch.nn as nn class crop(nn.Module): def __init__(self): super().__init__() def forward(self, x): N, C, H, W = x.shape x = x[0:N, 0:C, 0:H - 1, 0:W] return x class shift(nn.Module): def __init__(self): super().__init__() self.shift_...
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...
amonod/udvd
Pool
false
1,419
[ "MIT" ]
0
a1ccb777d205255ac68c40efb93dd3996f562c45
https://github.com/amonod/udvd/tree/a1ccb777d205255ac68c40efb93dd3996f562c45
LN_DDPGCritic
# 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....
RohanPankaj/apex
LN_DDPGCritic
false
1,001
[ "MIT" ]
0
74e96386bf9446d1179106d6d65ea0368c1b5b27
https://github.com/RohanPankaj/apex/tree/74e96386bf9446d1179106d6d65ea0368c1b5b27
OELoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
ChurchChen/SparsityRegularization
OELoss
false
8,926
[ "Apache-2.0" ]
0
5c2e050ffe511cf4307a0bcd98360d28b7db8fef
https://github.com/ChurchChen/SparsityRegularization/tree/5c2e050ffe511cf4307a0bcd98360d28b7db8fef
UpSample
# 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_...
pystokes/depth_estimation
UpSample
false
4,150
[ "MIT" ]
0
b5b1955bcb5b3f1a1f1c8ddde45431cf38514f90
https://github.com/pystokes/depth_estimation/tree/b5b1955bcb5b3f1a1f1c8ddde45431cf38514f90
MultiheadAttention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Acidburn0zzz/translate-1
MultiheadAttention
false
4,831
[ "BSD-3-Clause" ]
1
8385a3c95de397fec8ca7a032fe1c215fa4e31f9
https://github.com/Acidburn0zzz/translate-1/tree/8385a3c95de397fec8ca7a032fe1c215fa4e31f9
TensorClamp
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
Ilyabasharov/torch2trt
TensorClamp
false
2,531
[ "MIT" ]
0
76bf298b3da408509665e23e2494922b131afb10
https://github.com/Ilyabasharov/torch2trt/tree/76bf298b3da408509665e23e2494922b131afb10
Normalize
import torch from torch import nn class Normalize(nn.Module): """normalization layer""" def __init__(self, power=2): super(Normalize, self).__init__() self.power = power def forward(self, x): norm = x.pow(self.power).sum(1, keepdim=True).pow(1.0 / self.power) out = x.div(...
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...
Alibaba-MIIL/HeadSharingKD
Normalize
false
7,663
[ "BSD-2-Clause" ]
15
8e2738bf069c7d12ec933f9b9107f267f7b6603a
https://github.com/Alibaba-MIIL/HeadSharingKD/tree/8e2738bf069c7d12ec933f9b9107f267f7b6603a
BiasLayer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
JGU-VC/activation-pattern-analysis
BiasLayer
false
576
[ "MIT" ]
0
14da42ad541ee4faf35d360a6e871fd44decd33d
https://github.com/JGU-VC/activation-pattern-analysis/tree/14da42ad541ee4faf35d360a6e871fd44decd33d
EqualLinear
# 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 math import torch.nn as nn from torch...
cyysc1998/EDVRDarts
EqualLinear
false
6,512
[ "MIT" ]
1
201badbc8c6469b519647a8869c3782ebe1176cf
https://github.com/cyysc1998/EDVRDarts/tree/201badbc8c6469b519647a8869c3782ebe1176cf
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...
Artanic30/RentalPrediction
QuickGELU
false
1,972
[ "MIT" ]
0
5804ab9b453d2a40bce2bb304c31efc98a803ed8
https://github.com/Artanic30/RentalPrediction/tree/5804ab9b453d2a40bce2bb304c31efc98a803ed8
Reorg
# 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 import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._...
bruceli-rw0/rob535-perception
Reorg
false
9,826
[ "MIT" ]
0
b800b48aea888b0959b19fe13c637e1f257417e6
https://github.com/bruceli-rw0/rob535-perception/tree/b800b48aea888b0959b19fe13c637e1f257417e6
Classifier
import torch import torch.distributed import torch import torch.nn as nn class Classifier(nn.Module): def __init__(self, hidden_size): super(Classifier, self).__init__() self.linear1 = nn.Linear(hidden_size, 1) self.sigmoid = nn.Sigmoid() def forward(self, x, mask_cls): h = s...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.distributed import torch import torch.nn as nn assert_size_stride =...
RowitZou/CG-nAR
Classifier
false
17,862
[ "MIT" ]
8
8e2debeb3170045592b3b674ea6f9b56251e71f4
https://github.com/RowitZou/CG-nAR/tree/8e2debeb3170045592b3b674ea6f9b56251e71f4
LayerNorm
import torch import torch.nn as nn import torch.utils.data class LayerNorm(nn.Module): def __init__(self, num_features, eps=1e-05, affine=True): super(LayerNorm, self).__init__() self.num_features = num_features self.affine = affine self.eps = eps if self.affine: ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dy...
AllenPu/mbdg
LayerNorm
false
7,669
[ "MIT" ]
27
243f53a57dcf4bfb6e717c0c9f64a839cff8d548
https://github.com/AllenPu/mbdg/tree/243f53a57dcf4bfb6e717c0c9f64a839cff8d548
EqualConv2d
import torch from torch import nn from math import sqrt def equal_lr(module, name='weight'): EqualLR.apply(module, name) return module class EqualLR: def __init__(self, name): self.name = name def compute_weight(self, module): weight = getattr(module, self.name + '_orig') f...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import 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 math import sqrt assert_size_stride = torch._C._dynamo...
AaltoVision/balanced-pioneer
EqualConv2d
false
16,869
[ "MIT" ]
5
51f58080fd2db3159de3e1ccb47f38e03220faf0
https://github.com/AaltoVision/balanced-pioneer/tree/51f58080fd2db3159de3e1ccb47f38e03220faf0
NextSentencePrediction
import torch import torch.nn as nn class NextSentencePrediction(nn.Module): """ 2-class classification model : is_next, is_not_next """ def __init__(self, hidden): """ :param hidden: BERT model output size """ super().__init__() self.linear = nn.Linear(hidden, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
mortonjt/BERT-pytorch
NextSentencePrediction
false
16,113
[ "Apache-2.0" ]
5,013
d10dc4f9d5a6f2ca74380f62039526eb7277c671
https://github.com/mortonjt/BERT-pytorch/tree/d10dc4f9d5a6f2ca74380f62039526eb7277c671
L1CompositionLoss
# 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...
akimotty877/mmediting
L1CompositionLoss
false
3,066
[ "Apache-2.0" ]
0
cae872d6f3e867ba144c7c0dbc29a0ee1a29e5a6
https://github.com/akimotty877/mmediting/tree/cae872d6f3e867ba144c7c0dbc29a0ee1a29e5a6
PositionwiseFeedForward
# 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 math from to...
clairett/fast-bert
PositionwiseFeedForward
false
15,041
[ "Apache-2.0" ]
1,542
506771b930aa70e7ca2852e5e8ebb14656d97bfa
https://github.com/clairett/fast-bert/tree/506771b930aa70e7ca2852e5e8ebb14656d97bfa
TransformerEncoderLayer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
XeniaOhmer/SystematicRepresentations
TransformerEncoderLayer
false
1,272
[ "MIT" ]
0
825208d1be659dc820e61f577cdb53afc47302f4
https://github.com/XeniaOhmer/SystematicRepresentations/tree/825208d1be659dc820e61f577cdb53afc47302f4
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 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
MergeLayer
# 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 assert_size_stride = torch._C...
Blidge/tgn-caw-main
MergeLayer
false
4,914
[ "Apache-2.0" ]
1
7a58f22bc7d9f1e2f6e9cbb1a60a18aed81071ee
https://github.com/Blidge/tgn-caw-main/tree/7a58f22bc7d9f1e2f6e9cbb1a60a18aed81071ee
GlobalAvgPool1D
# 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 reinterpret...
charliemorning/mlws
GlobalAvgPool1D
false
1,668
[ "MIT" ]
0
8e9bad59ca9f5e774cc1ae7fe454ff3b8a8e1784
https://github.com/charliemorning/mlws/tree/8e9bad59ca9f5e774cc1ae7fe454ff3b8a8e1784
ConvBlock
import torch import torch.nn.functional as F from functools import partial import torch.nn as nn def dispatcher(dispatch_fn): def decorated(key, *args): if callable(key): return key if key is None: key = 'none' return dispatch_fn(key, *args) return decorated ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 functools import partial...
derwind/dmfont
ConvBlock
false
15,175
[ "MIT" ]
95
17a91a9cc1917d2485eaa8e92b68245578920c76
https://github.com/derwind/dmfont/tree/17a91a9cc1917d2485eaa8e92b68245578920c76
KDLoss
import torch import torch.nn as nn import torch.utils.data class KDLoss(nn.Module): def __init__(self, temp_factor): super(KDLoss, self).__init__() self.temp_factor = temp_factor self.kl_div = nn.KLDivLoss(reduction='sum') def forward(self, input, target): log_p = torch.log_s...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
Pre-release/BAKE
KDLoss
false
14,244
[ "MIT" ]
67
2899b38d556a9151f55079c1b9888d462369aec8
https://github.com/Pre-release/BAKE/tree/2899b38d556a9151f55079c1b9888d462369aec8
Max_AvgPool
import torch import torch.nn as nn from itertools import product as product class Max_AvgPool(nn.Module): def __init__(self, kernel_size=(3, 3), stride=2, padding=1, dim=128): super(Max_AvgPool, self).__init__() self.Maxpool = nn.MaxPool2d(kernel_size=kernel_size, stride=stride, paddi...
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 from itertools import product as product assert_size_stride = torch...
kooBH/EXTD_Pytorch
Max_AvgPool
false
10,435
[ "MIT" ]
0
e93b196c87054684cc6c757e1dfd26f8b7dc57cf
https://github.com/kooBH/EXTD_Pytorch/tree/e93b196c87054684cc6c757e1dfd26f8b7dc57cf
ModulatedConv2d
# 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.autograd...
achrefjarray/ESRGANplus-master
ModulatedConv2d
false
1,374
[ "Apache-2.0" ]
0
ba470ec5c565a6dc8b48575b1e185ef6b796aec6
https://github.com/achrefjarray/ESRGANplus-master/tree/ba470ec5c565a6dc8b48575b1e185ef6b796aec6
PCA_layer
# 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...
CompTop/Interleaving-DR
PCA_layer
false
2,108
[ "MIT" ]
0
479c190d9a9315038348cec115793258f067b1ca
https://github.com/CompTop/Interleaving-DR/tree/479c190d9a9315038348cec115793258f067b1ca
SelfAttentionGPT2
# 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....
Marcel-Busschers/former
SelfAttentionGPT2
false
9,334
[ "MIT" ]
0
5380fad4c0890503188e01f9b2cbd06fdb33a7af
https://github.com/Marcel-Busschers/former/tree/5380fad4c0890503188e01f9b2cbd06fdb33a7af
Classifier
import torch import torch.nn as nn class Classifier(nn.Module): def __init__(self, hidden_dim, num_classes): super(Classifier, self).__init__() self.fc1 = nn.Linear(hidden_dim, num_classes) self.softmax = nn.Softmax(dim=0) def forward(self, x): x = x.squeeze() out = 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....
a-coles/fast-accent-detector
Classifier
false
6,037
[ "MIT" ]
1
e5b993fba7397cd8c4071479bd92d1e0ba54d363
https://github.com/a-coles/fast-accent-detector/tree/e5b993fba7397cd8c4071479bd92d1e0ba54d363
UnaryPrimitivesPredefined_v2
# 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 math from torch import nn assert_size_stride = torch._C._dynamo.guards.a...
C-SUNSHINE/TOQ-Nets-PyTorch-Release
UnaryPrimitivesPredefined_v2
false
17,169
[ "MIT" ]
6
05e06bf633fb3c6b610dda9a5126ecd7af1db02f
https://github.com/C-SUNSHINE/TOQ-Nets-PyTorch-Release/tree/05e06bf633fb3c6b610dda9a5126ecd7af1db02f
BackboneModel1
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data class BackboneModel1(nn.Module): def __init__(self): super().__init__() self.conv1 = nn.Conv2d(1, 1, 1, 1) def forward(self, x): return self.conv1(x) def get_inputs(): return ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.parallel import torch.optim import torch.u...
HarshCasper/nni
BackboneModel1
false
5,275
[ "MIT" ]
1
291bbbba9f296382015a77b2c88eb5db5b44bf94
https://github.com/HarshCasper/nni/tree/291bbbba9f296382015a77b2c88eb5db5b44bf94
Scaled_Dot_Product_Attention
# 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....
NTDXYG/Text-Classify-based-pytorch
Scaled_Dot_Product_Attention
false
8,574
[ "Apache-2.0" ]
20
b12a264a0ea64b2f8b46fafd5383ef0a8025ef2f
https://github.com/NTDXYG/Text-Classify-based-pytorch/tree/b12a264a0ea64b2f8b46fafd5383ef0a8025ef2f
ConvBlock
# 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...
ZombaSY/DeepLPF
ConvBlock
false
1,325
[ "BSD-3-Clause" ]
0
adce64ae01bc9e32f465a354cb1f6534f0d13597
https://github.com/ZombaSY/DeepLPF/tree/adce64ae01bc9e32f465a354cb1f6534f0d13597
GlobalAveragePooling
import torch import torch.nn as nn class GlobalAveragePooling(nn.Module): """Global Average Pooling neck. Note that we use `view` to remove extra channel after pooling. We do not use `squeeze` as it will also remove the batch dimension when the tensor has a batch dimension of size 1, which can lead t...
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...
Chrisfsj2051/my_tools
GlobalAveragePooling
false
8,918
[ "MIT" ]
0
67355a46df6290aa2fdc1e0266c61daacced3ba1
https://github.com/Chrisfsj2051/my_tools/tree/67355a46df6290aa2fdc1e0266c61daacced3ba1
PermEqui2_mean
# 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...
haoruilee/DeepSets
PermEqui2_mean
false
15,495
[ "Apache-2.0" ]
213
b405dd6b51a34fb1ef622e25e6685b417b7b7cbb
https://github.com/haoruilee/DeepSets/tree/b405dd6b51a34fb1ef622e25e6685b417b7b7cbb
Attention
import math import torch from torch import nn from torch.nn import functional as F import torch.utils.data def matmul(x, y): if x.dim() == y.dim(): return x @ y if x.dim() == y.dim() - 1: return (x.unsqueeze(-2) @ y).squeeze(-2) return (x @ y.unsqueeze(-2)).squeeze(-2) class Attention(nn...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
abhinavrangarajan/genienlp
Attention
false
1,354
[ "BSD-3-Clause" ]
0
ba121274b3365739ce9e5a8facc9a2904149b9c7
https://github.com/abhinavrangarajan/genienlp/tree/ba121274b3365739ce9e5a8facc9a2904149b9c7
ChannelNorm
import torch import torch.nn as nn class ChannelNorm(nn.Module): def __init__(self, numFeatures, epsilon=1e-05, affine=True): super(ChannelNorm, self).__init__() if affine: self.weight = nn.parameter.Parameter(torch.Tensor(1, numFeatures, 1)) self.bias = 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 from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
EyalSel/CPC_audio
ChannelNorm
false
13,676
[ "MIT" ]
260
b98a1bdf1fe9ea219816db7a6c28115d404a3510
https://github.com/EyalSel/CPC_audio/tree/b98a1bdf1fe9ea219816db7a6c28115d404a3510
NPRNNCell
# 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....
jinyeom/ga-plastic-models
NPRNNCell
false
3,750
[ "MIT" ]
0
e38b245ae51c35a5f32679cc9f215463a3d58f1a
https://github.com/jinyeom/ga-plastic-models/tree/e38b245ae51c35a5f32679cc9f215463a3d58f1a
Anomaly
# 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 ...
G-santini/anomalydetector
Anomaly
false
11,511
[ "MIT" ]
0
f41be86d357cba7c164a02947b28d5c70ee3e451
https://github.com/G-santini/anomalydetector/tree/f41be86d357cba7c164a02947b28d5c70ee3e451
DQFFN
# 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....
thomashopkins32/RedBlueGame
DQFFN
false
4,445
[ "MIT" ]
0
dd3e759123acc02375fdfcc504892e00e6b31ef1
https://github.com/thomashopkins32/RedBlueGame/tree/dd3e759123acc02375fdfcc504892e00e6b31ef1
FusedDownsample
# 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 math import sqrt assert_size_stride = torch._C._dynamo...
uzielroy/StyleGan_FewShot
FusedDownsample
false
16,642
[ "MIT" ]
76
94e4c49dbf39d1c6299f33787afb3e471ece11e3
https://github.com/uzielroy/StyleGan_FewShot/tree/94e4c49dbf39d1c6299f33787afb3e471ece11e3
Critic
import torch import numpy as np import torch.nn as nn import torch.nn.functional as F def hidden_init(layer): fan_in = layer.weight.data.size()[0] lim = 1.0 / np.sqrt(fan_in) return -lim, lim class Critic(nn.Module): """Critic (Value) Model.""" def __init__(self, state_size, action_size, seed, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import numpy as np import tor...
drib861204/Soft-Actor-Critic-and-Extensions
Critic
false
15,237
[ "MIT" ]
143
3075df7430c1c49177b3798d753a9e3f6226672e
https://github.com/drib861204/Soft-Actor-Critic-and-Extensions/tree/3075df7430c1c49177b3798d753a9e3f6226672e
MLPDecoder
import torch import torch.nn as nn import torch.nn.functional as F class MLPDecoder(nn.Module): def __init__(self, d_in, d_out): super(MLPDecoder, self).__init__() H1 = 10 H2 = 100 self._d_in = d_in self._d_out = d_out self.l1 = nn.Linear(d_in, H1) self.l11...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
cheng-xie/motionEncode
MLPDecoder
false
1,677
[ "MIT" ]
0
fa2152b3eaf2e09ad9477d054566db0a7bc4c7b4
https://github.com/cheng-xie/motionEncode/tree/fa2152b3eaf2e09ad9477d054566db0a7bc4c7b4
ModAssign
# 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 @triton.jit d...
PogChamper/torch2trt
ModAssign
false
14,192
[ "MIT" ]
3,363
43b12627ec0de4d212efb6d02b07570205085ccc
https://github.com/PogChamper/torch2trt/tree/43b12627ec0de4d212efb6d02b07570205085ccc
CRFLoss
import torch import torch.nn as nn class CRFLoss(nn.Module): def __init__(self, L, init): super(CRFLoss, self).__init__() self.start = nn.Parameter(torch.Tensor(L).uniform_(-init, init)) self.T = nn.Parameter(torch.Tensor(L, L).uniform_(-init, init)) self.end = nn.Parameter(torch....
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
Johannes0Horn/mtl-dts
CRFLoss
false
8,362
[ "MIT" ]
19
ae50253c808bbb77af3b1117f69f08d2268099e9
https://github.com/Johannes0Horn/mtl-dts/tree/ae50253c808bbb77af3b1117f69f08d2268099e9
LabelSmoothingCrossEntropyV2
import torch from torch import nn class LabelSmoothingCrossEntropyV2(nn.Module): """ 平滑的交叉熵, LabelSommth-CrossEntropy This is the autograd version, you can also try the LabelSmoothSoftmaxCEV2 that uses derived gradients url: https://github.com/CoinCheung/pytorch-loss examples: >>> criteria = 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 import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch import nn a...
dumpmemory/Pytorch-NLU
LabelSmoothingCrossEntropyV2
false
15,265
[ "Apache-2.0" ]
115
864fb9acc7751fc51abd3d05d24b5a9a7eab7110
https://github.com/dumpmemory/Pytorch-NLU/tree/864fb9acc7751fc51abd3d05d24b5a9a7eab7110
TorchLogCosh
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torch as _torch assert_size_stride = torch._C._dynamo.g...
inailuig/netket
TorchLogCosh
false
10,194
[ "Apache-2.0" ]
0
ab57a6fb019edb9ac298969950724781f2ae2b22
https://github.com/inailuig/netket/tree/ab57a6fb019edb9ac298969950724781f2ae2b22
LinearSwish
import torch import torch.nn as nn import torch.cuda import torch.nn.functional as F import torch.backends.cudnn import torch.backends.mkl class LinearSwish(nn.Module): def __init__(self, in_channels, out_channels, **kwargs): super(LinearSwish, self).__init__() seed = 2018 torch.manual_se...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.cuda import torch.backends.cudnn import torch...
JudeDavis1/intel-extension-for-pytorch
LinearSwish
false
2,584
[ "Apache-2.0" ]
0
364e34cb4917a709f5108c07d4005bf82f3d5067
https://github.com/JudeDavis1/intel-extension-for-pytorch/tree/364e34cb4917a709f5108c07d4005bf82f3d5067
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....
Columbine21/PyTorch-NLP
Attention
false
8,907
[ "BSD-3-Clause" ]
0
63460d0951a0406b4b7cb99d3a290dcef0721eff
https://github.com/Columbine21/PyTorch-NLP/tree/63460d0951a0406b4b7cb99d3a290dcef0721eff
PartialConv
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.a...
ShiraLightricks/3d-photo-inpainting
PartialConv
false
1,071
[ "MIT" ]
0
c42ac41576690b765e50f5281ddbfb58439ff36d
https://github.com/ShiraLightricks/3d-photo-inpainting/tree/c42ac41576690b765e50f5281ddbfb58439ff36d
BananaResNet
# 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_...
slash-fury/DRL-Navigation
BananaResNet
false
4,372
[ "MIT" ]
0
5989dca62590b611ab39ac8722a22d897c65cc88
https://github.com/slash-fury/DRL-Navigation/tree/5989dca62590b611ab39ac8722a22d897c65cc88
KMomentLoss
import torch import torch.optim import torch.nn as nn class KMomentLoss(nn.Module): def __init__(self, k: 'int'=4): """ k moment distance, where `k` represents the highest order of moment. """ super(KMomentLoss, self).__init__() self.eps = 1e-08 self.k = k 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.triton_helpers import libdevice import torch.optim import torch.nn as nn assert_size_stride = torch._C._dynamo....
Fyy10/UESTC-Thesis-DA
KMomentLoss
false
511
[ "MIT" ]
0
6cb16efd1f80aa569c90874a806a62dec8afaec4
https://github.com/Fyy10/UESTC-Thesis-DA/tree/6cb16efd1f80aa569c90874a806a62dec8afaec4
Actor
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
bar0net/Udacity_DeepReinforcementLearning
Actor
false
1,524
[ "MIT" ]
0
3b5f98b7c2c1911b351be541fda3aa190bf48456
https://github.com/bar0net/Udacity_DeepReinforcementLearning/tree/3b5f98b7c2c1911b351be541fda3aa190bf48456
SimpleACosModule
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.jit import torch.onnx import torch.nn assert_size_stride = torch._...
opti-mix/glow
SimpleACosModule
false
7,381
[ "Apache-2.0" ]
1
4ba074df5da9822986a23a6679ab592c22660f6d
https://github.com/opti-mix/glow/tree/4ba074df5da9822986a23a6679ab592c22660f6d
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...
brudermueller/PointRCNN
DiceLoss
false
3,257
[ "MIT" ]
0
430bb45d6d512ad4e3eb509d65377511361c300f
https://github.com/brudermueller/PointRCNN/tree/430bb45d6d512ad4e3eb509d65377511361c300f
TransposeMultiheadAttention
import torch import torch.nn as nn from typing import Optional import torch.utils.data import torch.nn class TransposeMultiheadAttention(nn.Module): """ Wrapper for nn.MultiheadAttention which first transposes the input tensor from (batch_size, seq_len, feature_dim) to (seq_length, batch_size, feature_dim...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
zijian-hu/pytorchvideo
TransposeMultiheadAttention
false
4,713
[ "Apache-2.0" ]
0
51589b100437af2285c56ce2ccc7ccecb7f9b18b
https://github.com/zijian-hu/pytorchvideo/tree/51589b100437af2285c56ce2ccc7ccecb7f9b18b
ConvNeuralNetwork
import torch import torch.nn as nn class ConvNeuralNetwork(nn.Module): def __init__(self, num_classes=3): super(ConvNeuralNetwork, self).__init__() self.conv1 = nn.Conv2d(in_channels=3, out_channels=12, kernel_size= 3, stride=1, padding=1) self.conv2 = nn.Conv2d(in_channels=12...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
mngaonkar/pytorch-image-classifier
ConvNeuralNetwork
false
4,027
[ "MIT" ]
0
f10b4363dc62c2fbbb5fbfbc56a3849da623fc80
https://github.com/mngaonkar/pytorch-image-classifier/tree/f10b4363dc62c2fbbb5fbfbc56a3849da623fc80
MarginRankingLoss
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch.nn.functional as F class MarginRankingLoss(nn.Module): def __init__(self, margin=0.2, loss_weight=5e-05, size_average=None, reduce=None, reduction='mean'): super(MarginRankingLoss, ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data...
Karenou/mmfashion
MarginRankingLoss
false
9,466
[ "Apache-2.0" ]
0
dfc334232d1700cde18d144f983dd5b0a7f9852a
https://github.com/Karenou/mmfashion/tree/dfc334232d1700cde18d144f983dd5b0a7f9852a
MultiheadAttention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Mehrad0711/HUBERT
MultiheadAttention
false
17,714
[ "MIT" ]
3
2f13fd2f7f5a2ec13544f4007158b582ae7408c3
https://github.com/Mehrad0711/HUBERT/tree/2f13fd2f7f5a2ec13544f4007158b582ae7408c3
NLL
# 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 import torch.nn.parallel assert_size_stride...
Manojbhat09/Sane-annotation-shape-complete
NLL
false
17,695
[ "Apache-2.0" ]
9
03b298b2c0a187be979ff31ad2a39238b72a6d78
https://github.com/Manojbhat09/Sane-annotation-shape-complete/tree/03b298b2c0a187be979ff31ad2a39238b72a6d78
Flatten
import torch import torch.nn as nn from itertools import product as product class Flatten(nn.Module): def __init__(self): super(Flatten, self).__init__() def forward(self, x): """ Arguments: x: a float tensor with shape [batch_size, c, h, w]. Returns: ...
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 itertools import product as product assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided...
Juggernaut93/InsightFace-v2
Flatten
false
674
[ "Apache-2.0" ]
0
65e9b8d1f285a87472ffb913bec136d4e046798f
https://github.com/Juggernaut93/InsightFace-v2/tree/65e9b8d1f285a87472ffb913bec136d4e046798f
HardSwish
# 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.nn.functional as F import torch.utils.data import torc...
BigFishMaster/tnt
HardSwish
false
17,506
[ "BSD-3-Clause" ]
3
8b80bb3b194eb87ac18924428ef0924c2fb263c5
https://github.com/BigFishMaster/tnt/tree/8b80bb3b194eb87ac18924428ef0924c2fb263c5
SimpleErfModule
import torch import torch.jit import torch.onnx import torch.nn class SimpleErfModule(torch.nn.Module): def forward(self, input): return torch.special.erf(input) 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._inductor.runtime.triton_helpers import libdevice import torch.jit import torch.onnx import torch.nn assert_size_stride = torch._...
mciprian13/glow
SimpleErfModule
false
3,992
[ "Apache-2.0" ]
0
90f88205d9bf8baff8df5bbda51c9d138e3e668b
https://github.com/mciprian13/glow/tree/90f88205d9bf8baff8df5bbda51c9d138e3e668b
TemporalRelation
import torch import torch.nn as nn class TemporalRelation(nn.Module): def __init__(self, feat_dim, time_window=1): super(TemporalRelation, self).__init__() self.time_window = time_window self.feat_dim = feat_dim self.WT = nn.Linear(self.feat_dim, self.feat_dim, bias=False) de...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
weiyi1991/UA_Concurrent
TemporalRelation
false
4,523
[ "MIT" ]
0
11238c778c60095abf326800d6e6a13a643bf071
https://github.com/weiyi1991/UA_Concurrent/tree/11238c778c60095abf326800d6e6a13a643bf071
HSwish
import torch import torch.utils.data from torch import nn class HSwish(nn.Module): """Hard Swish activation function. See: https://arxiv.org/abs/1905.02244 """ def forward(self, x): return x * nn.functional.relu6(x + 3).div_(6) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def g...
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 from torch import nn assert_size_stride = torch._C._dynamo.guards...
prabhum456/determined
HSwish
false
10,632
[ "Apache-2.0" ]
0
7e8017df0f62d80d21f5483578e2d5abd0e30935
https://github.com/prabhum456/determined/tree/7e8017df0f62d80d21f5483578e2d5abd0e30935
SmallBlock
import torch from torch import nn from torchvision import models as models import torch.onnx import torch.nn class SmallBlock(nn.Module): def __init__(self, channels): super(SmallBlock, self).__init__() self.conv1 = nn.Conv2d(in_channels=channels, out_channels=channels, kernel_size=3,...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn from tor...
krodyush/training_extensions
SmallBlock
false
10,996
[ "Apache-2.0" ]
0
542f4004dfbc6fc62a622065367ba4f85a703dd3
https://github.com/krodyush/training_extensions/tree/542f4004dfbc6fc62a622065367ba4f85a703dd3
Downsample
import torch from torch import Tensor from torch import nn class Downsample(nn.Module): def __init__(self, c1, c2, patch_size): super().__init__() self.proj = nn.Conv2d(c1, c2, patch_size, patch_size) def forward(self, x: 'Tensor') ->Tensor: x = x.permute(0, 3, 1, 2) x = self...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
sithu31296/image_classification
Downsample
false
16,450
[ "MIT" ]
57
6b8cbce96100225621cee3166a73e852ba216cc3
https://github.com/sithu31296/image_classification/tree/6b8cbce96100225621cee3166a73e852ba216cc3
RPA
import torch from torch import nn as nn from torch.nn import init as init from torch.utils import data as data import torch.onnx class RPA(nn.Module): """Residual pixel-attention block """ def __init__(self, num_feat): super(RPA, self).__init__() self.conv1 = nn.Conv2d(num_feat, num_feat ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn as nn from torch.nn import init as init from torch.utils im...
aesrgan/A-ESRGAN
RPA
false
14,754
[ "BSD-3-Clause" ]
58
e1a71deb4a47e332cad6b3d6bbbbb21a56bdd9c6
https://github.com/aesrgan/A-ESRGAN/tree/e1a71deb4a47e332cad6b3d6bbbbb21a56bdd9c6
GELU
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
simonlevine/enformer-pytorch
GELU
false
13,093
[ "MIT" ]
0
342915c3f9385f5f24ee4d1d9965d126d49ca279
https://github.com/simonlevine/enformer-pytorch/tree/342915c3f9385f5f24ee4d1d9965d126d49ca279
CNN3dModel
import torch class CNN3dModel(torch.nn.ModuleDict): def __init__(self, D_in=1, D_out=1): super(CNN3dModel, self).__init__() self.conv3d = torch.nn.Conv3d(D_in, D_in * 2, kernel_size=2, stride =2, padding=1) self.conv3d2 = torch.nn.Conv3d(D_in * 2, D_in * 2, kernel_size=2, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C...
MilesCranmer/Sapsan
CNN3dModel
false
8,568
[ "BSD-3-Clause" ]
11
4d21954baf196ede2d4dafc765aed98a0cfca21b
https://github.com/MilesCranmer/Sapsan/tree/4d21954baf196ede2d4dafc765aed98a0cfca21b
NormStyleCode
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
ArdWang/GFPGAN
NormStyleCode
false
11,250
[ "BSD-3-Clause" ]
0
f984ec32754190fad0b9b7a60d372aac84e57173
https://github.com/ArdWang/GFPGAN/tree/f984ec32754190fad0b9b7a60d372aac84e57173
DeepQNetwork
# 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_...
sanmusane/AIGames
DeepQNetwork
false
4,269
[ "MIT" ]
0
3f4eecdd02089911d1989e40e2b336e13b800e55
https://github.com/sanmusane/AIGames/tree/3f4eecdd02089911d1989e40e2b336e13b800e55
ChannelSpatialSELayer3D
# 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 ...
Nightmare4214/FracNet
ChannelSpatialSELayer3D
false
2,704
[ "Apache-2.0" ]
0
db397adb50f71387155d9d110302a5968f86f756
https://github.com/Nightmare4214/FracNet/tree/db397adb50f71387155d9d110302a5968f86f756
ActNorm
import torch import torch.nn as nn from torch.nn import Parameter class ActNorm(nn.Module): def __init__(self, num_channels, eps=1e-05): super(ActNorm, self).__init__() self.eps = eps self.num_channels = num_channels self._log_scale = Parameter(torch.Tensor(num_channels)) ...
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 from torch.nn import Parameter assert_size_stride =...
Schwartz-Zha/My-invertible-resnet
ActNorm
false
1,036
[ "MIT" ]
0
5415975bb0d640f3bf3ef4a7b986563e84109270
https://github.com/Schwartz-Zha/My-invertible-resnet/tree/5415975bb0d640f3bf3ef4a7b986563e84109270
Conv_ReLU_Block
import torch from torch import nn class Conv_ReLU_Block(nn.Module): def __init__(self): super(Conv_ReLU_Block, self).__init__() self.conv = nn.Conv2d(in_channels=64, out_channels=64, kernel_size= 3, stride=1, padding=1, bias=False) self.relu = nn.ReLU(inplace=True) 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 import nn assert_s...
HwangToeMat/Asym_VDSR
Conv_ReLU_Block
false
17,417
[ "MIT" ]
4
598200f745434fc6e1bb46b6da7d6cf7b0fdaa50
https://github.com/HwangToeMat/Asym_VDSR/tree/598200f745434fc6e1bb46b6da7d6cf7b0fdaa50
ResBlock
import torch import torch.nn as nn def conv3x3(in_planes, out_planes, stride=1): """3x3 convolution with padding""" return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, padding=1, bias=False) def norm(dim): return nn.GroupNorm(min(32, dim), dim) class ResBlock(nn.Module): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
MaricelaM/torchdiffeq
ResBlock
false
14,010
[ "MIT" ]
4,088
4e070fb687167e53082a91f32e102af7f4521058
https://github.com/MaricelaM/torchdiffeq/tree/4e070fb687167e53082a91f32e102af7f4521058
CoughNet
import torch class CoughNet(torch.nn.Module): def __init__(self, input_size): super(CoughNet, self).__init__() self.l1 = torch.nn.Linear(input_size, 512) self.l2 = torch.nn.Linear(512, 256) self.l3 = torch.nn.Linear(256, 128) self.l4 = torch.nn.Linear(128, 64) 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 assert_size_stride = torch._C...
DerWaldi/COVID-19-Cough-Classification
CoughNet
false
17,243
[ "MIT" ]
7
40f85133b0b8973c088dc2730c592af1b89b29b7
https://github.com/DerWaldi/COVID-19-Cough-Classification/tree/40f85133b0b8973c088dc2730c592af1b89b29b7
Gaussian_Kernel_Function
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math from torch import nn assert_size_stride = torch._C._dynamo.gua...
FupingWu90/VarDA
Gaussian_Kernel_Function
false
8,119
[ "MIT" ]
14
cfea269a4f608128bb5b13a778619b17d7123bfa
https://github.com/FupingWu90/VarDA/tree/cfea269a4f608128bb5b13a778619b17d7123bfa
LSTM
# 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 ...
SakastLord/STGAT
LSTM
false
11,841
[ "MIT" ]
0
664843b3a55ac55383de1d5400d731376476ea03
https://github.com/SakastLord/STGAT/tree/664843b3a55ac55383de1d5400d731376476ea03
BaseFactorizationMachine
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
dreaming-qin/RecBole
BaseFactorizationMachine
false
12,314
[ "MIT" ]
0
d6de39521484ded60c387ca604abaf86310acdbe
https://github.com/dreaming-qin/RecBole/tree/d6de39521484ded60c387ca604abaf86310acdbe
CustomInverse
import torch class CustomInverse(torch.nn.Module): def forward(self, x, y): ress = torch.inverse(x) + x return ress, torch.all(y) def get_inputs(): return [torch.rand([4, 4, 4, 4]), 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._inductor.runtime import triton_helpers assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
natke/onnxruntime-extensions
CustomInverse
false
4,048
[ "MIT" ]
0
e7b7eb596016242a7e913044e889c4a0d7dc1000
https://github.com/natke/onnxruntime-extensions/tree/e7b7eb596016242a7e913044e889c4a0d7dc1000
ConvAE
# 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.nn a...
Xanadu12138/DSCN-superpixels
ConvAE
false
18,093
[ "MIT" ]
4
babe16edde9c61699ef203effbfc9f03246765f3
https://github.com/Xanadu12138/DSCN-superpixels/tree/babe16edde9c61699ef203effbfc9f03246765f3
Extractor
from torch.nn import Module import torch from torch import Tensor from typing import Optional from typing import Tuple import torch.nn.functional as F from torch.nn import Dropout from torch.nn import LayerNorm from torch.nn import Conv1d from torch.nn import MultiheadAttention class Extractor(Module): """Convolu...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
SolomidHero/FragmentVC-with-RAdam
Extractor
false
17,950
[ "MIT" ]
6
a0ee884155a4e8f47d8950a35258e58987f6289e
https://github.com/SolomidHero/FragmentVC-with-RAdam/tree/a0ee884155a4e8f47d8950a35258e58987f6289e
SmallConvNet
# 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 typing import Tuple import torch.nn as nn from numpy import prod assert_siz...
synthara/M-SFV-SyntharaFVcore
SmallConvNet
false
10,900
[ "Apache-2.0" ]
0
b4d2167a110aaecf3df442f58793ca2cb7b028ba
https://github.com/synthara/M-SFV-SyntharaFVcore/tree/b4d2167a110aaecf3df442f58793ca2cb7b028ba
AdaptiveAvgPool3dOutSize1
import torch import torch.nn as nn from abc import abstractmethod from typing import Tuple import torch.utils.data import torch.nn class EfficientBlockBase(nn.Module): """ PyTorchVideo/accelerator provides a set of efficient blocks that have optimal efficiency for each target hardware device. Each ef...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from abc import abstractmethod from typing import Tuple import torch.utils.data import torch.nn assert_size_stride = t...
TheShadow29/pytorchvideo
AdaptiveAvgPool3dOutSize1
false
9,691
[ "Apache-2.0" ]
0
39a3e34e33fb0e1ec142288df08f6e8c3585961a
https://github.com/TheShadow29/pytorchvideo/tree/39a3e34e33fb0e1ec142288df08f6e8c3585961a
ResidualLayer
import math import torch from torch import Tensor from torch.nn import Linear from torch.nn import Parameter import torch.utils.data def uniform(size, tensor): bound = 1.0 / math.sqrt(size) if tensor is not None: tensor.data.uniform_(-bound, bound) def kaiming_uniform(tensor, fan, a): if tensor ...
import torch from torch._inductor.select_algorithm import extern_kernels import 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 Tensor from torch.nn import Linear from torch.nn i...
CFF-Dream/pytorch_geometric
ResidualLayer
false
2,035
[ "MIT" ]
0
7c19ad74957409ee9e07314ce81524b3113b9c84
https://github.com/CFF-Dream/pytorch_geometric/tree/7c19ad74957409ee9e07314ce81524b3113b9c84
PoswiseFeedForwardNet
from _paritybench_helpers import _mock_config import torch import torch.nn as nn import torch.nn.functional as F class PoswiseFeedForwardNet(nn.Module): def __init__(self, config): super().__init__() self.config = config self.conv1 = nn.Conv1d(in_channels=self.config.d_hidn, out_channels ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
kyuhyoung/transformer-evolution
PoswiseFeedForwardNet
false
15,859
[ "Apache-2.0" ]
105
fae06f677df0be55c67cd58efea158e5517ac045
https://github.com/kyuhyoung/transformer-evolution/tree/fae06f677df0be55c67cd58efea158e5517ac045
DiceLoss
import torch from torch import nn class DiceLoss(nn.Module): """ Loss function from https://arxiv.org/abs/1707.03237, where iou computation is introduced heatmap manner to measure the diversity bwtween tow heatmaps. """ def __init__(self, eps=1e-06): super(DiceLoss, self).__init__() ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
DYF-AI/openvino-x
DiceLoss
false
5,041
[ "Apache-2.0" ]
1
0f18ebb240ea3394f7e461aca34fac158e686d95
https://github.com/DYF-AI/openvino-x/tree/0f18ebb240ea3394f7e461aca34fac158e686d95
Swish
import torch from torch import nn class Swish(nn.Module): def __init__(self, num_features): super().__init__() self.num_features = num_features self.scale = nn.Parameter(torch.ones(num_features)) def forward(self, x): return x * torch.sigmoid(self.scale * x) def extra_re...
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...
rgflowopen/rg-flow
Swish
false
7,544
[ "MIT" ]
1
f1ebb56e3e51bb26ecc2f10fe61eb34cae18398b
https://github.com/rgflowopen/rg-flow/tree/f1ebb56e3e51bb26ecc2f10fe61eb34cae18398b
GANLossGenerator
import torch import torch.nn as nn import torch.nn.functional as F class GANLossGenerator(nn.Module): """ This class implements the standard generator GAN loss proposed in: https://papers.nips.cc/paper/2014/file/5ca3e9b122f61f8f06494c97b1afccf3-Paper.pdf """ def __init__(self) ->None: """...
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...
ChristophReich1996/Mode_Collapse
GANLossGenerator
false
7,910
[ "MIT" ]
14
937ee8bf96510fbf4070fc7e14b78276ab036b8c
https://github.com/ChristophReich1996/Mode_Collapse/tree/937ee8bf96510fbf4070fc7e14b78276ab036b8c
SymKlCriterion
import torch import torch.nn.functional as F from torch.nn.modules.loss import _Loss from torch.optim.lr_scheduler import * class Criterion(_Loss): def __init__(self, alpha=1.0, name='criterion'): super().__init__() """Alpha is used to weight each loss term """ self.alpha = alpha ...
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....
posuer/mt-dnn
SymKlCriterion
false
12,908
[ "MIT" ]
0
5106083238654777838aaab5d1111b3b05c4ce04
https://github.com/posuer/mt-dnn/tree/5106083238654777838aaab5d1111b3b05c4ce04
GeneralizedMeanPooling
from torch.nn import Module import torch import torch.nn.functional as F from torch.nn.modules import Module class GeneralizedMeanPooling(Module): """Applies a 2D power-average adaptive pooling over an input signal composed of several input planes. The function computed is: :math:`f(X) = pow(sum(pow(X, p)), ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice from torch.nn import Module ...
dongan-beta/deep-image-retrieval
GeneralizedMeanPooling
false
15,200
[ "BSD-3-Clause" ]
253
3e0885f88da328aefb7abb2fa350f8860a4bd52d
https://github.com/dongan-beta/deep-image-retrieval/tree/3e0885f88da328aefb7abb2fa350f8860a4bd52d
SavageLoss
import torch import torch.nn as nn import torch.distributions import torch.utils.data class SavageLoss(nn.Module): def __init__(self): super().__init__() def forward(self, output): return 1 / (1 + output.exp()) ** 2 def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_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.triton_helpers import math as tl_math import torch.nn as nn import torch.distributions import torch.utils.data ...
AlexMeinke/Provable-OOD-Detection
SavageLoss
false
7,698
[ "MIT" ]
21
9a132aec994ff718c96b81885736ab866df60d87
https://github.com/AlexMeinke/Provable-OOD-Detection/tree/9a132aec994ff718c96b81885736ab866df60d87