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
ReGLU
import torch import torch.nn as nn class PositionWiseFeedForward(nn.Module): """ title: Position-wise Feed-Forward Network (FFN) summary: Documented reusable implementation of the position wise feedforward network. # Position-wise Feed-Forward Network (FFN) This is a [PyTorch](https://pytorch.org...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
Actis92/pytorch_tabular
ReGLU
false
4,791
[ "MIT" ]
1
78dabf5e7b97d8ff24db4bc83d9d0a2273941bbe
https://github.com/Actis92/pytorch_tabular/tree/78dabf5e7b97d8ff24db4bc83d9d0a2273941bbe
FocusLiteNNMinMax
# 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 import torch.utils assert_size_stride = torch....
adynmiles/DARTS-FQA
FocusLiteNNMinMax
false
6,091
[ "MIT" ]
1
a088a0efeb1160d0cdbf2b2a3e30f132c16eb53f
https://github.com/adynmiles/DARTS-FQA/tree/a088a0efeb1160d0cdbf2b2a3e30f132c16eb53f
NoNorm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
deepframwork/TorchBlocks
NoNorm
false
6,535
[ "MIT" ]
1
35f6e1bb83d2b9b05ba914a21fd365cb26ac4a32
https://github.com/deepframwork/TorchBlocks/tree/35f6e1bb83d2b9b05ba914a21fd365cb26ac4a32
DupCNN2
import torch from torch import nn class DupCNN2(nn.Module): def __init__(self, input_shape, output_size, conv_layers, fc_layers): super(DupCNN2, self).__init__() self.input_shape = input_shape self.output_size = output_size self.conv_layers = conv_layers self.fc_layers = 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 import triton_helpers from torch import nn assert_s...
WillieMaddox/Airbus_SDC_dup
DupCNN2
false
12,006
[ "MIT" ]
0
09be904cf3c8050086f07538f5e2954282de5d62
https://github.com/WillieMaddox/Airbus_SDC_dup/tree/09be904cf3c8050086f07538f5e2954282de5d62
BuildingsModel
import torch from torch import Tensor from typing import List from typing import Tuple from typing import Union import torch.nn as nn class DownSamplingBlock(nn.Module): def __init__(self, in_channels: 'int', channel_up_factor: 'int'=2, max_pooling: 'bool'=True, dropout: 'Tuple'=(0, 0)): super()....
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
JosefDoun/Ikonos-2-Building-Segmentation-U-Net
BuildingsModel
false
9,271
[ "MIT" ]
0
fecb9874dbf74886fd30d00b8561dfc66886be8c
https://github.com/JosefDoun/Ikonos-2-Building-Segmentation-U-Net/tree/fecb9874dbf74886fd30d00b8561dfc66886be8c
MSE
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
Columbine21/TFR-Net
MSE
false
17,107
[ "MIT" ]
7
1da01577542e7f477fdf7323ec0696aebc632357
https://github.com/Columbine21/TFR-Net/tree/1da01577542e7f477fdf7323ec0696aebc632357
SplitDim
# 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, math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.gu...
b4thesunrise/drbayes
SplitDim
false
6,311
[ "BSD-2-Clause" ]
1
9bc827aea2c7f084fb1ee77a4bd9f3c9726ecf8c
https://github.com/b4thesunrise/drbayes/tree/9bc827aea2c7f084fb1ee77a4bd9f3c9726ecf8c
InnerProductDecoder
import torch import torch.nn as nn from torch.nn import functional as F import torch.multiprocessing import torch.utils.data import torch.nn.modules.loss class InnerProductDecoder(nn.Module): """Decoder for using inner product for prediction.""" def __init__(self, dropout, act=torch.sigmoid): super(I...
import torch from torch._inductor.select_algorithm import extern_kernels import 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.multiprocessing import torch.utils.data impor...
cminusQAQ/graph4nlp
InnerProductDecoder
false
15,048
[ "Apache-2.0" ]
1,269
d980e897131f1b9d3766750c06316d94749904fa
https://github.com/cminusQAQ/graph4nlp/tree/d980e897131f1b9d3766750c06316d94749904fa
DQN_Linear
import torch import torch.nn as nn import torch.nn.functional as F class DQN_Linear(nn.Module): def __init__(self, input_size, output_size): super(DQN_Linear, self).__init__() self.l1 = nn.Linear(input_size, 32) self.l2 = nn.Linear(32, 64) self.head = nn.Linear(64, 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 import torch.nn as nn assert_...
vashineyu/dqn_cartpole
DQN_Linear
false
13,067
[ "MIT" ]
0
7d3d2c26e29d40fce7710dbd56c59045514f2e84
https://github.com/vashineyu/dqn_cartpole/tree/7d3d2c26e29d40fce7710dbd56c59045514f2e84
ForwardCrossAttentionLayer
import torch import numpy as np import torch.nn as nn import torch.nn.functional as F class ResidualConnectionLayer(nn.Module): def __init__(self, dim_model, prob_dropout=0.1, add_sublayer=True): super(ResidualConnectionLayer, self).__init__() self.add_sublayer = add_sublayer 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....
KirkGuo/HCN
ForwardCrossAttentionLayer
false
5,492
[ "MIT" ]
1
7d8020c8d76413b6ca3a359fb2e9b34652949e17
https://github.com/KirkGuo/HCN/tree/7d8020c8d76413b6ca3a359fb2e9b34652949e17
PixelSort
# 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...
alpayuz/DeepDeblur-PyTorch
PixelSort
false
14,808
[ "MIT" ]
158
771252e123e3a11da849bb9cef2a7cc49d8d1a2d
https://github.com/alpayuz/DeepDeblur-PyTorch/tree/771252e123e3a11da849bb9cef2a7cc49d8d1a2d
Expand
import torch import torch.nn as nn class Expand(nn.Module): def __init__(self, gain=2): super().__init__() self.gain = gain def forward(self, x): b, c, h, w = x.size() s = self.gain x = x.view(b, s, s, c // s ** 2, h, w) x = x.permute(0, 3, 4, 1, 5, 2).contigu...
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...
Aditya239233/MDP
Expand
false
16,906
[ "MIT" ]
4
87491e1d67e547c11f4bdd5d784d120473429eae
https://github.com/Aditya239233/MDP/tree/87491e1d67e547c11f4bdd5d784d120473429eae
Discrete
# 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 ...
rsomani95/client
Discrete
false
10,701
[ "MIT" ]
0
772c6de325b30323397cfb98ab7e126910c5912b
https://github.com/rsomani95/client/tree/772c6de325b30323397cfb98ab7e126910c5912b
_DynamicGates
# 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...
kyleniemeyer/neuralhydrology
_DynamicGates
false
3,873
[ "BSD-3-Clause" ]
0
440fda715c4f746a2d56b058b9af2f0e03c36aa0
https://github.com/kyleniemeyer/neuralhydrology/tree/440fda715c4f746a2d56b058b9af2f0e03c36aa0
TemporalAttentionLayer
import torch from torch import nn class TemporalAttentionLayer(nn.Module): """Single Graph Temporal Attention Layer :param n_features: number of input features/nodes :param window_size: length of the input sequence :param dropout: percentage of nodes to dropout :param alpha: negative slope used 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....
kj21choi/LATAD
TemporalAttentionLayer
false
7,041
[ "MIT" ]
1
80d91e0f251ad0225342ee30e2461a39fa9cca97
https://github.com/kj21choi/LATAD/tree/80d91e0f251ad0225342ee30e2461a39fa9cca97
LogisticRegressionBinaryClassifier
# 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.utils.data assert_size_stride = torch._C._dyn...
JayWalker512/PacketGAN
LogisticRegressionBinaryClassifier
false
17,464
[ "MIT" ]
5
93d4266ab9299c25ffd1f0aedf68fa4639f66572
https://github.com/JayWalker512/PacketGAN/tree/93d4266ab9299c25ffd1f0aedf68fa4639f66572
Triangle_transform
# 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 import torch.nn as nn ...
BorgwardtLab/TOGL
Triangle_transform
false
17,001
[ "BSD-3-Clause" ]
6
d0c986cf829ca6bbae1a23e5cdab1c99146503cd
https://github.com/BorgwardtLab/TOGL/tree/d0c986cf829ca6bbae1a23e5cdab1c99146503cd
LRN
import torch import torch.nn as nn import torch.utils.data class LRN(nn.Module): def __init__(self, local_size=1, alpha=1.0, beta=0.75, ACROSS_CHANNELS=True ): super(LRN, self).__init__() self.ACROSS_CHANNELS = ACROSS_CHANNELS if ACROSS_CHANNELS: self.average = nn.AvgP...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dy...
VisionLearningGroup/CDS
LRN
false
18,040
[ "MIT" ]
7
5b3644c286f19f76acdc03c6f6021a6f6e4ec4fc
https://github.com/VisionLearningGroup/CDS/tree/5b3644c286f19f76acdc03c6f6021a6f6e4ec4fc
DFire
# 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...
BloodAxe/segmentation-networks-benchmark
DFire
false
7,879
[ "MIT" ]
34
2e3feb560102230be9369ab442b4a59cc86dff61
https://github.com/BloodAxe/segmentation-networks-benchmark/tree/2e3feb560102230be9369ab442b4a59cc86dff61
LightHead
import torch from torch import nn class RMSNorm(nn.Module): """An implementation of RMS Normalization. # https://catalyst-team.github.io/catalyst/_modules/catalyst/contrib/nn/modules/rms_norm.html#RMSNorm """ def __init__(self, dimension: 'int', epsilon: 'float'=1e-08, is_bias: 'bool'=False)...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import n...
mohamedbakrey12/prpjectINDeepLearning
LightHead
false
16,101
[ "MIT" ]
122
b6106ee13ff9377e4a84bee4814bd54a34156930
https://github.com/mohamedbakrey12/prpjectINDeepLearning/tree/b6106ee13ff9377e4a84bee4814bd54a34156930
RNNCell
# 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_...
saidulislam/RNN-Sequential-Data-Processing
RNNCell
false
12,983
[ "Apache-2.0" ]
0
2e043f37f9a67177a3dc19cbfe67d187c9cbb5f9
https://github.com/saidulislam/RNN-Sequential-Data-Processing/tree/2e043f37f9a67177a3dc19cbfe67d187c9cbb5f9
MaxPoolPad
import torch import torch.nn as nn import torch.utils.data class MaxPoolPad(nn.Module): def __init__(self): super(MaxPoolPad, self).__init__() self.pad = nn.ZeroPad2d((1, 0, 1, 0)) self.pool = nn.MaxPool2d(3, stride=2, padding=1) def forward(self, x): x = self.pad(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 import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dynamo.guard...
BigFishMaster/tnt
MaxPoolPad
false
17,155
[ "BSD-3-Clause" ]
3
8b80bb3b194eb87ac18924428ef0924c2fb263c5
https://github.com/BigFishMaster/tnt/tree/8b80bb3b194eb87ac18924428ef0924c2fb263c5
FlexibleDropout
import torch import torch.nn as nn from torch.distributions import Bernoulli class FlexibleDropout(nn.Module): """FlexibleDropout disconnects the sampling step from the masking step of dropout. There are two important differences between FlexibleDropout and nn.Dropout. First, FlexibleDropout exposes a sa...
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 Bernoulli assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_stride...
scfrank/deep-generative-lm
FlexibleDropout
false
4,286
[ "MIT" ]
0
70067fcda82aa035bba805ce6c2709097166a7a4
https://github.com/scfrank/deep-generative-lm/tree/70067fcda82aa035bba805ce6c2709097166a7a4
cPReLU
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
JamesLiao714/FullSubNet
cPReLU
false
605
[ "MIT" ]
0
dad740bac35b5d7544c97740ae59101455acdc40
https://github.com/JamesLiao714/FullSubNet/tree/dad740bac35b5d7544c97740ae59101455acdc40
DecoderLayer
import torch import torch.nn as nn import torch.nn.functional as F class ScaledDotProductAttention(nn.Module): """ Scaled Dot-Product Attention """ def __init__(self, temperature, attn_dropout=0.1): super().__init__() self.temperature = temperature self.dropout = nn.Dropout(attn_dropo...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Rajathbharadwaj/algorithmic-efficiency
DecoderLayer
false
14,286
[ "Apache-2.0" ]
49
47d2928836e0574bc54cc3ad58860dd4daf86cce
https://github.com/Rajathbharadwaj/algorithmic-efficiency/tree/47d2928836e0574bc54cc3ad58860dd4daf86cce
SpaceTimeRegionalConv
import torch from torch import nn class SpaceTimeRegionalConv(nn.Module): """ Space Time Region Graph """ def __init__(self, input_dim, output_dim, t_kernel_size=1, t_stride=1, t_padding=None, t_dilation=1, bias=True, residual=True): super().__init__() self.input_dim = input_d...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
C-SUNSHINE/TOQ-Nets-PyTorch-Release
SpaceTimeRegionalConv
false
17,156
[ "MIT" ]
6
05e06bf633fb3c6b610dda9a5126ecd7af1db02f
https://github.com/C-SUNSHINE/TOQ-Nets-PyTorch-Release/tree/05e06bf633fb3c6b610dda9a5126ecd7af1db02f
ParsingRelationLoss
import torch import torch.nn.modules import torch.nn as nn class ParsingRelationLoss(nn.Module): def __init__(self): super(ParsingRelationLoss, self).__init__() def forward(self, logits): _n, _c, h, _w = logits.shape loss_all = [] for i in range(0, h - 1): loss_al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn.modules import torch.nn as nn assert_size_stride = torch....
wangping984/Ultra-Fast-Lane-Detection
ParsingRelationLoss
false
13,083
[ "MIT" ]
0
b7559c1469d832bf5afe5d158dd3ad63b4df9d9c
https://github.com/wangping984/Ultra-Fast-Lane-Detection/tree/b7559c1469d832bf5afe5d158dd3ad63b4df9d9c
BertLMPredictionHead
# 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....
minjoong507/Image-Captioning-Transformer
BertLMPredictionHead
false
7,248
[ "MIT" ]
1
813060f0bb656e336154173f11e99a80362c8c2a
https://github.com/minjoong507/Image-Captioning-Transformer/tree/813060f0bb656e336154173f11e99a80362c8c2a
SegmentationTestModel
from torch.nn import Module import torch import torch.nn as nn from typing import Any from typing import cast from torch.nn.modules import Module class SegmentationTestModel(Module): def __init__(self, in_channels: 'int'=3, classes: 'int'=1000, **kwargs: Any ) ->None: super().__init__() s...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch.nn import Module import torch.nn as nn from typing import Any from to...
LaudateCorpus1/torchgeo
SegmentationTestModel
false
2,491
[ "MIT" ]
0
747a9352b9663e7d0e0c90a8b53533f0bb06c9b3
https://github.com/LaudateCorpus1/torchgeo/tree/747a9352b9663e7d0e0c90a8b53533f0bb06c9b3
AE
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.modules.loss class AE(nn.Module): """ Autoencoder for dimensional reduction""" def __init__(self, dim): super(AE, self).__init__() self.dim = dim self.fc1 = nn.Linear(dim, 512) self.fc2 = nn.Lin...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
hurraygong/scGNN
AE
false
6,834
[ "MIT" ]
1
bc555895fbd5740ddd82e03187171116889cc10e
https://github.com/hurraygong/scGNN/tree/bc555895fbd5740ddd82e03187171116889cc10e
Actor
import torch import torch.nn as nn import torch.nn.functional as F class Actor(nn.Module): def __init__(self, state_dim, action_dim, max_action): super(Actor, self).__init__() self.l1 = nn.Linear(state_dim, 128) self.l2 = nn.Linear(128, 128) self.l3 = nn.Linear(128, action_dim) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
sridas123/TD3
Actor
false
12,996
[ "MIT" ]
0
2556c952ef7623c8201fdfdd9102e23d98101f5c
https://github.com/sridas123/TD3/tree/2556c952ef7623c8201fdfdd9102e23d98101f5c
BasicModel_MaxPool_ReLU
import torch import torch.nn as nn class BasicModel_MaxPool_ReLU(nn.Module): def __init__(self, inplace=False) ->None: super().__init__() self.maxpool = nn.MaxPool1d(3) self.relu = nn.ReLU(inplace=inplace) def forward(self, x): return self.relu(self.maxpool(x)).sum(dim=1) d...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
LMdeLiangMi/captum
BasicModel_MaxPool_ReLU
false
5,477
[ "BSD-3-Clause" ]
1
8bd9686013fe0ba8996e9b1cbeb0ea8e91512787
https://github.com/LMdeLiangMi/captum/tree/8bd9686013fe0ba8996e9b1cbeb0ea8e91512787
MultiheadAttention
import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.parameter import Parameter import torch.utils.checkpoint from torch.nn import Parameter class MultiheadAttention(nn.Module): """Multi-headed attention. See "Attention Is All You Need" for more details. """ def __init__(s...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
byamao1/MMSA
MultiheadAttention
false
14,992
[ "MIT" ]
198
1a894d042144c9ac75b3465d38871ce8c2987251
https://github.com/byamao1/MMSA/tree/1a894d042144c9ac75b3465d38871ce8c2987251
Patch2Image
# 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 import torch.optim import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert...
nudro/counterfactual_generative_networks
Patch2Image
false
10,766
[ "MIT" ]
0
0d000903ad9da4eab0f4d397395a769c9c7bff5d
https://github.com/nudro/counterfactual_generative_networks/tree/0d000903ad9da4eab0f4d397395a769c9c7bff5d
SimpleTanhModel
import torch import torch.jit import torch.onnx import torch.nn class SimpleTanhModel(torch.nn.Module): def __init__(self, inplace=False): super(SimpleTanhModel, self).__init__() self.inplace = inplace def forward(self, tensor): tensor = tensor + tensor return tensor.tanh_() ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.jit import torch.onnx import torch.nn assert_size_stride = torch._...
YaronBenAtar/glow
SimpleTanhModel
false
14,681
[ "Apache-2.0" ]
2,838
a13706a4239fa7eaf059c670dc573e3eb0768f86
https://github.com/YaronBenAtar/glow/tree/a13706a4239fa7eaf059c670dc573e3eb0768f86
CrossNet
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from sklearn.metrics import * import torch.onnx import tor...
dulvqingyunLT/DeepCTR-Torch
CrossNet
false
10,412
[ "Apache-2.0" ]
0
f40cf08f3469aa471f9ca69e44c5de51180341cc
https://github.com/dulvqingyunLT/DeepCTR-Torch/tree/f40cf08f3469aa471f9ca69e44c5de51180341cc
LearnedPositionalEncoding
import torch import torch.nn as nn import torch.optim class LearnedPositionalEncoding(nn.Module): def __init__(self, max_position_embeddings, embedding_dim, seq_length): super(LearnedPositionalEncoding, self).__init__() self.position_embeddings = nn.Parameter(torch.zeros(1, 3200, 512)) def f...
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.optim assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dyna...
felixquinton1/TransBTS
LearnedPositionalEncoding
false
10,274
[ "Apache-2.0" ]
0
6992c902413ba15f40ebfe9f6d5d0e3594051033
https://github.com/felixquinton1/TransBTS/tree/6992c902413ba15f40ebfe9f6d5d0e3594051033
Cauchy
import torch import torch.nn as nn import torch.utils.model_zoo class Cauchy(nn.Module): def __init__(self): super(Cauchy, self).__init__() self.c = 1.0 def forward(self, X, Y): r = torch.add(X, -Y) ra = torch.abs(r) error = 0.5 * self.c ** 2 * torch.log(1 + (ra / sel...
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 ...
SimoneDutto/EDSR
Cauchy
false
11,879
[ "MIT" ]
0
a13fd4e4950649f9a33aa2089c6db4e3920ea4d2
https://github.com/SimoneDutto/EDSR/tree/a13fd4e4950649f9a33aa2089c6db4e3920ea4d2
BinaryMarginLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torch.nn as nn import torch.distributions import torch....
AlexMeinke/Provable-OOD-Detection
BinaryMarginLoss
false
7,682
[ "MIT" ]
21
9a132aec994ff718c96b81885736ab866df60d87
https://github.com/AlexMeinke/Provable-OOD-Detection/tree/9a132aec994ff718c96b81885736ab866df60d87
SwishV2
import torch import torch.nn as nn class SwishFunction(torch.autograd.Function): @staticmethod def forward(ctx, feat): sig = torch.sigmoid(feat) out = feat * torch.sigmoid(feat) grad = sig * (1 + feat * (1 - sig)) ctx.grad = grad return out @staticmethod def 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
chizhu/pytorch-loss
SwishV2
false
6,437
[ "MIT" ]
1
c8fbd78771f11a910b0b51ae3697c09761dd9696
https://github.com/chizhu/pytorch-loss/tree/c8fbd78771f11a910b0b51ae3697c09761dd9696
EmbeddingLearner
# 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...
adonis704/ucas_2021_hc_15
EmbeddingLearner
false
18,220
[ "MIT" ]
6
7308c3b32962ef5430d85ccfcb199ebe40bf4a7f
https://github.com/adonis704/ucas_2021_hc_15/tree/7308c3b32962ef5430d85ccfcb199ebe40bf4a7f
CoordConv2d
# 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...
imvladikon/pytorch-loss
CoordConv2d
false
6,877
[ "MIT" ]
1
6cfaabe1be898e1ff000b3dffb46d0ef09096f6b
https://github.com/imvladikon/pytorch-loss/tree/6cfaabe1be898e1ff000b3dffb46d0ef09096f6b
NsSymKlCriterion
# 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.functi...
anlewy/mt-dnn
NsSymKlCriterion
false
14,874
[ "MIT" ]
2,075
eeb6f01ce0630e61a52b8c9c6f7537cd34978e45
https://github.com/anlewy/mt-dnn/tree/eeb6f01ce0630e61a52b8c9c6f7537cd34978e45
upsampleBlock
# 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...
carl-zjr/super-resolution-reconstruction
upsampleBlock
false
6,388
[ "Apache-2.0" ]
1
37b5b42ea6e8864c12a93a7e90d3bf0920f502d4
https://github.com/carl-zjr/super-resolution-reconstruction/tree/37b5b42ea6e8864c12a93a7e90d3bf0920f502d4
ReCodeAlphabet
import torch import torch.nn as nn class ReCodeAlphabet(nn.Module): def __init__(self): super(ReCodeAlphabet, self).__init__() def forward(self, input): input_reordered = [input[:, i, ...] for i in [0, 2, 1, 3]] input = torch.stack(input_reordered, dim=1) return input 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
Luma-1994/lama
ReCodeAlphabet
false
14,000
[ "MIT" ]
137
60d802e2e4cce789f03eea11b038212ba5f7fd1b
https://github.com/Luma-1994/lama/tree/60d802e2e4cce789f03eea11b038212ba5f7fd1b
folder
# 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....
memesoo99/AdelaiDet
folder
false
12,767
[ "BSD-2-Clause" ]
0
1e9cdfee3d1c35dcb6b4e04fdcc966115f34c71f
https://github.com/memesoo99/AdelaiDet/tree/1e9cdfee3d1c35dcb6b4e04fdcc966115f34c71f
Transformer
# 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_...
xuewanqi/RestoreNet
Transformer
false
10,957
[ "Apache-2.0" ]
0
fc313dc36965c2fab2c4cea9bf1227de75319439
https://github.com/xuewanqi/RestoreNet/tree/fc313dc36965c2fab2c4cea9bf1227de75319439
GatedConv2d
import torch import torch.nn as nn from torch.nn import functional as F class GatedConv2d(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, stride, padding, dilation=1): super(GatedConv2d, self).__init__() self.conv = nn.Conv2d(in_channels, 2 * out_channels, kernel_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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
davidreiman/nsf
GatedConv2d
false
15,136
[ "MIT" ]
231
ed70316c3bf1acd4ffdf309f1773172c34e48320
https://github.com/davidreiman/nsf/tree/ed70316c3bf1acd4ffdf309f1773172c34e48320
Lookahead
import torch import torch.nn as nn import torch.nn.functional as F class Lookahead(nn.Module): def __init__(self, n_features, context): super(Lookahead, self).__init__() assert context > 0 self.context = context self.n_features = n_features self.pad = 0, self.context - 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
wenjie-p/CAT
Lookahead
false
4,654
[ "Apache-2.0" ]
0
0e6904658dd3d14afe51faf1d0141ae95fef44e8
https://github.com/wenjie-p/CAT/tree/0e6904658dd3d14afe51faf1d0141ae95fef44e8
RobertaRNNHead
from _paritybench_helpers import _mock_config import torch from torch import nn class RobertaRNNHead(nn.Module): """Head for sentence-level classification tasks.""" def __init__(self, config, num_labels): super(RobertaRNNHead, self).__init__() self.hidden_size = config.hidden_size 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.triton_helpers import libdevice from torch import n...
abrinkmann/productCategorization
RobertaRNNHead
false
18,214
[ "MIT" ]
5
75732e4b1c9da941a793db80b5fe2245bae45e87
https://github.com/abrinkmann/productCategorization/tree/75732e4b1c9da941a793db80b5fe2245bae45e87
TSA_Fusion
import torch import torch.utils.data import torch.nn.functional as F import torch.nn as nn class TSA_Fusion(nn.Module): """ Temporal Spatial Attention fusion module Temporal: correlation; Spatial: 3 pyramid levels. """ def __init__(self, nf=64, nframes=5, center=2): super(TSA_Fusion, self...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.utils.data impor...
creeper121386/EDVR-modified
TSA_Fusion
false
1,816
[ "Apache-2.0" ]
0
3fa565b99811e8f84f6ea3793090614606382332
https://github.com/creeper121386/EDVR-modified/tree/3fa565b99811e8f84f6ea3793090614606382332
Accuracy
# 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.nn import Module from torch import Tensor assert_size_stride = torch._C._dynam...
eldarkurtic/sparseml
Accuracy
false
10,051
[ "Apache-2.0" ]
0
9535ce1a576cd672fead58826376eef22baaebf7
https://github.com/eldarkurtic/sparseml/tree/9535ce1a576cd672fead58826376eef22baaebf7
Encoder
# 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....
BHD233/PaddleOCR2Pytorch
Encoder
false
13,377
[ "Apache-2.0" ]
364
f114069b3e2669c6adf0adf9596756205f184c9c
https://github.com/BHD233/PaddleOCR2Pytorch/tree/f114069b3e2669c6adf0adf9596756205f184c9c
LocalFeatureEncoder
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from abc import ABCMeta from torch.utils import model_zoo ...
Pooya448/leap
LocalFeatureEncoder
false
14,242
[ "BSD-3-Clause" ]
55
b0562baaaad1d4c0bcd514e020185c32a86faf23
https://github.com/Pooya448/leap/tree/b0562baaaad1d4c0bcd514e020185c32a86faf23
RealConvTranspose2d
import torch import torch.nn as nn class RealConvTranspose2d(nn.Module): def __init__(self, in_channels, out_channels, kernel_size=(1, 1), stride=(1, 1), padding=(0, 0), output_padding=(0, 0), groups=1): """ in_channels: real+imag out_channels: real+imag """ ...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
JamesLiao714/FullSubNet
RealConvTranspose2d
false
613
[ "MIT" ]
0
dad740bac35b5d7544c97740ae59101455acdc40
https://github.com/JamesLiao714/FullSubNet/tree/dad740bac35b5d7544c97740ae59101455acdc40
ClampModule
import torch import torch as th class ClampModule(th.nn.Module): """Why is this not a thing in the main library?""" def __init__(self, min_v, max_v): super().__init__() self.min_v = min_v self.max_v = max_v def forward(self, x): return th.clamp(x, self.min_v, self.max_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 import triton_helpers import torch as th assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_...
Miffyli/policy-supervectors
ClampModule
false
8,538
[ "MIT" ]
17
358284805e5bc96b95cae15e9741571e46d84bc9
https://github.com/Miffyli/policy-supervectors/tree/358284805e5bc96b95cae15e9741571e46d84bc9
HSwish
import torch from torch import nn class HSwish(nn.Module): """Hard Swish activation function. See: https://arxiv.org/abs/1905.02244 """ def forward(self, x): return x * nn.functional.relu6(x + 3).div_(6) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): re...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
BlueskyFR/determined
HSwish
false
156
[ "Apache-2.0" ]
0
ac734f0df11565333f9f37480cfc01dda011e349
https://github.com/BlueskyFR/determined/tree/ac734f0df11565333f9f37480cfc01dda011e349
MockModule
import torch import torch.nn as nn import torch.nn import torch.optim class MockModule(nn.Module): def __init__(self): super().__init__() self.conv = nn.Conv2d(3, 16, kernel_size=1) def forward(self, x: 'torch.Tensor'): return self.conv(x).mean(3).mean(2) def get_inputs(): retu...
import torch from torch._inductor.select_algorithm import extern_kernels import 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 import torch.optim assert_size_stride = to...
FebruaryBreeze/torch-parameter-groups
MockModule
false
451
[ "MIT" ]
0
e90c3d451c1afcfe5267801d5cfcc5413777b1d8
https://github.com/FebruaryBreeze/torch-parameter-groups/tree/e90c3d451c1afcfe5267801d5cfcc5413777b1d8
MeshEdgeEmbeddingLayer
# 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 import torch from torch import nn assert_size_stride = t...
eldadp100/The-Mesh-Transformer
MeshEdgeEmbeddingLayer
false
6,642
[ "MIT" ]
1
b3ab18f774251feff1093040dfdcf7b836a43505
https://github.com/eldadp100/The-Mesh-Transformer/tree/b3ab18f774251feff1093040dfdcf7b836a43505
Self_Attn
# 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....
anonymous2022ijcai/RGSL
Self_Attn
false
1,460
[ "MIT" ]
0
11c38ee50d50127c0f7c2a137bdb21ca5f7f3644
https://github.com/anonymous2022ijcai/RGSL/tree/11c38ee50d50127c0f7c2a137bdb21ca5f7f3644
ResNetV2
import torch import torch.nn.functional as F import torch.nn as nn from collections import OrderedDict def conv3x3(cin, cout, stride=1, groups=1, bias=False): return StdConv2d(cin, cout, kernel_size=3, stride=stride, padding=1, bias=bias, groups=groups) def conv1x1(cin, cout, stride=1, bias=False): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
RicJM/weighted_c2d
ResNetV2
false
15,389
[ "MIT" ]
49
38053869b77c1544349c53ba6f3c1325254aa413
https://github.com/RicJM/weighted_c2d/tree/38053869b77c1544349c53ba6f3c1325254aa413
TensorClampOptionMax
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
ahangchen/torch2trt
TensorClampOptionMax
false
6,116
[ "MIT" ]
1
53c663f0e0570ef7ffd6771354ae3478f63bd328
https://github.com/ahangchen/torch2trt/tree/53c663f0e0570ef7ffd6771354ae3478f63bd328
TransformerEncoderLayer
import math import torch from torch import nn import torch.nn.functional as F import torch.utils.model_zoo def _get_activation_fn(activation): """Return an activation function given a string""" if activation == 'relu': return F.relu if activation == 'gelu': return F.gelu if activation ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
dongyan007/Pretrained-IPT-main-master
TransformerEncoderLayer
false
1,875
[ "Apache-2.0" ]
0
7ed47002373e11bd57b7904f6935acdfba1e44ff
https://github.com/dongyan007/Pretrained-IPT-main-master/tree/7ed47002373e11bd57b7904f6935acdfba1e44ff
ResidualConvUnit
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
Zacchaeus14/lang-seg
ResidualConvUnit
false
9,763
[ "MIT" ]
0
ad1196a4d33830f3219dbe2260a69364a745f094
https://github.com/Zacchaeus14/lang-seg/tree/ad1196a4d33830f3219dbe2260a69364a745f094
TilePad2d
# 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...
mkarmann/conway-reversed
TilePad2d
false
10,672
[ "MIT" ]
0
a3ae10dd5768affb9caf193a246395ee0fb2bc6f
https://github.com/mkarmann/conway-reversed/tree/a3ae10dd5768affb9caf193a246395ee0fb2bc6f
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 assert_size_stride ...
UlyssesZh/selfsup_hnn
MLP
false
9,650
[ "MIT" ]
0
fedd261be81b38ec179cc71ea75d91964985a9e8
https://github.com/UlyssesZh/selfsup_hnn/tree/fedd261be81b38ec179cc71ea75d91964985a9e8
BCEIoULoss
# 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 typing...
arjunshibu/catalyst
BCEIoULoss
false
6,242
[ "Apache-2.0" ]
1
7160540f09530b803e5664e57db3e951fdc4dab3
https://github.com/arjunshibu/catalyst/tree/7160540f09530b803e5664e57db3e951fdc4dab3
BCEDiceLoss
import torch import torch.utils.data import torch import torch.nn as nn import torch.nn.functional as F class BCEDiceLoss(nn.Module): def __init__(self): super().__init__() def forward(self, output, target): bce = F.binary_cross_entropy_with_logits(output, target) smooth = 1e-05 ...
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...
AzmHmd/RMS
BCEDiceLoss
false
1,998
[ "MIT" ]
0
61d108e118d1e06de324644ebd8d92fc1b091b91
https://github.com/AzmHmd/RMS/tree/61d108e118d1e06de324644ebd8d92fc1b091b91
CircleLoss
# 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 ...
fabiozappo/Person_reID_tensorrt
CircleLoss
false
6,675
[ "Apache-2.0" ]
1
164441f35777698274e7664a9aefcc8d54467dc3
https://github.com/fabiozappo/Person_reID_tensorrt/tree/164441f35777698274e7664a9aefcc8d54467dc3
LayerNorm
import torch import torch.nn as nn import torch.optim class LayerNorm(nn.Module): """Construct a layernorm module in the OpenAI style (epsilon inside the square root).""" def __init__(self, n_state, e=1e-05): super(LayerNorm, self).__init__() self.g = nn.Parameter(torch.ones(n_state)) ...
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.optim assert_size_stride = torch._C._dynamo....
Arsenaut/comet-commonsense
LayerNorm
false
13,311
[ "Apache-2.0" ]
521
ffa4691ba6bfcb46ea2ed4ce91de5c6815f66e52
https://github.com/Arsenaut/comet-commonsense/tree/ffa4691ba6bfcb46ea2ed4ce91de5c6815f66e52
FiLM
# 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.functional assert_size_stride = torch._C._...
MichalOp/StarTrain
FiLM
false
17,717
[ "MIT" ]
7
e8dddf879f103e18239ad37b373c9b51fbbe093b
https://github.com/MichalOp/StarTrain/tree/e8dddf879f103e18239ad37b373c9b51fbbe093b
MultiLayerPerceptron
import torch import torch.cuda import torch.distributed import torch.utils.data import torch.optim class MultiLayerPerceptron(torch.nn.Module): """ A simple MLP that can either be used independently or put on top of pretrained models (such as BERT) and act as a classifier. Args: hidden_size (i...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Oreoluwa1234/NeMo
MultiLayerPerceptron
false
9,715
[ "Apache-2.0" ]
0
b01e3ceed34efe31fd43866685dbdd19a6b30928
https://github.com/Oreoluwa1234/NeMo/tree/b01e3ceed34efe31fd43866685dbdd19a6b30928
NonLocalLayer
import torch from torch import nn class NonLocalLayer(nn.Module): def __init__(self, input_dim, output_dim, hidden_dim=None, t_kernel_size=1, t_stride=1, t_padding=None, t_dilation=1, bias= True, residual=True): super().__init__() if t_padding is None: t_padding = (t_k...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
C-SUNSHINE/TOQ-Nets-PyTorch-Release
NonLocalLayer
false
17,138
[ "MIT" ]
6
05e06bf633fb3c6b610dda9a5126ecd7af1db02f
https://github.com/C-SUNSHINE/TOQ-Nets-PyTorch-Release/tree/05e06bf633fb3c6b610dda9a5126ecd7af1db02f
FPELU
import random import torch import torch.nn as nn class FPELU(nn.Module): """ Test for nn.functional types """ def __init__(self): super(FPELU, self).__init__() self.alpha = random.random() def forward(self, x): from torch.nn import functional as F return F.elu(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.triton_helpers import libdevice import random import torch.nn as nn assert_size_stride = torch._C._dynamo.guard...
dawnclaude/onnx2keras
FPELU
false
15,138
[ "MIT" ]
115
3d2a47c0a228b91fd434232274e216e491da36e3
https://github.com/dawnclaude/onnx2keras/tree/3d2a47c0a228b91fd434232274e216e491da36e3
LayerNorm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
Dodger23/SincNet
LayerNorm
false
13,585
[ "MIT" ]
951
bf848e88dc8d6cbeb4484e89486ec0a4ab237cb1
https://github.com/Dodger23/SincNet/tree/bf848e88dc8d6cbeb4484e89486ec0a4ab237cb1
Gaussianize
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch....
ffraaz/flow_based_priors
Gaussianize
false
3,498
[ "MIT" ]
0
4f61ecc233a01375c9a069a8baf676152a3e20fa
https://github.com/ffraaz/flow_based_priors/tree/4f61ecc233a01375c9a069a8baf676152a3e20fa
PositionwiseFeedForward
import torch from torch import nn from torchvision import models as models import torch.onnx import torch.nn class Identity(nn.Module): def forward(self, input_): return input_ class LayerNormalization(nn.Module): """ Layer normalization module """ def __init__(self, d_hid, eps=0.001): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
krodyush/training_extensions
PositionwiseFeedForward
false
10,981
[ "Apache-2.0" ]
0
542f4004dfbc6fc62a622065367ba4f85a703dd3
https://github.com/krodyush/training_extensions/tree/542f4004dfbc6fc62a622065367ba4f85a703dd3
AdjEncoder
import torch from torch import nn import torch.utils.data class AdjEncoder(nn.Module): def __init__(self, featureSize, hiddenSize): super(AdjEncoder, self).__init__() self.left = nn.Linear(featureSize, hiddenSize) self.right = nn.Linear(featureSize, hiddenSize, bias=False) self.se...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import n...
BigkoalaZhu/SCORES
AdjEncoder
false
7,778
[ "MIT" ]
16
8332733c375ee85c02bd34c2adce6a3213aad3c4
https://github.com/BigkoalaZhu/SCORES/tree/8332733c375ee85c02bd34c2adce6a3213aad3c4
SigmoidFocalClassificationLoss
# 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...
AbangLZU/OpenPCDet
SigmoidFocalClassificationLoss
false
7,642
[ "Apache-2.0" ]
29
eeea3f24d392f692228c1ad4e28c0dc9d0e25665
https://github.com/AbangLZU/OpenPCDet/tree/eeea3f24d392f692228c1ad4e28c0dc9d0e25665
adaILN
# 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.onnx from torch import nn import torch from torch.nn.parameter imp...
rtolps/Cats2dogs_ONNX
adaILN
false
10,739
[ "MIT" ]
0
9c18a9ea9c6ae65feb5c2a1a4c814d31999b6ffc
https://github.com/rtolps/Cats2dogs_ONNX/tree/9c18a9ea9c6ae65feb5c2a1a4c814d31999b6ffc
DenseConv2dLayer_5C
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from torch.nn import Parameter assert_size_stride = torch....
LenKerr/Semantic-Colorization-GAN
DenseConv2dLayer_5C
false
5,526
[ "MIT" ]
1
2ce52406ca6fc92e69692b451b1c9ae66ba3b76f
https://github.com/LenKerr/Semantic-Colorization-GAN/tree/2ce52406ca6fc92e69692b451b1c9ae66ba3b76f
SimpleCosModule
# 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
SimpleCosModule
false
7,395
[ "Apache-2.0" ]
1
4ba074df5da9822986a23a6679ab592c22660f6d
https://github.com/opti-mix/glow/tree/4ba074df5da9822986a23a6679ab592c22660f6d
BasicConv
# 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...
BJTU-MIMO/Channel_estimation_MRDN
BasicConv
false
125
[ "MIT" ]
0
f41972998a5403c901bc3e5d68d4acd05e9a7f6c
https://github.com/BJTU-MIMO/Channel_estimation_MRDN/tree/f41972998a5403c901bc3e5d68d4acd05e9a7f6c
SimpleNet
import torch import torch.nn as nn import torch.nn.functional as F class SimpleNet(nn.Module): def __init__(self, ni): super().__init__() self.linear1 = nn.Linear(ni, 128) self.linear2 = nn.Linear(128, 128) self.linear3 = nn.Linear(128, 64) self.linear4 = nn.Linear(64, 64)...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
pranjukn/AI-Feynman
SimpleNet
false
16,275
[ "MIT" ]
470
92e67b01fc2b00ed6ebcacc67edf6122b4219ac7
https://github.com/pranjukn/AI-Feynman/tree/92e67b01fc2b00ed6ebcacc67edf6122b4219ac7
GaussianSmearing
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
CGruich/ocp
GaussianSmearing
false
11,253
[ "MIT", "BSD-3-Clause" ]
0
dd97972b39d4a05e37f745e393a5245657ef5f9e
https://github.com/CGruich/ocp/tree/dd97972b39d4a05e37f745e393a5245657ef5f9e
SineLayer
import torch import numpy as np import torch.nn as nn class SineLayer(nn.Module): def __init__(self, in_features: 'int', out_features: 'int', omega_0: 'float'=30, is_first: 'bool'=False) ->None: """Sine activation function layer with omega_0 scaling. Args: in_features (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 from torch._inductor.runtime.triton_helpers import math as tl_math import numpy ...
Jose-Bastos/DeePyMoD
SineLayer
false
2,424
[ "MIT" ]
0
c043f9314990c9dd67d8f897cb14e107758f326d
https://github.com/Jose-Bastos/DeePyMoD/tree/c043f9314990c9dd67d8f897cb14e107758f326d
_GatedResidualNetwork
# 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 T...
gdevos010/darts
_GatedResidualNetwork
false
3,671
[ "Apache-2.0" ]
0
96c97c1e241500ae7b91d32bbfa21d811e4a7d71
https://github.com/gdevos010/darts/tree/96c97c1e241500ae7b91d32bbfa21d811e4a7d71
MaskedWordPredictions
from _paritybench_helpers import _mock_config import math import torch from torch import nn def gelu(x): """Gaussian Error Linear Unitという活性化関数です。 LeLUが0でカクっと不連続なので、そこを連続になるように滑らかにした形のLeLUです。 """ return x * 0.5 * (1.0 + torch.erf(x / math.sqrt(2.0))) class BertLayerNorm(nn.Module): def __init__(...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.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
EdgeFeaturesLayer
import torch import torch.nn as nn class EdgeFeaturesLayer(nn.Module): def __init__(self, d_model, d_edge, h, dropout): super(EdgeFeaturesLayer, self).__init__() assert d_model % h == 0 d_model // h self.linear = nn.Linear(d_edge, 1, bias=False) with torch.no_grad(): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
Jh-SYSU/MolRep
EdgeFeaturesLayer
false
13,877
[ "MIT" ]
57
b2c802d18d41d7db26c19c6dd644098f945e48a1
https://github.com/Jh-SYSU/MolRep/tree/b2c802d18d41d7db26c19c6dd644098f945e48a1
AR
# 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...
chenghaoliu89/TSForecasting_FT
AR
false
9,990
[ "MIT" ]
0
e29227e67f754919672eab9002a1b37b13ed28a0
https://github.com/chenghaoliu89/TSForecasting_FT/tree/e29227e67f754919672eab9002a1b37b13ed28a0
ReinforcedReceiver
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel import torch.utils.data from torch.distributions import Bernoulli import torch.distributions class ReinforcedReceiver(nn.Module): def __init__(self, n_bits, n_hidden): super(ReinforcedReceiver, 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 import torch.nn as nn import torch.nn.parallel import torch.utils.data import to...
Shawn-Guo-CN/EGG
ReinforcedReceiver
false
2,885
[ "MIT" ]
0
0a5b258108e2cd1c873d7f67e8c92551bb3d809c
https://github.com/Shawn-Guo-CN/EGG/tree/0a5b258108e2cd1c873d7f67e8c92551bb3d809c
MNIST_CNN
import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data class MNIST_CNN(nn.Module): def __init__(self): super(MNIST_CNN, self).__init__() self.conv1 = nn.Conv2d(1, 64, 3, 1, padding=1) self.conv2 = nn.Conv2d(64, 128, 3, stride=2, padding=1) self....
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
VinAIResearch/mDSDI
MNIST_CNN
false
18,068
[ "Apache-2.0" ]
9
8ec49085d8389ab490ec633c3ae4bf66be085366
https://github.com/VinAIResearch/mDSDI/tree/8ec49085d8389ab490ec633c3ae4bf66be085366
Conv2dLocal
# 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 math from torch.nn.parameter import Parameter...
vluzko/keras_to_pytorch
Conv2dLocal
false
10,946
[ "MIT" ]
0
eefb3f77024b3a3b75e918b93316c12bb9338f1c
https://github.com/vluzko/keras_to_pytorch/tree/eefb3f77024b3a3b75e918b93316c12bb9338f1c
ResidualBlock
import torch import torch.nn as nn def conv3x3(in_ch, out_ch, stride=1): """3x3 convolution with padding.""" return nn.Conv2d(in_ch, out_ch, kernel_size=3, stride=stride, padding=1) class ResidualBlock(nn.Module): """Simple residual block with two 3x3 convolutions. Args: in_ch (int): number...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
fqhank/HESIC
ResidualBlock
false
6,696
[ "Apache-2.0" ]
1
f15cb8e6822af45f0022ea4887fce915e250ed75
https://github.com/fqhank/HESIC/tree/f15cb8e6822af45f0022ea4887fce915e250ed75
APPNProp
import torch import torch.nn as nn import torch.nn.functional as F class SparseDropout(nn.Module): def __init__(self, p=0.5): super().__init__() self.p = p def forward(self, x): x_coal = x.coalesce() drop_val = F.dropout(x_coal._values(), self.p, self.training) return...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.functional as F assert_size_stride = torch...
EdisonLeeeee/GraphGallery
APPNProp
false
13,637
[ "MIT" ]
300
4eec9c5136bda14809bd22584b26cc346cdb633b
https://github.com/EdisonLeeeee/GraphGallery/tree/4eec9c5136bda14809bd22584b26cc346cdb633b
SelfAttention
import torch import torch.nn.functional as F import torch.nn as nn class SelfAttention(nn.Module): def __init__(self, input_size, heads, embed_size): super().__init__() self.input_size = input_size self.heads = heads self.emb_size = embed_size self.tokeys = nn.Linear(self....
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
mariuslindegaard/6.867_MARL_project
SelfAttention
false
16,011
[ "Apache-2.0" ]
401
572b88b4d491db8a1673535868f4bf9aff58f73d
https://github.com/mariuslindegaard/6.867_MARL_project/tree/572b88b4d491db8a1673535868f4bf9aff58f73d
FloorDivConst
import torch class FloorDivConst(torch.nn.Module): def __init__(self): super(FloorDivConst, self).__init__() def forward(self, x): return x // 2.0 def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_c...
NVIDIA-AI-IOT-private/torch2trt
FloorDivConst
false
10,503
[ "MIT" ]
0
953d60039e0c81e90eea467c3df2e6e3f7040242
https://github.com/NVIDIA-AI-IOT-private/torch2trt/tree/953d60039e0c81e90eea467c3df2e6e3f7040242
PatchEmbed
# 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...
IgoshinLab/dino
PatchEmbed
false
2,439
[ "Apache-2.0" ]
0
00abaabd8ad2f4edc414a44166a24211dfb75900
https://github.com/IgoshinLab/dino/tree/00abaabd8ad2f4edc414a44166a24211dfb75900
PSNRLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn from t...
ChristophReich1996/kornia
PSNRLoss
false
270
[ "ECL-2.0", "Apache-2.0" ]
0
35f955b46e8015da1cb9faa28c6943ec2b09cc2a
https://github.com/ChristophReich1996/kornia/tree/35f955b46e8015da1cb9faa28c6943ec2b09cc2a
TestConv2d
# 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...
AliaksandrSiarohin/pytorch2keras
TestConv2d
false
8,895
[ "MIT" ]
0
9c8ee213cff43ade152b1de78fa76fd05ec8b40a
https://github.com/AliaksandrSiarohin/pytorch2keras/tree/9c8ee213cff43ade152b1de78fa76fd05ec8b40a