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
InnerProd
import torch import torch.nn as nn class InnerProd(nn.Module): def __init__(self, fc_dim): super(InnerProd, self).__init__() self.scale = nn.Parameter(torch.ones(fc_dim)) self.bias = nn.Parameter(torch.zeros(1)) def forward(self, feat_img, feat_sound): sound_size = feat_sound...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
SheldonTsui/Minus-Plus-Network
InnerProd
false
17,915
[ "Apache-2.0" ]
5
7aa281b17f637a9f168aaf250039e560027a3817
https://github.com/SheldonTsui/Minus-Plus-Network/tree/7aa281b17f637a9f168aaf250039e560027a3817
LearnedPositionalEmbedding
import torch import torch.nn as nn import torch.utils.data def create_position_ids_from_input_ids(input_ids, padding_idx): """ Replace non-padding symbols with their position numbers. Position numbers begin at padding_idx+1. Padding symbols are ignored. This is modified from fairseq's `utils.make_position...
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....
JuruoMP/Text2SQL-Multiturn
LearnedPositionalEmbedding
false
2,454
[ "Apache-2.0" ]
0
1c7d1a93d638650a63959327a07c804d1d013e0e
https://github.com/JuruoMP/Text2SQL-Multiturn/tree/1c7d1a93d638650a63959327a07c804d1d013e0e
InputProjectionA
import torch import torch.nn as nn import torch.nn.parallel import torch.utils.data class InputProjectionA(nn.Module): """ This class projects the input image to the same spatial dimensions as the feature map. For example, if the input image is 512 x512 x3 and spatial dimensions of feature map size are 56...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.parallel import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty...
PhillipHuang2017/ext_portrait_segmentation
InputProjectionA
false
951
[ "MIT" ]
0
6d0cec0a953dacbc94a01ea8b719feb687b7c029
https://github.com/PhillipHuang2017/ext_portrait_segmentation/tree/6d0cec0a953dacbc94a01ea8b719feb687b7c029
CNNLayerNorm
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_...
MatyashDare/DLA
CNNLayerNorm
false
2,638
[ "MIT" ]
0
a1783a1298d9e5c7edc82bb2e7f17ba59743152e
https://github.com/MatyashDare/DLA/tree/a1783a1298d9e5c7edc82bb2e7f17ba59743152e
VAE
# 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 ...
angelajiang/examples
VAE
false
9,732
[ "BSD-3-Clause" ]
0
9964d6bd97a93420f101ebcdc40f8bd540930956
https://github.com/angelajiang/examples/tree/9964d6bd97a93420f101ebcdc40f8bd540930956
ConvReLUNorm
import torch import torch.cuda import torch.distributed import torch.optim class ConvReLUNorm(torch.nn.Module): def __init__(self, in_channels, out_channels, kernel_size=1, dropout=0.0): super(ConvReLUNorm, self).__init__() self.conv = torch.nn.Conv1d(in_channels, out_channels, kernel_size= ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
admariner/NeMo
ConvReLUNorm
false
1,379
[ "Apache-2.0" ]
0
e542d7f9063a40afa4119a3b94de4c2c636a37bb
https://github.com/admariner/NeMo/tree/e542d7f9063a40afa4119a3b94de4c2c636a37bb
GumbelSoftmaxLayer
import torch import torch.nn as nn from torch.distributions import RelaxedOneHotCategorical import torch.nn.parallel import torch.utils.data import torch.distributions def gumbel_softmax_sample(logits: 'torch.Tensor', temperature: 'float'=1.0, training: 'bool'=True, straight_through: 'bool'=False): size = log...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from torch.distributions import RelaxedOneHotCategorical import torch.nn.parallel import torch.utils.data import torch...
cjlovering/EGG
GumbelSoftmaxLayer
false
10,042
[ "MIT" ]
0
cce146e035decbc410e981f8bc7ada32979f3b6d
https://github.com/cjlovering/EGG/tree/cce146e035decbc410e981f8bc7ada32979f3b6d
InnerProductDecoder
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import 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.modules.loss import torch.nn as nn assert_size_s...
spatial-Transcriptomics/DeepST
InnerProductDecoder
false
4,363
[ "MIT" ]
0
47ce64b06b62395cd2983939d4bf2419f558a562
https://github.com/spatial-Transcriptomics/DeepST/tree/47ce64b06b62395cd2983939d4bf2419f558a562
dis_cf
# 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....
layel2/layyer-lib
dis_cf
false
3,915
[ "MIT" ]
0
db48b5c38098ee93d2d34693d98e5ef4d319d919
https://github.com/layel2/layyer-lib/tree/db48b5c38098ee93d2d34693d98e5ef4d319d919
StendLoss
# 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 iterto...
anton-br/SlowFast
StendLoss
false
12,099
[ "Apache-2.0" ]
0
6e8d68bc6f3191886a57f819db1c766c6ca32d21
https://github.com/anton-br/SlowFast/tree/6e8d68bc6f3191886a57f819db1c766c6ca32d21
EqualLinear
import math import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data def fused_leaky_relu(input, bias, negative_slope=0.2, scale=2 ** 0.5): rest_dim = [1] * (input.ndim - bias.ndim - 1) return F.leaky_relu(input + bias.view(1, bias.shape[0], *rest_dim), negative_slope...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math import torch.nn as nn import torch.nn.functional as F import torch.u...
HappyBelief/ContraD
EqualLinear
false
13,757
[ "MIT" ]
168
abb72562ddac8d8ab37fe9af6ac4c44c61e8ea0f
https://github.com/HappyBelief/ContraD/tree/abb72562ddac8d8ab37fe9af6ac4c44c61e8ea0f
mlp
# 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_...
liuziyang1106/sodeep
mlp
false
10,460
[ "BSD-3-Clause-Clear" ]
0
47f8a5cbe5b8405624877efc81cb28f104f1e2d7
https://github.com/liuziyang1106/sodeep/tree/47f8a5cbe5b8405624877efc81cb28f104f1e2d7
RMSELoss
# 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 assert_size_stride = torch._...
cvpr22sub7201/SpeechDrivenTongueAnimation
RMSELoss
false
6,500
[ "MIT" ]
1
82caf9d7f4331e039e3b2f0d31df6393d24ccb1c
https://github.com/cvpr22sub7201/SpeechDrivenTongueAnimation/tree/82caf9d7f4331e039e3b2f0d31df6393d24ccb1c
HyperSphereLoss
# 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_...
Dotori-HJ/SphereGAN-Pytorch-implementation
HyperSphereLoss
false
7,995
[ "MIT" ]
11
fe7843545388ecdae34f374e7f1c42300ab12689
https://github.com/Dotori-HJ/SphereGAN-Pytorch-implementation/tree/fe7843545388ecdae34f374e7f1c42300ab12689
NTXent
# 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...
Meteor-han/ReLMole
NTXent
false
5,592
[ "MIT" ]
1
ec8f2d3ec7b8edb6cd34aede36a980bab3dc35c2
https://github.com/Meteor-han/ReLMole/tree/ec8f2d3ec7b8edb6cd34aede36a980bab3dc35c2
NormImageUint8ToFloat
from torch.nn import Module import torch class NormImageUint8ToFloat(Module): def forward(self, im): return 2.0 * (im / 255.0 - 0.5) 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.nn import Module assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._em...
CeadeS/PyTorchH5Dataset
NormImageUint8ToFloat
false
2,079
[ "BSD-3-Clause" ]
0
9ee6e49f2a780345abd708abf2e0c47bb5475e0a
https://github.com/CeadeS/PyTorchH5Dataset/tree/9ee6e49f2a780345abd708abf2e0c47bb5475e0a
FeedForwardLayer
# 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.autogr...
SsGood/MMGL
FeedForwardLayer
false
17,977
[ "MIT" ]
6
ea769e46fffb42559e764e2912c5b1dc17c10af2
https://github.com/SsGood/MMGL/tree/ea769e46fffb42559e764e2912c5b1dc17c10af2
BboxHead
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from itertools import product as product import torch.nn as nn assert_size_strid...
Danil328/Pytorch_Retinaface
BboxHead
false
2,216
[ "MIT" ]
0
048a1d68217b2a99fbf83e2537ecc7e281ed6bd6
https://github.com/Danil328/Pytorch_Retinaface/tree/048a1d68217b2a99fbf83e2537ecc7e281ed6bd6
Upsampler
import math import torch from torchvision.transforms import * class ConvBlock(torch.nn.Module): def __init__(self, input_size, output_size, kernel_size=3, stride=1, padding=1, bias=True, activation='prelu', norm=None): super(ConvBlock, self).__init__() self.conv = torch.nn.Conv2d(input_si...
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 math from torchvision.transforms import * assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch....
EvgeneyZ/RBPN
Upsampler
false
9,501
[ "MIT" ]
0
acfe636cc48a4fbfea78f934a251c32e53367659
https://github.com/EvgeneyZ/RBPN/tree/acfe636cc48a4fbfea78f934a251c32e53367659
L1CosineSim
import torch import torch.utils.data from torch import nn import torch.jit class L1CosineSim(nn.Module): def __init__(self, loss_lambda=5): super(L1CosineSim, self).__init__() self.similarity = torch.nn.CosineSimilarity(dim=1, eps=1e-20) self.l1_loss = nn.L1Loss() self.loss_lambda...
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...
BlueAmulet/BasicSR
L1CosineSim
false
7,816
[ "Apache-2.0" ]
12
7040913d8659a05af4c2428feb71c260efbf1e9c
https://github.com/BlueAmulet/BasicSR/tree/7040913d8659a05af4c2428feb71c260efbf1e9c
L2Norm
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import torch.nn.init assert_size_stride = torch._C._dynam...
keeeeenw/image-matching-benchmark-baselines
L2Norm
false
15,785
[ "Apache-2.0" ]
103
1a11bedbe3c57f477ab9de302591811115ada37a
https://github.com/keeeeenw/image-matching-benchmark-baselines/tree/1a11bedbe3c57f477ab9de302591811115ada37a
STFullyConnected
# 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....
cthoyt/DrugEx
STFullyConnected
false
1,826
[ "MIT" ]
0
9e4d31adb2c65d0afc852948f502c79dcf8308a3
https://github.com/cthoyt/DrugEx/tree/9e4d31adb2c65d0afc852948f502c79dcf8308a3
TestNet2
import torch import torch.nn as nn import torch.nn.functional as F class TestNet2(nn.Module): def __init__(self): super(TestNet2, self).__init__() self.conv1 = nn.Conv2d(3, 18, 7, padding=3) self.pool = nn.MaxPool2d(2, 2) self.conv2 = nn.Conv2d(18, 36, 5, padding=2) self.c...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
jjmachan/Cifar-pytorch
TestNet2
false
6,988
[ "Apache-2.0" ]
1
11268af2f9f5230b721ac554a2ce83496c41d06c
https://github.com/jjmachan/Cifar-pytorch/tree/11268af2f9f5230b721ac554a2ce83496c41d06c
Decoder
import torch import torch.nn as nn class Decoder(nn.Module): def __init__(self, z_dim, hidden_dim, input_dim): super().__init__() self.fc1 = nn.Linear(z_dim, hidden_dim) self.fc21 = nn.Linear(hidden_dim, input_dim) self.softplus = nn.Softplus() self.sigmoid = nn.Sigmoid() ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math im...
einbandi/samplednn
Decoder
false
6,643
[ "MIT" ]
1
3525e46ab5096a569dde40e5a10d6ee05128ec7d
https://github.com/einbandi/samplednn/tree/3525e46ab5096a569dde40e5a10d6ee05128ec7d
MaskedDense
# 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.nn import Module import torch.nn as nn from torch.nn import init from...
DwaraknathT/pyfl
MaskedDense
false
632
[ "MIT" ]
0
e9a4d1ca98c6167a567d0d46771ac9e1c7bb7322
https://github.com/DwaraknathT/pyfl/tree/e9a4d1ca98c6167a567d0d46771ac9e1c7bb7322
OneLayerFCBodyWithAction
import torch from torch.nn import functional as F import torch.nn as nn def layer_init(layer, w_scale=1.0): nn.init.orthogonal_(layer.weight.data) layer.weight.data.mul_(w_scale) nn.init.constant_(layer.bias.data, 0) return layer class OneLayerFCBodyWithAction(nn.Module): def __init__(self, sta...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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.nn import function...
Marianoetchart/DeepRL
OneLayerFCBodyWithAction
false
2,637
[ "Apache-2.0" ]
0
40d4825694c0890440859166de56701fc1f61d5b
https://github.com/Marianoetchart/DeepRL/tree/40d4825694c0890440859166de56701fc1f61d5b
APLayer
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed class ZIF(torch.autograd.Function): @staticmethod def forward(ctx, input, gama): out = (input > 0).float() L = torch.tensor([gama]) ctx.save_for_b...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed assert_size_st...
Gus-Lab/temporal_efficient_training
APLayer
false
17,312
[ "MIT" ]
5
f9bde4107ed653cc8dd3ee58689bf3b55f6b89ba
https://github.com/Gus-Lab/temporal_efficient_training/tree/f9bde4107ed653cc8dd3ee58689bf3b55f6b89ba
GraphEncoderDecoderAttentionLayer
# 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....
Nmegha2601/activitygraph_transformer
GraphEncoderDecoderAttentionLayer
false
14,132
[ "MIT" ]
63
4e21a4ea12527df470b7586d149fa4168a41307c
https://github.com/Nmegha2601/activitygraph_transformer/tree/4e21a4ea12527df470b7586d149fa4168a41307c
HardSwish
import torch import torch.nn as nn class HardSwish(nn.Module): """ Hard Swish """ def forward(self, x: 'torch.Tensor') ->torch.Tensor: return x.add(0.5).clamp_(min=0, max=1).mul_(x) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
Vermeille/Torchelie
HardSwish
false
14,551
[ "MIT" ]
117
43957d83238372ae6436aac90127865c2040b76c
https://github.com/Vermeille/Torchelie/tree/43957d83238372ae6436aac90127865c2040b76c
PatchEmbed
import torch import torch.nn as nn class PatchEmbed(nn.Module): """ Image to Patch Embedding """ def __init__(self, img_size=224, patch_size=16, in_chans=3, embed_dim=768): super().__init__() num_patches = img_size // patch_size * (img_size // patch_size) self.img_size = img_size ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Curli-quan/fewshot-select
PatchEmbed
false
17,210
[ "Apache-2.0" ]
7
34f8ce5069ed1fbd01c1fa73a3ef264c98dadafe
https://github.com/Curli-quan/fewshot-select/tree/34f8ce5069ed1fbd01c1fa73a3ef264c98dadafe
BCEAfterSigmoidLoss
# 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 ...
Sina-Baharlou/pykeen
BCEAfterSigmoidLoss
false
11,881
[ "MIT" ]
0
89984e0f7a490f3c0f0d936564b7744097130d15
https://github.com/Sina-Baharlou/pykeen/tree/89984e0f7a490f3c0f0d936564b7744097130d15
Pow
# 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...
bunderhi/torch2trt
Pow
false
1,601
[ "MIT" ]
0
fa5e31e742a0f0c9a9ee38909a6fa56bb07ba96d
https://github.com/bunderhi/torch2trt/tree/fa5e31e742a0f0c9a9ee38909a6fa56bb07ba96d
EmbedNet
# 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 ...
hwfan/mega.pytorch
EmbedNet
false
3,846
[ "BSD-2-Clause" ]
0
a07b2267daad73c9482233cfe754d59b8ae2f688
https://github.com/hwfan/mega.pytorch/tree/a07b2267daad73c9482233cfe754d59b8ae2f688
PCENlr
# 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....
Js-Mim/wagner_vad
PCENlr
false
5,410
[ "MIT" ]
1
cc682bd7a8f496a26fe4be39ea2b2d68e493c5ba
https://github.com/Js-Mim/wagner_vad/tree/cc682bd7a8f496a26fe4be39ea2b2d68e493c5ba
VGG19
# 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_...
Hwa-Jong/VGG_in_Torch
VGG19
false
685
[ "MIT" ]
0
99a922070367ee9b9485c4df397f9413d11841b8
https://github.com/Hwa-Jong/VGG_in_Torch/tree/99a922070367ee9b9485c4df397f9413d11841b8
Actor
import torch import torch.nn.functional as F class Actor(torch.nn.Module): """Defines custom model Inherits from torch.nn.Module """ def __init__(self, dim_input, dim_output): super(Actor, self).__init__() self._dim_input = dim_input self._dim_output = dim_output SIZE_...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C...
cheng-xie/dpgfddagger
Actor
false
3,282
[ "MIT" ]
0
5264d5b9e0ab76fc9620da63bcfd78b25dadcbec
https://github.com/cheng-xie/dpgfddagger/tree/5264d5b9e0ab76fc9620da63bcfd78b25dadcbec
Discriminator
import torch import torch.nn as nn import torch.nn.functional as F class Discriminator(nn.Module): def __init__(self, in_dim, hidden_dim=100): super(Discriminator, self).__init__() self.fc1 = nn.Linear(in_dim, 256) nn.init.xavier_normal(self.fc1.weight) nn.init.constant(self.fc1.b...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
Vahe1994/ThreeDLAPGAN
Discriminator
false
18,029
[ "MIT" ]
6
7e8f20be9216bc741bbe22ed2a13c261f78db521
https://github.com/Vahe1994/ThreeDLAPGAN/tree/7e8f20be9216bc741bbe22ed2a13c261f78db521
vd_linear_1L_hetero
# 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....
Neronjust2017/Bayesian-neural-networks
vd_linear_1L_hetero
false
17,780
[ "MIT" ]
4
9d7f781f5c2dfa8fadf26300b4b5b64366c939cd
https://github.com/Neronjust2017/Bayesian-neural-networks/tree/9d7f781f5c2dfa8fadf26300b4b5b64366c939cd
ItemToInterestAggregation
import torch import torch.nn as nn class ItemToInterestAggregation(nn.Module): def __init__(self, seq_len, hidden_size, k_interests=5): super().__init__() self.k_interests = k_interests self.theta = nn.Parameter(torch.randn([hidden_size, k_interests])) def forward(self, input_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 from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
MIracleyin/RecBole-notebook
ItemToInterestAggregation
false
9,572
[ "MIT" ]
0
ef32b3e57a297ff4889dec1f63c7984f8f901a23
https://github.com/MIracleyin/RecBole-notebook/tree/ef32b3e57a297ff4889dec1f63c7984f8f901a23
DAModule
# 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....
rushirajsherlocked/External-Attention-pytorch
DAModule
false
4,248
[ "MIT" ]
0
7d6814b2d90909adf81c62f3f8a89e30a59d6481
https://github.com/rushirajsherlocked/External-Attention-pytorch/tree/7d6814b2d90909adf81c62f3f8a89e30a59d6481
MatrixAdd
# 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.autograd assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._d...
hirayamy/nngen
MatrixAdd
false
12,501
[ "Apache-2.0" ]
0
63f72be83e4bb1a697a969fb6a14d0335ec0316f
https://github.com/hirayamy/nngen/tree/63f72be83e4bb1a697a969fb6a14d0335ec0316f
CTLoss
# 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.onnx assert_size_stride = torch._C._dynamo.guards.asse...
c464851257/extremenet-lite
CTLoss
false
6,387
[ "BSD-3-Clause" ]
1
331446f2c5d9524d46d2b33823eff02416f43052
https://github.com/c464851257/extremenet-lite/tree/331446f2c5d9524d46d2b33823eff02416f43052
ResidualDenseBlock
# 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 torch.utils import data as data import torch.nn as ...
BCV-Uniandes/RSR
ResidualDenseBlock
false
8,129
[ "zlib-acknowledgement" ]
14
dad60eedd3560f2655e3d1ed444153ed2616af2e
https://github.com/BCV-Uniandes/RSR/tree/dad60eedd3560f2655e3d1ed444153ed2616af2e
L1GradientLoss
import torch from torch import nn import torch.nn.functional as F import torch.utils.data from torch.nn.modules.loss import _Loss class Gradient(nn.Module): def __init__(self): super(Gradient, self).__init__() kernel_v = [[0, -1, 0], [0, 0, 0], [0, 1, 0]] kernel_h = [[0, 0, 0], [-1, 0, 1]...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
YDDDDG/3D2Unet
L1GradientLoss
false
6,009
[ "MIT" ]
1
daca056958fb2ae319dc18a350e04b3cefe0d99f
https://github.com/YDDDDG/3D2Unet/tree/daca056958fb2ae319dc18a350e04b3cefe0d99f
SphereLoss
import torch import torch.utils.data import torch.nn as nn from torchvision.transforms import * class SphereLoss(nn.Module): def __init__(self, in_feats, n_classes, scale=14, *args, **kwargs): super(SphereLoss, self).__init__(*args, **kwargs) self.scale = scale self.cross_entropy = nn.Cro...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
ace19-dev/image-retrieval-pytorch
SphereLoss
false
18,236
[ "MIT" ]
9
19bd4ae5efea5b6184c345f693646bcd9a0fc8cf
https://github.com/ace19-dev/image-retrieval-pytorch/tree/19bd4ae5efea5b6184c345f693646bcd9a0fc8cf
PredictorCNN
# 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...
SarodYatawatta/federated-pytorch-test
PredictorCNN
false
8,796
[ "Apache-2.0" ]
33
42a51ba12a92b32fa19273340d5b61e74e11d8e0
https://github.com/SarodYatawatta/federated-pytorch-test/tree/42a51ba12a92b32fa19273340d5b61e74e11d8e0
BertOutput
# 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 imp...
Project-MONAI/MONAI
BertOutput
false
16,225
[ "Apache-2.0" ]
2,971
2bab12c67c3cc1d54a4847628ce1e879064be11c
https://github.com/Project-MONAI/MONAI/tree/2bab12c67c3cc1d54a4847628ce1e879064be11c
ResidualBlock
# 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 ...
nathalia-kim/nu_gan
ResidualBlock
false
10,724
[ "MIT" ]
0
c1d0891945bd7ac3d95869db91f490f57f203110
https://github.com/nathalia-kim/nu_gan/tree/c1d0891945bd7ac3d95869db91f490f57f203110
NCESoftmaxLoss
import torch from torch import nn import torch.utils.data class NCESoftmaxLoss(nn.Module): def __init__(self): super(NCESoftmaxLoss, self).__init__() self.criterion = nn.CrossEntropyLoss() def forward(self, x, label): x.shape[0] x = x.squeeze() loss = self.criterion(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._inductor.runtime.triton_helpers import math as tl_math from torch import nn i...
Shreyas-Gururaj/Point_Contrast_ME0.5.3
NCESoftmaxLoss
false
9,441
[ "MIT" ]
0
72bc78001b0b4529ca96f193764dcac0c5a0ce0f
https://github.com/Shreyas-Gururaj/Point_Contrast_ME0.5.3/tree/72bc78001b0b4529ca96f193764dcac0c5a0ce0f
Net
import torch import torch.nn as nn import torch.nn.functional as F class Net(nn.Module): def __init__(self, feature_num): super(Net, self).__init__() self.layer_1 = nn.Linear(feature_num, 500) self.layer_2 = nn.Linear(500, 20) def forward(self, x): x = F.relu(self.layer_1(x))...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
bm2-lab/scPrivacy
Net
false
6,337
[ "MIT" ]
1
444c8f3a5e7b890c299cd823359e5414f73d6205
https://github.com/bm2-lab/scPrivacy/tree/444c8f3a5e7b890c299cd823359e5414f73d6205
DiceLoss
import torch from torch import nn as nn from torch.autograd import Variable def expand_as_one_hot(input, C, ignore_index=None): """ Converts NxDxHxW label image to NxCxDxHxW, where each label is stored in a separate channel :param input: 4D input image (NxDxHxW) :param C: number of channels/labels ...
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 as nn assert_size_stride = torch._C._dynamo.guards.assert_size_strid...
junweiy/pcs_seg
DiceLoss
false
6,997
[ "MIT" ]
1
38ed98130b34a6d3d0b986cad98b08b791760f0b
https://github.com/junweiy/pcs_seg/tree/38ed98130b34a6d3d0b986cad98b08b791760f0b
GaussLinearStandardized
# 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.nn import Module from torch.nn.modules import Module from torch.nn.pa...
widedeepnetworks/widedeepnetworks
GaussLinearStandardized
false
16,717
[ "Apache-2.0" ]
50
81a8629d62d31643f3d598992ac6376a8fc5c48a
https://github.com/widedeepnetworks/widedeepnetworks/tree/81a8629d62d31643f3d598992ac6376a8fc5c48a
NormedConv2d
# 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 ...
Bin-ze/Food_detection
NormedConv2d
false
17,010
[ "Apache-2.0" ]
4
1c1a067f12644f2b0289e49aec4637d580722f70
https://github.com/Bin-ze/Food_detection/tree/1c1a067f12644f2b0289e49aec4637d580722f70
RegressionModel
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed class RegressionModel(nn.Module): def __init__(self, num_features_in, num_anchors=15, feature_size=256): super(RegressionModel, self).__init__() self.conv1 = ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
BradleyBrown19/CustomObjectDetector
RegressionModel
false
2,112
[ "Apache-2.0" ]
0
11c14ec6127c553ac365703c768b75dde33d9a4d
https://github.com/BradleyBrown19/CustomObjectDetector/tree/11c14ec6127c553ac365703c768b75dde33d9a4d
ContextualCell
# 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...
DrSleep/nas-segm-pytorch
ContextualCell
false
15,844
[ "BSD-2-Clause" ]
155
5de0c5c60cc05f94305ff59ae9f822656e3e7a96
https://github.com/DrSleep/nas-segm-pytorch/tree/5de0c5c60cc05f94305ff59ae9f822656e3e7a96
NonLocal2D
# 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....
Yuliang-Liu/bezier_curve_text_spotting
NonLocal2D
false
14,729
[ "BSD-2-Clause" ]
423
8986ff0eb7f9ccd5943cc46191bded2affdfe61f
https://github.com/Yuliang-Liu/bezier_curve_text_spotting/tree/8986ff0eb7f9ccd5943cc46191bded2affdfe61f
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....
Novemser/fairseq
MultiheadAttention
false
11,769
[ "BSD-3-Clause" ]
0
b9e29a4711a6c0b7923879d5d59f3e879f0f228a
https://github.com/Novemser/fairseq/tree/b9e29a4711a6c0b7923879d5d59f3e879f0f228a
channel_attention
import torch from torch import nn class channel_attention(nn.Module): def __init__(self, in_channels, feature_size): super(channel_attention, self).__init__() self.fc1 = nn.Linear(feature_size * feature_size, feature_size, bias=False) self.relu1 = nn.ReLU(inplace=True) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
SCUT-AILab/AFA
channel_attention
false
17,885
[ "BSD-3-Clause" ]
7
acfb42236ce0114d63f22a821fc5954c8c149f45
https://github.com/SCUT-AILab/AFA/tree/acfb42236ce0114d63f22a821fc5954c8c149f45
DisparityConv
import torch import torch.nn as nn class DisparityConv(nn.Module): def __init__(self, max_shift, output_nc): super().__init__() self.max_shift = int(max_shift) self.conv = nn.Conv2d(self.max_shift, output_nc, kernel_size=3, stride=1, padding=1, bias=True) def forward(self...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch....
jiupinjia/neural-magic-eye
DisparityConv
false
15,701
[ "MIT" ]
59
ded1cd4fc2194fe031f76bc3a2c307e761f70d85
https://github.com/jiupinjia/neural-magic-eye/tree/ded1cd4fc2194fe031f76bc3a2c307e761f70d85
WeightedL2WithSigmaLoss
import math import torch import numpy as np import torch.nn as nn import torch.utils.data import torch.autograd class WeightedL2WithSigmaLoss(nn.Module): def __init__(self, code_weights: 'list'=None): super(WeightedL2WithSigmaLoss, self).__init__() if code_weights is not None: self.co...
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 import numpy as np import torch.nn as nn import torch.utils.data im...
LaudateCorpus1/LIGA-Stereo
WeightedL2WithSigmaLoss
false
13,989
[ "Apache-2.0" ]
56
aee3731a24a0ab1667e633e520cc89be2f135272
https://github.com/LaudateCorpus1/LIGA-Stereo/tree/aee3731a24a0ab1667e633e520cc89be2f135272
DQN_xy4
# 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 ...
CoAxLab/azad
DQN_xy4
false
17,187
[ "MIT" ]
6
d1498069dd8856e93ae077b34dd7c9f1c7ce80e6
https://github.com/CoAxLab/azad/tree/d1498069dd8856e93ae077b34dd7c9f1c7ce80e6
BahdanauAttention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import n...
Emotional-Text-to-Speech/tacotron_pytorch
BahdanauAttention
false
5,131
[ "MIT" ]
1
e6b1a3907afb01fe31bcbd77c677667adf6733f5
https://github.com/Emotional-Text-to-Speech/tacotron_pytorch/tree/e6b1a3907afb01fe31bcbd77c677667adf6733f5
Layer4NN
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn import torch....
naruarjun/SADAM-reproducibility
Layer4NN
false
12,821
[ "MIT" ]
0
1654804268ae984f49abc3ab2495c350dc09a3e2
https://github.com/naruarjun/SADAM-reproducibility/tree/1654804268ae984f49abc3ab2495c350dc09a3e2
MaxPool
# 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 import torch.nn as nn from torch import optim as optim import tor...
Exir-lxr/crldr-prune-pytorch
MaxPool
false
2,276
[ "Apache-2.0" ]
0
adeb5e0b24ce66ff9531d4d947f72412c1b5c033
https://github.com/Exir-lxr/crldr-prune-pytorch/tree/adeb5e0b24ce66ff9531d4d947f72412c1b5c033
CNNLayer
import torch import torch.nn as nn class CNNLayer(nn.Module): """Conv1d layer. nn.Conv1d layer require the input shape is (batch_size, in_channels, length), however, our input shape is (batch_size, length, in_channels), so we need to transpose our input data into (B, C, L_in) and send it to conv layer...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
WiseDoge/Text-Classification-PyTorch
CNNLayer
false
18,095
[ "MIT" ]
6
9371eeed6bd7ecf1d529c8f2a6c997fcde67a559
https://github.com/WiseDoge/Text-Classification-PyTorch/tree/9371eeed6bd7ecf1d529c8f2a6c997fcde67a559
FFNNDual
import torch import torch.utils.data from torch import nn class FFNNDual(nn.Module): def __init__(self, input_size, hidden_size_1, hidden_size_2, hidden_dropout_prob_1, hidden_dropout_prob_2): super(FFNNDual, self).__init__() self.input_size = input_size self.hidden_size_1 = hidde...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
MaurizioFD/recsys-challenge-2020-twitter
FFNNDual
false
8,524
[ "Apache-2.0" ]
44
95dc024fb4f8777aa62e1304536daece640428de
https://github.com/MaurizioFD/recsys-challenge-2020-twitter/tree/95dc024fb4f8777aa62e1304536daece640428de
LayerNormLSTMCell
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel import torch.utils.data class LayerNormLSTMCell(nn.LSTMCell): def __init__(self, input_size, hidden_size, bias=True): super().__init__(input_size, hidden_size, bias) self.ln_ih = nn.LayerNorm(4 * hidden_si...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
drgripa1/deepvecfont
LayerNormLSTMCell
false
15,241
[ "MIT" ]
68
a44d81ba19a22e43b4e576cd8ebc5c2fd961a621
https://github.com/drgripa1/deepvecfont/tree/a44d81ba19a22e43b4e576cd8ebc5c2fd961a621
TransformerEncoderLayer
import math import torch from typing import Callable from typing import Optional from typing import Tuple from typing import List from typing import Dict from typing import Union from typing import Any import torch.utils.data import torch.nn.functional as F import torch.nn import torch.cuda import torch.backends.cudnn ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
RobertCsordas/tcf
TransformerEncoderLayer
false
17,876
[ "MIT" ]
5
da20530dfb4336deddfbe5e79d62e72d1dc2580e
https://github.com/RobertCsordas/tcf/tree/da20530dfb4336deddfbe5e79d62e72d1dc2580e
net
import torch import torch.nn as nn import torch.nn.functional as F class net(nn.Module): def __init__(self, input_dim, output_dim): super(net, self).__init__() self.fc1 = nn.Linear(input_dim, 30) self.fc1.weight.data.normal_(0, 1) self.fc2 = nn.Linear(30, 20) self.fc2.weig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
Kernels-K/DDPG-pytorch-
net
false
8,390
[ "MIT" ]
26
9a80a56f52f2232e5bd197521d3d2d388b48c882
https://github.com/Kernels-K/DDPG-pytorch-/tree/9a80a56f52f2232e5bd197521d3d2d388b48c882
CNN
import torch from torch import nn from torch.nn import functional as F class CNN(nn.Module): """ conv1, conv2 two convolution layers. fc1, fc2 two fully connected layers. fc3 output layer relu activation function for hidden layers sigmoid activation func...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
EE559DeepLearningEPFL/Project1
CNN
false
406
[ "MIT" ]
0
cbafdfee26771ae0ba3cd36375e68d92e9f108b2
https://github.com/EE559DeepLearningEPFL/Project1/tree/cbafdfee26771ae0ba3cd36375e68d92e9f108b2
feedforwardLayer
# 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....
ayyyq/T-LSTM
feedforwardLayer
false
6,320
[ "MIT" ]
1
36dbc88ac710d3925851cd87c2368ecfc7061b70
https://github.com/ayyyq/T-LSTM/tree/36dbc88ac710d3925851cd87c2368ecfc7061b70
MaxPoolTrinary
# 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...
C-SUNSHINE/TOQ-Nets-PyTorch-Release
MaxPoolTrinary
false
17,131
[ "MIT" ]
6
05e06bf633fb3c6b610dda9a5126ecd7af1db02f
https://github.com/C-SUNSHINE/TOQ-Nets-PyTorch-Release/tree/05e06bf633fb3c6b610dda9a5126ecd7af1db02f
SmoothL1Loss
import torch import torch.nn as nn import torch.cuda import torch.distributed import torch.multiprocessing class SmoothL1Loss(nn.Module): """Smooth L1 Loss""" def __init__(self, beta=0.11): super().__init__() self.beta = beta def forward(self, pred, target): x = (pred - target).a...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn import torch.cuda import torch.distributed import t...
Mo5mami/retinanet-examples
SmoothL1Loss
false
14,046
[ "BSD-3-Clause" ]
848
f7ad4ff6a99fe3e66f8a9c8e8a6e03b870f84700
https://github.com/Mo5mami/retinanet-examples/tree/f7ad4ff6a99fe3e66f8a9c8e8a6e03b870f84700
Hsigmoid
import torch import torch.nn as nn from torch.quantization import QuantStub from torch.quantization import DeQuantStub class Hsigmoid(nn.Module): def __init__(self, add_stub=False): super().__init__() self.quant = QuantStub() self.dequant = DeQuantStub() self.add_stub = add_stub ...
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 torch.quantization import QuantStub from torch.quantization im...
Archermmt/tvm
Hsigmoid
false
11,203
[ "Apache-2.0" ]
0
8b900cec1a9c3cb453e159db4d497ebeb26ed289
https://github.com/Archermmt/tvm/tree/8b900cec1a9c3cb453e159db4d497ebeb26ed289
_Transition
# 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...
yifanpu001/PytorchToCaffe
_Transition
false
4,720
[ "MIT" ]
0
37c1ebfc3547e93b1c174721036d03c831c60e48
https://github.com/yifanpu001/PytorchToCaffe/tree/37c1ebfc3547e93b1c174721036d03c831c60e48
Attention
from _paritybench_helpers import _mock_config import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import * class Attention(nn.Module): def __init__(self, opt): super(Attention, self).__init__() self.rnn_size = opt.rnn_size self.att_hid_size = opt.att_hid...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Romero027/ImageCaptioning.pytorch
Attention
false
4,309
[ "MIT" ]
0
069c95f5d343fb126afa8b10ec18e472f30b7b35
https://github.com/Romero027/ImageCaptioning.pytorch/tree/069c95f5d343fb126afa8b10ec18e472f30b7b35
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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
BHD233/PaddleOCR2Pytorch
Hswish
false
13,357
[ "Apache-2.0" ]
364
f114069b3e2669c6adf0adf9596756205f184c9c
https://github.com/BHD233/PaddleOCR2Pytorch/tree/f114069b3e2669c6adf0adf9596756205f184c9c
SmallMnistNoDropout
# 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....
arjunsuresh/aimet
SmallMnistNoDropout
false
12,216
[ "BSD-3-Clause" ]
0
f6e09cb07a91eed3a5e6b8e19e6b065303af5a39
https://github.com/arjunsuresh/aimet/tree/f6e09cb07a91eed3a5e6b8e19e6b065303af5a39
GAT
# 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....
markheimann/fgc
GAT
false
12,773
[ "MIT" ]
0
909d4f0a84c9b61a8030f9f3f50b17f143576007
https://github.com/markheimann/fgc/tree/909d4f0a84c9b61a8030f9f3f50b17f143576007
AE_3D_50
import torch import torch.nn as nn import torch.utils.data class AE_3D_50(nn.Module): def __init__(self, n_features=4): super(AE_3D_50, self).__init__() self.en1 = nn.Linear(n_features, 50) self.en2 = nn.Linear(50, 50) self.en3 = nn.Linear(50, 20) self.en4 = nn.Linear(20, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
gitter-badger/HEPAutoencoders
AE_3D_50
false
12,425
[ "Apache-2.0" ]
0
43010cd66fa4335a04b30b87926148e1c8d92de9
https://github.com/gitter-badger/HEPAutoencoders/tree/43010cd66fa4335a04b30b87926148e1c8d92de9
Conv
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
moritztng/stylegan2-pytorch
Conv
false
4,030
[ "MIT" ]
0
8827eae2e76c54b7406b34b2d49563ae53b04001
https://github.com/moritztng/stylegan2-pytorch/tree/8827eae2e76c54b7406b34b2d49563ae53b04001
pixelwise_norm_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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
mikanCan/PG-GAN
pixelwise_norm_layer
false
10,640
[ "MIT" ]
0
bc4a1bd2101f836c22a164174381f80b3f5c73c1
https://github.com/mikanCan/PG-GAN/tree/bc4a1bd2101f836c22a164174381f80b3f5c73c1
MultiHeadedAttention
import math import torch from torch import Tensor import torch.nn as nn class MultiHeadedAttention(nn.Module): """ Multi-Head Attention module from "Attention is All You Need" Implementation modified from OpenNMT-py. https://github.com/OpenNMT/OpenNMT-py """ def __init__(self, num_heads: 'in...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
AlexShypula/joeynmt
MultiHeadedAttention
false
8,869
[ "Apache-2.0" ]
0
045f86916dbebc4fbaccaaec17b8c7f665392194
https://github.com/AlexShypula/joeynmt/tree/045f86916dbebc4fbaccaaec17b8c7f665392194
MultiHeadAttention
import torch import torch.nn as nn import torch.nn.functional as F class MultiHeadAttention(nn.Module): """ input: query --- [N, T_q, query_dim] key --- [N, T_k, key_dim] output: out --- [N, T_q, num_units] """ def __init__(self, query_dim, key_dim, num_units, num_heads): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Sala7efelninja/GST-Tacotron
MultiHeadAttention
false
11,854
[ "MIT" ]
0
e69a5663832a2c3639d4afbb85092a35be621380
https://github.com/Sala7efelninja/GST-Tacotron/tree/e69a5663832a2c3639d4afbb85092a35be621380
SACActorNetwork
import torch import torch.nn.functional as F import torch.nn as nn class SACActorNetwork(nn.Module): def __init__(self, input_shape, output_shape, n_features, **kwargs): super(SACActorNetwork, self).__init__() n_input = input_shape[-1] n_output = output_shape[0] self._h1 = nn.Line...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
benvoe/mushroom-rl-benchmark
SACActorNetwork
false
1,536
[ "MIT" ]
0
217d8c077bf6f3febaed92821a2cf183c83f703b
https://github.com/benvoe/mushroom-rl-benchmark/tree/217d8c077bf6f3febaed92821a2cf183c83f703b
h_swish
# 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...
SpikeKing/MobileNetV3-Classification-PyTorch
h_swish
false
11,890
[ "MIT" ]
0
ab8d64c27ace7c70bfd1611bd8452947218d9b21
https://github.com/SpikeKing/MobileNetV3-Classification-PyTorch/tree/ab8d64c27ace7c70bfd1611bd8452947218d9b21
ResidualAttentionBlock
import math import torch import torch as th import torch.nn as nn class LayerNorm(nn.LayerNorm): """ Implementation that supports fp16 inputs but fp32 gains/biases. """ def forward(self, x: 'th.Tensor'): return super().forward(x.float()) class QKVMultiheadAttention(nn.Module): def __in...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
dashstander/glide-text2im
ResidualAttentionBlock
false
1,814
[ "MIT" ]
0
58f03a871ee0567e27fccc40df98203e675a9b8e
https://github.com/dashstander/glide-text2im/tree/58f03a871ee0567e27fccc40df98203e675a9b8e
EqualLinearActModule
import torch import torch.nn as nn from copy import deepcopy from functools import partial from torch.nn.init import _calculate_correct_fan def equalized_lr(module, name='weight', gain=2 ** 0.5, mode='fan_in', lr_mul=1.0): """Equalized Learning Rate. This trick is proposed in: Progressive Growing of ...
import torch from torch._inductor.select_algorithm import extern_kernels import 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 copy import deepcopy from functools import partial fr...
Juggernaut93/mmediting
EqualLinearActModule
false
13,916
[ "Apache-2.0" ]
1,884
8ef46ace29756dd2df1d92f2f73a33646e33e007
https://github.com/Juggernaut93/mmediting/tree/8ef46ace29756dd2df1d92f2f73a33646e33e007
PFLDLoss
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data from typing import * class PFLDLoss(nn.Module): """Weighted loss of L2 distance with the pose angle for PFLD.""" def __init__(self): super(PFLDLoss, self).__init__() def forward(self, landmark_...
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.parallel import torch.optim import ...
Johnsonms/NNI_master
PFLDLoss
false
11,596
[ "MIT" ]
0
e5e5c7aed89cf3189cffe1056464833c15eb54ff
https://github.com/Johnsonms/NNI_master/tree/e5e5c7aed89cf3189cffe1056464833c15eb54ff
conv_head_pooling
import torch import torch.nn as nn class conv_head_pooling(nn.Module): def __init__(self, in_feature, out_feature, stride, padding_mode='zeros'): super(conv_head_pooling, self).__init__() self.conv = nn.Conv2d(in_feature, out_feature, kernel_size=stride + 1, padding=stride // 2, strid...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
Equationliu/GA-Attack
conv_head_pooling
false
17,263
[ "MIT" ]
8
b0280674a211f6451774ec6b1d4cee2fc19a4de6
https://github.com/Equationliu/GA-Attack/tree/b0280674a211f6451774ec6b1d4cee2fc19a4de6
SynthWide256
import torch import torch.nn as nn import torch.nn.functional as F class SynthWide256(nn.Module): def __init__(self, num_c=10, f=1): super(SynthWide256, self).__init__() self.pool = nn.MaxPool2d(2, 2) self.conv1 = nn.Conv2d(3, 32 * f, 3, padding=1) self.conv2 = nn.Conv2d(32 * f, 6...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
dengliming/iotnets
SynthWide256
false
1,873
[ "MIT" ]
0
db744e56769c799dbf765a27fc5aa91e3edeaaa3
https://github.com/dengliming/iotnets/tree/db744e56769c799dbf765a27fc5aa91e3edeaaa3
AvgPool
# 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...
Raiselimit/TorchBlocks
AvgPool
false
5,736
[ "MIT" ]
1
a5baecb9a2470ff175087475630f2b7db3f7ef51
https://github.com/Raiselimit/TorchBlocks/tree/a5baecb9a2470ff175087475630f2b7db3f7ef51
SimpleAttention
# 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....
TahaBinhuraib/lexical
SimpleAttention
false
2,878
[ "MIT" ]
0
0af02590829755f9ae2268fed76ea4b6d38e9b61
https://github.com/TahaBinhuraib/lexical/tree/0af02590829755f9ae2268fed76ea4b6d38e9b61
UNETWithoutConcat
import torch from torch import nn class UNETWithoutConcat(nn.Module): """UNET Without concatenation during decoding""" def __init__(self): super(UNETWithoutConcat, self).__init__() self.conv1_1 = nn.Conv2d(in_channels=3, out_channels=16, kernel_size=3, stride=1, padding=1) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_s...
quenting44/semantic_segmentation
UNETWithoutConcat
false
10,831
[ "MIT" ]
0
bd197ddda3c6891d69ff7e552a0c224c7ec1269a
https://github.com/quenting44/semantic_segmentation/tree/bd197ddda3c6891d69ff7e552a0c224c7ec1269a
GAT
import torch import torch.nn.functional as F import torch.nn as nn class GraphAttentionLayer(nn.Module): """ Simple GAT layer, similar to https://arxiv.org/abs/1710.10903 """ def __init__(self, in_features, out_features, dropout, alpha, concat=True): super(GraphAttentionLayer, self).__init__(...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Anou9531/GUA
GAT
false
7,795
[ "MIT" ]
20
354acceb69656e76fb4ee296c66ae42c18cd939f
https://github.com/Anou9531/GUA/tree/354acceb69656e76fb4ee296c66ae42c18cd939f
BalancedNet
import torch import torch.nn as nn from torch import logsumexp as logsumexp import torch.nn.functional as F class BalancedNet(nn.Module): """A torch.model used as a component of the HEMM module to determine the outcome as a function of confounders. The balanced net consists of two different neural networks 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._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
liranszlak/causallib
BalancedNet
false
15,920
[ "Apache-2.0" ]
350
2636149f6b1e307672aff638a53f8eaf2be56bc9
https://github.com/liranszlak/causallib/tree/2636149f6b1e307672aff638a53f8eaf2be56bc9
SimpleAbsModule
# 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.jit import torch.onnx import torch.nn assert_size_stride = t...
opti-mix/glow
SimpleAbsModule
false
7,384
[ "Apache-2.0" ]
1
4ba074df5da9822986a23a6679ab592c22660f6d
https://github.com/opti-mix/glow/tree/4ba074df5da9822986a23a6679ab592c22660f6d
RatioModel
import torch import torch.nn.functional as F class RatioModel(torch.nn.Module): def __init__(self, D_in, hidden_unit_num): super().__init__() None self.l1 = torch.nn.Linear(D_in, hidden_unit_num) self.l2 = torch.nn.Linear(hidden_unit_num, hidden_unit_num) self.l3 = torch.n...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 as...
numahha/wmopo
RatioModel
false
7,358
[ "MIT" ]
1
1557dab2e8168c1f2e53ffbc435b4000680f1d28
https://github.com/numahha/wmopo/tree/1557dab2e8168c1f2e53ffbc435b4000680f1d28
InstanceSimilarity
# 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....
Tiamat-Tech/ZAQ-code
InstanceSimilarity
false
14,497
[ "MIT" ]
55
e7e9f55791e36c6784d58c356d3ced76a7583369
https://github.com/Tiamat-Tech/ZAQ-code/tree/e7e9f55791e36c6784d58c356d3ced76a7583369
HighwayLayer
import torch import torch.nn as nn import torch.nn.functional as F import torch.onnx.operators class HighwayLayer(nn.Module): def __init__(self, input_dim, transform_activation=F.relu, gate_activation=F.softmax, gate_bias=-2): super().__init__() self.highway_transform_activation = transfo...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
vincentLiangBerkeley/translate
HighwayLayer
false
4,497
[ "BSD-3-Clause" ]
0
734ae1ad9dfb778935e4825b5ce2687e2df559ea
https://github.com/vincentLiangBerkeley/translate/tree/734ae1ad9dfb778935e4825b5ce2687e2df559ea