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
TransformerLayer
# 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....
JAVI897/CLIP_prefix_caption
TransformerLayer
false
600
[ "MIT" ]
0
f4569891d01a5a790e9cdf850fb7feda3a0affc7
https://github.com/JAVI897/CLIP_prefix_caption/tree/f4569891d01a5a790e9cdf850fb7feda3a0affc7
CodeLoss
import torch import torch.nn as nn class CodeLoss(nn.Module): def __init__(self): super().__init__() self.loss = nn.MSELoss() def forward(self, origin_logit, trans_logit): origin_code, trans_code = torch.sign(origin_logit), torch.sign( trans_logit) code_balance_lo...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
KMU-AELAB/Active_Learning
CodeLoss
false
2,450
[ "MIT" ]
0
bc569c16b5f12b58989a8f3db59b7eb4e35cce1b
https://github.com/KMU-AELAB/Active_Learning/tree/bc569c16b5f12b58989a8f3db59b7eb4e35cce1b
ToyRes
import torch import torch.nn as nn import torch.multiprocessing class ToyResLayer(nn.Module): """ Custom Linear layer but mimics a standard linear layer """ def __init__(self): super().__init__() aprime = torch.Tensor(1) bprime = torch.Tensor(1) self.aprime = nn.Parameter(apri...
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.multiprocessing assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
suswei/RLCT
ToyRes
false
4,477
[ "MIT" ]
0
e9e04ca5e64250dfbb94134ec5283286dcdc4358
https://github.com/suswei/RLCT/tree/e9e04ca5e64250dfbb94134ec5283286dcdc4358
IoULoss
import torch import torch.nn as nn class IoULoss(nn.Module): def __init__(self, weight=None, size_average=True): super(IoULoss, self).__init__() def forward(self, inputs: 'torch.Tensor', targets: 'torch.Tensor', smooth: 'int'=1): inputs = torch.sigmoid(inputs) inputs = 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 from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
Latterlig96/DCUnet
IoULoss
false
8,489
[ "MIT" ]
11
87d1c137a60177d6daf1dfff0483678d5580fda0
https://github.com/Latterlig96/DCUnet/tree/87d1c137a60177d6daf1dfff0483678d5580fda0
hsigmoid
import torch import torch.onnx import torch import torch.nn as nn import torch.nn.functional as F class hsigmoid(nn.Module): def forward(self, x): out = F.relu6(x + 3, inplace=True) / 6 return out def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.onnx import torch import torch.nn as nn assert_size_stride = torch._C._dynam...
tomy-0000/pytorch-ssd
hsigmoid
false
10,924
[ "MIT" ]
0
620c0020bbd418001d10263559406bb464139419
https://github.com/tomy-0000/pytorch-ssd/tree/620c0020bbd418001d10263559406bb464139419
Normalize_one
import torch from torch import nn class Normalize_one(nn.Module): def __init__(self, mean, std): super(Normalize_one, self).__init__() self.mean = mean self.std = std def forward(self, input): x = input.clone() x = (x - self.mean) / self.std return x def get...
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...
Alibaba-AAIG/Beyond-ImageNet-Attack
Normalize_one
false
7,667
[ "MIT" ]
23
c14b4844b64a8035b8fe033a617c0567224a9fa4
https://github.com/Alibaba-AAIG/Beyond-ImageNet-Attack/tree/c14b4844b64a8035b8fe033a617c0567224a9fa4
SeparableConvolutionLayer
import torch class SeparableConvolutionLayer(torch.nn.Module): """Depthwise separable convolution layer implementation.""" def __init__(self, nin, nout, kernel_size=3): super(SeparableConvolutionLayer, self).__init__() self.depthwise = torch.nn.Conv2d(nin, nin, kernel_size=kernel_size, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride @triton.jit de...
NileshPranami/Emotion-age-and-ethnicity-Estimation
SeparableConvolutionLayer
false
9,365
[ "MIT" ]
0
2631470899e55956252e2ef84f4f590eede27090
https://github.com/NileshPranami/Emotion-age-and-ethnicity-Estimation/tree/2631470899e55956252e2ef84f4f590eede27090
SimpleAndModule
import torch import torch.jit import torch.onnx import torch.nn class SimpleAndModule(torch.nn.Module): def __init__(self): super(SimpleAndModule, self).__init__() def forward(self, a, b): c = torch.logical_and(a, b) return torch.logical_and(c, c) def get_inputs(): return [torc...
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.jit import torch.onnx import torch.nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
YaronBenAtar/glow
SimpleAndModule
false
14,656
[ "Apache-2.0" ]
2,838
a13706a4239fa7eaf059c670dc573e3eb0768f86
https://github.com/YaronBenAtar/glow/tree/a13706a4239fa7eaf059c670dc573e3eb0768f86
BalancedLoss
# 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...
LIANGKE23/Siamese-FC-KF-CF
BalancedLoss
false
17,566
[ "MIT" ]
10
3d9db19c0f39f0588a5061cd182bfbfc37dca76f
https://github.com/LIANGKE23/Siamese-FC-KF-CF/tree/3d9db19c0f39f0588a5061cd182bfbfc37dca76f
WeightBCE
# 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 from torch import nn a...
BetterRaven/Transfer-Learning_vscode
WeightBCE
false
4,898
[ "MIT" ]
1
90c9bce630f54fd2322cce8fab5fe1d074ff141c
https://github.com/BetterRaven/Transfer-Learning_vscode/tree/90c9bce630f54fd2322cce8fab5fe1d074ff141c
StateAttention
import torch import torch.nn as nn class StateAttention(nn.Module): def __init__(self): super(StateAttention, self).__init__() self.sm = nn.Softmax(dim=1) def forward(self, a_t, r_t, input_embedding, padded_mask): new_a_t = torch.zeros_like(a_t) for i in range(a_t.shape[1]): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
zhangyuejoslin/selfmonitoring-agent
StateAttention
false
4,663
[ "MIT" ]
0
9401ceb492f6c4576d62404b62e815d184136b24
https://github.com/zhangyuejoslin/selfmonitoring-agent/tree/9401ceb492f6c4576d62404b62e815d184136b24
_final_conv_block
import torch import torch.utils.data import torch from torch import nn import torch.nn.functional as F from torch.nn import Parameter def l2normalize(v, eps=1e-12): return v / (v.norm() + eps) class SpectralNorm(nn.Module): def __init__(self, module, name='weight', power_iterations=1): super(Spectr...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
Minsoo2022/Pose-Transfer
_final_conv_block
false
14,050
[ "MIT" ]
692
10a60bb33d51a06e1200f5726f2367b5be4a6b79
https://github.com/Minsoo2022/Pose-Transfer/tree/10a60bb33d51a06e1200f5726f2367b5be4a6b79
Model
import torch import torch.nn as nn import torch.nn.functional as F class Model(nn.Module): def __init__(self, act_dim): super().__init__() self.conv1 = nn.Conv2d(3, 6, 5) self.pool = nn.MaxPool2d(2, 2) self.conv2 = nn.Conv2d(6, 16, 5) self.fc1 = nn.Linear(2704, 520) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
krishanrana/robot_learning_algorithms
Model
false
3,871
[ "MIT" ]
0
3e66c9bf44e81ff281195130c71bcc6ebdf5ccda
https://github.com/krishanrana/robot_learning_algorithms/tree/3e66c9bf44e81ff281195130c71bcc6ebdf5ccda
MLP
import torch import torch.nn as nn import torch.nn.functional as F class MLP(nn.Module): def __init__(self, input_dim, output_dim): super().__init__() self.input_fc = nn.Linear(input_dim, 250) self.hidden_fc = nn.Linear(250, 100) self.output_fc = nn.Linear(100, output_dim) de...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
JanSKowalski/ese440-ese441
MLP
false
13,870
[ "MIT" ]
54
90d7b7afc34aa062aad23dd23813284f66bf1f4d
https://github.com/JanSKowalski/ese440-ese441/tree/90d7b7afc34aa062aad23dd23813284f66bf1f4d
Foo
import torch import torch.nn.functional import torch.nn.parallel import torch.utils.data import torch.optim import torch.utils.data.distributed class Foo(torch.nn.Module): def __init__(self, size): super(Foo, self).__init__() self.n = torch.nn.Parameter(torch.ones(size)) self.m = torch.nn...
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...
DominickZhang/Distillation-Swin-Transformer
Foo
false
11,373
[ "MIT" ]
0
6fc7b25bd558edb14e6f15715f53612c37e5166f
https://github.com/DominickZhang/Distillation-Swin-Transformer/tree/6fc7b25bd558edb14e6f15715f53612c37e5166f
SmallMnist
import torch import torch.nn as nn import torch.nn import torch.utils.data import torch.utils.tensorboard._pytorch_graph import torch.onnx.symbolic_caffe2 class SmallMnist(nn.Module): def __init__(self): super(SmallMnist, self).__init__() self.conv1 = nn.Conv2d(1, 10, kernel_size=5) self....
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
arjunsuresh/aimet
SmallMnist
false
12,736
[ "BSD-3-Clause" ]
0
f6e09cb07a91eed3a5e6b8e19e6b065303af5a39
https://github.com/arjunsuresh/aimet/tree/f6e09cb07a91eed3a5e6b8e19e6b065303af5a39
FPN
import torch import torch.nn as nn from math import sqrt as sqrt from itertools import product as product import torch.nn.functional as F class FPN(nn.Module): def __init__(self, lat_inC, top_inC, outC, mode='nearest'): super(FPN, self).__init__() assert mode in ['nearest', 'bilinear'] 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 import torch.nn as nn from math import sqrt as sqrt from itertools import produc...
KaiOtter/pytorch_DSOD_variants
FPN
false
5,428
[ "MIT" ]
1
f29088b13b24f24e2cf20e9a2dc800cd6dbde145
https://github.com/KaiOtter/pytorch_DSOD_variants/tree/f29088b13b24f24e2cf20e9a2dc800cd6dbde145
OuterProductLayer
# 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...
dreaming-qin/RecBole
OuterProductLayer
false
12,329
[ "MIT" ]
0
d6de39521484ded60c387ca604abaf86310acdbe
https://github.com/dreaming-qin/RecBole/tree/d6de39521484ded60c387ca604abaf86310acdbe
ReferenceWeightBinarizationModule
import torch from torch import nn from torchvision import models as models import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed import torch.onnx class ReferenceDOREFABinarize(torch.autograd.Function): @staticmethod def forward(ctx, x): norm = x.abs(...
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 from torch import nn from torchvision import models as models import torc...
JinYAnGHe/openvino_training_extensions
ReferenceWeightBinarizationModule
false
3,024
[ "Apache-2.0" ]
0
a0b4456a3c9fe6c1b7eabc9d5eb4e74d01453dee
https://github.com/JinYAnGHe/openvino_training_extensions/tree/a0b4456a3c9fe6c1b7eabc9d5eb4e74d01453dee
AttentionPool2d
import math import torch from torch import nn import torch as th def conv_nd(dims, *args, **kwargs): """ Create a 1D, 2D, or 3D convolution module. """ if dims == 1: return nn.Conv1d(*args, **kwargs) elif dims == 2: return nn.Conv2d(*args, **kwargs) elif dims == 3: retu...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
litevxx/glid-3
AttentionPool2d
false
10,447
[ "MIT" ]
0
d7bd53e671d642b0cbc8af81197170b585c7e624
https://github.com/litevxx/glid-3/tree/d7bd53e671d642b0cbc8af81197170b585c7e624
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_...
JamesMcGuigan/udacity-deep-reinforcement-learning
QNetwork
false
691
[ "MIT" ]
0
e093db535fb12dbfb8bc2b5764133e1f52bbbccd
https://github.com/JamesMcGuigan/udacity-deep-reinforcement-learning/tree/e093db535fb12dbfb8bc2b5764133e1f52bbbccd
SmallDecoder5_16x
# 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....
MingSun-Tse/Collaborative-Distillation
SmallDecoder5_16x
false
14,072
[ "MIT" ]
172
915712674af82ff91d926d922c14988cce0430f3
https://github.com/MingSun-Tse/Collaborative-Distillation/tree/915712674af82ff91d926d922c14988cce0430f3
MaxElementwise
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
PogChamper/torch2trt
MaxElementwise
false
14,199
[ "MIT" ]
3,363
43b12627ec0de4d212efb6d02b07570205085ccc
https://github.com/PogChamper/torch2trt/tree/43b12627ec0de4d212efb6d02b07570205085ccc
DeiTEmbeddings
from _paritybench_helpers import _mock_config import collections import torch from torch import nn import torch.utils.checkpoint import collections.abc def to_2tuple(x): if isinstance(x, collections.abc.Iterable): return x return x, x class PatchEmbeddings(nn.Module): """ Image to Patch Embe...
import torch from torch._inductor.select_algorithm import extern_kernels import 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 collections from torch import nn import torch.utils.checkpoint import col...
Clemens123/transformers
DeiTEmbeddings
false
11,793
[ "Apache-2.0" ]
0
22abe7bbc587c16ec30f9d1aa549dcbeba6e9e26
https://github.com/Clemens123/transformers/tree/22abe7bbc587c16ec30f9d1aa549dcbeba6e9e26
DecoderLayer
import torch import torch.nn as nn import torch.utils.checkpoint import torch.nn.functional as F from torch.cuda.amp import autocast class ScaledDotProductAttention(nn.Module): """ Scaled Dot-Product Attention """ def __init__(self, temperature, attn_dropout=0.1): super().__init__() self.temp...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
bahducoup/factorized_training
DecoderLayer
false
12,184
[ "MIT" ]
0
0af38f16338a9bcfcc11091b1a6b75befd67f234
https://github.com/bahducoup/factorized_training/tree/0af38f16338a9bcfcc11091b1a6b75befd67f234
ResNetClassifier
import torch from torch import nn class ResNetClassifier(nn.Module): def __init__(self, n_class, len_feature): super().__init__() self.len_feature = len_feature self.classifier = nn.Linear(self.len_feature, n_class) def forward(self, x): x = x.view(x.size(0), x.size(1), -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 import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
Starrah/THU-SuperMoon
ResNetClassifier
false
14,431
[ "MIT" ]
64
1e6b8ccc207f789fb8426806251cc3d4e1cca35a
https://github.com/Starrah/THU-SuperMoon/tree/1e6b8ccc207f789fb8426806251cc3d4e1cca35a
Invertible1x1Conv
# 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.functional as F from torch.autograd import Variable import torch...
leo0519/TensorRT
Invertible1x1Conv
false
7,075
[ "Apache-2.0" ]
1
498dcb009fe4c2dedbe9c61044d3de4f3c04a41b
https://github.com/leo0519/TensorRT/tree/498dcb009fe4c2dedbe9c61044d3de4f3c04a41b
SquareRoot
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn.functional from torch import nn assert_size_stride = torch._C._...
drivendataorg/DrivenData-2021-Geopose-Solution
SquareRoot
false
6,595
[ "MIT" ]
1
fc1dead0aeb1ade9e9d87b55f56e631c57e966a6
https://github.com/drivendataorg/DrivenData-2021-Geopose-Solution/tree/fc1dead0aeb1ade9e9d87b55f56e631c57e966a6
RpowFloat
import torch class RpowFloat(torch.nn.Module): def __init__(self): super(RpowFloat, self).__init__() def forward(self, x): return 2.0 ** x def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_c...
Akababa/torch2trt
RpowFloat
false
18,419
[ "MIT" ]
2
03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7
https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7
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....
francescodisalvo05/LoFTR
FullAttention
false
12,401
[ "Apache-2.0" ]
0
66372ebbe1ea97d57fe6cb8b5acf5cd92a87ef8d
https://github.com/francescodisalvo05/LoFTR/tree/66372ebbe1ea97d57fe6cb8b5acf5cd92a87ef8d
BERTLhuc
from _paritybench_helpers import _mock_config import torch import torch.nn as nn from torch.nn.parameter import Parameter class BERTLhuc(nn.Module): def __init__(self, config): super(BERTLhuc, self).__init__() self.lhuc = Parameter(torch.zeros(config.hidden_size)) def forward(self, hidden_st...
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.nn.parameter import Parameter assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided...
Chriskuei/FedMatch
BERTLhuc
false
18,352
[ "Apache-2.0" ]
4
305e8c4bbb398712b00c883a986dfec17b500f76
https://github.com/Chriskuei/FedMatch/tree/305e8c4bbb398712b00c883a986dfec17b500f76
ColorJitterLayer
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math from torch....
ParthaEth/PyTorch-StudioGAN
ColorJitterLayer
false
1,896
[ "MIT" ]
0
16dd84415e4b7f4667cb1b1e0ef3fc04edf6b5a9
https://github.com/ParthaEth/PyTorch-StudioGAN/tree/16dd84415e4b7f4667cb1b1e0ef3fc04edf6b5a9
SimpleGeluModule
import torch import torch.nn.functional as F import torch.jit import torch.onnx import torch.nn class SimpleGeluModule(torch.nn.Module): def forward(self, tensor): return F.gelu(tensor + tensor) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.jit import torch.onnx import torch.nn assert_size_stride = torch._...
opti-mix/glow
SimpleGeluModule
false
7,394
[ "Apache-2.0" ]
1
4ba074df5da9822986a23a6679ab592c22660f6d
https://github.com/opti-mix/glow/tree/4ba074df5da9822986a23a6679ab592c22660f6d
SRCNN
import logging import torch import torch.nn as nn def get_root_logger(log_file=None, log_level=logging.INFO): """Get the root logger. The logger will be initialized if it has not been initialized. By default a StreamHandler will be added. If `log_file` is specified, a FileHandler will also be added. ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Juggernaut93/mmediting
SRCNN
false
13,928
[ "Apache-2.0" ]
1,884
8ef46ace29756dd2df1d92f2f73a33646e33e007
https://github.com/Juggernaut93/mmediting/tree/8ef46ace29756dd2df1d92f2f73a33646e33e007
HardSigmoid
import torch import torch.nn as nn class HardSigmoid(nn.Module): def __init__(self, bias=1.0, divisor=2.0, min_value=0.0, max_value=1.0): super(HardSigmoid, self).__init__() assert divisor != 0, 'divisor is not allowed to be equal to zero' self.bias = bias self.divisor = divisor ...
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...
SegmentationBLWX/sssegmentation
HardSigmoid
false
14,383
[ "MIT" ]
411
0b2e3ff5abd7b97e15ac8daf63ea214688c26541
https://github.com/SegmentationBLWX/sssegmentation/tree/0b2e3ff5abd7b97e15ac8daf63ea214688c26541
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 as ...
TheRealMarVin/mlp-mixer
TokenMixer
false
1,147
[ "MIT" ]
0
2124cb5c5adfc7af473cab535095471d4943adab
https://github.com/TheRealMarVin/mlp-mixer/tree/2124cb5c5adfc7af473cab535095471d4943adab
GateLayer
# 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...
Xiaolong-Qi/CRSLab
GateLayer
false
5,993
[ "MIT" ]
1
d507378c86f4996727bf062482e1f224486d4533
https://github.com/Xiaolong-Qi/CRSLab/tree/d507378c86f4996727bf062482e1f224486d4533
MultiHeadLinearAttention
# 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....
debasish-mihup/EfficientConformer
MultiHeadLinearAttention
false
10,349
[ "Apache-2.0" ]
0
bddd927cebcde044a999aaa7766fa6d44dc20576
https://github.com/debasish-mihup/EfficientConformer/tree/bddd927cebcde044a999aaa7766fa6d44dc20576
BertAttention
# 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....
Somefive/cogdl
BertAttention
false
5,848
[ "MIT" ]
1
1c5ab88aafc27529495d0d22f781055619e27cb2
https://github.com/Somefive/cogdl/tree/1c5ab88aafc27529495d0d22f781055619e27cb2
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 from torch import nn f...
oskarnatan/RGBDVS-fusion
HuberLoss
false
7,424
[ "MIT" ]
1
5e560f54442d387a86e3a469107cf65859693987
https://github.com/oskarnatan/RGBDVS-fusion/tree/5e560f54442d387a86e3a469107cf65859693987
SoftDiceLoss
# 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...
cmarasinou/carvana-challenge
SoftDiceLoss
false
15,047
[ "MIT" ]
93
4e1c43f306cfbef1df267acfce59bdcf19504850
https://github.com/cmarasinou/carvana-challenge/tree/4e1c43f306cfbef1df267acfce59bdcf19504850
TemperatureTanh
import torch from torch import Tensor from torch.functional import Tensor from torch import nn as nn class TemperatureTanh(nn.Module): def __init__(self, temperature: 'float'=1.0) ->None: """The hyperbolic tangent with an optional temperature.""" super().__init__() assert temperature != 0...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn as nn assert_size_stride = torch._C._dynamo.guards.assert_...
Felix2048/VLN-CE
TemperatureTanh
false
13,673
[ "MIT" ]
106
4ea21f2af0d869ae65dd6677a53e788233f93761
https://github.com/Felix2048/VLN-CE/tree/4ea21f2af0d869ae65dd6677a53e788233f93761
DPFP
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch.nn import Module from torch import nn import torch.utils.data import torch.nn....
mcx/annotated_deep_learning_paper_implementations
DPFP
false
7,198
[ "MIT" ]
1
f169f3a71dd2d36eb28ad31062d3475efa367b88
https://github.com/mcx/annotated_deep_learning_paper_implementations/tree/f169f3a71dd2d36eb28ad31062d3475efa367b88
SpatialDepthWisePerHeadConvolution
from torch.nn import Module import torch from torch import nn import torch.utils.data import torch.nn.functional import torch.autograd class SpatialDepthWisePerHeadConvolution(Module): """ ## Spatial Depth Wise Per Head Convolution """ def __init__(self, heads: 'int', d_k: 'int', kernel_size: 'int'=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.nn import Module from torch import nn import torch.utils.data import ...
mcx/annotated_deep_learning_paper_implementations
SpatialDepthWisePerHeadConvolution
false
7,212
[ "MIT" ]
1
f169f3a71dd2d36eb28ad31062d3475efa367b88
https://github.com/mcx/annotated_deep_learning_paper_implementations/tree/f169f3a71dd2d36eb28ad31062d3475efa367b88
UsedIndices
# 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.onnx assert_size_stride = torch._C._dynamo.guards.asser...
Piteryo/onnx2pytorch
UsedIndices
false
9,450
[ "Apache-2.0" ]
0
c25b3a5289ee7073d644d280a112c15382b7f690
https://github.com/Piteryo/onnx2pytorch/tree/c25b3a5289ee7073d644d280a112c15382b7f690
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....
Dio990521/LSTM_emo_classifier
BertSelfAttention
false
5,197
[ "MIT" ]
1
aaf2bf2d6a3e60c1acfcff5b82ab256f86ba0dbc
https://github.com/Dio990521/LSTM_emo_classifier/tree/aaf2bf2d6a3e60c1acfcff5b82ab256f86ba0dbc
LossDice
# 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...
MECLabTUDA/OOD-Gen
LossDice
false
17,628
[ "MIT" ]
5
f85ea9106ae1425f18e34c9d82fa3ca4925d8d9e
https://github.com/MECLabTUDA/OOD-Gen/tree/f85ea9106ae1425f18e34c9d82fa3ca4925d8d9e
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 from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
FYJNEVERFOLLOWS/hw_NLP
LanguageModelCriterion
false
420
[ "MIT" ]
0
c9d72804128dfed3a53e9df40e94b2d53cccacae
https://github.com/FYJNEVERFOLLOWS/hw_NLP/tree/c9d72804128dfed3a53e9df40e94b2d53cccacae
LayerNorm
import torch import torch.nn as nn class LayerNorm(nn.Module): def __init__(self, weights, eps=1e-05): super().__init__() self.gamma = nn.Parameter(torch.ones(weights)) self.beta = nn.Parameter(torch.zeros(weights)) self.eps = eps def forward(self, x): mean = x.mean(-...
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_...
AWilcke/Dissertation
LayerNorm
false
3
[ "MIT" ]
0
b85ad38a7f336ee290d5883f5e942f54e140d0d0
https://github.com/AWilcke/Dissertation/tree/b85ad38a7f336ee290d5883f5e942f54e140d0d0
Sys_R
# 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_...
LuckierDodge/ROS_Dockerfiles
Sys_R
false
2,630
[ "MIT" ]
0
42fd0e7ecfef86d792fcc29197fcd79dcb789122
https://github.com/LuckierDodge/ROS_Dockerfiles/tree/42fd0e7ecfef86d792fcc29197fcd79dcb789122
LandmarkHead
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from itertools import product as product assert_size_strid...
huigs/retinaface-pytorch
LandmarkHead
false
10,244
[ "MIT" ]
0
0d7551d5863d172c2122bdd8d2d58be36e1b10fd
https://github.com/huigs/retinaface-pytorch/tree/0d7551d5863d172c2122bdd8d2d58be36e1b10fd
triplet_my_loss
import torch from torch import nn def normalize(x, axis=-1): """Normalizing to unit length along the specified dimension. Args: x: pytorch Variable Returns: x: pytorch Variable, same shape as input """ x = 1.0 * x / (torch.norm(x, 2, axis, keepdim=True).expand_as(x) + 1e-12) return...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Xavierxhq/fruit_identification
triplet_my_loss
false
5,989
[ "MIT" ]
1
54cdf2c3e0aad26ae98b081e44ad1655b6f0a758
https://github.com/Xavierxhq/fruit_identification/tree/54cdf2c3e0aad26ae98b081e44ad1655b6f0a758
GlobalAttention_text
# 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....
JoonHong-Kim/T2I_CL
GlobalAttention_text
false
8,397
[ "MIT" ]
35
c52aa73da903d6e4174eeef2663e5bc1163785b1
https://github.com/JoonHong-Kim/T2I_CL/tree/c52aa73da903d6e4174eeef2663e5bc1163785b1
GHMR
import torch import torch.nn as nn import torch._C import torch.serialization from torch import optim as optim class GHMR(nn.Module): """GHM Regression Loss. Details of the theorem can be viewed in the paper `Gradient Harmonized Single-stage Detector <https://arxiv.org/abs/1811.05181>`_. Args: ...
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...
Atten4Vis/DemystifyLocalViT
GHMR
false
13,351
[ "MIT" ]
64
2e2327caec6d56ae2c8aa861b32bb62f3cdb786e
https://github.com/Atten4Vis/DemystifyLocalViT/tree/2e2327caec6d56ae2c8aa861b32bb62f3cdb786e
Atan
import torch import torch.nn as nn class Atan(nn.Module): def forward(self, x): return torch.atan(x) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
fmhoward/pysurvival
Atan
false
12,381
[ "Apache-2.0" ]
0
3fea55f09477e9f0844845e09d6ea60434436e2e
https://github.com/fmhoward/pysurvival/tree/3fea55f09477e9f0844845e09d6ea60434436e2e
Block
import torch import torch.nn as nn import torch.nn.functional as F class RemoveChannelMeanStd(torch.nn.Module): def forward(self, x): x2 = x.view(x.size(0), x.size(1), -1) mean = x2.mean(dim=2).view(x.size(0), x.size(1), 1, 1) std = x2.std(dim=2).view(x.size(0), x.size(1), 1, 1) r...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
cadurosar/graph_kd_dense_cifar100
Block
false
1,639
[ "MIT" ]
0
84054ab4f8f61c9db3460993661ba7bf1d951b36
https://github.com/cadurosar/graph_kd_dense_cifar100/tree/84054ab4f8f61c9db3460993661ba7bf1d951b36
DenseResidualLayer
import torch import torch.nn as nn class DenseResidualLayer(nn.Module): """ PyTorch like layer for standard linear layer with identity residual connection. :param num_features: (int) Number of input / output units for the layer. """ def __init__(self, num_features): super(DenseResidualLay...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
DaikiSannoXC/simple-cnaps
DenseResidualLayer
false
13,555
[ "MIT" ]
62
be35c4522b180eaae8278633b1c6ca7e5bb56ebb
https://github.com/DaikiSannoXC/simple-cnaps/tree/be35c4522b180eaae8278633b1c6ca7e5bb56ebb
DGCNLayer
from _paritybench_helpers import _mock_config from torch.nn import Module import math import torch import numpy as np import torch.nn as nn import torch.nn.functional as F from torch.nn.modules.module import Module class GraphConvolution(Module): def __init__(self, in_features, out_features, 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 import triton_helpers from torch.nn import Module i...
cjx96/CDRIB
DGCNLayer
false
6,467
[ "MIT" ]
1
e0d2d2b70ec195a76b479b94fb7758d286350c39
https://github.com/cjx96/CDRIB/tree/e0d2d2b70ec195a76b479b94fb7758d286350c39
Extractor
from torch.nn import Module import torch from torch import Tensor from typing import Optional from typing import Tuple import torch.nn.functional as F from torch.nn import Dropout from torch.nn import LayerNorm from torch.nn import Conv1d from torch.nn import MultiheadAttention class Extractor(Module): """Convolu...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
OlegJakushkin/FragmentVC
Extractor
false
14,212
[ "MIT" ]
136
8aa673157b855bf3b67f06fdb6eb4b2a12ed0005
https://github.com/OlegJakushkin/FragmentVC/tree/8aa673157b855bf3b67f06fdb6eb4b2a12ed0005
GatSymAttention
# 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 as F import torch.nn as nn from torch.nn import Parameter assert_size_stride = torch._C._dynamo.guards.assert_siz...
GraphNAS/GraphNAS
GatSymAttention
false
13,739
[ "Apache-2.0" ]
94
b4f05bb10b8b96bb9e82344bfae36a23db2431a6
https://github.com/GraphNAS/GraphNAS/tree/b4f05bb10b8b96bb9e82344bfae36a23db2431a6
DepthwiseSeparableConv
# 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...
AlanShaw-GitHub/video-temporal-localization
DepthwiseSeparableConv
false
18,401
[ "Apache-2.0" ]
3
111b654970914305b1f74d26f8dcc32d9224aa22
https://github.com/AlanShaw-GitHub/video-temporal-localization/tree/111b654970914305b1f74d26f8dcc32d9224aa22
Hflip
import torch import torch.nn as nn def hflip(input: 'torch.Tensor') ->torch.Tensor: """Horizontally flip a tensor image or a batch of tensor images. .. image:: _static/img/hflip.png Input must be a tensor of shape (C, H, W) or a batch of tensors :math:`(*, C, H, W)`. Args: input: input tens...
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...
YanivHollander/kornia
Hflip
false
14,630
[ "ECL-2.0", "Apache-2.0" ]
418
ccd258d0956da89b1feca96448eff8e4969d405a
https://github.com/YanivHollander/kornia/tree/ccd258d0956da89b1feca96448eff8e4969d405a
Critic
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import numpy as np ...
monimoyd/project_deep_reinforcement_learning_collaboration_competition
Critic
false
12,796
[ "MIT" ]
0
3782abb839b671ea53ece1435a4d481d7871cd39
https://github.com/monimoyd/project_deep_reinforcement_learning_collaboration_competition/tree/3782abb839b671ea53ece1435a4d481d7871cd39
SEModule
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
GuillaumeAI/gia-labeling-ImageNet21K
SEModule
false
17,323
[ "MIT" ]
4
825ff49f1558f848fc8a798e2e393b708e75bb0e
https://github.com/GuillaumeAI/gia-labeling-ImageNet21K/tree/825ff49f1558f848fc8a798e2e393b708e75bb0e
RMSNorm
import torch from torch import nn class RMSNorm(nn.Module): def __init__(self, dim, eps=1e-08): super().__init__() self.scale = dim ** -0.5 self.eps = eps self.g = nn.Parameter(torch.ones(dim)) def forward(self, x): norm = torch.norm(x, dim=-1, keepdim=True) * self.sc...
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 from torch import nn assert_...
booydar/x-transformers
RMSNorm
false
3,234
[ "MIT" ]
0
97f0a854fdf4df8a3fbf6a580e2375463af3538c
https://github.com/booydar/x-transformers/tree/97f0a854fdf4df8a3fbf6a580e2375463af3538c
FreqEncoder
import torch import torch.nn as nn class FreqEncoder(nn.Module): def __init__(self, input_dim, max_freq_log2, N_freqs, log_sampling=True, include_input=True, periodic_fns=(torch.sin, torch.cos)): super().__init__() self.input_dim = input_dim self.include_input = include_input ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
StanfordMSL/torch-ngp
FreqEncoder
false
11,892
[ "MIT" ]
0
fc5c70bd5739ce39f7f9765e2ac73ecab86bc64a
https://github.com/StanfordMSL/torch-ngp/tree/fc5c70bd5739ce39f7f9765e2ac73ecab86bc64a
Downsample
# 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 numpy as np assert_size_stride = torch._C._dynamo.guards.assert_size_stri...
Sobsz/uberduck-ml-dev
Downsample
false
1,068
[ "Apache-2.0" ]
0
f099238f6f2e3f600d72d89dea3c883c59d91387
https://github.com/Sobsz/uberduck-ml-dev/tree/f099238f6f2e3f600d72d89dea3c883c59d91387
KLDLoss
import torch import torch.nn as nn import torch.utils.data class KLDLoss(nn.Module): def forward(self, mu1, logvar1, mu2, logvar2): batch_size = mu1.shape[0] sigma1 = logvar1.mul(0.5).exp() sigma2 = logvar2.mul(0.5).exp() kld = torch.log(sigma2 / sigma1 + 1e-08) + (torch.exp(logva...
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 ...
atmacvit/meronymnet
KLDLoss
false
6,271
[ "MIT" ]
1
47e1a7caadc0f770439bb26a93b885f790f62804
https://github.com/atmacvit/meronymnet/tree/47e1a7caadc0f770439bb26a93b885f790f62804
ContrastiveLoss
import torch from torchvision import transforms as transforms import torch.nn as nn import torch.nn.functional as F class ContrastiveLoss(nn.Module): """ Contrastive loss function. Based on: http://yann.lecun.com/exdb/publis/pdf/hadsell-chopra-lecun-06.pdf """ def __init__(self, margin): ...
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 from torchvision import tran...
justinluyao/phd_thesis
ContrastiveLoss
false
3,785
[ "MIT" ]
0
0a61f5deaac86dd34839ce24c2ad89e1411a8540
https://github.com/justinluyao/phd_thesis/tree/0a61f5deaac86dd34839ce24c2ad89e1411a8540
Dueling_DQN
from _paritybench_helpers import _mock_config import torch import torch.nn as nn import torch.nn.functional as F class Dueling_DQN(nn.Module): def __init__(self, args): super().__init__() self.state_space = args.state_space self.fc1 = nn.Linear(self.state_space, args.hidden_size) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
wotmd5731/pseudo_random_gen
Dueling_DQN
false
4,545
[ "MIT" ]
0
f79810cd5ac79afe0a73dee73aa21bd8c01aeb9b
https://github.com/wotmd5731/pseudo_random_gen/tree/f79810cd5ac79afe0a73dee73aa21bd8c01aeb9b
CNN
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.utils class CNN(nn.Module): """ Convolutional layer of a character-based convolutional encoder that outputs word embeddings. """ def __init__(self, char_embed_size: 'int', word_embed_size: 'int', kernel_size: '...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
giwankim/cs224n
CNN
false
3,543
[ "MIT" ]
0
d05d018dd3026aa48810260be50c94cda596dc82
https://github.com/giwankim/cs224n/tree/d05d018dd3026aa48810260be50c94cda596dc82
ChannelMixer
import torch from torch import nn import torch.nn.functional as F import torch.multiprocessing import torch.nn import torch.optim import torch.distributed class FeedForward(nn.Module): def __init__(self, num_features, expansion_factor, dropout): super().__init__() num_hidden = expansion_factor * ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
Cardroid/Muskits
ChannelMixer
false
8,981
[ "Apache-2.0" ]
0
91708bb243bc671e48893a734aee710c356e4bd8
https://github.com/Cardroid/Muskits/tree/91708bb243bc671e48893a734aee710c356e4bd8
Fire
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import n...
BloodAxe/segmentation-networks-benchmark
Fire
false
7,887
[ "MIT" ]
34
2e3feb560102230be9369ab442b4a59cc86dff61
https://github.com/BloodAxe/segmentation-networks-benchmark/tree/2e3feb560102230be9369ab442b4a59cc86dff61
PosLinear2
import torch from torch import Tensor from torch.utils.data import Dataset as Dataset import torch.nn as nn import torch.utils.data class PosLinear2(torch.nn.Linear): def forward(self, x: 'Tensor') ->Tensor: return nn.functional.linear(x, torch.nn.functional.softmax(self. weight, 1), self.bia...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
KelvinKan/CP-Flow
PosLinear2
false
13,955
[ "MIT" ]
64
d01303cb4ebeb5a0bbfca638ffaf5b7a8ec22fb1
https://github.com/KelvinKan/CP-Flow/tree/d01303cb4ebeb5a0bbfca638ffaf5b7a8ec22fb1
ReRegualizedLinearPosNACLayer
# 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 collections import mat...
wlm2019/Neural-Arithmetic-Units
ReRegualizedLinearPosNACLayer
false
16,725
[ "MIT" ]
147
f9de9d004bb2dc2ee28577cd1760d0a00c185836
https://github.com/wlm2019/Neural-Arithmetic-Units/tree/f9de9d004bb2dc2ee28577cd1760d0a00c185836
ResBlock
# 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 ...
FUTUREEEEEE/S2R-DepthNet
ResBlock
false
2,251
[ "MIT" ]
0
415cc40aef10f9540026ff435d14a9ba9e30ad74
https://github.com/FUTUREEEEEE/S2R-DepthNet/tree/415cc40aef10f9540026ff435d14a9ba9e30ad74
AutoEncoder
# 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 assert_size_stride = ...
Gabiedcc/CSC-311
AutoEncoder
false
11,437
[ "MIT" ]
0
e0ae7598ad9e9057ef41c6e634a47a15fc4b3321
https://github.com/Gabiedcc/CSC-311/tree/e0ae7598ad9e9057ef41c6e634a47a15fc4b3321
BertOutput
from _paritybench_helpers import _mock_config import torch from torch import nn import torch.utils.data class BertLayerNorm(nn.Module): def __init__(self, hidden_size, eps=1e-05): """Construct a layernorm module in the TF style (epsilon inside the square root).""" super(BertLayerNorm, self).__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.triton_helpers import libdevice from torch import n...
Stephen0808/WebQA
BertOutput
false
11,908
[ "Apache-2.0" ]
0
b9758932a9d0d75167ec837bb6ee8bc571c64681
https://github.com/Stephen0808/WebQA/tree/b9758932a9d0d75167ec837bb6ee8bc571c64681
BridgeFeatLoss
import torch import torch.nn as nn import torch.utils.data class BridgeFeatLoss(nn.Module): def __init__(self): super(BridgeFeatLoss, self).__init__() def forward(self, f_s, f_t, f_mixed, lam): dist_mixed2s = ((f_mixed - f_s) ** 2).sum(1, keepdim=True) dist_mixed2t = ((f_mixed - f_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 from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import...
neka-nat/Transfer-Learning-Library
BridgeFeatLoss
false
16,144
[ "MIT" ]
1,474
a3b27b0d7562fa90a02e914140b37ab438469e6c
https://github.com/neka-nat/Transfer-Learning-Library/tree/a3b27b0d7562fa90a02e914140b37ab438469e6c
BlendLinear
import torch import torch.nn as nn import torch.utils.data class BlendLinear(nn.Module): def __init__(self, dim_in, dim_out, layer_type=nn.Linear, **unused_kwargs): super(BlendLinear, self).__init__() self._layer0 = layer_type(dim_in, dim_out) self._layer1 = layer_type(dim_in, dim_out) ...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
ClaraBing/ffjord
BlendLinear
false
13,502
[ "MIT" ]
518
a97c34ff546a063316828f53bd041555e663428d
https://github.com/ClaraBing/ffjord/tree/a97c34ff546a063316828f53bd041555e663428d
BertOutAttention
from _paritybench_helpers import _mock_config import math import torch import torch.nn as nn class BertOutAttention(nn.Module): def __init__(self, config, ctx_dim=None): super().__init__() if config.hidden_size % config.num_attention_heads != 0: raise ValueError( 'The ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
YanyuanQiao/HOP-VLN
BertOutAttention
false
18,144
[ "MIT" ]
8
4b26b2569afb3e7eb7d8c2ed814cd424e41cbade
https://github.com/YanyuanQiao/HOP-VLN/tree/4b26b2569afb3e7eb7d8c2ed814cd424e41cbade
MetaCurvatureTransform
import torch import numpy as np class MetaCurvatureTransform(torch.nn.Module): """ [[Source]](https://github.com/learnables/learn2learn/blob/master/learn2learn/optim/transforms/module_transform.py) **Description** Implements the Meta-Curvature transform of Park and Oliva, 2019. Unlike `ModuleTr...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import numpy as np assert_size_stride = torch._C._dynamo.guards.assert_size_stri...
Brikwerk/learn2learn
MetaCurvatureTransform
false
13,427
[ "MIT" ]
1,774
7997c13c26ec627d13ce77ba98427260df78ada8
https://github.com/Brikwerk/learn2learn/tree/7997c13c26ec627d13ce77ba98427260df78ada8
SimpleConv2dModule
import torch import torch.nn.functional as F import torch.jit import torch.onnx import torch.nn class SimpleConv2dModule(torch.nn.Module): def __init__(self, stride=1, padding=0, dilation=1, groups=1): super(SimpleConv2dModule, self).__init__() self.stride = stride self.padding = padding ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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.jit import torch...
andreas-hommel/glow
SimpleConv2dModule
false
3,332
[ "Apache-2.0" ]
0
2bbbf8188a2a941e85677c83f2146bbd076a262e
https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e
RFDB
# 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 ...
BigKingXXL/RFDN
RFDB
false
8,923
[ "MIT" ]
0
35efe7db2558ca063206f3b5ab8341ba9c5e2dc8
https://github.com/BigKingXXL/RFDN/tree/35efe7db2558ca063206f3b5ab8341ba9c5e2dc8
ScaledSiLU
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
krylea/ocp
ScaledSiLU
false
10,492
[ "MIT" ]
0
00fc1df29731d70ff1b5cf8e9323d1d2f1f8e540
https://github.com/krylea/ocp/tree/00fc1df29731d70ff1b5cf8e9323d1d2f1f8e540
NormStyleCode
import torch import torch.nn as nn class NormStyleCode(nn.Module): def forward(self, x): """Normalize the style codes. Args: x (Tensor): Style codes with shape (b, c). Returns: Tensor: Normalized tensor. """ return x * torch.rsqrt(torch.mean(x ** ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
ArdWang/GFPGAN
NormStyleCode
false
11,250
[ "BSD-3-Clause" ]
0
f984ec32754190fad0b9b7a60d372aac84e57173
https://github.com/ArdWang/GFPGAN/tree/f984ec32754190fad0b9b7a60d372aac84e57173
ENC_Conv
import torch import torch.nn as nn class crop(nn.Module): def __init__(self): super().__init__() def forward(self, x): N, C, H, W = x.shape x = x[0:N, 0:C, 0:H - 1, 0:W] return x class shift(nn.Module): def __init__(self): super().__init__() self.shift_...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
amonod/udvd
ENC_Conv
false
1,441
[ "MIT" ]
0
a1ccb777d205255ac68c40efb93dd3996f562c45
https://github.com/amonod/udvd/tree/a1ccb777d205255ac68c40efb93dd3996f562c45
CNNCifar
# 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....
EugeneYuZ/RL-FL
CNNCifar
false
3,641
[ "MIT" ]
0
cb4cc2a17eda1dbf60d696e361f31e433d8dbdea
https://github.com/EugeneYuZ/RL-FL/tree/cb4cc2a17eda1dbf60d696e361f31e433d8dbdea
UpsamplingPixelShuffle
# 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 torchvision import models as models import torch.nn.pa...
JinYAnGHe/openvino_training_extensions
UpsamplingPixelShuffle
false
2,713
[ "Apache-2.0" ]
0
a0b4456a3c9fe6c1b7eabc9d5eb4e74d01453dee
https://github.com/JinYAnGHe/openvino_training_extensions/tree/a0b4456a3c9fe6c1b7eabc9d5eb4e74d01453dee
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....
Harbar-Inbound/BMT
MultiheadedAttention
false
11,863
[ "MIT" ]
0
ec8826f0633db754c7ea8d206672aa0b6b6048fd
https://github.com/Harbar-Inbound/BMT/tree/ec8826f0633db754c7ea8d206672aa0b6b6048fd
PAM_Module
from torch.nn import Module import torch from torch.nn import Conv2d from torch.nn import Parameter from torch.nn import Softmax class PAM_Module(Module): """ Position attention module""" def __init__(self, in_dim): super(PAM_Module, self).__init__() self.chanel_in = in_dim self.query...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
KonarkPaul/COVID_Adv_attack_vulnerability_study
PAM_Module
false
5,452
[ "MIT" ]
1
f0d1256d0d57a933dd86ccd5fe12d83f9f79ca9c
https://github.com/KonarkPaul/COVID_Adv_attack_vulnerability_study/tree/f0d1256d0d57a933dd86ccd5fe12d83f9f79ca9c
ClassificationModel
import torch import torch.nn as nn class ClassificationModel(nn.Module): def __init__(self, num_features_in, num_anchors=9, num_classes=80, prior=0.01, feature_size=256): super(ClassificationModel, self).__init__() self.num_classes = num_classes self.num_anchors = num_anchors ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
DvdNss/FaceMaskDetection
ClassificationModel
false
422
[ "Apache-2.0" ]
0
3a4efe2bf8fb224d72636c853684a563b4e7a2e4
https://github.com/DvdNss/FaceMaskDetection/tree/3a4efe2bf8fb224d72636c853684a563b4e7a2e4
SpatialMeanPool
# 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...
CPJKU/kagglebirds2020
SpatialMeanPool
false
17,044
[ "MIT" ]
4
f86b459389b1d0b0af96ebc9252ffc8496c272e8
https://github.com/CPJKU/kagglebirds2020/tree/f86b459389b1d0b0af96ebc9252ffc8496c272e8
weightedLoss
# 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 from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_...
Mikubill/GAN-ConvLSTM
weightedLoss
false
8,573
[ "MIT" ]
16
943525f62a3ab462a625c72534b3188cd583d839
https://github.com/Mikubill/GAN-ConvLSTM/tree/943525f62a3ab462a625c72534b3188cd583d839
OutputTransition
# 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...
SeanDeloddere/ModelsGenesis
OutputTransition
false
11,862
[ "MIT" ]
0
1c4d1439626b42906311a38aa5f8d4fbd7a2517a
https://github.com/SeanDeloddere/ModelsGenesis/tree/1c4d1439626b42906311a38aa5f8d4fbd7a2517a
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 import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
Kuga23/Deep-Learning
TwoLayerNet
false
2,467
[ "MIT" ]
0
86980338208c702b6bfcbcfffdb18498e389a56b
https://github.com/Kuga23/Deep-Learning/tree/86980338208c702b6bfcbcfffdb18498e389a56b
TPSELoss
# 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 from torch import nn assert_size_stride = torch._...
azahed98/mellotron
TPSELoss
false
1,514
[ "BSD-3-Clause" ]
0
02998743de820e379e0c7ff44506088d6e65c693
https://github.com/azahed98/mellotron/tree/02998743de820e379e0c7ff44506088d6e65c693
TransitionUp
import torch from torch import Tensor import torch.nn as nn def center_crop(layer, max_height, max_width): _, _, h, w = layer.size() xy1 = (w - max_width) // 2 xy2 = (h - max_height) // 2 return layer[:, :, xy2:xy2 + max_height, xy1:xy1 + max_width] class TransitionUp(nn.Module): """ Scale t...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
LPF2020hit/sttr
TransitionUp
false
2,479
[ "Apache-2.0" ]
0
6460951fb29842d3a7c455a9b06708ff61ee36d3
https://github.com/LPF2020hit/sttr/tree/6460951fb29842d3a7c455a9b06708ff61ee36d3
GlobalMaxPooling
import torch import torch.nn as nn class GlobalMaxPooling(nn.Module): def __init__(self, dim=-1): super(self.__class__, self).__init__() self.dim = dim def forward(self, x): return x.max(dim=self.dim)[0] def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_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 from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
numb3r33/toxic_comments_classification
GlobalMaxPooling
false
10,596
[ "MIT" ]
0
c5de56751aee29b6dee6e330237a4fd0bcd7fd51
https://github.com/numb3r33/toxic_comments_classification/tree/c5de56751aee29b6dee6e330237a4fd0bcd7fd51
ResBlock
# 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....
navaro1/parking_prediction
ResBlock
false
12,897
[ "MIT" ]
0
c532a2f75155abc9c0d4be9c955eabe368591932
https://github.com/navaro1/parking_prediction/tree/c532a2f75155abc9c0d4be9c955eabe368591932