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
DSCNet
# 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...
ShulingTang/DSC-Net
DSCNet
false
9,506
[ "MIT" ]
0
2da1e0c654b045057c654cbcbb8a8c23fb832c9d
https://github.com/ShulingTang/DSC-Net/tree/2da1e0c654b045057c654cbcbb8a8c23fb832c9d
DistillLoss
import torch from torch import nn import torch.nn.functional as F class DistillLoss(nn.Module): def __init__(self, temperature, distillation_weight): super().__init__() self.temperature = temperature self.distillation_weight = distillation_weight self.kldiv = nn.KLDivLoss(reductio...
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 ...
mrtunguyen/knowledge_distillation
DistillLoss
false
7,292
[ "MIT" ]
1
dd114e980dbebda6cc247f658eb801ab948ee6ba
https://github.com/mrtunguyen/knowledge_distillation/tree/dd114e980dbebda6cc247f658eb801ab948ee6ba
Q_Critic
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
XinJingHao/RL
Q_Critic
false
18,100
[ "MIT" ]
6
eed54d6602b173e45ede722b0fcf82b5a203f14a
https://github.com/XinJingHao/RL/tree/eed54d6602b173e45ede722b0fcf82b5a203f14a
RingLoss
import torch import warnings import torch.nn as nn class RingLoss(nn.Module): """Ring loss. Reference: Zheng et al. Ring loss: Convex Feature Normalization for Face Recognition. CVPR 2018. """ def __init__(self): super(RingLoss, self).__init__() warnings.warn('This method is ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import warnings import torch.nn as nn assert_size_stride = torch._C._dynamo.gua...
Danish-VSL/deep-person-reid
RingLoss
false
13,571
[ "MIT" ]
244
2e3a4b6706b84c77203f9905683b917ab0871b93
https://github.com/Danish-VSL/deep-person-reid/tree/2e3a4b6706b84c77203f9905683b917ab0871b93
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 from torch._inductor.runtime.triton_helpers import libdevice from torch import n...
Holmes-Alan/RefVAE
ConvBlock
false
8,262
[ "MIT" ]
13
836b8f1168f1b0f923b609a48e202ace7806f79c
https://github.com/Holmes-Alan/RefVAE/tree/836b8f1168f1b0f923b609a48e202ace7806f79c
Net2
import torch import torch.nn as nn from torch.testing._internal.common_utils import * class MyRelu2(torch.autograd.Function): @staticmethod def forward(ctx, input): ctx.save_for_backward(input) return input.clamp(min=0) class Net2(nn.Module): def __init__(self): super().__init_...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn from torch.testing._internal.common_utils import * assert_size_stri...
LexcaliburR/notebook
Net2
false
7,611
[ "MIT" ]
1
84a8f3801dff20d07caa0ed2584e722656fb5726
https://github.com/LexcaliburR/notebook/tree/84a8f3801dff20d07caa0ed2584e722656fb5726
SpatialAttention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
Neronjust2017/challenge2020_test4
SpatialAttention
false
9,472
[ "BSD-2-Clause" ]
0
6494107a459b563aa51f8ea75c580c17557b13af
https://github.com/Neronjust2017/challenge2020_test4/tree/6494107a459b563aa51f8ea75c580c17557b13af
BoundaryDiscriminator
import torch import torch.nn as nn class BoundaryDiscriminator(nn.Module): def __init__(self): super(BoundaryDiscriminator, self).__init__() filter_num_list = [64, 128, 256, 512, 1] self.conv1 = nn.Conv2d(1, filter_num_list[0], kernel_size=4, stride =2, padding=2, bias=False) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
JACKYLUO1991/DCBNet
BoundaryDiscriminator
false
17,468
[ "MIT" ]
6
b797584b66ad99fe984f58268befb12ec60ccfae
https://github.com/JACKYLUO1991/DCBNet/tree/b797584b66ad99fe984f58268befb12ec60ccfae
C3D
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn assert_size_stride = torch._C._dynamo.guar...
Schmiddo/d2conv3d
C3D
false
8,748
[ "MIT" ]
16
9b330be56f0dfb9657a63e3fb3394ab36b35a67b
https://github.com/Schmiddo/d2conv3d/tree/9b330be56f0dfb9657a63e3fb3394ab36b35a67b
ThreeNet
import torch import torch.nn as nn class ThreeNet(nn.Module): """ A network with three layers. This is used for testing a network with more than one operation. The network has a convolution layer followed by two fully connected layers. """ def __init__(self, input_dim: 'int', conv_dim: 'int',...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
Jennifer-Rigdon/fvcore
ThreeNet
false
5,404
[ "Apache-2.0" ]
1
7e800a86f2df93da017e07380543b4060ab88c94
https://github.com/Jennifer-Rigdon/fvcore/tree/7e800a86f2df93da017e07380543b4060ab88c94
DilateConv
# 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...
donghaW/RCF-pytorch
DilateConv
false
1,857
[ "MIT" ]
0
6380209ef747abefa87637e60d33369ba423814d
https://github.com/donghaW/RCF-pytorch/tree/6380209ef747abefa87637e60d33369ba423814d
SoftmaxAttention
import torch import torch.nn as nn def masked_softmax(tensor, mask): """ Apply a masked softmax on the last dimension of a tensor. The input tensor and mask should be of size (batch, *, sequence_length). Args: tensor: The tensor on which the softmax function must be applied along ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
marvosyntactical/fs2018ex3viz
SoftmaxAttention
false
7,179
[ "Apache-2.0" ]
1
9002133a45b52c596efa91d842f691fe1f066a6c
https://github.com/marvosyntactical/fs2018ex3viz/tree/9002133a45b52c596efa91d842f691fe1f066a6c
Net
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Hunkzer/DLplayground
Net
false
11,499
[ "Apache-2.0" ]
0
c85238e00052a80e6a59e5d1c705014c45eeb6aa
https://github.com/Hunkzer/DLplayground/tree/c85238e00052a80e6a59e5d1c705014c45eeb6aa
AlbertAttention
# 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....
ncoop57/transformers
AlbertAttention
false
4,069
[ "Apache-2.0" ]
0
d7e156bd1ae2467e9ea1dbc44f31da0ed2296aee
https://github.com/ncoop57/transformers/tree/d7e156bd1ae2467e9ea1dbc44f31da0ed2296aee
NonBlurryLoss
import torch from torch import nn class NonBlurryLoss(nn.Module): def __init__(self): """ Loss on the distance to 0.5 """ super(NonBlurryLoss, self).__init__() self.mse = nn.MSELoss() def forward(self, x): return 1 - self.mse(x, torch.ones_like(x) * 0.5) def...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
GuYuanjie/Deep-Retinex-fusion
NonBlurryLoss
false
17,348
[ "MIT" ]
5
ffa2a1689fd512c8820fd87cbf665c09bcb142b4
https://github.com/GuYuanjie/Deep-Retinex-fusion/tree/ffa2a1689fd512c8820fd87cbf665c09bcb142b4
Relu
from torch.nn import Module import torch class Relu(Module): def forward(self, inp): return inp.clamp_min(0.0) - 0.5 def bwd(self, out, inp): inp.g = (inp > 0).float() * out.g 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 from torch.nn import Module assert_size_stride = torch._C._dynamo.guards.assert_size_stri...
Akramz/Impractical-DL
Relu
false
11,152
[ "MIT" ]
0
ff909e369fb765c0857800925e39c433057ae8ac
https://github.com/Akramz/Impractical-DL/tree/ff909e369fb765c0857800925e39c433057ae8ac
CustomClassificationHead
# 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...
y-kamiya/emotion-classification
CustomClassificationHead
false
4,712
[ "MIT" ]
0
8d5b6ab4aafd60607260dc87e5360c04bf149e18
https://github.com/y-kamiya/emotion-classification/tree/8d5b6ab4aafd60607260dc87e5360c04bf149e18
Transform
import torch import torch.nn as nn def calc_mean_std(feat, eps=1e-05): size = feat.size() assert len(size) == 4 N, C = size[:2] feat_var = feat.view(N, C, -1).var(dim=2) + eps feat_std = feat_var.sqrt().view(N, C, 1, 1) feat_mean = feat.view(N, C, -1).mean(dim=2).view(N, C, 1, 1) return fe...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
HalbertCH/IEContraAST
Transform
false
8,289
[ "MIT" ]
39
50ee949f5302a7e4a3cae3226610c03462093c21
https://github.com/HalbertCH/IEContraAST/tree/50ee949f5302a7e4a3cae3226610c03462093c21
SimulatorReward
import torch import torch.nn.functional as F class SimulatorReward(torch.nn.Module): def __init__(self): super(SimulatorReward, self).__init__() self.conv1 = torch.nn.Conv2d(4, 8, kernel_size=3, padding=1) self.conv2 = torch.nn.Conv2d(8, 16, kernel_size=3, padding=1) self.conv3 = ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Tuantrung/DeepReinforcementLearningInAction
SimulatorReward
false
14,516
[ "MIT" ]
474
8afda00a8211326c540b5de5a964d62a7f29a70c
https://github.com/Tuantrung/DeepReinforcementLearningInAction/tree/8afda00a8211326c540b5de5a964d62a7f29a70c
Conv2d_depthwise_sep
# 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...
maet3608/torchy
Conv2d_depthwise_sep
false
3,962
[ "Apache-2.0" ]
0
8c73732a1d4631bd97bfafdc18e52a22ff5410f7
https://github.com/maet3608/torchy/tree/8c73732a1d4631bd97bfafdc18e52a22ff5410f7
TransposeGatedConv2d
import torch import torch.nn as nn from torch.nn import functional as F from torch.nn import Parameter def l2normalize(v, eps=1e-12): return v / (v.norm() + eps) class LayerNorm(nn.Module): def __init__(self, num_features, eps=1e-08, affine=True): super(LayerNorm, self).__init__() self.num_...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
kangzhiq/DeepFillv2_Pytorch
TransposeGatedConv2d
false
10,445
[ "MIT" ]
0
9c7ed61b25bb995713f89108b712490737abe1b1
https://github.com/kangzhiq/DeepFillv2_Pytorch/tree/9c7ed61b25bb995713f89108b712490737abe1b1
Hswish
import torch import torch.nn as nn import torch.quantization class Hsigmoid(nn.Module): def __init__(self, inplace=True): super(Hsigmoid, self).__init__() self.float_op = nn.quantized.FloatFunctional() self.relu6 = nn.ReLU6(inplace=inplace) def forward(self, x): relu6 = self....
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.quantization assert_size_stride = torch._C._dynamo.gua...
Edgecortix-Inc/pytorch_quantization
Hswish
false
8,080
[ "Apache-2.0" ]
13
ad7120439f473d539adec22930a8363bfb63e830
https://github.com/Edgecortix-Inc/pytorch_quantization/tree/ad7120439f473d539adec22930a8363bfb63e830
RNN
import torch import torch.nn as nn from torch.autograd import Variable class RNN(nn.Module): def __init__(self, category_size, input_size, hidden_size, output_size): super(RNN, self).__init__() self.category_size = category_size self.input_size = input_size self.hidden_size = hidd...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from torch.autograd import Variable assert_size_stride = t...
ChronosMasterOfAllTime/practical-pytorch
RNN
false
11,313
[ "MIT" ]
0
ed9567cec05ac348063c11963b6d05065fec3578
https://github.com/ChronosMasterOfAllTime/practical-pytorch/tree/ed9567cec05ac348063c11963b6d05065fec3578
EmbedNet
from _paritybench_helpers import _mock_config import torch from torchvision.transforms import functional as F import torch.utils.data from torch import nn import torch.nn.functional as F class EmbedNet(nn.Module): def __init__(self, cfg): super(EmbedNet, self).__init__() self.embed_conv1 = nn.Con...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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
EncoderBlock
# 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....
howardchenhd/Transformer-pytorch
EncoderBlock
false
6,849
[ "MIT" ]
1
ae71ed5767272feb7e717be6d5bfce46f80ec57a
https://github.com/howardchenhd/Transformer-pytorch/tree/ae71ed5767272feb7e717be6d5bfce46f80ec57a
Return
import torch import numpy as np class Return(torch.nn.Module): def __init__(self, discount_factor): super().__init__() assert 0 <= discount_factor < 1 self.coefficient = 1 / (1 - discount_factor) self.min_reward = np.float32(-1) self.max_reward = np.float32(1) self...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import numpy as np assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strid...
P-Schumacher/tonic
Return
false
9,345
[ "MIT" ]
0
8d45a1668a3d60430bb36a7119947fc97d2690aa
https://github.com/P-Schumacher/tonic/tree/8d45a1668a3d60430bb36a7119947fc97d2690aa
NetworkDQN
# 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_...
doganjr/MarioDQN
NetworkDQN
false
6,618
[ "MIT" ]
1
62daa390f8ee0b732275e71675a2b9eae85c43a4
https://github.com/doganjr/MarioDQN/tree/62daa390f8ee0b732275e71675a2b9eae85c43a4
TemporalAggregation_Mean
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from math import sqrt as sqrt from itertools import product as product assert_size_stride = torch._C._dynamo.guards.as...
burhanmudassar/pytorch-action-detection
TemporalAggregation_Mean
false
1,666
[ "MIT" ]
0
16afb9312248d73c0e2be56ac733e0a33040307e
https://github.com/burhanmudassar/pytorch-action-detection/tree/16afb9312248d73c0e2be56ac733e0a33040307e
GMP
import torch class GMP(torch.nn.Module): """A global max pooling module. Args: dim (int): The dimension at which to compute the maximum. """ def __init__(self, dim: 'int'): super().__init__() self.dim = dim def forward(self, x): return x.max(dim=self.dim)[0] de...
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...
CLARITI-REPHRAIN/mumin-trawl
GMP
false
2,074
[ "MIT" ]
0
8a7eda49d8740e927332cd3972750d0b54c23eb1
https://github.com/CLARITI-REPHRAIN/mumin-trawl/tree/8a7eda49d8740e927332cd3972750d0b54c23eb1
SimpleLogSoftmaxModel
import torch import torch.nn.functional as F import torch.jit import torch.onnx import torch.nn class SimpleLogSoftmaxModel(torch.nn.Module): def __init__(self, dimension): super(SimpleLogSoftmaxModel, self).__init__() self.dimension = dimension def forward(self, tensor): return F.lo...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.jit impor...
opti-mix/glow
SimpleLogSoftmaxModel
false
7,413
[ "Apache-2.0" ]
1
4ba074df5da9822986a23a6679ab592c22660f6d
https://github.com/opti-mix/glow/tree/4ba074df5da9822986a23a6679ab592c22660f6d
MaskedWordPredictions
# 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...
Cyndi-Tokyotech/Fin_Text_Analysis_ML
MaskedWordPredictions
false
10,821
[ "MIT" ]
0
7f9b6c1ea78f8e6f32c003b2de32809722df88d4
https://github.com/Cyndi-Tokyotech/Fin_Text_Analysis_ML/tree/7f9b6c1ea78f8e6f32c003b2de32809722df88d4
EqualConvTranspose2d
# 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...
justinjohn0306/CIPS-3D
EqualConvTranspose2d
false
7,002
[ "MIT" ]
1
69a910a7841846419a6b5e03182c8cf061a82584
https://github.com/justinjohn0306/CIPS-3D/tree/69a910a7841846419a6b5e03182c8cf061a82584
HardSigmoid
# 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...
DocYard-ai/UCR
HardSigmoid
false
8,002
[ "Apache-2.0" ]
10
7618aa336f56e71d9fd8cdc2d591e3d138e3dc68
https://github.com/DocYard-ai/UCR/tree/7618aa336f56e71d9fd8cdc2d591e3d138e3dc68
Scaler
import torch from torch import nn class Scaler(nn.Module): def __init__(self, alpha=16.0): super().__init__() self.alpha = nn.Parameter(torch.tensor(alpha)) def forward(self, input): return self.alpha * input def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_in...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
YangXuanyue/Neural-Unaligned-Phoneme-Sequence-Prediction
Scaler
false
18,143
[ "BSD-3-Clause" ]
5
91ef1c95478367f5b421da125f07660cfc9bed98
https://github.com/YangXuanyue/Neural-Unaligned-Phoneme-Sequence-Prediction/tree/91ef1c95478367f5b421da125f07660cfc9bed98
CAMMNISTExtendedClassifier
import torch from torch import nn as nn from torch import optim as optim from torchvision import transforms as transforms from torch.nn.functional import pad class CAMMNISTExtendedClassifier(nn.Module): def __init__(self): super(CAMMNISTExtendedClassifier, self).__init__() self.conv1 = nn.Conv2d(...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 fr...
RobinMaas95/GTSRB_Visualization
CAMMNISTExtendedClassifier
false
1,017
[ "MIT" ]
0
fa837ff94e089a936ef4f4418970d262b35f70b6
https://github.com/RobinMaas95/GTSRB_Visualization/tree/fa837ff94e089a936ef4f4418970d262b35f70b6
Mul
# 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 as ch assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strid...
njwfish/ffcv
Mul
false
10,598
[ "Apache-2.0" ]
0
3c219787da2fb8dbdaab24e75f34b3398ad7b7d1
https://github.com/njwfish/ffcv/tree/3c219787da2fb8dbdaab24e75f34b3398ad7b7d1
PFF
import torch import torch.nn as nn class PFF(nn.Module): def __init__(self, model_dimension, width_mult=4): super().__init__() self.linear1 = nn.Linear(model_dimension, width_mult * model_dimension) self.linear2 = nn.Linear(width_mult * model_dimension, model_dimension) self.norm ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
AmitNikhade/MyTransformer
PFF
false
11,214
[ "Apache-2.0" ]
0
d717ee1db59ba60bb6b3f1b8a705f6ebed6df1e5
https://github.com/AmitNikhade/MyTransformer/tree/d717ee1db59ba60bb6b3f1b8a705f6ebed6df1e5
Get_gradient_nopadding
import torch import torch.nn as nn import torch.nn.functional as F class Get_gradient_nopadding(nn.Module): def __init__(self): super(Get_gradient_nopadding, self).__init__() kernel_v = [[0, -1, 0], [0, 0, 0], [0, 1, 0]] kernel_h = [[0, 0, 0], [-1, 0, 1], [0, 0, 0]] kernel_h = tor...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
eqprog/ESRGAN
Get_gradient_nopadding
false
12,346
[ "Apache-2.0" ]
0
d5eb02531cf0ce4e8df93793f3012486bac8d87a
https://github.com/eqprog/ESRGAN/tree/d5eb02531cf0ce4e8df93793f3012486bac8d87a
PositionalEncodingGenerator
# 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...
rosinality/vision-transformers-pytorch
PositionalEncodingGenerator
false
16,340
[ "MIT" ]
77
b884b5da79900c96e4ce17fbb575cf1c5cb3cd5f
https://github.com/rosinality/vision-transformers-pytorch/tree/b884b5da79900c96e4ce17fbb575cf1c5cb3cd5f
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.triton_helpers import libdevice, math as tl_math im...
eungbean/CoCosNet
ResidualBlock
false
15,330
[ "MIT" ]
319
f8007d9369cc11bc04709ef02dedbbf718d74414
https://github.com/eungbean/CoCosNet/tree/f8007d9369cc11bc04709ef02dedbbf718d74414
MemoryLayer
# 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....
MaryZolfaghar/WCSLS
MemoryLayer
false
811
[ "Apache-2.0" ]
0
fcb3bfd11c19bb90690ec772f91bbd107832d636
https://github.com/MaryZolfaghar/WCSLS/tree/fcb3bfd11c19bb90690ec772f91bbd107832d636
LogCoshLoss
import torch class LogCoshLoss(torch.nn.Module): def __init__(self): super().__init__() def forward(self, true, pred): loss = true - pred return torch.mean(torch.log(torch.cosh(loss + 1e-12))) def get_inputs(): return [torch.rand([4, 4, 4, 4]), 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 from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math assert_size...
CSID-DGU/-2020-1-OSSP1-ninetynine-2
LogCoshLoss
false
4,940
[ "MIT" ]
1
b1824254882eeea0ee44e4e60896b72c51ef1d2c
https://github.com/CSID-DGU/-2020-1-OSSP1-ninetynine-2/tree/b1824254882eeea0ee44e4e60896b72c51ef1d2c
MaxPoolStride1
import torch import torch.nn as nn import torch.nn.functional as F class MaxPoolStride1(nn.Module): def __init__(self, kernel_size): super(MaxPoolStride1, self).__init__() self.kernel_size = kernel_size self.pad = kernel_size - 1 def forward(self, x): padded_x = F.pad(x, (0, ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
AlexRogalskiy/smart-social-distancing
MaxPoolStride1
false
13,262
[ "Apache-2.0" ]
113
2def6738038035e67ac79fc9b72ba072e190321f
https://github.com/AlexRogalskiy/smart-social-distancing/tree/2def6738038035e67ac79fc9b72ba072e190321f
resblock
import torch from torch import nn class mfm(nn.Module): def __init__(self, in_channels, out_channels, kernel_size=3, stride=1, padding=1, type=1): super(mfm, self).__init__() self.out_channels = out_channels if type == 1: self.filter = nn.Conv2d(in_channels, 2 * out_ch...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
AnimeshKoratana/blurryface
resblock
false
50
[ "Apache-2.0" ]
0
c6cb5feec02f6d5af3acb1678336800390715d65
https://github.com/AnimeshKoratana/blurryface/tree/c6cb5feec02f6d5af3acb1678336800390715d65
NTN
# 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 ...
jinfenglin/TaxoExpan
NTN
false
15,694
[ "Apache-2.0" ]
55
86bd3f805508d03367539f2fdd43889fc0a4f6b2
https://github.com/jinfenglin/TaxoExpan/tree/86bd3f805508d03367539f2fdd43889fc0a4f6b2
MaxPool2dDynamicSamePadding
import math import torch import torch.nn.functional as F import torch.nn as nn class MaxPool2dDynamicSamePadding(nn.MaxPool2d): """2D MaxPooling like TensorFlow's 'SAME' mode, with a dynamic image size. The padding is operated in forward function by calculating dynamically. """ def __init__(self, ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
GavinHU66/DebugEntity
MaxPool2dDynamicSamePadding
false
11,436
[ "MIT" ]
0
21f38f01bdfbbc363a73f640331c6f04a121cf82
https://github.com/GavinHU66/DebugEntity/tree/21f38f01bdfbbc363a73f640331c6f04a121cf82
ReLU
import torch import numpy as np import torch.nn as nn from numbers import Number def normcdf(value, mu=0.0, stddev=1.0): sinv = 1.0 / stddev if isinstance(stddev, Number) else stddev.reciprocal() return 0.5 * (1.0 + torch.erf((value - mu) * sinv / np.sqrt(2.0))) def _normal_log_pdf(value, mu, stddev): v...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import numpy as np import torch.nn as nn from numbers import N...
DoggyLiu0116/MamboNet
ReLU
false
5,081
[ "MIT" ]
1
3b708091422491f660c4bd5eb12b06ce3b8a5f79
https://github.com/DoggyLiu0116/MamboNet/tree/3b708091422491f660c4bd5eb12b06ce3b8a5f79
Network
import torch import torch.nn as nn import torch.nn.functional as F class Network(nn.Module): def __init__(self, input_size, number_of_actions): super(Network, self).__init__() self.input_size = input_size self.number_of_actions = number_of_actions self.full_connection1 = nn.Linear...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
Radu-Raicea/self-driving-car-ai
Network
false
8,695
[ "MIT" ]
16
cf2b42472f7e78dd3bd530c0c7cd547988a8b0d2
https://github.com/Radu-Raicea/self-driving-car-ai/tree/cf2b42472f7e78dd3bd530c0c7cd547988a8b0d2
CNN
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_s...
zitkat/transformer-HTR
CNN
false
11,054
[ "Apache-2.0" ]
0
fa14dc99f1050c022cd54bc82abe9bc8dbfbc95a
https://github.com/zitkat/transformer-HTR/tree/fa14dc99f1050c022cd54bc82abe9bc8dbfbc95a
C3D
import torch from torch import nn def get_10x_lr_params(model): """ This generator returns all the parameters for the fc layer of the net. """ b = [model.linear] for j in range(len(b)): for k in b[j].parameters(): if k.requires_grad: yield k def get_1x_lr_para...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_s...
HuaizhengZhang/autovideo
C3D
false
5,511
[ "MIT" ]
1
58817a6e5973efaabae8e9d749a5cf0f3ff5d13b
https://github.com/HuaizhengZhang/autovideo/tree/58817a6e5973efaabae8e9d749a5cf0f3ff5d13b
PlusBottleneck
# 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.nn.parallel assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C....
Hulihrach/RoadDetector
PlusBottleneck
false
13,808
[ "Apache-2.0" ]
180
9fedd537d7d3a5c81a60562a185fc13370af9a99
https://github.com/Hulihrach/RoadDetector/tree/9fedd537d7d3a5c81a60562a185fc13370af9a99
SimpleExpModule
# 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...
andreas-hommel/glow
SimpleExpModule
false
3,334
[ "Apache-2.0" ]
0
2bbbf8188a2a941e85677c83f2146bbd076a262e
https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e
NTimesTanh
# 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_...
Prinsphield/ELEGANT
NTimesTanh
false
14,238
[ "MIT" ]
276
26827e679cbef2074693ffb0d3f36426e481f7f5
https://github.com/Prinsphield/ELEGANT/tree/26827e679cbef2074693ffb0d3f36426e481f7f5
Synthesis_net
from torch.autograd import Function import math import torch import torch.nn as nn import torch.utils.data class LowerBound(Function): @staticmethod def forward(ctx, inputs, bound): b = torch.ones_like(inputs) * bound ctx.save_for_backward(inputs, b) return torch.max(inputs, 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 from torch._inductor.runtime....
wemozj/Image-Compression-based-GMM-and-Attention-Module
Synthesis_net
false
4,568
[ "Apache-2.0" ]
0
93f804dbcea8ffc1621456f3d104d0342c75373b
https://github.com/wemozj/Image-Compression-based-GMM-and-Attention-Module/tree/93f804dbcea8ffc1621456f3d104d0342c75373b
BPR_max
# 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 ...
Ethan-Yys/GRU4REC-pytorch-master
BPR_max
false
2,229
[ "Apache-2.0" ]
0
175ccb851f881d3506680c459491e76f50aa9898
https://github.com/Ethan-Yys/GRU4REC-pytorch-master/tree/175ccb851f881d3506680c459491e76f50aa9898
GaussActivation
# 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 import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch import nn f...
DLwbm123/LBAM_inpainting
GaussActivation
false
17,197
[ "MIT" ]
7
c809c3cedf09cda7c175e930c7834ac39d8f526f
https://github.com/DLwbm123/LBAM_inpainting/tree/c809c3cedf09cda7c175e930c7834ac39d8f526f
SEModule
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
Andyeyeye/MTANet
SEModule
false
16,914
[ "MIT" ]
8
65f5c356b18400bd1d1b80cffa1ec9f8c6570d2a
https://github.com/Andyeyeye/MTANet/tree/65f5c356b18400bd1d1b80cffa1ec9f8c6570d2a
AdaptiveConcatPool2d
# 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 from typing import * assert_size_stride = torch._C._dynamo.guards.a...
Cedric-Perauer/DL_from_Foundations
AdaptiveConcatPool2d
false
11,280
[ "Apache-2.0" ]
0
c53722216a088cc9f67a2e1bf955d043023e6a85
https://github.com/Cedric-Perauer/DL_from_Foundations/tree/c53722216a088cc9f67a2e1bf955d043023e6a85
CRFRNN
import torch import torch._C import torch.serialization from torch import nn from torch.nn import init from torch.nn import Parameter def make_onehot_kernel(kernel_size, index): """ Make 2D one hot square kernel, i.e. h=w k[kernel_size, kernel_size] = 0 except k.view(-1)[index] = 1 """ kernel = to...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Molly6/segmentation_shengteng2021
CRFRNN
false
8,617
[ "Apache-2.0" ]
21
33dfefa80193586f504069793d9e141944549e99
https://github.com/Molly6/segmentation_shengteng2021/tree/33dfefa80193586f504069793d9e141944549e99
SCse
# 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_...
evilidol/kaggle-Steel-Defect-Detection
SCse
false
6,671
[ "MIT" ]
1
41e3e360f49d706c8c79bcd442342c529648a736
https://github.com/evilidol/kaggle-Steel-Defect-Detection/tree/41e3e360f49d706c8c79bcd442342c529648a736
RDivInt
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
Akababa/torch2trt
RDivInt
false
18,412
[ "MIT" ]
2
03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7
https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7
TotalVariationLoss
import torch from torch import nn class TotalVariationLoss(nn.Module): def forward(self, img, tv_weight): """ Compute total variation loss. Inputs: - img: PyTorch Variable of shape (1, 3, H, W) holding an input image. - tv_weight: Scalar giving the weight ...
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...
Kuga23/Deep-Learning
TotalVariationLoss
false
2,474
[ "MIT" ]
0
86980338208c702b6bfcbcfffdb18498e389a56b
https://github.com/Kuga23/Deep-Learning/tree/86980338208c702b6bfcbcfffdb18498e389a56b
SAMblock
import torch class SAMblock(torch.nn.Module): def __init__(self, size=7, model='full', outplanes=None): super(SAMblock, self).__init__() self.outplanes = outplanes if self.outplanes is None: self.outplanes = 1 self.model = model self.conv1 = torch.nn.Conv2d(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...
Knight825/models-pytorch
SAMblock
false
8,414
[ "Apache-2.0" ]
16
133559eebb8795d78a32fa44d49408d0c5167ae9
https://github.com/Knight825/models-pytorch/tree/133559eebb8795d78a32fa44d49408d0c5167ae9
MinibatchDiscrimination1d
import torch import torch.nn as nn import torch.autograd import torch.utils.data class MinibatchDiscrimination1d(nn.Module): """1D Minibatch Discrimination Module as proposed in the paper `"Improved Techniques for Training GANs by Salimans et. al." <https://arxiv.org/abs/1805.08318>`_ Allows the Discrimi...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
kayuksel/torchgan
MinibatchDiscrimination1d
false
10,560
[ "MIT" ]
0
739d97cef4c49fb80155de84e609471efafab107
https://github.com/kayuksel/torchgan/tree/739d97cef4c49fb80155de84e609471efafab107
InstanceNorm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch.nn import Module from torch import nn import torch.utils.data import...
techthiyanes/annotated_deep_learning_paper_implementations
InstanceNorm
false
16,561
[ "MIT" ]
3,714
8af24da2dd39a9a87482a4d18c2dc829bbd3fd47
https://github.com/techthiyanes/annotated_deep_learning_paper_implementations/tree/8af24da2dd39a9a87482a4d18c2dc829bbd3fd47
InvDepth
import torch import torch.nn as nn class InvDepth(nn.Module): """Inverse depth layer""" def __init__(self, in_channels, out_channels=1, min_depth=0.5): """ Initializes an InvDepth object. Parameters ---------- in_channels : int Number of input 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Fatmangh/VIDEO-ACTION-CLASSIFICATION-USING-PRETAINED-SELF-SUPERVISED-DEPTH-AWARE-DENSE-PREDICTIVE-CODING-
InvDepth
false
2,239
[ "MIT" ]
0
13fac05601efed16ae8b29989aad487e04cd90a7
https://github.com/Fatmangh/VIDEO-ACTION-CLASSIFICATION-USING-PRETAINED-SELF-SUPERVISED-DEPTH-AWARE-DENSE-PREDICTIVE-CODING-/tree/13fac05601efed16ae8b29989aad487e04cd90a7
FC
import torch import torch.nn as nn import torch.nn.functional as F class FC(nn.Module): """FC baseline implementation""" def __init__(self): super(FC, self).__init__() self.fc1 = nn.Linear(45 * 45, 1024) self.fc2 = nn.Linear(1024, 256) self.fc3 = nn.Linear(256, 64) sel...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
chenxi-wang/cs420-codes
FC
false
6,435
[ "MIT" ]
1
756b71ea4f4d8c4694c8c3f32ed9d1c6e89fad15
https://github.com/chenxi-wang/cs420-codes/tree/756b71ea4f4d8c4694c8c3f32ed9d1c6e89fad15
Bandpass
# 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....
tsumansapkota/Input-Invex-Neural-Network
Bandpass
false
4,465
[ "Apache-2.0" ]
0
6a14ee12b33da1d231d231c8f9631851a7668997
https://github.com/tsumansapkota/Input-Invex-Neural-Network/tree/6a14ee12b33da1d231d231c8f9631851a7668997
TransitionUp
import torch import torch.nn as nn def center_crop(layer, max_height, max_width): _, _, h, w = layer.size() xy1 = (w - max_width) // 2 xy2 = (h - max_height) // 2 return layer[:, :, xy2:xy2 + max_height, xy1:xy1 + max_width] class TransitionUp(nn.Module): def __init__(self, in_channels, out_cha...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
adriancampos/road-extraction
TransitionUp
false
6,084
[ "MIT" ]
1
3eaf4ed010d71475276d99d4841d67990a967a1b
https://github.com/adriancampos/road-extraction/tree/3eaf4ed010d71475276d99d4841d67990a967a1b
Hidden2Discrete
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.init class Hidden2Discrete(nn.Module): def __init__(self, input_size, y_size, k_size, is_lstm=False, has_bias=True ): super(Hidden2Discrete, self).__init__() self.y_size = y_size self.k_size = k_siz...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
haojiepan1/CrossWOZ
Hidden2Discrete
false
6,786
[ "Apache-2.0" ]
1
6d7b4c4cfb73a528b76074764687906abecc90b6
https://github.com/haojiepan1/CrossWOZ/tree/6d7b4c4cfb73a528b76074764687906abecc90b6
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.triton_helpers import libdevice import torch.nn as ...
ChangeTheWorld20191008/SwinIR
Mlp
false
11,293
[ "Apache-2.0" ]
0
a0cf7330b10e7c7294f11f59e1b89eff973b9093
https://github.com/ChangeTheWorld20191008/SwinIR/tree/a0cf7330b10e7c7294f11f59e1b89eff973b9093
ResBlock2d
import torch from torch import nn class ResBlock2d(nn.Module): def __init__(self, in_ch, out_ch): super(ResBlock2d, self).__init__() self.conv1 = nn.Conv2d(in_ch, out_ch, 3, 1, padding=1) self.conv2 = nn.Conv2d(out_ch, out_ch, 3, 1, padding=1) self.bn = nn.InstanceNorm2d(in_ch) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
ldlasso2/hologan-pytorch
ResBlock2d
false
15,893
[ "BSD-3-Clause" ]
61
baec67d3673cc68e51434516d19465f3d6dd0a1b
https://github.com/ldlasso2/hologan-pytorch/tree/baec67d3673cc68e51434516d19465f3d6dd0a1b
AddCoords
import torch import torch.nn as nn class AddCoords(nn.Module): """ Source: https://github.com/mkocabas/CoordConv-pytorch/blob/master/CoordConv.py """ def __init__(self, with_r=False): super().__init__() self.with_r = with_r def forward(self, input_tensor): """ Arg...
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...
HexagonPrime/pixel-nerf
AddCoords
false
2,413
[ "BSD-2-Clause" ]
0
298aa7a3451c01e6f19f73f0c756672d3de54bf9
https://github.com/HexagonPrime/pixel-nerf/tree/298aa7a3451c01e6f19f73f0c756672d3de54bf9
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 from torch import nn from torch....
CurtisASmith/stylegan2-pytorch
EqualLinear
false
11,321
[ "MIT", "BSD-2-Clause", "Apache-2.0" ]
0
139ded3394718b9b8a727949dd46ad77ec2ec746
https://github.com/CurtisASmith/stylegan2-pytorch/tree/139ded3394718b9b8a727949dd46ad77ec2ec746
Value
# 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 ...
SaminYeasar/pytorch-trpo
Value
false
4,127
[ "MIT" ]
0
653a3357cf0461c175fb741604c0cd4ad1f4b841
https://github.com/SaminYeasar/pytorch-trpo/tree/653a3357cf0461c175fb741604c0cd4ad1f4b841
HuberLoss
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_str...
martius-lab/CombOptNet
HuberLoss
false
16,023
[ "MIT" ]
46
d563d31a95dce35a365d50b81f932c27531ae09b
https://github.com/martius-lab/CombOptNet/tree/d563d31a95dce35a365d50b81f932c27531ae09b
BiaffineAttention
# 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....
ciaochiaociao/CLNER
BiaffineAttention
false
3,384
[ "MIT" ]
0
a31fb1c3bfdaa5d62147dc892489d29a85e6b385
https://github.com/ciaochiaociao/CLNER/tree/a31fb1c3bfdaa5d62147dc892489d29a85e6b385
fpn_module
import torch import torch.nn as nn import torch.nn.functional as F class fpn_module(nn.Module): def __init__(self, numClass): super(fpn_module, self).__init__() self.toplayer = nn.Conv2d(2048, 256, kernel_size=1, stride=1, padding=0 ) self.smooth1_1 = nn.Conv2d(256, 256, kerne...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
ShenZheng2000/Syn2Real-Pytorch
fpn_module
false
6,012
[ "MIT" ]
1
214c800914e2bcd57d4ca74a4c8476a11e1b5905
https://github.com/ShenZheng2000/Syn2Real-Pytorch/tree/214c800914e2bcd57d4ca74a4c8476a11e1b5905
SEBlock
# 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 ...
LeoMaximal/RepVGG
SEBlock
false
5,517
[ "MIT" ]
1
1e2e7bde551860a1453601424294f25fa7bcaa76
https://github.com/LeoMaximal/RepVGG/tree/1e2e7bde551860a1453601424294f25fa7bcaa76
SequenceBias
# 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 import torch.utils.data import torch.utils.data.distributed import torch.nn.parallel from torch.nn.parameter import Pa...
anibadde/opacus
SequenceBias
false
14,855
[ "Apache-2.0" ]
958
be221231e1b579bdae4ad34c8ae0c7c4928cee25
https://github.com/anibadde/opacus/tree/be221231e1b579bdae4ad34c8ae0c7c4928cee25
TemporalAttention
# 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....
Shashwat07gupta/MSVD
TemporalAttention
false
1,066
[ "MIT" ]
0
8026557ef7681a504b5140560ec4aaad9944de2d
https://github.com/Shashwat07gupta/MSVD/tree/8026557ef7681a504b5140560ec4aaad9944de2d
AndModule
import torch import torch.nn as nn class AndModule(nn.Module): """ A neural module that (basically) performs a logical and. Extended Summary ---------------- An :class:`AndModule` is a neural module that takes two input attention masks and (basically) performs a set intersection. This would be u...
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...
ArjitJ/tbd-nets
AndModule
false
8,851
[ "MIT" ]
0
8e93ecad54489706ec3249c9ca5d345d6866e1ba
https://github.com/ArjitJ/tbd-nets/tree/8e93ecad54489706ec3249c9ca5d345d6866e1ba
TuckERLoss
import torch import torch.nn as nn class TuckERLoss(nn.Module): def __init__(self, margin): super(TuckERLoss, self).__init__() pass def forward(self, p_score, n_score, penalty=None): p_score = -torch.mean(torch.log(p_score)) n_score = -torch.mean(torch.log(1 - n_score)) ...
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 ...
CogNLP/CogKGE
TuckERLoss
false
5,016
[ "MIT" ]
1
70d851d6489600c1e90eb25b0388a3ceba2f078c
https://github.com/CogNLP/CogKGE/tree/70d851d6489600c1e90eb25b0388a3ceba2f078c
SpatialGather_Module
import torch import torch.nn as nn import torch.nn.functional as F import torch._utils class SpatialGather_Module(nn.Module): """ Aggregate the context features according to the initial predicted probability distribution. Employ the soft-weighted method to aggregate the context. O...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
NikV-JS/semantic-segmentation
SpatialGather_Module
false
11,765
[ "BSD-3-Clause" ]
0
68fd9ddc5498590371f064c8bebb03ac80932766
https://github.com/NikV-JS/semantic-segmentation/tree/68fd9ddc5498590371f064c8bebb03ac80932766
PositionwiseFeedForward
import math import torch from torch import nn def gelu(x): return 0.5 * x * (1 + torch.tanh(math.sqrt(2 / math.pi) * (x + 0.044715 * torch.pow(x, 3)))) class PositionwiseFeedForward(nn.Module): """ A two-layer Feed-Forward-Network with residual layer norm. Args: d_model (int): the size ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import math from to...
AdrianVandierAst/fast-bert
PositionwiseFeedForward
false
8,861
[ "Apache-2.0" ]
0
f5adb426accee4a1882cdd4372fced4ef922c978
https://github.com/AdrianVandierAst/fast-bert/tree/f5adb426accee4a1882cdd4372fced4ef922c978
TensorClampMax
import torch class TensorClampMax(torch.nn.Module): def forward(self, x): return x.clamp_max(0.1) 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
Akababa/torch2trt
TensorClampMax
false
18,436
[ "MIT" ]
2
03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7
https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7
AsymmetricLossOptimized
import torch from torchvision import datasets as datasets import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data.distributed class AsymmetricLossOptimized(nn.Module): """ Notice - optimized version, minimizes memory allocation and gpu uploading, favors inplace operations""" ...
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 torchv...
Coler1994/robust-loss-mlml
AsymmetricLossOptimized
false
8,210
[ "MIT" ]
15
a68718eba7efa82c3eca79031eeee444f8eb5fa3
https://github.com/Coler1994/robust-loss-mlml/tree/a68718eba7efa82c3eca79031eeee444f8eb5fa3
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....
Renovamen/Text-Classification
MultiHeadAttention
false
14,302
[ "MIT" ]
72
4a4aa4001c402ed4371ebaabe1393b27794e5992
https://github.com/Renovamen/Text-Classification/tree/4a4aa4001c402ed4371ebaabe1393b27794e5992
Biaffine
import torch import torch.utils.data.dataloader import torch.nn class Biaffine(torch.nn.Module): def __init__(self, n_in, n_out=1, bias_x=True, bias_y=True): """ :param n_in: size of input :param n_out: number of channels :param bias_x: set bias for x :param bias_x: set bi...
import torch from torch._inductor.select_algorithm import extern_kernels import 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.dataloader import torch.nn assert_size_stride = torch._C...
ParikhKadam/flair
Biaffine
false
14,145
[ "MIT" ]
7,539
a1732bc5ab0b4aeb09d1ed3a630ae2fd8fa095ef
https://github.com/ParikhKadam/flair/tree/a1732bc5ab0b4aeb09d1ed3a630ae2fd8fa095ef
AvgPoolPad
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed from torch import optim as optim class AvgPoolPad(nn.Module): def __init__(self, stride=2, padding=1): super(AvgPoolPad, self).__init__() self.pad = nn.ZeroPa...
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 from torch imp...
BarneyQiao/CondenseNetV2
AvgPoolPad
false
13,395
[ "MIT" ]
80
c771957cb8fe466d0ecbafe9060e4c342a33fc4d
https://github.com/BarneyQiao/CondenseNetV2/tree/c771957cb8fe466d0ecbafe9060e4c342a33fc4d
ConformerFeedForward
import torch from torch import nn import torch.utils.data import torch.optim class Swish(nn.Module): """ Swish activation function introduced in 'https://arxiv.org/abs/1710.05941' """ def forward(self, x): return x * torch.sigmoid(x) class ConformerFeedForward(nn.Module): """ feed-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 import torch.utils.data import torch.optim assert_size_stri...
ShantanuNair/NeMo
ConformerFeedForward
false
17,899
[ "Apache-2.0" ]
10
d01b7bbc3fdb1bbf14789f71b8f368cf0aa8f86b
https://github.com/ShantanuNair/NeMo/tree/d01b7bbc3fdb1bbf14789f71b8f368cf0aa8f86b
SemanticComposite
# 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....
zfjsail/MatchZoo-py
SemanticComposite
false
4,705
[ "Apache-2.0" ]
0
c93e52e7db7e257b46bb8bf8df8ce1ab1944e2f2
https://github.com/zfjsail/MatchZoo-py/tree/c93e52e7db7e257b46bb8bf8df8ce1ab1944e2f2
ConvMlp
import torch import torch.nn as nn class ConvMlp(nn.Module): """ MLP using 1x1 convs that keeps spatial dims """ def __init__(self, in_features, hidden_features=None, out_features=None, act_layer=nn.ReLU, norm_layer=None, drop=0.0): super().__init__() out_features = out_features o...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
RICE-EIC/Patch-Fool
ConvMlp
false
17,812
[ "MIT" ]
7
9638ec33a4d13b0c5ff0ec3ee5ce6b46ea7da5a6
https://github.com/RICE-EIC/Patch-Fool/tree/9638ec33a4d13b0c5ff0ec3ee5ce6b46ea7da5a6
Attention
import torch import torch.nn as nn class Attention(nn.Module): def __init__(self, ft_dim, rnn_dim, attn_dim): super().__init__() self.enc_attn = nn.Linear(ft_dim, attn_dim) self.dec_attn = nn.Linear(rnn_dim, attn_dim) self.attn = nn.Linear(attn_dim, 1) self.relu = nn.ReLU(...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
skasai5296/image_captioning
Attention
false
10,777
[ "MIT" ]
0
b4bb2c015a2bdce2040ab14fe2a53e9b79aa3c30
https://github.com/skasai5296/image_captioning/tree/b4bb2c015a2bdce2040ab14fe2a53e9b79aa3c30
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....
Luo-Chang/Graphormer
MultiHeadAttention
false
5,571
[ "MIT" ]
1
b35b3ca6369e25cdae80e1617bfc3921feeb3158
https://github.com/Luo-Chang/Graphormer/tree/b35b3ca6369e25cdae80e1617bfc3921feeb3158
MLP3_clamp_eval
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed class MLP3_clamp_eval(nn.Module): def __init__(self): super(MLP3_clamp_eval, self).__init__() self.fc1 = nn.Linear(32 * 32, 51...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
RuokaiYin/UnarySim
MLP3_clamp_eval
false
5,778
[ "MIT" ]
1
343ff9abf356a63d526b1df8eb946ad528690a27
https://github.com/RuokaiYin/UnarySim/tree/343ff9abf356a63d526b1df8eb946ad528690a27
ClassificationModel
import torch import torch.nn as nn class ClassificationModel(nn.Module): def __init__(self, num_features_in, num_anchors=9, num_classes=80, prior=0.01, feature_size=256): super(ClassificationModel, self).__init__() self.num_classes = num_classes self.num_anchors = num_anchors ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
CraigWang1/EfficientDet-PyTorch
ClassificationModel
false
13,567
[ "Apache-2.0" ]
66
531d3c83338f03aa5c6f0615839c0ea5c03025f6
https://github.com/CraigWang1/EfficientDet-PyTorch/tree/531d3c83338f03aa5c6f0615839c0ea5c03025f6
AffineGridGen
# 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.nn import Module import torch.nn from torch.nn.modules.module import Module assert_size_stride = torch._C._dynamo.guards.assert_s...
JiwonCocoder/matching1
AffineGridGen
false
647
[ "MIT" ]
0
75274312a4ab6ba318c3d241abc0eb292f6ce69c
https://github.com/JiwonCocoder/matching1/tree/75274312a4ab6ba318c3d241abc0eb292f6ce69c
Differencial_SMAPE
import torch import torch.nn as nn class Differencial_SMAPE(nn.Module): def __init__(self): super(Differencial_SMAPE, self).__init__() def forward(self, true, predicted): epsilon = 0.1 summ = torch.clamp(torch.abs(true) + torch.abs(predicted) + epsilon, min=0.5 + epsilon)...
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 ...
pixel-ports/PV_prod_predic
Differencial_SMAPE
false
7,462
[ "Apache-2.0" ]
1
2ceb4cf8218f43f3ea94c5520b1904663cfb0de1
https://github.com/pixel-ports/PV_prod_predic/tree/2ceb4cf8218f43f3ea94c5520b1904663cfb0de1
GCN
from torch.nn import Module import math import torch import torch.nn as nn from torch.nn.parameter import Parameter from torch.nn.modules.module import Module import torch.nn.functional as F class GraphConvolution(Module): """ Simple GCN layer, similar to https://arxiv.org/abs/1609.02907 """ 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....
jindl465/pygcn
GCN
false
12,618
[ "MIT" ]
0
bbbedc2278d1b1bc260e138f98cf27733995914d
https://github.com/jindl465/pygcn/tree/bbbedc2278d1b1bc260e138f98cf27733995914d