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
TransformerEncoderLayer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
RobertCsordas/tcf
TransformerEncoderLayer
false
17,876
[ "MIT" ]
5
da20530dfb4336deddfbe5e79d62e72d1dc2580e
https://github.com/RobertCsordas/tcf/tree/da20530dfb4336deddfbe5e79d62e72d1dc2580e
Swish
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.parallel import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty...
doudoulaile/RL-GAN-Net
Swish
false
15,228
[ "MIT" ]
112
9c221223d1878bc24f0f39ad34928c1bb2974ae3
https://github.com/doudoulaile/RL-GAN-Net/tree/9c221223d1878bc24f0f39ad34928c1bb2974ae3
ManifoldPropagation
# 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....
wonkyunglee/MPNet
ManifoldPropagation
false
16,758
[ "MIT" ]
1,280
3a6821a88a5e3db5bd97121761dbb361d9518bc2
https://github.com/wonkyunglee/MPNet/tree/3a6821a88a5e3db5bd97121761dbb361d9518bc2
GlobalAvgPool2d
# 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...
CharlesPikachu/YOLO
GlobalAvgPool2d
false
13,456
[ "MIT" ]
57
950b11c35517c1c3d7d7856b5768c4023c1f89eb
https://github.com/CharlesPikachu/YOLO/tree/950b11c35517c1c3d7d7856b5768c4023c1f89eb
WassersteinLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_str...
nikitadhawan/SimCLR
WassersteinLoss
false
7,347
[ "MIT" ]
1
7d87b384b1edb68e7ba86601b26f76e6da214718
https://github.com/nikitadhawan/SimCLR/tree/7d87b384b1edb68e7ba86601b26f76e6da214718
DiceCoefficientLoss
import torch import torch.nn as nn class DiceCoefficientLoss(nn.Module): def __init__(self, apply_softmax: 'bool'=False, eps: 'float'=1e-06): super().__init__() self.apply_softmax = apply_softmax self.eps = eps def forward(self, x: 'torch.Tensor', y: 'torch.Tensor', multiclass=True ...
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...
HalestormAI/efficientnet-unet
DiceCoefficientLoss
false
2,329
[ "MIT" ]
0
b6d5ec86d667ce7ac1f689bc16269dca83a079f0
https://github.com/HalestormAI/efficientnet-unet/tree/b6d5ec86d667ce7ac1f689bc16269dca83a079f0
LogSumExpPool
# 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 ...
C3-ASV-Team/torchxrayvision
LogSumExpPool
false
4,926
[ "Apache-2.0" ]
1
7e53f0606986562f17a1ffd9f31d006756eff78d
https://github.com/C3-ASV-Team/torchxrayvision/tree/7e53f0606986562f17a1ffd9f31d006756eff78d
KLDLoss
# 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 ...
izhorvath/MetGAN
KLDLoss
false
10,236
[ "BSD-3-Clause" ]
0
aca85fb3306d2515a65c8d525cd78e1147ba7e1b
https://github.com/izhorvath/MetGAN/tree/aca85fb3306d2515a65c8d525cd78e1147ba7e1b
RobertaSequenceClassificationHead
# 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 import torch.onnx.operators import...
llMuShu/NEW_repstp
RobertaSequenceClassificationHead
false
15,935
[ "MIT" ]
138
314ba30e4ab2af2b23a435db49a8eb4b89e48680
https://github.com/llMuShu/NEW_repstp/tree/314ba30e4ab2af2b23a435db49a8eb4b89e48680
ChannelSqueeze
# 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...
iofthetiger/pkuad
ChannelSqueeze
false
6,891
[ "Apache-2.0" ]
1
07496d108c614c84be028f344830becc9cac8fe5
https://github.com/iofthetiger/pkuad/tree/07496d108c614c84be028f344830becc9cac8fe5
ConvNet
import torch import torch.nn as nn class ConvNet(nn.Module): def __init__(self): super(ConvNet, self).__init__() self.conv1 = nn.Conv2d(in_channels=3, out_channels=32, kernel_size= 5, padding=2) self.conv2 = nn.Conv2d(in_channels=32, out_channels=32, kernel_size =3...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
slowy07/dffml
ConvNet
false
13,006
[ "MIT" ]
0
bbf491064470f1170be75b6bec572b6e576940b9
https://github.com/slowy07/dffml/tree/bbf491064470f1170be75b6bec572b6e576940b9
SSWELoss
# 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...
Cuiqingyao/multilabel
SSWELoss
false
8,931
[ "Apache-2.0" ]
0
f36dc6f1168a3edf8f43565477c096dc0bf31de8
https://github.com/Cuiqingyao/multilabel/tree/f36dc6f1168a3edf8f43565477c096dc0bf31de8
DenseSAGEConv
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import math from torch import...
CFF-Dream/pytorch_geometric
DenseSAGEConv
false
2,033
[ "MIT" ]
0
7c19ad74957409ee9e07314ce81524b3113b9c84
https://github.com/CFF-Dream/pytorch_geometric/tree/7c19ad74957409ee9e07314ce81524b3113b9c84
BertSelfAttention
# 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....
sermolin/amazon-sagemaker-examples
BertSelfAttention
false
4,300
[ "Apache-2.0" ]
0
3e6083d1b53cb718893a04c46513a9482a17bd6b
https://github.com/sermolin/amazon-sagemaker-examples/tree/3e6083d1b53cb718893a04c46513a9482a17bd6b
LayerReLU6
# 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...
dawnclaude/onnx2keras
LayerReLU6
false
15,150
[ "MIT" ]
115
3d2a47c0a228b91fd434232274e216e491da36e3
https://github.com/dawnclaude/onnx2keras/tree/3d2a47c0a228b91fd434232274e216e491da36e3
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....
Michellemingxuan/stanford_cs231n
TransformerDecoderLayer
false
11,819
[ "MIT" ]
0
b1d0a5a4a3b2fe5d685e34a4ebd810cbc56ec143
https://github.com/Michellemingxuan/stanford_cs231n/tree/b1d0a5a4a3b2fe5d685e34a4ebd810cbc56ec143
BCE_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 libdevice, math as tl_math import torc...
EmmanuelleB985/Head-and-Neck-Tumour-Segmentation-and-Prediction-of-Patient-Survival
BCE_loss
false
11,393
[ "MIT" ]
0
347883eb6dd5daebba091119ede7a9f5b78076d1
https://github.com/EmmanuelleB985/Head-and-Neck-Tumour-Segmentation-and-Prediction-of-Patient-Survival/tree/347883eb6dd5daebba091119ede7a9f5b78076d1
PreNet
# 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_...
NarutoUA/WaveRNN
PreNet
false
9,385
[ "MIT" ]
0
ed80c3f092b9c086d42af51a7f2545727ed1610c
https://github.com/NarutoUA/WaveRNN/tree/ed80c3f092b9c086d42af51a7f2545727ed1610c
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.triton_helpers import libdevice import math from to...
GuyLor/attention-learn-to-route
Attention
false
2,328
[ "MIT" ]
0
d07d5c1465f7ee5d18651e23cfae9aa1f52a9c6c
https://github.com/GuyLor/attention-learn-to-route/tree/d07d5c1465f7ee5d18651e23cfae9aa1f52a9c6c
A2CActorCont
import torch import torch as t import torch.nn as nn from torch.distributions import Normal import torch.nn.functional as F class A2CActorCont(nn.Module): def __init__(self, state_dim, action_dim, action_range): super().__init__() self.fc1 = nn.Linear(state_dim, 16) self.fc2 = nn.Linear(1...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
ikamensh/machin
A2CActorCont
false
6,865
[ "MIT" ]
1
af7b423c47bc1412530cf6c96c11bd3af9b3e239
https://github.com/ikamensh/machin/tree/af7b423c47bc1412530cf6c96c11bd3af9b3e239
GramMatrix
import torch import torch.nn as nn def get_outnorm(x: 'torch.Tensor', out_norm: 'str'='') ->torch.Tensor: """ Common function to get a loss normalization value. Can normalize by either the batch size ('b'), the number of channels ('c'), the image size ('i') or combinations ('bi', 'bci', et...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
grofit/traiNNer
GramMatrix
false
15,459
[ "Apache-2.0" ]
78
12d006fd44ed304e4178839c53b1f3d95ca25dcb
https://github.com/grofit/traiNNer/tree/12d006fd44ed304e4178839c53b1f3d95ca25dcb
MultiheadedAttention
import torch import numpy as np import torch.nn.functional as F import torch.nn as nn from torch.utils import tensorboard as tensorboard def attention(Q, K, V, mask, dropout=None): d_k = Q.size(-1) QKt = Q.matmul(K.transpose(-1, -2)) sm_input = QKt / np.sqrt(d_k) if mask is not None: sm_input ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
valterlej/CustomBMT
MultiheadedAttention
false
16,854
[ "MIT" ]
157
c9326752d1355c81f845f2caab9c047be76067de
https://github.com/valterlej/CustomBMT/tree/c9326752d1355c81f845f2caab9c047be76067de
TransitionUpB
# 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...
adriancampos/road-extraction
TransitionUpB
false
6,082
[ "MIT" ]
1
3eaf4ed010d71475276d99d4841d67990a967a1b
https://github.com/adriancampos/road-extraction/tree/3eaf4ed010d71475276d99d4841d67990a967a1b
h_swish
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
dhananjaisharma10/mmdetection
h_swish
false
12,265
[ "Apache-2.0" ]
0
6f6db3211c3760cffe9db2350297c42cc29ce140
https://github.com/dhananjaisharma10/mmdetection/tree/6f6db3211c3760cffe9db2350297c42cc29ce140
LabelSmoothSoftmaxCEV1
import torch import torch.nn as nn class LabelSmoothSoftmaxCEV1(nn.Module): """ This is the autograd version, you can also try the LabelSmoothSoftmaxCEV2 that uses derived gradients """ def __init__(self, lb_smooth=0.1, reduction='mean', ignore_index=-100): super(LabelSmoothSoftmaxCEV1, 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 ...
chizhu/pytorch-loss
LabelSmoothSoftmaxCEV1
false
6,443
[ "MIT" ]
1
c8fbd78771f11a910b0b51ae3697c09761dd9696
https://github.com/chizhu/pytorch-loss/tree/c8fbd78771f11a910b0b51ae3697c09761dd9696
AttentionNet
import torch import torch.nn.functional import torch.nn as nn from torch.nn import functional as F def conv3x3(in_, out): return nn.Conv2d(in_, out, 3, padding=1) class ConvRelu(nn.Module): def __init__(self, in_, out): super().__init__() self.conv = conv3x3(in_, out) self.activatio...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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.functional im...
CarlosPena00/pytorchvision
AttentionNet
false
245
[ "MIT" ]
0
824b3a5a8940f3ee6b4da5de7a391a88e5aa36a2
https://github.com/CarlosPena00/pytorchvision/tree/824b3a5a8940f3ee6b4da5de7a391a88e5aa36a2
GetSegPred
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.utils.data.dataset assert_size_stride = torch._C._dynamo.guards.as...
melisataspinar/Concurrent-Completion-and-Part-Segmentation-for-3D-Missing-Point-Clouds-viaSynergistic-Feature-Mappi
GetSegPred
false
10,461
[ "MIT" ]
0
3b03f3c167d9927a660d798ffcd8ecc0f5cbaf89
https://github.com/melisataspinar/Concurrent-Completion-and-Part-Segmentation-for-3D-Missing-Point-Clouds-viaSynergistic-Feature-Mappi/tree/3b03f3c167d9927a660d798ffcd8ecc0f5cbaf89
CoAttentionTransformerEncoderLayer
import torch from torch import Tensor from typing import Optional import torch.nn as nn import torch.nn.functional as F def _get_activation_fn(activation): if activation == 'relu': return F.relu elif activation == 'gelu': return F.gelu raise ValueError('activation should be relu/gelu, not ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
doiken23/mccformers.pytorch
CoAttentionTransformerEncoderLayer
false
6,615
[ "MIT" ]
1
678bd9448e3a2f35bd408e8c8e510e0ea1f9a19f
https://github.com/doiken23/mccformers.pytorch/tree/678bd9448e3a2f35bd408e8c8e510e0ea1f9a19f
encoder3
# 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 ...
kamieen03/style-transfer-server
encoder3
false
3,868
[ "BSD-2-Clause" ]
0
91727ec62080215a0b870ce043faf0657137b84b
https://github.com/kamieen03/style-transfer-server/tree/91727ec62080215a0b870ce043faf0657137b84b
Transformation
import torch from torch import nn class Transformation(torch.nn.Module): def __init__(self, input_size): super(Transformation, self).__init__() self.input_size = input_size self.linear1 = torch.nn.Linear(self.input_size, self.input_size) self.linear2 = torch.nn.Linear(self.input_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...
kj21choi/LATAD
Transformation
false
7,040
[ "MIT" ]
1
80d91e0f251ad0225342ee30e2461a39fa9cca97
https://github.com/kj21choi/LATAD/tree/80d91e0f251ad0225342ee30e2461a39fa9cca97
my_AvgPool2d
from torch.nn import Module import torch import torch.nn.functional as F from torch.nn.modules.module import Module class my_AvgPool2d(Module): def __init__(self, kernel_size, stride=None, padding=0, ceil_mode=False, count_include_pad=True): super(my_AvgPool2d, self).__init__() self.kerne...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch.nn import Module from torch.nn.modules.module import Module assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty...
likun97/Low_quality_classification_with_mobilenetv3
my_AvgPool2d
false
10,436
[ "Apache-2.0" ]
0
a9e6f66caad937fc7c8e101cddb76f116219b255
https://github.com/likun97/Low_quality_classification_with_mobilenetv3/tree/a9e6f66caad937fc7c8e101cddb76f116219b255
HuberLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
hslrock/Reinforcement-Learning-Implementation
HuberLoss
false
10,171
[ "MIT" ]
0
31db7e31c92f8e01609bf51d3f8f22211ec0fd5d
https://github.com/hslrock/Reinforcement-Learning-Implementation/tree/31db7e31c92f8e01609bf51d3f8f22211ec0fd5d
BertIntermediate
from _paritybench_helpers import _mock_config import math import torch import torch.nn as nn def gelu(x): """Implementation of the gelu activation function. For information: OpenAI GPT"s gelu is slightly different (and gives slightly different results): 0.5 * x * (1 + torch.tanh(math.sqrt(2 / math...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import math import ...
RoshanTanisha/TVCaption
BertIntermediate
false
1,892
[ "MIT" ]
0
8b14a340134ec69ed87426ee1f0e93e53f6456e5
https://github.com/RoshanTanisha/TVCaption/tree/8b14a340134ec69ed87426ee1f0e93e53f6456e5
distLinear
# 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 ...
raphael-baena/clean-train
distLinear
false
12,932
[ "MIT" ]
0
f65fcecc11203b12f27d14964944db6941b513cc
https://github.com/raphael-baena/clean-train/tree/f65fcecc11203b12f27d14964944db6941b513cc
SoftQNetwork
# 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_...
biemann/rl-testbed-for-energyplus
SoftQNetwork
false
9,802
[ "MIT" ]
0
a01be4d12eda970b352729ff6cb4a3eea8ddee6a
https://github.com/biemann/rl-testbed-for-energyplus/tree/a01be4d12eda970b352729ff6cb4a3eea8ddee6a
ChannelMixer
import torch import torch.nn.functional as F from torch import nn class FeedForward(nn.Module): def __init__(self, num_features, expansion_factor, dropout): super().__init__() num_hidden = expansion_factor * num_features self.fc1 = nn.Linear(num_features, num_hidden) self.fc2 = nn...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn.fun...
RAYTRAC3R/mlp-singer
ChannelMixer
false
14,265
[ "MIT" ]
82
a68299b943815353fcc177e4873d24d1d0937cfb
https://github.com/RAYTRAC3R/mlp-singer/tree/a68299b943815353fcc177e4873d24d1d0937cfb
L2Norm
# 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 from math import sqrt as sqrt from itertools import produ...
Feywell/association_lstm_implement
L2Norm
false
5,161
[ "MIT" ]
1
4e439bd934dc865aad0015a897980a8f124602af
https://github.com/Feywell/association_lstm_implement/tree/4e439bd934dc865aad0015a897980a8f124602af
PCN1
# 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....
wkdhkr/pytorch-PCN
PCN1
false
4,552
[ "BSD-2-Clause" ]
0
4686c8fcda0b4fe7ecd7488f5554e19e8f6a8f68
https://github.com/wkdhkr/pytorch-PCN/tree/4686c8fcda0b4fe7ecd7488f5554e19e8f6a8f68
TensorClampMin
import torch class TensorClampMin(torch.nn.Module): def forward(self, x): return x.clamp_min(-0.1) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
PogChamper/torch2trt
TensorClampMin
false
14,210
[ "MIT" ]
3,363
43b12627ec0de4d212efb6d02b07570205085ccc
https://github.com/PogChamper/torch2trt/tree/43b12627ec0de4d212efb6d02b07570205085ccc
Router
# 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....
mcx/annotated_deep_learning_paper_implementations
Router
false
7,240
[ "MIT" ]
1
f169f3a71dd2d36eb28ad31062d3475efa367b88
https://github.com/mcx/annotated_deep_learning_paper_implementations/tree/f169f3a71dd2d36eb28ad31062d3475efa367b88
SimulatorReward
import torch import torch.nn.functional as F class SimulatorReward(torch.nn.Module): def __init__(self): super(SimulatorReward, self).__init__() self.conv1 = torch.nn.Conv2d(4, 8, kernel_size=3, padding=1) self.conv2 = torch.nn.Conv2d(8, 16, kernel_size=3, padding=1) self.conv3 = ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
seulbinHwang/DeepReinforcementLearningInAction
SimulatorReward
false
4,312
[ "MIT" ]
0
c9039fd6951c46c8902cda04580c69159d172c82
https://github.com/seulbinHwang/DeepReinforcementLearningInAction/tree/c9039fd6951c46c8902cda04580c69159d172c82
FusedLeakyReLU
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 import triton import 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 torch.nn import functional as F assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda...
Jerry2001/StyleCLIP
FusedLeakyReLU
false
637
[ "MIT" ]
0
806216b4ce7b4c001ff05d7bd707b28d20ea6191
https://github.com/Jerry2001/StyleCLIP/tree/806216b4ce7b4c001ff05d7bd707b28d20ea6191
SuperpointDecoder
# 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_...
wx-b/SOLD2
SuperpointDecoder
false
16,746
[ "MIT" ]
347
71c3243f9d3a695788d0a6bfd134b9849425900a
https://github.com/wx-b/SOLD2/tree/71c3243f9d3a695788d0a6bfd134b9849425900a
DotProductAttention
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
StevenJokess/d2l-en-read
DotProductAttention
false
5,870
[ "MIT" ]
1
71b0f35971063b9fe5f21319b8072d61c9e5a298
https://github.com/StevenJokess/d2l-en-read/tree/71b0f35971063b9fe5f21319b8072d61c9e5a298
Generator
# 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...
QuLog1/QuLog
Generator
false
970
[ "Apache-2.0" ]
0
121f3a8c6f5ee60cde771c36b9eef823a1b2597a
https://github.com/QuLog1/QuLog/tree/121f3a8c6f5ee60cde771c36b9eef823a1b2597a
DQN_RAM
# 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_...
paulesta55/pytorch-dqn
DQN_RAM
false
12,866
[ "MIT" ]
0
0c1345952c8f99b2f74ec357867262fae6d928ec
https://github.com/paulesta55/pytorch-dqn/tree/0c1345952c8f99b2f74ec357867262fae6d928ec
MaxFeature
import torch import torch.nn as nn class MaxFeature(nn.Module): """Conv2d or Linear layer with max feature selector Generate feature maps with double channels, split them and select the max feature. Args: in_channels (int): Channel number of inputs. out_channels (int): Channel nu...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
Serene99-09/mmediting
MaxFeature
false
9,549
[ "Apache-2.0" ]
0
be49e33650627ac26fdd065fbbaff66f726e3fde
https://github.com/Serene99-09/mmediting/tree/be49e33650627ac26fdd065fbbaff66f726e3fde
MultiHeadSelfAttention
# 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....
melaniezhang/cs224n-final-proj
MultiHeadSelfAttention
false
12,772
[ "MIT" ]
0
a012759e8caf4d585421d78c07125fa3696fda4e
https://github.com/melaniezhang/cs224n-final-proj/tree/a012759e8caf4d585421d78c07125fa3696fda4e
Bottleneck_nobn
# 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_...
daroczyb/tangent_sensitivity
Bottleneck_nobn
false
10,002
[ "MIT" ]
0
925258ab381ca5ab95620c411f72836a90baeb7f
https://github.com/daroczyb/tangent_sensitivity/tree/925258ab381ca5ab95620c411f72836a90baeb7f
NetFCN12
import torch import torch.nn as nn import torch.nn.functional as F class NetFCN12(nn.Module): def __init__(self): super(NetFCN12, self).__init__() self.conv = nn.Conv2d(3, 16, 3) self.pool = nn.MaxPool2d((3, 3), stride=2) self.conv2 = nn.Conv2d(16, 16, 4) self.conv3 = nn.C...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
RoyHirsch/DeepLearningCourse
NetFCN12
false
1,010
[ "MIT" ]
0
9036c0fdbb08b610524d7be991f8e4b490a82c6c
https://github.com/RoyHirsch/DeepLearningCourse/tree/9036c0fdbb08b610524d7be991f8e4b490a82c6c
SimpleExpModule
import torch import torch.jit import torch.onnx import torch.nn class SimpleExpModule(torch.nn.Module): def forward(self, input): other = torch.exp(input) return torch.exp(other) 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 math as tl_math import torch.jit import torch.onnx import torch.nn assert_size_stride = t...
briancoutinho/glow
SimpleExpModule
false
12,566
[ "Apache-2.0" ]
0
4c919d60b3c33296c4109aec8020a1733c98f5b5
https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5
TokenMixer
# 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.fun...
RAYTRAC3R/mlp-singer
TokenMixer
false
14,259
[ "MIT" ]
82
a68299b943815353fcc177e4873d24d1d0937cfb
https://github.com/RAYTRAC3R/mlp-singer/tree/a68299b943815353fcc177e4873d24d1d0937cfb
ProjectionInputPose
import torch import torch.nn as nn import torch.nn.functional as F class ProjectionInputPose(nn.Module): def __init__(self, cost_dim, hidden_dim, out_chs): super().__init__() self.out_chs = out_chs self.convc1 = nn.Conv2d(cost_dim, hidden_dim, 1, padding=0) self.convc2 = 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_...
aliyun/dro-sfm
ProjectionInputPose
false
14,818
[ "MIT" ]
147
8707e2e0ef799d7d47418a018060f503ef449fe3
https://github.com/aliyun/dro-sfm/tree/8707e2e0ef799d7d47418a018060f503ef449fe3
PreActBlockNoBN
import torch import torch.nn as nn import torch.nn.functional as F class PreActBlockNoBN(nn.Module): """Pre-activation version of the BasicBlock.""" expansion = 1 def __init__(self, in_planes, planes, stride=1): super(PreActBlockNoBN, self).__init__() self.conv1 = nn.Conv2d(in_planes, pla...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
arhik/LoCo
PreActBlockNoBN
false
12,114
[ "MIT" ]
0
de3792a8c5650ee1efa0682ad494a3b1b1be3dd0
https://github.com/arhik/LoCo/tree/de3792a8c5650ee1efa0682ad494a3b1b1be3dd0
FeatureModel
import torch import torch.nn as nn class FeatureModel(nn.Module): def __init__(self, num_features_in, num_anchors=9, feature_size_out=64, prior=0.01, feature_size=256): super(FeatureModel, self).__init__() self.feature_size_out = feature_size_out self.num_anchors = num_anchors ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
nassarofficial/pytorch-retina
FeatureModel
false
4,077
[ "Apache-2.0" ]
0
b2f10ffa7617797280c1f44d562c455b996254af
https://github.com/nassarofficial/pytorch-retina/tree/b2f10ffa7617797280c1f44d562c455b996254af
UniverseHead
import torch import torch.nn as nn import torch.nn.functional as F class UniverseHead(torch.nn.Module): """ universe agent example input: [None, 42, 42, 1]; output: [None, 288]; """ def __init__(self, n): super(UniverseHead, self).__init__() self.conv1 = nn.Conv2d(n, 32, 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 from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
andy920262/pytorch-a2c-ppo-acktr
UniverseHead
false
12,091
[ "MIT" ]
0
2e7e85219dfe737cb4036de3cf0c8b00706d640e
https://github.com/andy920262/pytorch-a2c-ppo-acktr/tree/2e7e85219dfe737cb4036de3cf0c8b00706d640e
UNet
import torch import torch.nn as nn import torch.nn.functional as F class down(nn.Module): """ A class for creating neural network blocks containing layers: Average Pooling --> Convlution + Leaky ReLU --> Convolution + Leaky ReLU This is used in the UNet Class to create a UNet like NN archite...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
avinashpaliwal/Deep-SloMo
UNet
false
15,057
[ "MIT" ]
76
93373aa3cb9fd384fbf905e235fe6eb4f9cac780
https://github.com/avinashpaliwal/Deep-SloMo/tree/93373aa3cb9fd384fbf905e235fe6eb4f9cac780
ResolutionScalingLayer
import torch import torch.nn as nn import torch.nn.functional as F class ResolutionScalingLayer(nn.Module): """Implements the resolution scaling layer. Basically, this layer can be used to upsample or downsample feature maps from spatial domain with nearest neighbor interpolation. """ def __init__(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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
CV-IP/interfacegan
ResolutionScalingLayer
false
13,458
[ "MIT" ]
855
5a556b8e693f6e1888f769f653aaafaaccca5dc2
https://github.com/CV-IP/interfacegan/tree/5a556b8e693f6e1888f769f653aaafaaccca5dc2
SeqAttendImgResAttOnlyFusion
import torch from torch import nn class SeqAttendImgFusion(nn.Module): def __init__(self, seq_dim, img_dim, hidden_dim, att_dropout, att_scale_factor=1, **kwargs): super(SeqAttendImgFusion, self).__init__() self.SeqTrans = nn.Linear(seq_dim, hidden_dim, bias=False) self.ImgTrans =...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Asichurter/MalFusionFSL
SeqAttendImgResAttOnlyFusion
false
16,996
[ "MIT" ]
4
713bf64cc07a3489f42941fd2299837075575ac0
https://github.com/Asichurter/MalFusionFSL/tree/713bf64cc07a3489f42941fd2299837075575ac0
ResidualBlock
import torch import torch.nn as nn from functools import partial def ncsn_conv3x3(in_planes, out_planes, stride=1, bias=True, dilation=1, init_scale=1.0, padding=1): """3x3 convolution with PyTorch initialization. Same as NCSNv1/NCSNv2.""" init_scale = 1e-10 if init_scale == 0 else init_scale conv = n...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
chen-hao-chao/dlsm
ResidualBlock
false
3,285
[ "Apache-2.0" ]
0
aea88aa7e59a02fe44f25f4de9d6f2eaf044093b
https://github.com/chen-hao-chao/dlsm/tree/aea88aa7e59a02fe44f25f4de9d6f2eaf044093b
BalancedL1Loss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import functools impor...
CK-er/mmdet
BalancedL1Loss
false
2,073
[ "Apache-2.0" ]
0
9bea4068efbcf7bf739dbe41917a68d525c29868
https://github.com/CK-er/mmdet/tree/9bea4068efbcf7bf739dbe41917a68d525c29868
FLogSigmoidTest
# 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...
goldbattle/onnx2keras
FLogSigmoidTest
false
12,450
[ "MIT" ]
0
dcf52041299ce4216552d1132ec86eb4debd5303
https://github.com/goldbattle/onnx2keras/tree/dcf52041299ce4216552d1132ec86eb4debd5303
velocity_adding_neuron
import torch import torch.nn as nn class velocity_adding_neuron(nn.Module): def __init__(self, weight): super(velocity_adding_neuron, self).__init__() self.w = weight self.nl = nn.Tanh() def forward(self, x): return self.nl(self.w * x) def get_inputs(): return [torch.ra...
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_...
AgamChopra/simulation-in-a-box
velocity_adding_neuron
false
11,149
[ "MIT" ]
0
2a346a2fc83d79e542b64f1bd45c338d27a1934d
https://github.com/AgamChopra/simulation-in-a-box/tree/2a346a2fc83d79e542b64f1bd45c338d27a1934d
L1Linear
# 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 warnings from torch.nn.parameter import Parameter from torch....
fabian-sp/regular-layers
L1Linear
false
3,539
[ "BSD-3-Clause" ]
0
573b652d1e66c4e44cc740dcc8dc618669af5c96
https://github.com/fabian-sp/regular-layers/tree/573b652d1e66c4e44cc740dcc8dc618669af5c96
Encoder_mse
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math fr...
Famingzhao/scMVP
Encoder_mse
false
9,523
[ "MIT" ]
0
fb0d2d2523d0ae10e10725babe8da7de63c2eef4
https://github.com/Famingzhao/scMVP/tree/fb0d2d2523d0ae10e10725babe8da7de63c2eef4
AttModel
# 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....
HuangHaoyu1997/pytorch_DGN
AttModel
false
13,790
[ "MIT" ]
48
f1b1a157a9b1678f9238f64458f44412b796d00e
https://github.com/HuangHaoyu1997/pytorch_DGN/tree/f1b1a157a9b1678f9238f64458f44412b796d00e
RNN
import torch import torch.nn as nn from torch.autograd import Variable class RNN(nn.Module): def __init__(self, input_size, hidden_size, output_size): super(RNN, self).__init__() self.hidden_size = hidden_size self.i2h = nn.Linear(input_size + hidden_size, hidden_size) self.i2o = ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from torch.autograd import Variable assert_size_stride = t...
zhiyongc/Graph_Convolutional_LSTM
RNN
false
16,810
[ "MIT" ]
281
a703b63e626b1e2563fe3f45d9714e468b1d4a0e
https://github.com/zhiyongc/Graph_Convolutional_LSTM/tree/a703b63e626b1e2563fe3f45d9714e468b1d4a0e
myConv2d
import math import torch import torch.nn as nn import torch.nn.functional as F class myConv2dFunction(torch.autograd.Function): @staticmethod def forward(ctx, input, weight, bias): ctx.save_for_backward(input, weight, bias) return F.conv2d(input, weight, bias) @staticmethod def backw...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math import torch.nn as nn import torch.nn.functional as F assert_size_st...
LogCreative/custom-tensor
myConv2d
false
5,547
[ "MIT" ]
1
63eccf82821b4d4076a4fdfc7380ee72333360f1
https://github.com/LogCreative/custom-tensor/tree/63eccf82821b4d4076a4fdfc7380ee72333360f1
Sine
# 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.utils.data import torch.nn as nn assert_size_stride = torch....
RisingStockPrices/sirenized-deepsdf
Sine
false
11,808
[ "MIT" ]
0
c0fb33e26b6bf0753c02adc5186af344e40a6d04
https://github.com/RisingStockPrices/sirenized-deepsdf/tree/c0fb33e26b6bf0753c02adc5186af344e40a6d04
LinearWithGroupNorm
# 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....
bradyz/nuplan-devkit
LinearWithGroupNorm
false
12,259
[ "Apache-2.0" ]
0
0a7a30e5d7fdf3787d9388676b7856fbd7d92992
https://github.com/bradyz/nuplan-devkit/tree/0a7a30e5d7fdf3787d9388676b7856fbd7d92992
SpatialAttention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
SamitHuang/CELNet
SpatialAttention
false
5,798
[ "MIT" ]
1
51e067fdb16e723a45a0a60399d568b58cdc011d
https://github.com/SamitHuang/CELNet/tree/51e067fdb16e723a45a0a60399d568b58cdc011d
DfAlphaLoss
import torch from torch import Tensor from typing import Optional from torch import nn from typing import Final class DfAlphaLoss(nn.Module): """Add a penalty to use DF for very noisy segments. Starting from lsnr_thresh, the penalty is increased and has its maximum at lsnr_min. """ factor: 'Final[flo...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch import Tens...
Rikorose/DeepFilterNet
DfAlphaLoss
false
14,319
[ "ECL-2.0", "Apache-2.0", "MIT" ]
54
afe6bfb53efae70207e18df7ed372c2cfe337fee
https://github.com/Rikorose/DeepFilterNet/tree/afe6bfb53efae70207e18df7ed372c2cfe337fee
Net
import torch import torch.nn as nn import torch.nn.functional as F class Net(nn.Module): def __init__(self, Cin, Cout): super(Net, self).__init__() self.conv1 = nn.Conv2d(Cin, Cout, (3, 3)) def forward(self, x): x0 = self.conv1(x) x1 = self.conv1(x) z = torch.cat([x0,...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
saeta/mlir-npcomp
Net
false
4,236
[ "Apache-2.0" ]
0
85898aaf10ea30237ee1d66c977b966cf7fcf6d0
https://github.com/saeta/mlir-npcomp/tree/85898aaf10ea30237ee1d66c977b966cf7fcf6d0
PredictionConvolutions
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn from itertools import product as product import torch.optim...
mosevg/ssd
PredictionConvolutions
false
10,793
[ "MIT" ]
0
8fd9f6cc376c027427531bcf475188ae43c4b2d6
https://github.com/mosevg/ssd/tree/8fd9f6cc376c027427531bcf475188ae43c4b2d6
Combiner
import torch import torch.nn as nn class Combiner(nn.Module): """ Parameterizes `q(z_t | z_{t-1}, x_{t:T}, m{t:T}, s)`, which is the basic building block of the guide (i.e. the variational distribution). The dependence on `x_{t:T} and m_{t:T}` is through the hidden state of the RNN (see the PyTorch mo...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math im...
autodidact-m/Projects
Combiner
false
3,145
[ "Apache-2.0" ]
0
f4c0473adba42f3a629b62eb09d3b1df91982f46
https://github.com/autodidact-m/Projects/tree/f4c0473adba42f3a629b62eb09d3b1df91982f46
SimpleEmbed
import math import torch import torch.nn as nn class SimpleEmbed(nn.Module): def __init__(self, d_feat, embed_dim): super(SimpleEmbed, self).__init__() self.d_feat = d_feat self.embed_dim = embed_dim self.proj = nn.Linear(d_feat, embed_dim) def forward(self, x): 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
rainwangphy/AutoDL-Projects
SimpleEmbed
false
16,308
[ "MIT" ]
923
1a40948255ac3c16ee529d94144a39bf26e89bfa
https://github.com/rainwangphy/AutoDL-Projects/tree/1a40948255ac3c16ee529d94144a39bf26e89bfa
TripletLoss
import torch import torch.nn as nn from torch.nn import functional as F class TripletLoss(nn.Module): """ Triplet loss Takes embeddings of an anchor sample, a positive sample and a negative sample """ def __init__(self, margin): super(TripletLoss, self).__init__() self.margin = ma...
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...
EmmaW8/EISNet
TripletLoss
false
8,040
[ "MIT" ]
40
97c420d6763c5f825e88ed732edee4e75f3b947e
https://github.com/EmmaW8/EISNet/tree/97c420d6763c5f825e88ed732edee4e75f3b947e
FusionLayer
import torch from torch import nn from torch.nn import init class FusionLayer(nn.Module): def __init__(self, nums=6): super(FusionLayer, self).__init__() self.weights = nn.Parameter(torch.randn(nums)) self.nums = nums self._reset_parameters() def _reset_parameters(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 import nn from torch.nn import init assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C...
JasonLin1998/DSS-pytorch
FusionLayer
false
13,886
[ "MIT" ]
188
f249541bf7e5e479e050b562dd6024d6219f36f4
https://github.com/JasonLin1998/DSS-pytorch/tree/f249541bf7e5e479e050b562dd6024d6219f36f4
Sobelxy
import torch import torch.nn as nn import torch.nn.functional as F class Sobelxy(nn.Module): def __init__(self): super(Sobelxy, self).__init__() kernelx = [[-1, 0, 1], [-2, 0, 2], [-1, 0, 1]] kernely = [[1, 2, 1], [0, 0, 0], [-1, -2, -1]] kernelx = torch.FloatTensor(kernelx).unsqu...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
Linfeng-Tang/SeAFusion
Sobelxy
false
8,500
[ "MIT" ]
18
54cf7ee116da3f726941560279bf12fedd0d434d
https://github.com/Linfeng-Tang/SeAFusion/tree/54cf7ee116da3f726941560279bf12fedd0d434d
ClassPredictor
# 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....
JasonQSY/Associative3D
ClassPredictor
false
8,337
[ "MIT" ]
25
c50818b593ec48c38ed7ee3e109c23531089da32
https://github.com/JasonQSY/Associative3D/tree/c50818b593ec48c38ed7ee3e109c23531089da32
MultiHeadAttention
import torch import numpy as np import torch.nn as nn import torch.nn.functional as F class ScaledDotProductAttention(nn.Module): """ Scaled Dot-product Attention Args: dim (int): dimention of attention Inputs: query, value - **query** (batch_size, q_len, hidden_dim): tensor containi...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Kormap/Side-Projects
MultiHeadAttention
false
750
[ "MIT" ]
0
9e61d5b062cc6823cfebc18370f7caae622ea571
https://github.com/Kormap/Side-Projects/tree/9e61d5b062cc6823cfebc18370f7caae622ea571
UnpoolingAsConvolution
import torch import torch.nn.functional as F import torch.nn as nn def getIncomingShape(incoming): size = incoming.size() return [size[0], size[1], size[2], size[3]] def interleave(tensors, axis): old_shape = getIncomingShape(tensors[0])[1:] new_shape = [-1] + old_shape new_shape[axis] *= len(te...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
ColinKohler/ActionDyanmicsNetwork
UnpoolingAsConvolution
false
330
[ "MIT" ]
0
9cb6ffca111bfb1e1efb31cbac9201a98739a6ed
https://github.com/ColinKohler/ActionDyanmicsNetwork/tree/9cb6ffca111bfb1e1efb31cbac9201a98739a6ed
topk_PAM_Module
from torch.nn import Module import torch import torch.nn.functional as F import torch.nn as nn from torch.nn.modules.module import Module def mask_softmax(input, mask=None, dim=-1): """Applies a softmax function. Softmax is defined as: :math:`\\text{Softmax}(x_{i}) = \\frac{exp(x_i)}{\\sum_j exp...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
yougoforward/OCNet1931
topk_PAM_Module
false
11,034
[ "MIT" ]
0
e679e9f248aff2f06e1d983e4e30230e5fc5174f
https://github.com/yougoforward/OCNet1931/tree/e679e9f248aff2f06e1d983e4e30230e5fc5174f
FixupBasicBlock
# 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 as th import tor...
sutkarsh/ttools
FixupBasicBlock
false
10,936
[ "MIT" ]
0
a2e5fbf308566c0c54ab9d6ad1d9f8bc63f8fe99
https://github.com/sutkarsh/ttools/tree/a2e5fbf308566c0c54ab9d6ad1d9f8bc63f8fe99
MsgNorm
import torch import torch.nn.functional as F class MsgNorm(torch.nn.Module): def __init__(self, learn_msg_scale=False): super(MsgNorm, self).__init__() self.msg_scale = torch.nn.Parameter(torch.Tensor([1.0]), requires_grad=learn_msg_scale) def forward(self, x, msg, p=2): ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice assert_size_stride = torch._...
Hermine2015/deep_gcns_torch
MsgNorm
false
5,334
[ "MIT" ]
1
69524a2a5de2ba4c3adb0fea0a090b3e9b4510d4
https://github.com/Hermine2015/deep_gcns_torch/tree/69524a2a5de2ba4c3adb0fea0a090b3e9b4510d4
VectorQuantizer
import torch import torch.utils.data from torch import nn from torch.nn import functional as F class VectorQuantizer(nn.Module): """ Tensorflow original: https://github.com/deepmind/sonnet/blob/v2/sonnet/src/nets/vqvae.py Based on: https://github.com/AntixK/PyTorch-VAE/blob/master/models/vq_vae.py """...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
ltschmitt/RecGen
VectorQuantizer
false
4,117
[ "MIT" ]
0
7f69b76b4213c823a3ff05c0e754face8b179896
https://github.com/ltschmitt/RecGen/tree/7f69b76b4213c823a3ff05c0e754face8b179896
FocalLoss2d
# 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...
kevinkwshin/kaggle-pneumothorax
FocalLoss2d
false
15,818
[ "MIT" ]
74
24b91a9425097023f0cc7781a9380cb247babe22
https://github.com/kevinkwshin/kaggle-pneumothorax/tree/24b91a9425097023f0cc7781a9380cb247babe22
RobNet
# 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...
hongrui16/rotated_detection
RobNet
false
10,287
[ "MIT" ]
0
0b0a061b0753950c20d1e52c8ae8fc59e1ceb21d
https://github.com/hongrui16/rotated_detection/tree/0b0a061b0753950c20d1e52c8ae8fc59e1ceb21d
MLP3_clamp_train
# 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....
RuokaiYin/UnarySim
MLP3_clamp_train
false
5,781
[ "MIT" ]
1
343ff9abf356a63d526b1df8eb946ad528690a27
https://github.com/RuokaiYin/UnarySim/tree/343ff9abf356a63d526b1df8eb946ad528690a27
LayerNorm
import torch import torch.nn as nn class LayerNorm(nn.Module): def __init__(self, num_features, eps=1e-05, affine=True): super(LayerNorm, self).__init__() self.num_features = num_features self.affine = affine self.eps = eps if self.affine: self.gamma = nn.Param...
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_...
JieFeng-cse/power-system-rl
LayerNorm
false
9,179
[ "MIT" ]
0
8295d14da83a40c755b8e6a14785c53a238f9a64
https://github.com/JieFeng-cse/power-system-rl/tree/8295d14da83a40c755b8e6a14785c53a238f9a64
_ChannelAttentionModule
import torch import torch.nn as nn class _ChannelAttentionModule(nn.Module): """Channel attention module""" def __init__(self, **kwargs): super(_ChannelAttentionModule, self).__init__() self.beta = nn.Parameter(torch.zeros(1)) self.softmax = nn.Softmax(dim=-1) def forward(self, 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 from torch._inductor.runtime....
HaoweiGis/EarthLearning
_ChannelAttentionModule
false
5,287
[ "MIT" ]
1
f2fa9c07f8af2512c4091a7901e781cc3dde99cf
https://github.com/HaoweiGis/EarthLearning/tree/f2fa9c07f8af2512c4091a7901e781cc3dde99cf
GatedConv2d
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math im...
autocomic/https-github.com-autocomic-DeepFillv2_Pytorch
GatedConv2d
false
3,147
[ "MIT" ]
0
7f6712a9b42dfd827879271f13856f1da5d6a032
https://github.com/autocomic/https-github.com-autocomic-DeepFillv2_Pytorch/tree/7f6712a9b42dfd827879271f13856f1da5d6a032
Decoder1
# 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....
EndyWon/Texture-Reformer
Decoder1
false
8,152
[ "MIT" ]
11
f84f95accb3574c7b759a7f03c0b0b4e150314b5
https://github.com/EndyWon/Texture-Reformer/tree/f84f95accb3574c7b759a7f03c0b0b4e150314b5
Network
import torch import torch.nn as nn import torch.nn.functional as F class Network(nn.Module): """Agent network""" def __init__(self, in_size, out_size): super().__init__() self.fc1 = nn.Linear(in_size, 200) self.fc2 = nn.Linear(200, 100) self.fc3 = nn.Linear(100, 50) 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 import triton_helpers import torch.nn as nn assert_...
Thytu/Deep-Q-Learning
Network
false
9,539
[ "MIT" ]
0
b17fbc66829932a9a3814a8f29d8c8146898b413
https://github.com/Thytu/Deep-Q-Learning/tree/b17fbc66829932a9a3814a8f29d8c8146898b413
BertSelfOutput
# 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...
BLimmie/pytorch-pretrained-BERT
BertSelfOutput
false
7,589
[ "Apache-2.0" ]
1
2ac4b29641e569020ed2acc28016f481f617052b
https://github.com/BLimmie/pytorch-pretrained-BERT/tree/2ac4b29641e569020ed2acc28016f481f617052b
ConcatSquashLinear
import torch import torch.nn as nn import torch.utils.data class ConcatSquashLinear(nn.Module): def __init__(self, dim_in, dim_out): super(ConcatSquashLinear, self).__init__() self._layer = nn.Linear(dim_in, dim_out) self._hyper_bias = nn.Linear(1, dim_out, bias=False) self._hyper...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
musyoku/ffjord
ConcatSquashLinear
false
7,300
[ "MIT" ]
1
9e431e122e59fa9a71f3f301dec8fdd3db51e0ce
https://github.com/musyoku/ffjord/tree/9e431e122e59fa9a71f3f301dec8fdd3db51e0ce
Actor
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
JackYangzg/pytorch-ddpg
Actor
false
5,389
[ "Apache-2.0" ]
1
96838a40dd6992a0a18065a5edafbefc6bb0ac69
https://github.com/JackYangzg/pytorch-ddpg/tree/96838a40dd6992a0a18065a5edafbefc6bb0ac69
Gating
import torch from torch import nn class Gating(nn.Module): def __init__(self, in0_size: 'int', in1_size: 'int', query_size: 'int', hidden_size: 'int'): super(Gating, self).__init__() self.q = nn.Linear(in0_size, query_size, bias=False) self.w_k0 = nn.Linear(in0_size, query_size, b...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
HiroakiMikami/mlprogram
Gating
false
17,379
[ "MIT" ]
9
573e94c567064705fa65267dd83946bf183197de
https://github.com/HiroakiMikami/mlprogram/tree/573e94c567064705fa65267dd83946bf183197de
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=5, 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 * 2, r_dim, k, bias=...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
QingkaiZeng/GenTaxo
NTN
false
8,721
[ "MIT" ]
28
10257a1714d14c6a4c49cbfa0b507408f718cdf0
https://github.com/QingkaiZeng/GenTaxo/tree/10257a1714d14c6a4c49cbfa0b507408f718cdf0
SigmoidDeepLiftModel
import torch import torch.nn as nn class SigmoidDeepLiftModel(nn.Module): """ Model architecture from: https://medium.com/coinmonks/create-a-neural-network-in -pytorch-and-make-your-life-simpler-ec5367895199 """ def __init__(self, num_in, num_hidden, num_out) ->None: super().__ini...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
aravipati12/captum
SigmoidDeepLiftModel
false
10,108
[ "BSD-3-Clause" ]
0
ef3e81d89c8c4404a49c384cf0727f2e7d393f5f
https://github.com/aravipati12/captum/tree/ef3e81d89c8c4404a49c384cf0727f2e7d393f5f