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
SpatialSELayer3D
import torch import torch.nn as nn import torch.nn.functional as F class SpatialSELayer3D(nn.Module): """ 3D extension of SE block -- squeezing spatially and exciting channel-wise described in: *Roy et al., Concurrent Spatial and Channel Squeeze & Excitation in Fully Convolutional Networks, MICCAI 201...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
YilinLiu97/AmygNet-Pytorch
SpatialSELayer3D
false
18,150
[ "MIT" ]
3
d5bb244fd930791345d38f09870a7ded633f4622
https://github.com/YilinLiu97/AmygNet-Pytorch/tree/d5bb244fd930791345d38f09870a7ded633f4622
L2Norm
import torch import torch.nn as nn class L2Norm(nn.Module): def __init__(self, n_dims, scale=20.0, eps=1e-10): """L2 normalization layer. Args: n_dims (int): Number of dimensions to be normalized scale (float, optional): Defaults to 20.. eps (float, optional):...
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_...
Bin-ze/Food_detection
L2Norm
false
17,007
[ "Apache-2.0" ]
4
1c1a067f12644f2b0289e49aec4637d580722f70
https://github.com/Bin-ze/Food_detection/tree/1c1a067f12644f2b0289e49aec4637d580722f70
FFN
# 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....
yhgon/Transformer-TTS
FFN
false
13,138
[ "MIT" ]
0
5f34945cb5500d484275700c4e393ed125d5e753
https://github.com/yhgon/Transformer-TTS/tree/5f34945cb5500d484275700c4e393ed125d5e753
SpatialSEBlock
import torch from torch import nn class SpatialSEBlock(nn.Module): def __init__(self, channel): super(SpatialSEBlock, self).__init__() self.conv = nn.Conv2d(in_channels=channel, out_channels=1, kernel_size=1) self.sigmoid = nn.Sigmoid() def forward(self, x): y = 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 import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
amitkumarj441/TGS_Kaggle
SpatialSEBlock
false
6,187
[ "MIT" ]
1
a4f613046cc36f3f6dbec28adb35f97a63c2a994
https://github.com/amitkumarj441/TGS_Kaggle/tree/a4f613046cc36f3f6dbec28adb35f97a63c2a994
TensorSigmoid
import torch class TensorSigmoid(torch.nn.Module): def __init__(self): super(TensorSigmoid, self).__init__() def forward(self, x): return x.sigmoid() 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
NVIDIA-AI-IOT-private/torch2trt
TensorSigmoid
false
10,530
[ "MIT" ]
0
953d60039e0c81e90eea467c3df2e6e3f7040242
https://github.com/NVIDIA-AI-IOT-private/torch2trt/tree/953d60039e0c81e90eea467c3df2e6e3f7040242
Advantage_estimate
import torch import torch.nn as nn import torch.nn.functional as F class Advantage_estimate(nn.Module): def __init__(self, input_shape, output_shape, device, hidden_shape=128): super(Advantage_estimate, self).__init__() self.device = device self.dropout = nn.Dropout(p=0.01) self.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 assert_size_stride = torch._C._dynamo.guards.assert_size_s...
pupupue/Deep-RL-atari
Advantage_estimate
false
7,490
[ "MIT" ]
1
9b97157f87826feafcf272761d7eef9693a2b2c4
https://github.com/pupupue/Deep-RL-atari/tree/9b97157f87826feafcf272761d7eef9693a2b2c4
GenNoise
# 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...
GuYuanjie/DeepFusionPrior
GenNoise
false
5,220
[ "MIT" ]
1
a7126e073ed8c49b6a9a662492b64aaeee56cc01
https://github.com/GuYuanjie/DeepFusionPrior/tree/a7126e073ed8c49b6a9a662492b64aaeee56cc01
StyledConv
import math import torch from torch import nn from torch.nn import functional as F def fused_leaky_relu(input, bias, negative_slope=0.2, scale=2 ** 0.5): rest_dim = [1] * (input.ndim - bias.ndim - 1) input = input if input.ndim == 3: return F.leaky_relu(input + bias.view(1, *rest_dim, bias.shape[0...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import math from to...
ozmig77/StyleCLIP-1
StyledConv
false
16,226
[ "MIT" ]
2,732
57b887bba971ef86c107f4805785ce44fca3efef
https://github.com/ozmig77/StyleCLIP-1/tree/57b887bba971ef86c107f4805785ce44fca3efef
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...
SaumilShah66/dqn_uav
ReLU
false
9,577
[ "MIT" ]
0
2bf780369e964b870624aebcff16c0714cad03c1
https://github.com/SaumilShah66/dqn_uav/tree/2bf780369e964b870624aebcff16c0714cad03c1
TransformerDecoderLayer
# 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....
YiwenShaoStephen/snowfall
TransformerDecoderLayer
false
14,700
[ "Apache-2.0" ]
145
949226f35b29c629cb03cae36fa43da5993d27a3
https://github.com/YiwenShaoStephen/snowfall/tree/949226f35b29c629cb03cae36fa43da5993d27a3
CopyChannels
import torch class CopyChannels(torch.nn.Module): def __init__(self, multiple=3, dim=1): super(CopyChannels, self).__init__() self.multiple = multiple self.dim = dim def forward(self, x): return torch.cat([x for _ in range(self.multiple)], dim=self.dim) def get_inputs(): ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda reinterpret...
dianjixz/AutoDL
CopyChannels
false
15,178
[ "Apache-2.0" ]
1,044
48db4eb04d55ce69e93d4a3bdc24592bdb34a868
https://github.com/dianjixz/AutoDL/tree/48db4eb04d55ce69e93d4a3bdc24592bdb34a868
ImgLayerNorm
from torch.nn import Module import torch import torch.nn import torch.utils.data class ImgLayerNorm(Module): """ LayerNorm for images with channel axis 1 (this is necessary because PyTorch's LayerNorm operates on the last axis) """ def __init__(self, in_dim, eps=1e-05): 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.triton_helpers import libdevice from torch.nn import Module import torch.nn import torch.utils.data assert_size...
CrhistyanSilva/localbitsback
ImgLayerNorm
false
13,530
[ "MIT" ]
100
bdf66b41b2120c5b35edac4e4efda0fda3f2db4d
https://github.com/CrhistyanSilva/localbitsback/tree/bdf66b41b2120c5b35edac4e4efda0fda3f2db4d
FullAttention
from torch.nn import Module import torch from torch.nn import Dropout class FullAttention(Module): def __init__(self, use_dropout=False, attention_dropout=0.1): super().__init__() self.use_dropout = use_dropout self.dropout = Dropout(attention_dropout) def forward(self, queries, keys...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
YanivHollander/kornia
FullAttention
false
14,633
[ "ECL-2.0", "Apache-2.0" ]
418
ccd258d0956da89b1feca96448eff8e4969d405a
https://github.com/YanivHollander/kornia/tree/ccd258d0956da89b1feca96448eff8e4969d405a
MLP
import torch import torch.autograd import torch.nn as nn class MLP(nn.Module): def __init__(self, n_in, n_out, dropout=0): super().__init__() self.linear = nn.Linear(n_in, n_out) self.activation = nn.GELU() self.dropout = nn.Dropout(dropout) def forward(self, x): x = ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.autogr...
yifding/W2NER
MLP
false
13,139
[ "MIT" ]
0
d13128e45f3930a8b8faa794318939dc90a75974
https://github.com/yifding/W2NER/tree/d13128e45f3930a8b8faa794318939dc90a75974
DiscriminatorLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn import torch.utils.data import torch.nn.init assert_size_stride = to...
ForrestPi/Unsupervised-Defect-Segmentation
DiscriminatorLoss
false
8,203
[ "MIT" ]
17
e366ac7c757bb1b45f38ebbc502dfee7ccb72398
https://github.com/ForrestPi/Unsupervised-Defect-Segmentation/tree/e366ac7c757bb1b45f38ebbc502dfee7ccb72398
Biaffine
# 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...
icewing1996/biaffine-parser
Biaffine
false
6,851
[ "MIT" ]
1
f5a4ece7ba9a087d81b76dd6a8ea6aa7d90c6c82
https://github.com/icewing1996/biaffine-parser/tree/f5a4ece7ba9a087d81b76dd6a8ea6aa7d90c6c82
Hard_Distillation_Loss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
ManojKesani/Transformer-Implementations
Hard_Distillation_Loss
false
793
[ "MIT" ]
0
faca89d44523da80073790d53e53b4e80bde736f
https://github.com/ManojKesani/Transformer-Implementations/tree/faca89d44523da80073790d53e53b4e80bde736f
Network
import torch import torch.nn as nn import torch.nn.functional as F class Network(nn.Module): def __init__(self): super(Network, self).__init__() self.fc1 = nn.Linear(4, 256) self.fc2 = nn.Linear(256, 2) def forward(self, x): x = F.relu(self.fc1(x)) x = self.fc2(x) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
noureldinalaa/monocular_visual_odometry-_DuckieTown
Network
false
12,841
[ "MIT" ]
0
6b65e4fb9918dbf435133a9dd608c58cfb12b44b
https://github.com/noureldinalaa/monocular_visual_odometry-_DuckieTown/tree/6b65e4fb9918dbf435133a9dd608c58cfb12b44b
Fusion3_MinusFCLayer
import torch from torch import nn class Fusion3_MinusFCLayer(nn.Module): def __init__(self, input_dim): super(Fusion3_MinusFCLayer, self).__init__() self._norm_layer1 = nn.Linear(input_dim * 6, input_dim) def forward(self, input1, input2, input3): norm_input = self._norm_layer1(torch...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import 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...
RUCAIBox/WSDM2022-C2CRS
Fusion3_MinusFCLayer
false
17,850
[ "MIT" ]
4
8ef2fa7c44bdba1799ab79f379ae7394bd468c02
https://github.com/RUCAIBox/WSDM2022-C2CRS/tree/8ef2fa7c44bdba1799ab79f379ae7394bd468c02
Bridge
import torch import torch.nn as nn import torch.nn.functional as F class Bridge(nn.Sequential): def __init__(self, in_channels, out_channels): super(Bridge, self).__init__() self.conv1 = nn.Conv2d(in_channels, out_channels, kernel_size=3, padding=1) self.act1 = nn.LeakyReLU(0....
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
aiarjun/Monocular-Depth-Estimation
Bridge
false
18,247
[ "MIT" ]
6
5989673f1b6d865f822a342448172b374968c234
https://github.com/aiarjun/Monocular-Depth-Estimation/tree/5989673f1b6d865f822a342448172b374968c234
DecoderBlock
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.utils.data impor...
jmargutt/automated-building-detection
DecoderBlock
false
15,718
[ "MIT" ]
48
e1668a470b94252040f27d26098826c293fbb46d
https://github.com/jmargutt/automated-building-detection/tree/e1668a470b94252040f27d26098826c293fbb46d
MaskedLoss
import torch import torch.nn as nn class MaskedLoss(nn.Module): mse = nn.MSELoss() def forward(self, pred, target, mask): pred = torch.log1p(pred).contiguous().view(-1) target = torch.log1p(target).contiguous().view(-1) mask = mask.view(-1) pred = (mask * pred.T).T ret...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert...
vegetablejuiceftw/soft-pointer-networks
MaskedLoss
false
11,075
[ "MIT" ]
0
9705d9688b6b69db3948172771df4c367165c948
https://github.com/vegetablejuiceftw/soft-pointer-networks/tree/9705d9688b6b69db3948172771df4c367165c948
BartClassificationHead
# 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...
Clemens123/transformers
BartClassificationHead
false
11,488
[ "Apache-2.0" ]
0
22abe7bbc587c16ec30f9d1aa549dcbeba6e9e26
https://github.com/Clemens123/transformers/tree/22abe7bbc587c16ec30f9d1aa549dcbeba6e9e26
Model
import torch import torch.nn as nn class Model(nn.Module): def __init__(self, input_dim, output_class_num, **kwargs): super(Model, self).__init__() self.linear = nn.Linear(input_dim, output_class_num) def forward(self, features): pooled = features.mean(dim=1) predicted = 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
albertvillanova/s3prl
Model
false
6,157
[ "MIT" ]
1
b127ade4ed2f80a1027901bbd2f204b4fb1aaf03
https://github.com/albertvillanova/s3prl/tree/b127ade4ed2f80a1027901bbd2f204b4fb1aaf03
OELoss
import torch import torch.nn as nn class OELoss(nn.Module): def __init__(self): super(OELoss, self).__init__() def forward(self, x): return -(x.mean(1) - torch.logsumexp(x, dim=1)).mean() 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._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
ChurchChen/SparsityRegularization
OELoss
false
8,926
[ "Apache-2.0" ]
0
5c2e050ffe511cf4307a0bcd98360d28b7db8fef
https://github.com/ChurchChen/SparsityRegularization/tree/5c2e050ffe511cf4307a0bcd98360d28b7db8fef
CIFAR10_Net
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
nannullna/deep-active-learning
CIFAR10_Net
false
16,143
[ "MIT" ]
465
c54a995640c63ba4679129c5a1fd5cec9a2858e6
https://github.com/nannullna/deep-active-learning/tree/c54a995640c63ba4679129c5a1fd5cec9a2858e6
SiameseMLP
# 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...
EE559DeepLearningEPFL/Project1
SiameseMLP
false
391
[ "MIT" ]
0
cbafdfee26771ae0ba3cd36375e68d92e9f108b2
https://github.com/EE559DeepLearningEPFL/Project1/tree/cbafdfee26771ae0ba3cd36375e68d92e9f108b2
ConvCompress
import torch from torch import nn class ConvCompress(nn.Module): def __init__(self, dim, ratio=4): super().__init__() self.conv = nn.Conv1d(dim, dim, ratio, stride=ratio) def forward(self, mem): mem = mem.transpose(1, 2) compressed_mem = self.conv(mem) return compress...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import 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...
yhgon/cmtf
ConvCompress
false
13,130
[ "MIT" ]
0
7a3ffc3a59a7c546a00d3b73be58f7d1c2f1f0cf
https://github.com/yhgon/cmtf/tree/7a3ffc3a59a7c546a00d3b73be58f7d1c2f1f0cf
PCN1
import torch import torch.nn as nn import torch.nn.functional as F class PCN1(nn.Module): def __init__(self): super().__init__() self.conv1 = nn.Conv2d(3, 16, kernel_size=3, stride=2, dilation=1) self.conv2 = nn.Conv2d(16, 32, kernel_size=3, stride=2) self.conv3 = nn.Conv2d(32, 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 import triton_helpers from torch._inductor.runtime....
wkdhkr/pytorch-PCN
PCN1
false
4,552
[ "BSD-2-Clause" ]
0
4686c8fcda0b4fe7ecd7488f5554e19e8f6a8f68
https://github.com/wkdhkr/pytorch-PCN/tree/4686c8fcda0b4fe7ecd7488f5554e19e8f6a8f68
SALayer
import torch import torch.nn as nn import torch.utils.model_zoo class SALayer(nn.Module): def __init__(self, channel, kernel_size=3): super(SALayer, self).__init__() self.conv_sa = nn.Conv2d(channel, channel, kernel_size, padding=1, groups=channel) def forward(self, x): y...
import torch from torch._inductor.select_algorithm import extern_kernels import 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.model_zoo assert_size_stride = torch._C...
iariav/EDSR-PyTorch
SALayer
false
3,661
[ "MIT" ]
0
c709b3d43adb6c2457cf87c37c1f34a7bcfc48bb
https://github.com/iariav/EDSR-PyTorch/tree/c709b3d43adb6c2457cf87c37c1f34a7bcfc48bb
GlobalPooling1D
# 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 from typing import * assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dyn...
HughMun/MultiBench
GlobalPooling1D
false
13,800
[ "MIT" ]
148
d5712a0815a9486b0e0c76b54cd63c880188fc8e
https://github.com/HughMun/MultiBench/tree/d5712a0815a9486b0e0c76b54cd63c880188fc8e
BasicModel3
# 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...
Europium248/captum
BasicModel3
false
410
[ "BSD-3-Clause" ]
0
ac02fae2651b8d68a44bcb9d03b91cbb3959f2fc
https://github.com/Europium248/captum/tree/ac02fae2651b8d68a44bcb9d03b91cbb3959f2fc
QNetwork
# 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_...
AlexS28/SABER
QNetwork
false
16,874
[ "BSD-3-Clause" ]
4
91f74319a41f473b8e8f9eff6b7d9b604b94c7da
https://github.com/AlexS28/SABER/tree/91f74319a41f473b8e8f9eff6b7d9b604b94c7da
Conv1dCompression
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch.nn import Module from torch import nn import torch.utils.data import ...
techthiyanes/annotated_deep_learning_paper_implementations
Conv1dCompression
false
16,552
[ "MIT" ]
3,714
8af24da2dd39a9a87482a4d18c2dc829bbd3fd47
https://github.com/techthiyanes/annotated_deep_learning_paper_implementations/tree/8af24da2dd39a9a87482a4d18c2dc829bbd3fd47
TransformerLayer
import torch import numpy as np import torch.nn as nn import torch.distributions class MultiHeadAttention(nn.Module): def __init__(self, d_model, n_heads, kq_same=False, bias=True): super().__init__() """ It has projection layer for getting keys, queries and values. Followed by attention....
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Yingting-dev/ReChorus
TransformerLayer
false
3,010
[ "MIT" ]
0
a16bc1e42f3e90e889133d7476c52ada44db573b
https://github.com/Yingting-dev/ReChorus/tree/a16bc1e42f3e90e889133d7476c52ada44db573b
DenseCrossEntropy
import torch import torch.nn as nn import torch.nn.functional as F class DenseCrossEntropy(nn.Module): def __init__(self): super(DenseCrossEntropy, self).__init__() def forward(self, logits, labels): logits = logits.float() labels = labels.float() logprobs = F.log_softmax(log...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
Mo5mami/wtfml
DenseCrossEntropy
false
14,054
[ "MIT" ]
283
afddec88d9c3a94e30ab2897525daf3f5cf8b774
https://github.com/Mo5mami/wtfml/tree/afddec88d9c3a94e30ab2897525daf3f5cf8b774
WeightedFeatureFusion
import torch import torch.nn as nn from torchvision.models.resnet import * import torch.utils.data class WeightedFeatureFusion(nn.Module): def __init__(self, layers, weight=False): super(WeightedFeatureFusion, self).__init__() self.layers = layers self.weight = weight self.n = len...
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 torchvision.models.resnet import * import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_si...
PanJason/ML_Proj
WeightedFeatureFusion
false
17,898
[ "MIT" ]
4
663be12e8eb6e30e3c902a4984ac0db33bfce605
https://github.com/PanJason/ML_Proj/tree/663be12e8eb6e30e3c902a4984ac0db33bfce605
TrainablePositionalEncoding
import torch import torch.nn as nn class TrainablePositionalEncoding(nn.Module): """Construct the embeddings from word, position and token_type embeddings. """ def __init__(self, max_position_embeddings, hidden_size, dropout=0.1): super(TrainablePositionalEncoding, self).__init__() self.p...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
minjoong507/TVRetrieval
TrainablePositionalEncoding
false
10,755
[ "MIT" ]
0
919e1766ab8aa1ef267bd3b80d4f87b06cde09a9
https://github.com/minjoong507/TVRetrieval/tree/919e1766ab8aa1ef267bd3b80d4f87b06cde09a9
NN
import torch import torch.nn as nn import torch.nn.functional as F class NN(nn.Module): def __init__(self, input_size, num_classes): super(NN, self).__init__() self.fc1 = nn.Linear(input_size, 50) self.fc2 = nn.Linear(50, num_classes) def forward(self, x): x = F.relu(self.fc1...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
AsianZeus/PyTorch-Models
NN
false
8,842
[ "Apache-2.0" ]
0
3249a06a5233b22232a8a336c52e8c24d1b55439
https://github.com/AsianZeus/PyTorch-Models/tree/3249a06a5233b22232a8a336c52e8c24d1b55439
SimpleGCN
import math import torch import torch.nn as nn from torch.nn.parameter import Parameter from torch.nn import Parameter import torch.nn import torch.autograd class SimpleGCN(nn.Module): """A simple graph convolution layer, similar to the one defined in Kipf et al. https://arxiv.org/abs/1609.02907 """ ...
import torch from torch._inductor.select_algorithm import extern_kernels import 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 from torch.nn.parameter import Parameter from ...
Kh4L/kaolin
SimpleGCN
false
712
[ "ECL-2.0", "Apache-2.0" ]
0
83002fedc67e1c9112a8f834ffb4f8a890e6042a
https://github.com/Kh4L/kaolin/tree/83002fedc67e1c9112a8f834ffb4f8a890e6042a
Critic
import torch import torch.nn as nn import torch.nn.functional as F class Critic(nn.Module): def __init__(self, state_dim, action_dim): super(Critic, self).__init__() self.fc1 = nn.Linear(state_dim + action_dim, 400) self.fc2 = nn.Linear(400, 300) self.fc3 = nn.Linear(300, 1) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
Chris0919/Deep-reinforcement-learning-with-pytorch
Critic
false
4,999
[ "MIT" ]
1
a4f458dde7659654fcae4635d25f6bd05a5d2d6c
https://github.com/Chris0919/Deep-reinforcement-learning-with-pytorch/tree/a4f458dde7659654fcae4635d25f6bd05a5d2d6c
down_right_shifted_conv2d
# 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 ...
andiac/pixel-cnn-pp
down_right_shifted_conv2d
false
6,205
[ "MIT" ]
1
3ba856320e40208cbb6e9cac3e66a739f148903e
https://github.com/andiac/pixel-cnn-pp/tree/3ba856320e40208cbb6e9cac3e66a739f148903e
AE_3D_200
import torch import torch.nn as nn import torch.utils.data class AE_3D_200(nn.Module): def __init__(self, n_features=4): super(AE_3D_200, self).__init__() self.en1 = nn.Linear(n_features, 200) self.en2 = nn.Linear(200, 100) self.en3 = nn.Linear(100, 50) self.en4 = nn.Linea...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
gitter-badger/HEPAutoencoders
AE_3D_200
false
12,432
[ "Apache-2.0" ]
0
43010cd66fa4335a04b30b87926148e1c8d92de9
https://github.com/gitter-badger/HEPAutoencoders/tree/43010cd66fa4335a04b30b87926148e1c8d92de9
EdgeCaseModel
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from typing import Any import torch.nn as nn assert_size_stride = torch._C._dyna...
e-dorigatti/torchinfo
EdgeCaseModel
false
12,327
[ "MIT" ]
0
9fa0e677fb7002e89afd5b1bb372fe8c1dd813d6
https://github.com/e-dorigatti/torchinfo/tree/9fa0e677fb7002e89afd5b1bb372fe8c1dd813d6
Flatten
# 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 itertools import product as product assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided...
Juggernaut93/InsightFace-v2
Flatten
false
674
[ "Apache-2.0" ]
0
65e9b8d1f285a87472ffb913bec136d4e046798f
https://github.com/Juggernaut93/InsightFace-v2/tree/65e9b8d1f285a87472ffb913bec136d4e046798f
DupCNN
# 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...
WillieMaddox/Airbus_SDC_dup
DupCNN
false
12,007
[ "MIT" ]
0
09be904cf3c8050086f07538f5e2954282de5d62
https://github.com/WillieMaddox/Airbus_SDC_dup/tree/09be904cf3c8050086f07538f5e2954282de5d62
TransformerLinearXMCHead
# 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 numpy as np import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dyna...
cjhsieh/pecos
TransformerLinearXMCHead
false
3,300
[ "Apache-2.0", "BSD-3-Clause" ]
0
22e88ee544d5a5e891a1d23a578881fdf26dfcf7
https://github.com/cjhsieh/pecos/tree/22e88ee544d5a5e891a1d23a578881fdf26dfcf7
LearnedPositionalEmbedding
import torch import torch.nn as nn import torch.nn.functional as F class LearnedPositionalEmbedding(nn.Embedding): """ This module learns positional embeddings up to a fixed maximum size. Padding ids are ignored by either offsetting based on padding_idx or by setting padding_idx to None and ensuring t...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
leeharry92/esm
LearnedPositionalEmbedding
false
12,702
[ "MIT" ]
0
7d0feccf03ebbdeba4e7ba0f21d934099a0223ce
https://github.com/leeharry92/esm/tree/7d0feccf03ebbdeba4e7ba0f21d934099a0223ce
MeanVarFC
# 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...
lingzenan/invertible-resnet
MeanVarFC
false
7,097
[ "MIT" ]
1
57b1c0de51a885aed074b77628f3b0c85c548e70
https://github.com/lingzenan/invertible-resnet/tree/57b1c0de51a885aed074b77628f3b0c85c548e70
ContrastiveLoss
import torch class ContrastiveLoss(torch.nn.Module): def __init__(self, margin=1.0): super(ContrastiveLoss, self).__init__() self.margin = margin def forward(self, anchor, positive, negative): distance_anchor_positive = (anchor - positive).pow(2).sum(1) distance_anchor_negati...
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...
DongChengdongHangZhou/Siamese-Network-tiff
ContrastiveLoss
false
375
[ "MIT" ]
0
aaf923ad59301af1b3237e605964341a90dc414b
https://github.com/DongChengdongHangZhou/Siamese-Network-tiff/tree/aaf923ad59301af1b3237e605964341a90dc414b
MSELoss
import functools import torch import torch.nn.functional as F import torch.nn as nn def reduce_loss(loss, reduction): """Reduce loss as specified. Args: loss (Tensor): Elementwise loss tensor. reduction (str): Options are "none", "mean" and "sum". Return: Tensor: Reduced loss ten...
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 functools import torch.nn.functional as F import torch.nn as nn assert_size_stride...
ChHanXiao/mmdetection
MSELoss
false
9,154
[ "Apache-2.0" ]
0
324aa5a042857a9b57abe37385e1210709a20d02
https://github.com/ChHanXiao/mmdetection/tree/324aa5a042857a9b57abe37385e1210709a20d02
CDEFunc
import torch class CDEFunc(torch.nn.Module): def __init__(self, input_channels, hidden_channels): super(CDEFunc, self).__init__() self.input_channels = input_channels self.hidden_channels = hidden_channels self.linear1 = torch.nn.Linear(hidden_channels, 128) self.linear2 =...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
khaledsaab/NeuralCDE
CDEFunc
false
12,671
[ "Apache-2.0" ]
0
559d9d6fdb137afd14965725ea4845cf31e9235c
https://github.com/khaledsaab/NeuralCDE/tree/559d9d6fdb137afd14965725ea4845cf31e9235c
PositionalEncoding
import torch from torch import nn import torch.nn import torch.optim class PositionalEncoding(nn.Module): """ A special, non-learnable positional encoding for handling variable (possibly longer) lengths of inputs. We simply add an ordinal number as an additional dimension for the input embeddings, and...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 import t...
ananthsub/ReAgent
PositionalEncoding
false
6,197
[ "BSD-3-Clause" ]
1
92f223a135b8fbc0942a217acb117ad0935897a3
https://github.com/ananthsub/ReAgent/tree/92f223a135b8fbc0942a217acb117ad0935897a3
ModuleForDdpCommHook
# 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 import torch.utils.data.distributed import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.dat...
woqidaideshi/bagua
ModuleForDdpCommHook
false
16,724
[ "MIT" ]
635
0ee96da598685748519d58d24ce983499cb36721
https://github.com/woqidaideshi/bagua/tree/0ee96da598685748519d58d24ce983499cb36721
Minibatch_stddev_layer
import torch import torch.nn as nn class Minibatch_stddev_layer(nn.Module): """ Minibatch standard deviation layer. (D_stylegan2) """ def __init__(self, group_size=4, num_new_features=1): super().__init__() self.group_size = group_size self.num_new_features = num_new_featu...
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_...
tomguluson92/StyleGAN2_PyTorch
Minibatch_stddev_layer
false
16,591
[ "MIT" ]
89
4ab7354c85cb986d2b77f5238c4a18c5efd1db1b
https://github.com/tomguluson92/StyleGAN2_PyTorch/tree/4ab7354c85cb986d2b77f5238c4a18c5efd1db1b
SageConv
from torch.nn import Module import torch import torch.nn as nn from torch.nn.modules.module import Module class SageConv(Module): """ Simple Graphsage layer """ def __init__(self, in_features, out_features, bias=False): super(SageConv, self).__init__() self.proj = nn.Linear(in_feature...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch.nn import Module import torch.nn as nn from torch.nn.modules.module i...
yutaoming/Rare-Category-Detection
SageConv
false
4,688
[ "MIT" ]
0
76cf023dff44eef3ecc17f0ebf2b11a08cd63a73
https://github.com/yutaoming/Rare-Category-Detection/tree/76cf023dff44eef3ecc17f0ebf2b11a08cd63a73
RegressionModel
import torch import torch.nn as nn class RegressionModel(nn.Module): def __init__(self, num_features_in, num_anchors=1, feature_size=256): super(RegressionModel, self).__init__() self.conv1 = nn.Conv2d(num_features_in, feature_size, kernel_size=3, padding=1) self.act1 = nn.ReL...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
fmrdev/ctracker
RegressionModel
false
12,622
[ "Apache-2.0" ]
0
6f5a88d569d0132a9f844cd1e55e60032d32bcba
https://github.com/fmrdev/ctracker/tree/6f5a88d569d0132a9f844cd1e55e60032d32bcba
TwoLayerNet
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C...
Saran-nns/delve
TwoLayerNet
false
1,015
[ "MIT" ]
0
3489d8aa13181b392d3c47a19f9d9a47d87f8790
https://github.com/Saran-nns/delve/tree/3489d8aa13181b392d3c47a19f9d9a47d87f8790
Highway
import torch from torch import nn import torch.nn.functional as F class Highway(nn.Module): def __init__(self, size): super(Highway, self).__init__() self.one = nn.Linear(size, size) self.two = nn.Linear(size, size) def forward(self, x): x0 = F.relu(self.one(x)) x1 = ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
DennisMagnusson/voice2voice
Highway
false
2,154
[ "MIT" ]
0
cee95b3eda8c2159f6b85e1733652ff8b7a537ce
https://github.com/DennisMagnusson/voice2voice/tree/cee95b3eda8c2159f6b85e1733652ff8b7a537ce
Foo
# 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.functional import torch.nn.parallel import torch.utils.data import torch.optim import torch.utils.data.distributed assert_si...
alexshuang/apex
Foo
false
1,405
[ "BSD-3-Clause" ]
0
107f1ff569c40769de2ed8d366126282e63b63ce
https://github.com/alexshuang/apex/tree/107f1ff569c40769de2ed8d366126282e63b63ce
PerturbationModule
import torch import torch.utils.data import torch import torch.nn as nn class PerturbationModule(nn.Module): def __init__(self, T): super(PerturbationModule, self).__init__() self.T = T self.training = False self.conv_block = None def forward(self, x): if not self.tra...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data import torch import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cud...
jeffkinnison/pytorch-CycleGAN-and-pix2pix
PerturbationModule
false
10,237
[ "BSD-3-Clause" ]
0
e47041fa4ffa80ad5948d2d1125ec94c34c5947d
https://github.com/jeffkinnison/pytorch-CycleGAN-and-pix2pix/tree/e47041fa4ffa80ad5948d2d1125ec94c34c5947d
_ASPP
# 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...
developfeng/BCM
_ASPP
false
9,989
[ "BSD-3-Clause-Attribution" ]
0
8eb5ac950a2d67d10fc707519bb66cd9ea4f14f2
https://github.com/developfeng/BCM/tree/8eb5ac950a2d67d10fc707519bb66cd9ea4f14f2
GramMatrix
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.fft assert_size_stride = torch._C._dynamo.guards.assert_size_stride...
NejcHirci/material-addon
GramMatrix
false
17,775
[ "MIT" ]
4
c08e2081413c3319b712c2f7193ac8013f601382
https://github.com/NejcHirci/material-addon/tree/c08e2081413c3319b712c2f7193ac8013f601382
DQN
# 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_...
FranckNdame/drlkit
DQN
false
8,106
[ "MIT" ]
33
698f3c182036cc5eed68f2a05b53a3e3670146bf
https://github.com/FranckNdame/drlkit/tree/698f3c182036cc5eed68f2a05b53a3e3670146bf
CaricatureLoss
import torch import torch.nn as nn import torch.nn.functional as F def resize_4d_tensor_by_size(x, height, width): res = F.interpolate(x, size=(height, width), mode='bilinear') return res class CaricatureLoss(nn.Module): def __init__(self, power=1.0): super().__init__() self.power = pow...
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 import...
Tiamat-Tech/torch-dreams
CaricatureLoss
false
2,929
[ "MIT" ]
0
e1c1795f0a0007f54293c474de5d2b80ee829ab8
https://github.com/Tiamat-Tech/torch-dreams/tree/e1c1795f0a0007f54293c474de5d2b80ee829ab8
ActivationClamp
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data...
ClashLuke/online-normalization
ActivationClamp
false
13,511
[ "BSD-3-Clause" ]
55
fe08b9f8e288d628eee4f9991e562cdb4f9e997b
https://github.com/ClashLuke/online-normalization/tree/fe08b9f8e288d628eee4f9991e562cdb4f9e997b
Postnet
# 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...
aviasd/Mockingjay-Speech-Representation
Postnet
false
6,281
[ "MIT" ]
1
c01aef3f98bbb3fd4b0fc1b61e77fb5d02a0e453
https://github.com/aviasd/Mockingjay-Speech-Representation/tree/c01aef3f98bbb3fd4b0fc1b61e77fb5d02a0e453
MNISTFeatures
import torch import torch.nn.functional as F import torch.nn as nn class MNISTFeatures(nn.Module): """ A small convnet for extracting features from MNIST. """ def __init__(self): """ """ super().__init__() self.conv1 = nn.Conv2d(3, 32, 5, 1) self.conv2 = 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 import torch.nn as nn assert_...
KevinMusgrave/pytorch-adapt
MNISTFeatures
false
13,966
[ "MIT" ]
131
ff1491e1bfcc586afb8ee619712c8816ddf10358
https://github.com/KevinMusgrave/pytorch-adapt/tree/ff1491e1bfcc586afb8ee619712c8816ddf10358
ResizeConv
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn import torch.utils.data assert_size_stride = torch._C._dyna...
ELEKTRONN/elektronn3
ResizeConv
false
13,629
[ "MIT" ]
124
19c751855dffc67b744cd43e757aa4a5bd577d9b
https://github.com/ELEKTRONN/elektronn3/tree/19c751855dffc67b744cd43e757aa4a5bd577d9b
C3D
import random import torch import torchvision import torch.nn.parallel import torch.optim from torch import nn class GroupMultiScaleCrop(object): def __init__(self, input_size, scales=None, max_distort=1, fix_crop= True, more_fix_crop=True): self.scales = scales if scales is not None else [1, 875...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 random import torchvis...
coderSkyChen/Action_Recognition_Zoo
C3D
false
15,235
[ "MIT" ]
240
92ec5ec3efeee852aec5c057798298cd3a8e58ae
https://github.com/coderSkyChen/Action_Recognition_Zoo/tree/92ec5ec3efeee852aec5c057798298cd3a8e58ae
Mean_One
# 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 ...
KaiQiangSong/joint_parse_summ
Mean_One
false
8,767
[ "BSD-3-Clause" ]
29
5d4a40d9a681bc8b06c847643d810846f3867216
https://github.com/KaiQiangSong/joint_parse_summ/tree/5d4a40d9a681bc8b06c847643d810846f3867216
Attention
# 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....
PeterouZh/SemiNAS
Attention
false
17,819
[ "Apache-2.0" ]
5
39731663271b994571160d43d796b2bb93386b3b
https://github.com/PeterouZh/SemiNAS/tree/39731663271b994571160d43d796b2bb93386b3b
DCENetLoss
from _paritybench_helpers import _mock_config import torch import torch.nn as nn import torch.nn.functional as F class DCENetLoss(nn.Module): def __init__(self, config): super(DCENetLoss, self).__init__() self.beta = config['beta'] self.pred_seq = config['pred_seq'] def forward(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 from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
SeongjuLee/DCENet-PyTorch
DCENetLoss
false
8,757
[ "MIT" ]
10
eb477ce06356ae597c162dd3229285400ebf9168
https://github.com/SeongjuLee/DCENet-PyTorch/tree/eb477ce06356ae597c162dd3229285400ebf9168
NeuralNetMultiplePositionalArgumentsMultiOutputsWithoutDependency
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn import torch....
thilow/onnxruntime
NeuralNetMultiplePositionalArgumentsMultiOutputsWithoutDependency
false
11,020
[ "MIT" ]
0
1a3ddf0714e1bdf9b807a342eee5f6e160ad1ec9
https://github.com/thilow/onnxruntime/tree/1a3ddf0714e1bdf9b807a342eee5f6e160ad1ec9
Net
import torch import torch.nn as nn import torch.nn.functional as F class Net(nn.Module): def __init__(self): super(Net, self).__init__() self.conv2 = nn.Conv2d(3, 64, 8, 2, 3) self.conv3 = nn.Conv2d(64, 128, 6, 2, 2) self.conv4 = nn.Conv2d(128, 256, 4, 2, 1) self.conv5 = n...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
eric-yoo/HairNet
Net
false
12,428
[ "MIT" ]
0
15725328709f3f0e63d122914f8e55d18c4fa1fa
https://github.com/eric-yoo/HairNet/tree/15725328709f3f0e63d122914f8e55d18c4fa1fa
Net
import torch from numpy import * class Net(torch.nn.Module): def __init__(self, n_feature, n_hidden, n_output): super(Net, self).__init__() self.hidden = torch.nn.Linear(n_feature, n_hidden) self.predict = torch.nn.Linear(n_hidden, n_output) def forward(self, x): x = self.hid...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from numpy import *...
LishudaNoBug/learning_PyTorch
Net
false
5,549
[ "MIT" ]
1
1026035a9cb3d70e2fe97363b532e63db3ca136d
https://github.com/LishudaNoBug/learning_PyTorch/tree/1026035a9cb3d70e2fe97363b532e63db3ca136d
mbr_convex_hull
import torch import torch.nn as nn class mbr_convex_hull(nn.Module): def _init_(self, hull_points_2d): super(mbr_convex_hull, self)._init_() self.hull_points_2d = hull_points_2d return def forward(ctx, hull_points_2d): N = hull_points_2d.shape[0] edges = hull_points_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 from torch._inductor.runtime....
hlesmqh/WS3D
mbr_convex_hull
false
15,548
[ "MIT" ]
100
6816eeb135923a59de34ee5d94be2d0fd3ec83f9
https://github.com/hlesmqh/WS3D/tree/6816eeb135923a59de34ee5d94be2d0fd3ec83f9
NTN
import torch import torch.nn as nn import torch.nn.functional as F class NTN(nn.Module): def __init__(self, l_dim, r_dim, k=4, non_linear=F.tanh): super(NTN, self).__init__() self.u_R = nn.Linear(k, 1, bias=False) self.f = non_linear self.W = nn.Bilinear(l_dim, r_dim, k, bias=True...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.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
SmallMnistNoDropoutWithPassThrough
# 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....
Rohan-Chaudhury/aimet
SmallMnistNoDropoutWithPassThrough
false
17,970
[ "BSD-3-Clause" ]
3
1c38cac8cc0fd32dca40ce5e39940805d29f7a4a
https://github.com/Rohan-Chaudhury/aimet/tree/1c38cac8cc0fd32dca40ce5e39940805d29f7a4a
BinaryCrossEntropyLabelSmooth
# 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 assert_size...
NehzUx/autodl
BinaryCrossEntropyLabelSmooth
false
8,580
[ "Apache-2.0" ]
25
c80fdc4b297ed1ec2b9e6911d313f1fe31d83cb9
https://github.com/NehzUx/autodl/tree/c80fdc4b297ed1ec2b9e6911d313f1fe31d83cb9
MaskedLanguageModel
import math import torch import torch.nn as nn import torch.cuda import torch.distributed def get_activation_fn(activation): """Return an activation function Module according to its name.""" if activation == 'gelu': fn = GELU() elif activation == 'relu': fn = nn.ReLU() elif 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....
SivilTaram/dialogue-utterance-rewriter-pytorch
MaskedLanguageModel
false
2,923
[ "MIT" ]
0
92c2254958b7a1ee9199836f7f2236575270983f
https://github.com/SivilTaram/dialogue-utterance-rewriter-pytorch/tree/92c2254958b7a1ee9199836f7f2236575270983f
LinearBlock
import torch import torch.nn as nn import torch.utils.data def l2normalize(v, eps=1e-12): return v / (v.norm() + eps) class LayerNorm(nn.Module): def __init__(self, num_features, eps=1e-05, affine=True): super(LayerNorm, self).__init__() self.num_features = num_features self.affine ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
AllenPu/mbdg
LinearBlock
false
7,664
[ "MIT" ]
27
243f53a57dcf4bfb6e717c0c9f64a839cff8d548
https://github.com/AllenPu/mbdg/tree/243f53a57dcf4bfb6e717c0c9f64a839cff8d548
UpsampleBLock
import torch import torch.nn as nn import torch.utils.data class UpsampleBLock(nn.Module): def __init__(self, in_channels): super(UpsampleBLock, self).__init__() self.conv = nn.Conv2d(in_channels, in_channels * 2 ** 2, kernel_size=3, padding=1) self.pixel_shuffle = nn.PixelShu...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
tomron27/srganus
UpsampleBLock
false
11,015
[ "Apache-2.0" ]
0
5dab73540535138375203bf31e31246cd203f3c0
https://github.com/tomron27/srganus/tree/5dab73540535138375203bf31e31246cd203f3c0
EncoderSteenkiste
# 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...
jnsrch/disentangling-vae-cwt
EncoderSteenkiste
false
15,720
[ "MIT" ]
581
0e927bdcd3d149cadb30aa107331f0c071138c41
https://github.com/jnsrch/disentangling-vae-cwt/tree/0e927bdcd3d149cadb30aa107331f0c071138c41
AdaptiveMaxPool2d
# 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...
yifanpu001/PytorchToCaffe
AdaptiveMaxPool2d
false
4,711
[ "MIT" ]
0
37c1ebfc3547e93b1c174721036d03c831c60e48
https://github.com/yifanpu001/PytorchToCaffe/tree/37c1ebfc3547e93b1c174721036d03c831c60e48
LanguageModelCriterion
# 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 torch.autograd import * assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
ankit1khare/Show_Infer_and_Tell-CIC
LanguageModelCriterion
false
18,334
[ "MIT" ]
5
5437cceaaaf1bbcd16cb921650afd769378f4fc4
https://github.com/ankit1khare/Show_Infer_and_Tell-CIC/tree/5437cceaaaf1bbcd16cb921650afd769378f4fc4
MSEGradLoss
import torch import torch.nn as nn import torch.utils.data class MSEGradLoss(nn.Module): def __init__(self, grad=False): super(MSEGradLoss, self).__init__() self.grad = grad def forward(self, input, target): err = input - target loss = err.norm(p=2).pow(2).div(err.numel()) ...
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 import...
JaguAroo/SRResCGAN
MSEGradLoss
false
626
[ "MIT" ]
0
9aac612aff631f7fb9142e0a36de9559cfc1a62d
https://github.com/JaguAroo/SRResCGAN/tree/9aac612aff631f7fb9142e0a36de9559cfc1a62d
RewardModelNetwork
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
Hcnaeg/DI-engine
RewardModelNetwork
false
2,393
[ "Apache-2.0" ]
0
aba0c629f87649854091e9e59d948f83962e3e1e
https://github.com/Hcnaeg/DI-engine/tree/aba0c629f87649854091e9e59d948f83962e3e1e
RegWeightedL1Loss
# 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 ...
Ssong24/CenterNet_Custom
RegWeightedL1Loss
false
9,541
[ "MIT" ]
0
526ec70f8dfabf9fb9179c9be28ce50fb2a7961c
https://github.com/Ssong24/CenterNet_Custom/tree/526ec70f8dfabf9fb9179c9be28ce50fb2a7961c
LinearGLUBlock
# 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...
Park-Jong-Min/neural_sp
LinearGLUBlock
false
2,725
[ "Apache-2.0" ]
0
a4f300ae9c16c6e9ea3128292fbc141f68f38081
https://github.com/Park-Jong-Min/neural_sp/tree/a4f300ae9c16c6e9ea3128292fbc141f68f38081
CausalSelfAttention
# 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....
DQiaole/ZITS
CausalSelfAttention
false
8,809
[ "Apache-2.0" ]
40
5f7a060167790789d5e29a3d14d3c2ef8a34e765
https://github.com/DQiaole/ZITS/tree/5f7a060167790789d5e29a3d14d3c2ef8a34e765
MLPEncoder
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn from typ...
HughMun/MultiBench
MLPEncoder
false
13,811
[ "MIT" ]
148
d5712a0815a9486b0e0c76b54cd63c880188fc8e
https://github.com/HughMun/MultiBench/tree/d5712a0815a9486b0e0c76b54cd63c880188fc8e
AdaptiveCatAvgMaxPool2d
import torch import torch.nn as nn import torch.utils.data import torchvision.transforms.functional as F import torch.nn.functional as F import torch.nn.parallel from torch import optim as optim def adaptive_catavgmax_pool2d(x, output_size=1): x_avg = F.adaptive_avg_pool2d(x, output_size) x_max = F.adaptive_m...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.utils.data import torchvision.transforms.functional as...
DifferentSC/pytorch-image-models
AdaptiveCatAvgMaxPool2d
false
11,611
[ "Apache-2.0" ]
0
ccfb5751abc70d80add4f197464190c4a2637c6c
https://github.com/DifferentSC/pytorch-image-models/tree/ccfb5751abc70d80add4f197464190c4a2637c6c
FiLM
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data.distributed class FiLM(nn.Module): """ A Feature-wise Linear Modulation Layer from 'FiLM: Visual Reasoning with a General Conditioning Layer' """ def forward(self, x, gammas, betas): ret...
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.distributed assert_size_stride = torch._C._dynamo....
Dou-Yiming/YouRefIt_ERU
FiLM
false
7,985
[ "MIT" ]
13
2a8e849380ed2d253c467b1af744a514bc171372
https://github.com/Dou-Yiming/YouRefIt_ERU/tree/2a8e849380ed2d253c467b1af744a514bc171372
_MCLSTMCell
from _paritybench_helpers import _mock_config import torch import torch.nn as nn from typing import Tuple class _Gate(nn.Module): """Utility class to implement a standard sigmoid gate""" def __init__(self, in_features: 'int', out_features: 'int'): super(_Gate, self).__init__() self.fc = nn.Li...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
NHoose/neuralhydrology
_MCLSTMCell
false
1,904
[ "BSD-3-Clause" ]
0
f320b417fe747a923ff8ef685ad33fd8b34effad
https://github.com/NHoose/neuralhydrology/tree/f320b417fe747a923ff8ef685ad33fd8b34effad
Conv3x3
# 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....
minjabenho/image2pcl
Conv3x3
false
7,229
[ "Apache-2.0" ]
1
7e696ee48edae30814d32f32e605ad6cf8bf702c
https://github.com/minjabenho/image2pcl/tree/7e696ee48edae30814d32f32e605ad6cf8bf702c
InceptionE
# 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 ...
Galaxies99/inception-cuda
InceptionE
false
11,476
[ "MIT" ]
0
ed8fdbe3caef415e60b52e671273be90e9423e44
https://github.com/Galaxies99/inception-cuda/tree/ed8fdbe3caef415e60b52e671273be90e9423e44
Delta
import torch import torch.nn as nn from torchaudio import transforms class Delta(nn.Module): def __init__(self, order=2, **kwargs): super(Delta, self).__init__() self.order = order self.compute_delta = transforms.ComputeDeltas(**kwargs) def forward(self, x): feats = [x] ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from torchaudio import transforms assert_size_stride = tor...
czlwang/s3prl
Delta
false
12,282
[ "Apache-2.0" ]
0
81d4bb8d051cee20fa87c083b8478999e1766172
https://github.com/czlwang/s3prl/tree/81d4bb8d051cee20fa87c083b8478999e1766172
SoftQNetwork
import torch import torch.nn.functional as F import torch.nn as nn def mish(x): """ Mish: A Self Regularized Non-Monotonic Neural Activation Function https://arxiv.org/abs/1908.08681v1 implemented for PyTorch / FastAI by lessw2020 https://github.com/lessw2020/mish param: ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Crawford-fang/ROS_pytorch_RL
SoftQNetwork
false
17,175
[ "Apache-2.0" ]
10
2d3476f15d51aa1f5b5ae9edc5d7f4c776e5de9f
https://github.com/Crawford-fang/ROS_pytorch_RL/tree/2d3476f15d51aa1f5b5ae9edc5d7f4c776e5de9f
TLU
import torch import torch.nn as nn import torch.utils.data.distributed class TLU(nn.Module): """ Thresholded Linear Unit """ def __init__(self, num_features): super().__init__() self.num_features = num_features self.tau = nn.Parameter(torch.zeros(1, num_features, 1, 1)) def forwa...
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.distributed assert_size_stride = torch._C._...
derwind/mxfont
TLU
false
10,127
[ "MIT" ]
0
0b6d4554a1e2208906230d3121d792d450ed28dd
https://github.com/derwind/mxfont/tree/0b6d4554a1e2208906230d3121d792d450ed28dd