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
DenseLayer
import torch import torch.nn as nn def actFunc(act, *args, **kwargs): act = act.lower() if act == 'relu': return nn.ReLU() elif act == 'relu6': return nn.ReLU6() elif act == 'leakyrelu': return nn.LeakyReLU(0.1) elif act == 'prelu': return nn.PReLU() elif act ==...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
zzh-tech/RSCD
DenseLayer
false
16,840
[ "MIT" ]
57
b287b1621121f8ca7ece6b27ebd4e28a5f8e6f5e
https://github.com/zzh-tech/RSCD/tree/b287b1621121f8ca7ece6b27ebd4e28a5f8e6f5e
BertPredictionHeadTransform
# 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 import ...
IsmaelElsharkawi/new_pororo_repo
BertPredictionHeadTransform
false
8,817
[ "MIT" ]
19
4617083b420615b8a3eb0f44d02e4e91a8f407f7
https://github.com/IsmaelElsharkawi/new_pororo_repo/tree/4617083b420615b8a3eb0f44d02e4e91a8f407f7
AddNorm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
sudarshan85/transformer_tutorial
AddNorm
false
10,791
[ "MIT" ]
0
a7fc327f0d952d38b3f711fe21ba416616ba8d7e
https://github.com/sudarshan85/transformer_tutorial/tree/a7fc327f0d952d38b3f711fe21ba416616ba8d7e
EncoderLayer
# 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....
AlbertiPot/attention-is-all-you-need-pytorch
EncoderLayer
false
37
[ "MIT" ]
0
c5ec40907db281b85b3bd7a5dd8016940291add0
https://github.com/AlbertiPot/attention-is-all-you-need-pytorch/tree/c5ec40907db281b85b3bd7a5dd8016940291add0
FM
# 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.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C....
Holldean/pytorch-models
FM
false
2,350
[ "MIT" ]
0
9509d0d462b1a98164b266d49ada199071a855ac
https://github.com/Holldean/pytorch-models/tree/9509d0d462b1a98164b266d49ada199071a855ac
Multihead_Attention_Layer
# 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....
NilsLusch/Point-Cloud-Transformer
Multihead_Attention_Layer
false
910
[ "MIT" ]
0
84a16b45b8949bbf8e7730b10bd5835e2ab4e642
https://github.com/NilsLusch/Point-Cloud-Transformer/tree/84a16b45b8949bbf8e7730b10bd5835e2ab4e642
Attention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
zaynmi/semantic-equivalent-da-for-vqa
Attention
false
16,802
[ "MIT" ]
298
f121fb3e8fee8af5f1935a7526f19e0d884bd95b
https://github.com/zaynmi/semantic-equivalent-da-for-vqa/tree/f121fb3e8fee8af5f1935a7526f19e0d884bd95b
DiceLoss
# 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...
LanXiangExcavator/challenge2021_submission_4
DiceLoss
false
769
[ "BSD-2-Clause" ]
0
ca0d4d4dd219119f7dc46464c92062ecdb7f9c49
https://github.com/LanXiangExcavator/challenge2021_submission_4/tree/ca0d4d4dd219119f7dc46464c92062ecdb7f9c49
SigmoidFocalClassificationLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
Javier-DlaP/OpenPCDet
SigmoidFocalClassificationLoss
false
620
[ "Apache-2.0" ]
0
c4d308ea8052dd92948e2377b161b2519254275b
https://github.com/Javier-DlaP/OpenPCDet/tree/c4d308ea8052dd92948e2377b161b2519254275b
GroupNorm32
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
ShivanshuPurohit/Diffusion
GroupNorm32
false
1,063
[ "MIT" ]
0
9a190d9aa4ed9767cf223e4ef57d0c31690f92cc
https://github.com/ShivanshuPurohit/Diffusion/tree/9a190d9aa4ed9767cf223e4ef57d0c31690f92cc
SimpleModel
# 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 ...
PanJinquan/pytorch-base-trainer
SimpleModel
false
8,652
[ "MIT" ]
11
37799c948f72b2f9d3771ff469e06cdbff4a1d07
https://github.com/PanJinquan/pytorch-base-trainer/tree/37799c948f72b2f9d3771ff469e06cdbff4a1d07
Model
import torch from torch import nn class Model(nn.Module): def __init__(self, input_size, dropout=0.5): super(Model, self).__init__() self.dropout = dropout if self.dropout > 0: self.dropout = nn.Dropout(dropout) self.encode_w1 = nn.Linear(input_size, 64) self.e...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
dohnlee/qufa2021
Model
false
12,301
[ "MIT" ]
0
5fb42caee09ec228358e49768e32c75e3c0094ce
https://github.com/dohnlee/qufa2021/tree/5fb42caee09ec228358e49768e32c75e3c0094ce
SigmoidFocalClassificationLoss
import torch import torch.nn as nn def _sigmoid_cross_entropy_with_logits(logits, labels): loss = torch.clamp(logits, min=0) - logits * labels.type_as(logits) loss += torch.log1p(torch.exp(-torch.abs(logits))) return loss class SigmoidFocalClassificationLoss(nn.Module): """Sigmoid focal cross entrop...
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...
JamesWang007/PointRCNN
SigmoidFocalClassificationLoss
false
11,541
[ "MIT" ]
0
ea0812c52e6767b976fc50fed61e6b72fa6cdf81
https://github.com/JamesWang007/PointRCNN/tree/ea0812c52e6767b976fc50fed61e6b72fa6cdf81
Attention
import torch import torch.nn.functional as F class Attention(torch.nn.Module): def __init__(self, features, attn_dim): super(Attention, self).__init__() self.to_q = torch.nn.Linear(features, attn_dim) self.to_k = torch.nn.Linear(features, attn_dim) self.to_v = torch.nn.Linear(feat...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
rish-16/pytorch-graphdl
Attention
false
7,570
[ "MIT" ]
1
631da8cbf24e67fab2122c507e1935d4acf26e41
https://github.com/rish-16/pytorch-graphdl/tree/631da8cbf24e67fab2122c507e1935d4acf26e41
Conv2d
import torch from torch import nn from torch.nn import functional as F class Conv2d(nn.Conv2d): def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True): super(Conv2d, self).__init__(in_channels, out_channels, kernel_size, stride...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
Farzanehkaji/MINet
Conv2d
false
17,266
[ "MIT" ]
9
cc2852cb2b3b20208f5edf38ec6952363a9b04a7
https://github.com/Farzanehkaji/MINet/tree/cc2852cb2b3b20208f5edf38ec6952363a9b04a7
BPRLoss
# 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 ...
MIracleyin/RecBole-notebook
BPRLoss
false
9,576
[ "MIT" ]
0
ef32b3e57a297ff4889dec1f63c7984f8f901a23
https://github.com/MIracleyin/RecBole-notebook/tree/ef32b3e57a297ff4889dec1f63c7984f8f901a23
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 import triton_helpers from itertools import product...
suiguoxin/Pytorch_Retinaface
fire
false
4,388
[ "MIT" ]
0
d9393bad43103635261b4ec5b03f20e79931d0da
https://github.com/suiguoxin/Pytorch_Retinaface/tree/d9393bad43103635261b4ec5b03f20e79931d0da
Generator
import torch from torch import nn from torch.nn import functional as F import torch.utils.data class Generator(nn.Module): def __init__(self, input_size, hidden_size, output_size): super(Generator, self).__init__() self.map1 = nn.Linear(input_size, hidden_size) self.map2 = nn.Linear(hidde...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
Dora-The-Kid/culture_network
Generator
false
2,161
[ "Apache-2.0" ]
0
bc2bac86e821faa797eeb2670d179395724f7922
https://github.com/Dora-The-Kid/culture_network/tree/bc2bac86e821faa797eeb2670d179395724f7922
Actor
import torch import torch.nn as nn class Actor(nn.Module): def __init__(self, state_dim, action_dim, net_width, maxaction): super(Actor, self).__init__() self.l1 = nn.Linear(state_dim, net_width) self.l2 = nn.Linear(net_width, net_width) self.l3 = nn.Linear(net_width, action_dim) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
XinJingHao/RL
Actor
false
18,101
[ "MIT" ]
6
eed54d6602b173e45ede722b0fcf82b5a203f14a
https://github.com/XinJingHao/RL/tree/eed54d6602b173e45ede722b0fcf82b5a203f14a
LanguageModelCriterion
import torch import torch.nn as nn from torch.autograd import * class LanguageModelCriterion(nn.Module): def __init__(self): super(LanguageModelCriterion, self).__init__() def forward(self, input, target, mask): target = target[:, :input.size(1)] mask = mask[:, :input.size(1)] ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from torch.autograd import * assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
SikandarBakht/Sub-GC
LanguageModelCriterion
false
14,419
[ "MIT" ]
71
5b89aff766df0b11446cf970fb285004ebfef672
https://github.com/SikandarBakht/Sub-GC/tree/5b89aff766df0b11446cf970fb285004ebfef672
QuantizableHSigmoid
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.quantization assert_size_stride = torch._C._dynamo.gua...
HwangJohn/model_compression
QuantizableHSigmoid
false
13,818
[ "MIT" ]
216
1df40c8a531313cc9e79255f4477f39d66d9b849
https://github.com/HwangJohn/model_compression/tree/1df40c8a531313cc9e79255f4477f39d66d9b849
ScaledDotProductAttention
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
ScaledDotProductAttention
false
12,166
[ "MIT" ]
0
0af38f16338a9bcfcc11091b1a6b75befd67f234
https://github.com/bahducoup/factorized_training/tree/0af38f16338a9bcfcc11091b1a6b75befd67f234
SigmoidFocalLoss
import torch import torch.nn as nn import torch.utils class SigmoidFocalLoss(nn.Module): def __init__(self, ignore_label, gamma=2.0, alpha=0.25, reduction='mean'): super(SigmoidFocalLoss, self).__init__() self.ignore_label = ignore_label self.gamma = gamma self.alpha = alpha ...
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 ...
Gaussianer/FasterSeg
SigmoidFocalLoss
false
17,304
[ "MIT" ]
6
f2e102b433275ac9f3387a8c2ae8439b2687bfda
https://github.com/Gaussianer/FasterSeg/tree/f2e102b433275ac9f3387a8c2ae8439b2687bfda
Conv5x5
import torch import torch.nn as nn class Conv5x5(nn.Module): def __init__(self, in_channels, out_channels, use_refl=True): super(Conv5x5, self).__init__() if use_refl: self.pad = nn.ReflectionPad2d(2) else: self.pad = nn.ZeroPad2d(2) self.conv = nn.Conv2d(i...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch....
ArminMasoumian/GCNDepth
Conv5x5
false
7,733
[ "MIT" ]
32
9fa77812fa944c2701a45f09acf988815ca50aee
https://github.com/ArminMasoumian/GCNDepth/tree/9fa77812fa944c2701a45f09acf988815ca50aee
Attention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
AmitMY/seq2seq
Attention
false
8,837
[ "MIT" ]
0
1ad7c09188537729e5b18356f5c36fad1928d245
https://github.com/AmitMY/seq2seq/tree/1ad7c09188537729e5b18356f5c36fad1928d245
Foo
import torch import torch.jit import torch.onnx import torch.nn class Foo(torch.nn.Module): def __init__(self): super(Foo, self).__init__() self.conv1 = torch.nn.Conv2d(3, 6, 3) self.relu = torch.nn.ReLU() self.conv2 = torch.nn.Conv2d(6, 16, 3) def forward(self, x): x...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.jit import torch...
briancoutinho/glow
Foo
false
12,573
[ "Apache-2.0" ]
0
4c919d60b3c33296c4109aec8020a1733c98f5b5
https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5
Interpolate
import torch import torch.fft import torch.nn as nn import torch.utils.cpp_extension class Interpolate(nn.Module): """Interpolation module.""" def __init__(self, size, mode='bilinear', align_corners=False): """Init. Args: scale_factor (float): scaling mode (str): inter...
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.fft import torch.nn as nn import torch.utils.cpp_extension assert_size_strid...
CeciLyu/projected_gan
Interpolate
false
11,580
[ "MIT" ]
0
5e86ee0c88d47164c30ede37448e7ba7f010fa7b
https://github.com/CeciLyu/projected_gan/tree/5e86ee0c88d47164c30ede37448e7ba7f010fa7b
SA_block
import torch import torch.nn as nn class SA_block(nn.Module): """Self-Attention block with dot product for point/voxel/pillar context. A part of the code is from MLCVNet (CVPR 2020). """ def __init__(self, inplanes, planes, groups=4): super().__init__() self.groups = groups 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 from torch._inductor.runtime....
reinforcementdriving/SA-Det3D
SA_block
false
16,327
[ "MIT" ]
134
682cbf5a3023bd580632435d1e4e0acb0ae08ab8
https://github.com/reinforcementdriving/SA-Det3D/tree/682cbf5a3023bd580632435d1e4e0acb0ae08ab8
MultiHeadAttention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
IanYHWu/transformers-for-translation
MultiHeadAttention
false
2,370
[ "MIT" ]
0
b763e58deb2263507eecd2eb569fbaf5c1dd9df8
https://github.com/IanYHWu/transformers-for-translation/tree/b763e58deb2263507eecd2eb569fbaf5c1dd9df8
QNetwork
import torch import numpy as np import torch.nn.functional as F import torch.nn as nn class QNetwork(nn.Module): def __init__(self, device, action_size, observation_size): super(QNetwork, self).__init__() self.device = device self.fc1 = nn.Linear(np.array((observation_size,)).prod() + np....
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 numpy as np import tor...
faisman/deep-reinforcement-learning-projects
QNetwork
false
12,364
[ "MIT" ]
0
cef102ec4019069a22f95d798f6694dce73655ae
https://github.com/faisman/deep-reinforcement-learning-projects/tree/cef102ec4019069a22f95d798f6694dce73655ae
EncoderLayer
import torch import torch.nn as nn class FeedForwardNetwork(nn.Module): def __init__(self, hidden_size, ffn_size, dropout_rate): super(FeedForwardNetwork, self).__init__() self.layer1 = nn.Linear(hidden_size, ffn_size) self.gelu = nn.GELU() self.layer2 = nn.Linear(ffn_size, hidden...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
ChantalMP/Graphormer
EncoderLayer
false
8,968
[ "MIT" ]
0
5c384d0f2840afc88ee88aeb874f4b1f41d760bf
https://github.com/ChantalMP/Graphormer/tree/5c384d0f2840afc88ee88aeb874f4b1f41d760bf
ResidualBlock
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Bartolo1024/ignite
ResidualBlock
false
4,905
[ "BSD-3-Clause" ]
1
b087fef0bc5f97cda415c1c56f1cd589383c54be
https://github.com/Bartolo1024/ignite/tree/b087fef0bc5f97cda415c1c56f1cd589383c54be
MultiHeadAttention
import math import torch from torch import nn from torch.nn import functional as F from numpy import inf from math import inf def Linear(in_features, out_features, bias=True): m = nn.Linear(in_features, out_features, bias) nn.init.xavier_uniform_(m.weight) if bias: nn.init.constant_(m.bias, 0.0) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math from torch import nn from torch.nn import functional as F from numpy...
L-Zhe/FasySeq
MultiHeadAttention
false
8,446
[ "Apache-2.0" ]
34
2cd2abd290666b1e118d8ad11c973b58ca4f0573
https://github.com/L-Zhe/FasySeq/tree/2cd2abd290666b1e118d8ad11c973b58ca4f0573
ApplyStyle
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data from torch import nn import torch.nn.functional as F ass...
Archjbald/PoseStylizer
ApplyStyle
false
1,980
[ "BSD-3-Clause" ]
0
95aae02d1f4ac83536d91b8db5f78d12e7830f97
https://github.com/Archjbald/PoseStylizer/tree/95aae02d1f4ac83536d91b8db5f78d12e7830f97
GaussMembFunc
# 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 math as tl_math assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_str...
trituenhantaoio/anfis-pytorch
GaussMembFunc
false
16,613
[ "MIT" ]
66
7a6bf123d69b550e46abeddd5b4a776243d43aa6
https://github.com/trituenhantaoio/anfis-pytorch/tree/7a6bf123d69b550e46abeddd5b4a776243d43aa6
MGRUCell
# 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.nn import Module i...
CSLT-THU/Vivi_3.0
MGRUCell
false
17,039
[ "Apache-2.0" ]
3
86996d99d662cd33100755501a971c41ce30ca70
https://github.com/CSLT-THU/Vivi_3.0/tree/86996d99d662cd33100755501a971c41ce30ca70
Conv2dSame
# 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 from torch import nn from typing import List from typing import Unio...
SimonCqk/towhee
Conv2dSame
false
9,624
[ "Apache-2.0" ]
0
a187833b1411216106a80a71e6f2c6e68e1be330
https://github.com/SimonCqk/towhee/tree/a187833b1411216106a80a71e6f2c6e68e1be330
Baseblock
import torch import torch.nn as nn from torch.nn import functional as F from torch.nn import init class Baseblock(nn.Module): def __init__(self, in_channels): super(Baseblock, self).__init__() self.p_size = [1, 1, 1, 1] self.pool1 = nn.MaxPool2d(kernel_size=self.p_size[0], stride=self. ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn from to...
FENGShuanglang/PyTorch_Feat_Vision
Baseblock
false
11,426
[ "MIT" ]
0
c45dd001c3354e430e9772ddca6f4ba779656761
https://github.com/FENGShuanglang/PyTorch_Feat_Vision/tree/c45dd001c3354e430e9772ddca6f4ba779656761
SimpleOrModule
# 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.jit import torch.onnx import torch.nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
andreas-hommel/glow
SimpleOrModule
false
3,346
[ "Apache-2.0" ]
0
2bbbf8188a2a941e85677c83f2146bbd076a262e
https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e
LayerNorm2d
import torch import torch.nn as nn import torch.nn.functional as F class LayerNorm2d(nn.LayerNorm): """LayerNorm on channels for 2d images. Args: num_channels (int): The number of channels of the input tensor. eps (float): a value added to the denominator for numerical stability. ...
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_...
HumberMe/mmclassification
LayerNorm2d
false
561
[ "Apache-2.0" ]
0
68f1542068d3af4db932c97e6a728181432fff0c
https://github.com/HumberMe/mmclassification/tree/68f1542068d3af4db932c97e6a728181432fff0c
Attention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
EgemenGuray/Subgraph-Classifier
Attention
false
2,189
[ "MIT" ]
0
b85d28c521701f41dcd698aed40d4c80d454e893
https://github.com/EgemenGuray/Subgraph-Classifier/tree/b85d28c521701f41dcd698aed40d4c80d454e893
BoundNot
# 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 math import numpy as np import torch.nn as nn import torch.nn.functional as F assert_size_stride = torch._C._dynamo.guards.assert_siz...
mnmueller/auto_LiRPA
BoundNot
false
7,281
[ "BSD-3-Clause" ]
1
55cb270b0b99f07b74541d55706c69fbb9daff66
https://github.com/mnmueller/auto_LiRPA/tree/55cb270b0b99f07b74541d55706c69fbb9daff66
NetVLAD
import torch import numpy as np import torch.nn as nn import torch.nn.functional as F from sklearn.neighbors import NearestNeighbors class NetVLAD(nn.Module): """NetVLAD layer implementation""" def __init__(self, num_clusters=64, dim=128, normalize_input=True, vladv2=False, use_faiss=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._inductor.runtime....
carson-sky/Patch-NetVLAD
NetVLAD
false
15,119
[ "MIT" ]
278
7b913626b34dbbe250d6921a6a093512ee513eac
https://github.com/carson-sky/Patch-NetVLAD/tree/7b913626b34dbbe250d6921a6a093512ee513eac
BasicCNN2
import torch import torch.nn as nn import torch.nn.functional as F class BasicCNN2(nn.Module): def __init__(self): super().__init__() self.layer_names = ['conv11', 'conv12', 'conv21', 'conv22', 'conv31', 'conv32', 'fc1', 'output_layer'] self.conv11 = nn.Conv2d(3, 32, 3, paddin...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
fnc11/CosDefence
BasicCNN2
false
10,133
[ "MIT" ]
0
94f451b7d4b36cb3b9fcc85098dae242f311532b
https://github.com/fnc11/CosDefence/tree/94f451b7d4b36cb3b9fcc85098dae242f311532b
Distance
import torch import torch.nn as nn class Distance(nn.Module): def __init__(self): super(Distance, self).__init__() def forward(self, s, t): n, q = s.shape[0], t.shape[0] dist = (t.unsqueeze(0).expand(n, q, -1) - s.unsqueeze(1).expand(n, q, -1)).pow(2).sum(dim=2).T ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
msc5/ml-tools
Distance
false
4,032
[ "Apache-2.0" ]
0
75ca504bdc0495e8a929ad73501b7de692b3089a
https://github.com/msc5/ml-tools/tree/75ca504bdc0495e8a929ad73501b7de692b3089a
BertAttention
from _paritybench_helpers import _mock_config import math import torch from torch import nn class BertLayerNorm(nn.Module): def __init__(self, hidden_size, eps=1e-12): """Construct a layernorm module in the TF style (epsilon inside the square root). """ super(BertLayerNorm, self).__init__...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
noble6emc2/MoCo-SSPT
BertAttention
false
12,850
[ "MIT" ]
0
e6d7cf3f0a3b5a467318dfc32096e4929adbe646
https://github.com/noble6emc2/MoCo-SSPT/tree/e6d7cf3f0a3b5a467318dfc32096e4929adbe646
CNN
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import numpy as np import tor...
MaryZolfaghar/WCSLS
CNN
false
824
[ "Apache-2.0" ]
0
fcb3bfd11c19bb90690ec772f91bbd107832d636
https://github.com/MaryZolfaghar/WCSLS/tree/fcb3bfd11c19bb90690ec772f91bbd107832d636
SelfAttentionSublayer
import math import torch from torch import nn import torch.optim class ScaledDotAttention(torch.nn.Module): def __init__(self, model_dim, n_heads, dropout=0.0): """ Creates a ScaledDotAttention. :param model_dim: The model dimensions. :param n_heads: The number of heads. :...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Nickeilf/pysimt
SelfAttentionSublayer
false
9,524
[ "MIT" ]
0
05c8de92d0e2b930e40939ad3695d8d2c2954dda
https://github.com/Nickeilf/pysimt/tree/05c8de92d0e2b930e40939ad3695d8d2c2954dda
AllReduceLinear
import torch from torch import Tensor import torch.distributed as dist import torch.nn as nn from torch.nn import Linear class ParallelModule(nn.Module): """Parents of all parallel layer classes""" def __init__(self): super().__init__() self.mp_group = None def allreduce(self, outputs): ...
import torch from torch._inductor.select_algorithm import extern_kernels import 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.distributed as dist import torch.nn as nn from torch.nn import Line...
Oaklight/parallelformers
AllReduceLinear
false
14,134
[ "Apache-2.0" ]
454
57fc36f81734c29aaf814e092ce13681d3c28ede
https://github.com/Oaklight/parallelformers/tree/57fc36f81734c29aaf814e092ce13681d3c28ede
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....
rupeshshrestha123/end2end-asr-pytorch
DotProductAttention
false
16,346
[ "MIT" ]
250
8aada8f7cbe90e1d0b05d505042d9e42b8e4dd52
https://github.com/rupeshshrestha123/end2end-asr-pytorch/tree/8aada8f7cbe90e1d0b05d505042d9e42b8e4dd52
CPAMDec
# 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....
bfjei2825401/siamban
CPAMDec
false
10,410
[ "Apache-2.0" ]
0
c41d58742b146dfc8960053453227c6e9fec1bac
https://github.com/bfjei2825401/siamban/tree/c41d58742b146dfc8960053453227c6e9fec1bac
DiceLoss
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
ChristophReich1996/3D_Baggage_Segmentation
DiceLoss
false
5,004
[ "MIT" ]
1
00392cb0fde22d3180b6baf81e404d0fcf4e2ebf
https://github.com/ChristophReich1996/3D_Baggage_Segmentation/tree/00392cb0fde22d3180b6baf81e404d0fcf4e2ebf
MultiheadAttention
import torch import torch.nn.functional as F import torch.utils.data import torch.distributed import torch.nn as nn from torch.nn import Parameter import torch.optim import torch.optim.lr_scheduler class MultiheadAttention(nn.Module): """Multi-headed attention. See "Attention Is All You Need" for more detail...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
farhanazareen/Fairseq
MultiheadAttention
false
6,694
[ "BSD-3-Clause" ]
1
39c7b6804b4a3426ef23b30f3ca8a3c0a9948079
https://github.com/farhanazareen/Fairseq/tree/39c7b6804b4a3426ef23b30f3ca8a3c0a9948079
DeNormalize
# 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.utils.cpp_extension assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = ...
STomoya/animeface
DeNormalize
false
14,363
[ "MIT" ]
61
37b3cd26097d7874559d4c152e41e5712b7a1a42
https://github.com/STomoya/animeface/tree/37b3cd26097d7874559d4c152e41e5712b7a1a42
InvertibleChannelMixing2D
from torch.autograd import Function import torch from torch import nn from warnings import warn def _cayley(A): I = torch.eye(A.shape[-1], device=A.device) LU = torch.lu(I + A, pivot=True) return torch.lu_solve(I - A, *LU) def _cayley_frechet(A, H, Q=None): I = torch.eye(A.shape[-1], device=A.device...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch.autograd import Function from torch import nn from warnings import wa...
cetmann/iunets
InvertibleChannelMixing2D
false
15,017
[ "MIT" ]
86
80ed7cce0e505a0396c42359eaf27819222d71f6
https://github.com/cetmann/iunets/tree/80ed7cce0e505a0396c42359eaf27819222d71f6
ATT
import torch import torch.nn as nn import torch.nn.functional as F class ATT(nn.Module): def __init__(self, din): super(ATT, self).__init__() self.fc1 = nn.Linear(din, 64) self.fc2 = nn.Linear(64, 64) self.fc3 = nn.Linear(64, 1) def forward(self, x): y = F.relu(self.f...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
HuangHaoyu1997/pytorch_DGN
ATT
false
13,778
[ "MIT" ]
48
f1b1a157a9b1678f9238f64458f44412b796d00e
https://github.com/HuangHaoyu1997/pytorch_DGN/tree/f1b1a157a9b1678f9238f64458f44412b796d00e
ShakeResNeXt
import math import torch from torch import nn from numpy import int64 as int64 import torch.nn.functional as F from torch.autograd import Variable class ShakeShake(torch.autograd.Function): @staticmethod def forward(ctx, x1, x2, training=True): if training: alpha = torch.FloatTensor(x1.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 import triton_helpers import math from torch import...
Josie-Li/ZazuML-easy_AutoML
ShakeResNeXt
false
2,436
[ "MIT" ]
0
e4daabaab9df518c35abdba35a67607d002bee33
https://github.com/Josie-Li/ZazuML-easy_AutoML/tree/e4daabaab9df518c35abdba35a67607d002bee33
ContrastiveLoss
# 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 assert_size_stride = torch._...
kevincao91/SiameseNet_Demo
ContrastiveLoss
false
10,315
[ "MIT" ]
0
6ec4384159682a8ee93fb110d6fca33de85fa1ba
https://github.com/kevincao91/SiameseNet_Demo/tree/6ec4384159682a8ee93fb110d6fca33de85fa1ba
WeightNet_DW
# 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...
Sense-GVT/BigPretrain
WeightNet_DW
false
17,938
[ "Apache-2.0" ]
8
d8d9b43d94dd1364c18c1e5ba21b85a31cdbba9e
https://github.com/Sense-GVT/BigPretrain/tree/d8d9b43d94dd1364c18c1e5ba21b85a31cdbba9e
ScaleNetwork
import torch import torch.nn as nn class ScaleNetwork(nn.Module): """Network for parameterizing a scaling function""" def __init__(self, input_dim): super(ScaleNetwork, self).__init__() self.fc1 = nn.Linear(input_dim, 2000) self.relu1 = nn.ReLU(inplace=True) self.fc2 = nn.Line...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
chawins/adv-exp
ScaleNetwork
false
6,441
[ "MIT" ]
1
5423e135c5599e4ec2bf90372916d8d05c89f285
https://github.com/chawins/adv-exp/tree/5423e135c5599e4ec2bf90372916d8d05c89f285
ImageNetNormalizer
import torch from torch import nn import torch.autograd class ImageNetNormalizer(nn.Module): def __init__(self, mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]): super().__init__() self.mean = mean self.std = std def forward(self, x): mean = torch.tensor(self.mean, devi...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn import torch.autograd assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dy...
cassidylaidlaw/perceptual-advex
ImageNetNormalizer
false
15,009
[ "MIT" ]
45
d39136eb5b5e950442456ddade6b4f4fba3dd8f6
https://github.com/cassidylaidlaw/perceptual-advex/tree/d39136eb5b5e950442456ddade6b4f4fba3dd8f6
BertAttention
from _paritybench_helpers import _mock_config import math import torch import torch.nn as nn class BertSelfAttention(nn.Module): def __init__(self, config): super(BertSelfAttention, self).__init__() if config.hidden_size % config.num_attention_heads != 0: raise ValueError( ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
minjoong507/TVRetrieval
BertAttention
false
10,754
[ "MIT" ]
0
919e1766ab8aa1ef267bd3b80d4f87b06cde09a9
https://github.com/minjoong507/TVRetrieval/tree/919e1766ab8aa1ef267bd3b80d4f87b06cde09a9
UpsampleBlock
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
Divyanshu23/model-zoo
UpsampleBlock
false
8,114
[ "MIT" ]
43
2eea6df691d302e182bb1ff8ec5af3542de562ba
https://github.com/Divyanshu23/model-zoo/tree/2eea6df691d302e182bb1ff8ec5af3542de562ba
GEGLU
# 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 from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Steffen-Wolf/vit-pytorch
GEGLU
false
9,607
[ "MIT" ]
0
4f590b9bd570091d9070a039ad33301516caa341
https://github.com/Steffen-Wolf/vit-pytorch/tree/4f590b9bd570091d9070a039ad33301516caa341
wSummation
# 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...
VincentYCYao/MVC-Net-pytorch
wSummation
false
9,600
[ "MIT" ]
0
31f826825cdfe862fbfe0fe19edc78c04d1dec55
https://github.com/VincentYCYao/MVC-Net-pytorch/tree/31f826825cdfe862fbfe0fe19edc78c04d1dec55
L2Norm
import torch from torch import nn class L2Norm(nn.Module): def forward(self, x, eps=1e-06): norm = x.norm(dim=1, keepdim=True).clamp(min=eps) return x / norm def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_...
idolumbantobing/vit-pytorch
L2Norm
false
15,581
[ "MIT" ]
9,373
eb70d8dca041cc387b3e1f72d965d8814eeab29a
https://github.com/idolumbantobing/vit-pytorch/tree/eb70d8dca041cc387b3e1f72d965d8814eeab29a
ModulatedConv2d
# 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.autograd...
BillyXYB/TransEditor
ModulatedConv2d
false
17,089
[ "MIT" ]
4
0194cd6f0e96c801d55c0cb9683e1f552bcf6d48
https://github.com/BillyXYB/TransEditor/tree/0194cd6f0e96c801d55c0cb9683e1f552bcf6d48
Accuracy
import torch import torch.nn.functional import torch.nn as nn import torch.nn.functional as F def centercrop(image, w, h): _nt, _ct, ht, wt = image.size() padw, padh = (wt - w) // 2, (ht - h) // 2 if padw > 0 and padh > 0: image = image[:, :, padh:-padh, padw:-padw] return image class Accura...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn.functi...
HelenGuohx/cv-ferattn-code
Accuracy
false
5,306
[ "MIT" ]
1
faa9b7850fe2a0f8c08193bb129b5fec4639d616
https://github.com/HelenGuohx/cv-ferattn-code/tree/faa9b7850fe2a0f8c08193bb129b5fec4639d616
SimpleArgSortModule
# 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.jit import torch.onnx import torch.nn assert_size_stride = torch._C._dynamo....
mciprian13/glow
SimpleArgSortModule
false
3,994
[ "Apache-2.0" ]
0
90f88205d9bf8baff8df5bbda51c9d138e3e668b
https://github.com/mciprian13/glow/tree/90f88205d9bf8baff8df5bbda51c9d138e3e668b
Mlp
import math import torch import warnings import torch.nn as nn def _no_grad_trunc_normal_(tensor, mean, std, a, b): """Copy & paste from PyTorch official master until it's in a few official releases - RW Method based on https://people.sc.fsu.edu/~jburkardt/presentations/truncated_normal.pdf """ def 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 math import ...
TranNhiem/solo-learn
Mlp
false
1,146
[ "MIT" ]
0
7539732b68d153087d09a26a23e1edfdc49bc086
https://github.com/TranNhiem/solo-learn/tree/7539732b68d153087d09a26a23e1edfdc49bc086
BCE_LOSS
import math import torch from torch.nn.modules.loss import _Loss import torch.optim import torch.nn class BCE_LOSS(_Loss): def __init__(self): super().__init__() self.bce_loss = torch.nn.BCEWithLogitsLoss() def forward(self, input, label): one_hot = torch.zeros_like(input) C ...
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....
YZW-explorer/EOD
BCE_LOSS
false
6,005
[ "Apache-2.0" ]
1
f10e64de86c0f356ebf5c7e923f4042eec4207b1
https://github.com/YZW-explorer/EOD/tree/f10e64de86c0f356ebf5c7e923f4042eec4207b1
TransitionUp
# 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...
adriancampos/road-extraction
TransitionUp
false
6,084
[ "MIT" ]
1
3eaf4ed010d71475276d99d4841d67990a967a1b
https://github.com/adriancampos/road-extraction/tree/3eaf4ed010d71475276d99d4841d67990a967a1b
ResidualBlock
import torch import torch.nn as nn import torch.utils.data class ResidualBlock(nn.Module): def __init__(self, channels): super(ResidualBlock, self).__init__() self.conv1 = nn.Conv2d(channels, channels, kernel_size=3, padding=1) self.prelu = nn.PReLU() self.conv2 = nn.Conv2d(channe...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
JaguAroo/SRResCGAN
ResidualBlock
false
619
[ "MIT" ]
0
9aac612aff631f7fb9142e0a36de9559cfc1a62d
https://github.com/JaguAroo/SRResCGAN/tree/9aac612aff631f7fb9142e0a36de9559cfc1a62d
TransformerEncoderLayer
import torch import torch.nn as nn import torch.nn.functional as F from torch.nn import Linear from torch.nn import Dropout from torch.nn import LayerNorm from typing import Optional import torch.utils.data from typing import Tuple class InProjContainer(torch.nn.Module): def __init__(self, query_proj, key_proj, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Hirni-Meshram3/text
TransformerEncoderLayer
false
5,330
[ "BSD-3-Clause" ]
1
84e6c7bd99c7fb3c229ff289aa722149e3136094
https://github.com/Hirni-Meshram3/text/tree/84e6c7bd99c7fb3c229ff289aa722149e3136094
Generator
import torch import torch.nn as nn import torch.nn.functional as F class Generator(nn.Module): def __init__(self, dim, hidden_dim, y_dim, sigma=0.02): super(Generator, self).__init__() input_dim = dim hidden_size = hidden_dim self.fc1 = nn.Linear(input_dim, hidden_size) se...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
ccha23/miml
Generator
false
6,400
[ "MIT" ]
1
6a41de1c0bb41d38e3cdc6e9c27363215b7729b9
https://github.com/ccha23/miml/tree/6a41de1c0bb41d38e3cdc6e9c27363215b7729b9
WeightedCrossEntropyLoss
# 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 ...
AbangLZU/OpenPCDet
WeightedCrossEntropyLoss
false
7,638
[ "Apache-2.0" ]
29
eeea3f24d392f692228c1ad4e28c0dc9d0e25665
https://github.com/AbangLZU/OpenPCDet/tree/eeea3f24d392f692228c1ad4e28c0dc9d0e25665
Swish
import torch import torch.nn as nn class Swish(nn.Module): def __init__(self): super(Swish, self).__init__() self.beta = nn.Parameter(torch.tensor(1.0)) def forward(self, x): return x * torch.sigmoid(self.beta * x) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_i...
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...
ali-zafari/high-fidelity-generative-compression
Swish
false
9,777
[ "Apache-2.0" ]
0
37ab8d6727df48f8ebf4577db0986ccd0ffe404b
https://github.com/ali-zafari/high-fidelity-generative-compression/tree/37ab8d6727df48f8ebf4577db0986ccd0ffe404b
ContrastiveLoss
import torch import torch.nn as nn class ContrastiveLoss(nn.Module): def __init__(self, margin=0.2): super(ContrastiveLoss, self).__init__() self.margin = margin def forward(self, imgs, caps): scores = torch.mm(imgs, caps.t()) diag = scores.diag() cost_s = torch.clamp...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
maxgreat/dsve-loc
ContrastiveLoss
false
16,025
[ "BSD-3-Clause-Clear" ]
56
dd6807d02c0d5fd3e215be8e5c7a88e73102e561
https://github.com/maxgreat/dsve-loc/tree/dd6807d02c0d5fd3e215be8e5c7a88e73102e561
Model
# 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....
ChengUVa/ptan
Model
false
13,475
[ "MIT" ]
492
f9b3ef2680ff64fad52e600d73ff2bf42eee310d
https://github.com/ChengUVa/ptan/tree/f9b3ef2680ff64fad52e600d73ff2bf42eee310d
OZELoss
# 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 import torch.nn.parallel as...
YanLu-nyu/transferlearning
OZELoss
false
14,627
[ "MIT" ]
9,657
037806c6eb8b0c12aefbfbf3e35cbf893093cff9
https://github.com/YanLu-nyu/transferlearning/tree/037806c6eb8b0c12aefbfbf3e35cbf893093cff9
LayerNorm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
HamoolNizar/RumorDetectionSystem
LayerNorm
false
11,534
[ "MIT" ]
0
902ae4d705c0a6db470064f0e7f07f3c167d3eac
https://github.com/HamoolNizar/RumorDetectionSystem/tree/902ae4d705c0a6db470064f0e7f07f3c167d3eac
LanguageModelCriterion
import torch import torch.nn as nn class LanguageModelCriterion(nn.Module): def __init__(self): super().__init__() def forward(self, x, target, mask): x = x.contiguous().view(-1, x.size(2)) target = target.contiguous().view(-1, 1) mask = mask.contiguous().view(-1, 1) ...
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...
neal2018/torch_learn
LanguageModelCriterion
false
10,608
[ "MIT" ]
0
80bda3a44952aca6fce7156fe4aecb48ddd602ee
https://github.com/neal2018/torch_learn/tree/80bda3a44952aca6fce7156fe4aecb48ddd602ee
MAB
import math import torch import torch.nn.functional as F from torch import nn class MAB(nn.Module): def __init__(self, dim_Q, dim_K, dim_V, num_heads, ln=False): super(MAB, self).__init__() self.dim_V = dim_V self.num_heads = num_heads self.fc_q = nn.Linear(dim_Q, dim_V) s...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
ydiller/NoMoreNMS
MAB
false
4,614
[ "Apache-2.0" ]
0
1c1557357e5312c287f0971c840060deb1bcd039
https://github.com/ydiller/NoMoreNMS/tree/1c1557357e5312c287f0971c840060deb1bcd039
LinearCombine
# 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 math as tl_math import torch.nn as nn import torch.nn.parallel import torch.optim import ...
savan77/nni
LinearCombine
false
4,278
[ "MIT" ]
0
510213393d9cae58c5a8cccd21f322f7bba4e0cf
https://github.com/savan77/nni/tree/510213393d9cae58c5a8cccd21f322f7bba4e0cf
ConvNet
# 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_...
AndrewAltimit/Scene-Classification-AWS-Serverless
ConvNet
false
11,234
[ "MIT" ]
0
caa4bff102987338dcfa597b9ec1638e6e5e63f5
https://github.com/AndrewAltimit/Scene-Classification-AWS-Serverless/tree/caa4bff102987338dcfa597b9ec1638e6e5e63f5
Pad
import torch import torch.nn as nn import torch.nn.functional as F class Pad(nn.Module): def __init__(self, value: 'float', size: 'int'): super().__init__() self.value = value self.size = size def forward(self, waveform: 'torch.Tensor') ->torch.Tensor: return F.pad(waveform, ...
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...
icyda17/very-deep-CNNs
Pad
false
10,219
[ "Apache-2.0" ]
0
c275ef222d50dae90e508345ec3be5adfa5e33ce
https://github.com/icyda17/very-deep-CNNs/tree/c275ef222d50dae90e508345ec3be5adfa5e33ce
VNLinear
import torch import torch.nn as nn import torch.utils.data import torch import torch.nn.parallel class VNLinear(nn.Module): def __init__(self, in_channels, out_channels): super(VNLinear, self).__init__() self.map_to_feat = nn.Linear(in_channels, out_channels, bias=False) 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 import torch.nn as nn import torch.utils.data import torch import torch.nn.paral...
shiyani21/vnn
VNLinear
false
4,313
[ "MIT" ]
0
921be51d6651ff32bff895f4da99ef83d50900da
https://github.com/shiyani21/vnn/tree/921be51d6651ff32bff895f4da99ef83d50900da
GlobalAveragePooling
# 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...
hugovk/EnAET
GlobalAveragePooling
false
15,546
[ "MIT" ]
87
596a1be95f4ebfc5fc4f372f251e66fb03e23b5a
https://github.com/hugovk/EnAET/tree/596a1be95f4ebfc5fc4f372f251e66fb03e23b5a
TemporalDecay
# 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....
LyapunovStability/BRITS
TemporalDecay
false
11,666
[ "MIT" ]
0
92a889dd5946aae215d61b1854d9767c6f7fcf2c
https://github.com/LyapunovStability/BRITS/tree/92a889dd5946aae215d61b1854d9767c6f7fcf2c
SoftmaxDeepLiftModel
import torch import torch.nn as nn class SoftmaxDeepLiftModel(nn.Module): """ Model architecture from: https://adventuresinmachinelearning.com/pytorch-tutorial-deep-learning/ """ def __init__(self, num_in, num_hidden, num_out) ->None: super().__init__() self.num_in = num_in ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
aravipati12/captum
SoftmaxDeepLiftModel
false
10,111
[ "BSD-3-Clause" ]
0
ef3e81d89c8c4404a49c384cf0727f2e7d393f5f
https://github.com/aravipati12/captum/tree/ef3e81d89c8c4404a49c384cf0727f2e7d393f5f
EqualLinear
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.model_zoo assert_size_stride = torch._C...
Aitical/ADspeech2face
EqualLinear
false
4,806
[ "MIT" ]
1
2e811ff8cc7333729f4b77d1b1067296253e8e38
https://github.com/Aitical/ADspeech2face/tree/2e811ff8cc7333729f4b77d1b1067296253e8e38
UpSampleX2
import torch from torchvision.transforms import * class DeconvBlock(torch.nn.Module): def __init__(self, input_size, output_size, kernel_size=4, stride=2, padding=1, bias=True, activation='prelu', norm=None): super(DeconvBlock, self).__init__() self.deconv = torch.nn.ConvTranspose2d(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 torchvision.transforms import * assert_size_stride = torch._C._dynamo.guard...
lizatish/My_CNN
UpSampleX2
false
10,426
[ "MIT" ]
0
b13818bcce2f8a3697d20e34157e3dce53f953ee
https://github.com/lizatish/My_CNN/tree/b13818bcce2f8a3697d20e34157e3dce53f953ee
KGCN
# 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.nn import Module i...
gear/gfnn
KGCN
false
15,418
[ "MIT" ]
46
36667861caacba921469d43917d002896e832c3f
https://github.com/gear/gfnn/tree/36667861caacba921469d43917d002896e832c3f
UpConv
# 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...
gandhisamay/Drone-Cam-Segmentation
UpConv
false
3,547
[ "MIT" ]
0
7e93b6bb65300aea94dd5e35bb8ca3bd1efbe043
https://github.com/gandhisamay/Drone-Cam-Segmentation/tree/7e93b6bb65300aea94dd5e35bb8ca3bd1efbe043
ConvertPointsFromHomogeneous
# 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...
aravinho/frankmocap
ConvertPointsFromHomogeneous
false
3,124
[ "BSD-3-Clause" ]
0
6a150a9cb96e9b32a60d8047eaa84d0c37e471f5
https://github.com/aravinho/frankmocap/tree/6a150a9cb96e9b32a60d8047eaa84d0c37e471f5
CQAttention
import torch import torch.nn as nn import torch.nn.functional as F def mask_logits(target, mask): mask = mask.type(torch.float32) return target * mask + (1 - mask) * -1e+30 class CQAttention(nn.Module): def __init__(self, d_model, dropout=0.1): super().__init__() w4C = torch.empty(d_mod...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
mirbostani/QA-KD-AL
CQAttention
false
7,255
[ "MIT" ]
1
0ec8756ee06ae2a204a5e9110503bc697e9108fb
https://github.com/mirbostani/QA-KD-AL/tree/0ec8756ee06ae2a204a5e9110503bc697e9108fb
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...
musyoku/ffjord
BlendLinear
false
7,297
[ "MIT" ]
1
9e431e122e59fa9a71f3f301dec8fdd3db51e0ce
https://github.com/musyoku/ffjord/tree/9e431e122e59fa9a71f3f301dec8fdd3db51e0ce
T5LayerNorm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
WangXinglin/BIT_framework
T5LayerNorm
false
1,205
[ "MIT" ]
0
1484874fcd00d052c7536789dec95050b480b25d
https://github.com/WangXinglin/BIT_framework/tree/1484874fcd00d052c7536789dec95050b480b25d
FixupResidualChain
import torch import numpy as np import torch as th import torch.utils.data import torch.nn as nn from collections import OrderedDict def _get_activation(activation): valid = ['relu', 'leaky_relu', 'lrelu', 'tanh', 'sigmoid'] assert activation in valid, 'activation should be one of {}'.format(valid) if act...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 numpy as np import tor...
IlyaBizyaev/ttools
FixupResidualChain
false
8,323
[ "MIT" ]
11
b1435b19f397ce1baff9daed3cb287e52a029fdb
https://github.com/IlyaBizyaev/ttools/tree/b1435b19f397ce1baff9daed3cb287e52a029fdb
convBlock_basic
import torch from torch import nn class convBlock_basic(nn.Module): def __init__(self, inChannel, outChannel, kernel, stride, pad, use_batchnorm=False): super(convBlock_basic, self).__init__() self.use_batchnorm = use_batchnorm self.conv = nn.Conv2d(inChannel, outChannel, kernel, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
YacobBY/ICDAR2019-ArT-Recognition-Alchemy
convBlock_basic
false
14,624
[ "MIT" ]
209
911c572c2aff4599a74b7974d46ef4cfb17078b9
https://github.com/YacobBY/ICDAR2019-ArT-Recognition-Alchemy/tree/911c572c2aff4599a74b7974d46ef4cfb17078b9