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
LSTM
# 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 ...
askliar/deep_learning
LSTM
false
1,569
[ "MIT" ]
0
e61b2391a3258d18719bf12d9ed1404620ce6c02
https://github.com/askliar/deep_learning/tree/e61b2391a3258d18719bf12d9ed1404620ce6c02
BinaryMinus
import abc import inspect import torch import warnings import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data from typing import Any from typing import * def get_module_name(cls_or_func): module_name = cls_or_func.__module__ if module_name == '__main__': for frm in 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 abc import inspect import warnings import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data from typ...
Johnsonms/NNI_master
BinaryMinus
false
11,571
[ "MIT" ]
0
e5e5c7aed89cf3189cffe1056464833c15eb54ff
https://github.com/Johnsonms/NNI_master/tree/e5e5c7aed89cf3189cffe1056464833c15eb54ff
GroupLinear
import torch import torch.optim import torch.nn as nn import torch.nn.functional as f class GroupLinear(nn.Module): def __init__(self, groups, channels, map_size, dropout=None): super(GroupLinear, self).__init__() self.groups = groups self.channels = channels self.map_size = map_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 import torch.optim import torch.nn as nn assert_size_stride = torch._C._dynamo.g...
tiruns/grad_proj
GroupLinear
false
4,427
[ "MIT" ]
0
8882ff1e3205e346e972d963480c57dbf5aef407
https://github.com/tiruns/grad_proj/tree/8882ff1e3205e346e972d963480c57dbf5aef407
MiniBatchDiscrimination
import torch import torch.nn as nn from torch.nn import init class MiniBatchDiscrimination(nn.Module): """ source: https://gist.github.com/t-ae/732f78671643de97bbe2c46519972491 paper: Salimans et al. 2016. Improved Methods for Training GANs """ def __init__(self, in_features, out_features, 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.triton_helpers import math as tl_math import torch....
danielnflam/GAN-Tests
MiniBatchDiscrimination
false
3,428
[ "BSD-3-Clause" ]
0
f112e27b802d717f64a8f2cfa79b9898667da14c
https://github.com/danielnflam/GAN-Tests/tree/f112e27b802d717f64a8f2cfa79b9898667da14c
BaselineActor
# 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....
greenstar1151/pytorch-benchmark
BaselineActor
false
10,440
[ "BSD-3-Clause" ]
0
8b7808d3be6b7ca1d57f1812e35fd2df5e470f8b
https://github.com/greenstar1151/pytorch-benchmark/tree/8b7808d3be6b7ca1d57f1812e35fd2df5e470f8b
MLP
import torch import torch.nn as nn class MLP(nn.Module): def __init__(self, input_size, output_size, hidden_size=500, weight_decay=0.0): super(MLP, self).__init__() self.i2h = nn.Linear(in_features=input_size, out_features=hidden_size) self.Dropout = nn.Dropout(p=0.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 import torch.nn as nn assert_...
gchrupala/lyz
MLP
false
12,419
[ "MIT" ]
0
e1e99899af65f6c4cb1fd77485f6fa61ba3500f5
https://github.com/gchrupala/lyz/tree/e1e99899af65f6c4cb1fd77485f6fa61ba3500f5
Standardize
from torch.nn import Module import torch from torch.nn import init from torch.nn.parameter import Parameter class Standardize(Module): """ Applies (element-wise) standardization with trainable translation parameter μ and scale parameter σ, i.e. computes (x - μ) / σ where '/' is applied element-wise. ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch.nn import Module from torch.nn import init from torch.nn.parameter import Parameter assert_size_stride = torch._C._dynamo.guards....
COMP6248-Reproducability-Challenge/MoveBrick_Reproducibility_DeepSAD
Standardize
false
11,277
[ "MIT" ]
0
8985dc9cd8741010362c6ca51e72648b7bd3908f
https://github.com/COMP6248-Reproducability-Challenge/MoveBrick_Reproducibility_DeepSAD/tree/8985dc9cd8741010362c6ca51e72648b7bd3908f
GLU
# 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 Tensor from torch import nn as nn import torch.nn.functional a...
gdevos010/darts
GLU
false
3,663
[ "Apache-2.0" ]
0
96c97c1e241500ae7b91d32bbfa21d811e4a7d71
https://github.com/gdevos010/darts/tree/96c97c1e241500ae7b91d32bbfa21d811e4a7d71
ResidualAttentionBlock
# 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....
HIT-SCIR-xuanxuan/OpenKS
ResidualAttentionBlock
false
13,756
[ "Apache-2.0" ]
88
a7f2ce0890822113322aad22e98d6c961e63caef
https://github.com/HIT-SCIR-xuanxuan/OpenKS/tree/a7f2ce0890822113322aad22e98d6c961e63caef
BridgeFeatLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import...
neka-nat/Transfer-Learning-Library
BridgeFeatLoss
false
16,144
[ "MIT" ]
1,474
a3b27b0d7562fa90a02e914140b37ab438469e6c
https://github.com/neka-nat/Transfer-Learning-Library/tree/a3b27b0d7562fa90a02e914140b37ab438469e6c
Hflip
import torch import torch.nn as nn def hflip(input: 'torch.Tensor') ->torch.Tensor: return torch.flip(input, [-1]) class Hflip(nn.Module): """Horizontally flip a tensor image or a batch of tensor images. Input must be a tensor of shape (C, H, W) or a batch of tensors :math:`(*, C, H, W)`. 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
justanhduc/kornia
Hflip
false
15,750
[ "ECL-2.0", "Apache-2.0" ]
51
c14081292dfb2491fad50ba10e27491cad8cb3e3
https://github.com/justanhduc/kornia/tree/c14081292dfb2491fad50ba10e27491cad8cb3e3
CNN
import torch import torch.nn as nn import torch.nn.functional as F class CNN(nn.Module): def __init__(self): super(CNN, self).__init__() self.conv1 = nn.Conv2d(1, 10, kernel_size=5) self.conv2 = nn.Conv2d(10, 20, kernel_size=5) self.conv2_drop = nn.Dropout2d() self.fc1 = n...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
awesome-archive/DeepLearningWithPyTorch
CNN
false
14,931
[ "MIT" ]
85
921e3c1bc33f88e2b749dd1f9dac8a414bd4a1ee
https://github.com/awesome-archive/DeepLearningWithPyTorch/tree/921e3c1bc33f88e2b749dd1f9dac8a414bd4a1ee
Luong_Attention
import torch import torch.nn as nn import torch.nn.functional as F class Luong_Attention(nn.Module): def __init__(self, hidden_size, score='general'): super(Luong_Attention, self).__init__() assert score.lower() in ['concat', 'general', 'dot'] self.score = score.lower() def wn(x)...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
placaille/nmt-comp550
Luong_Attention
false
7,499
[ "MIT" ]
1
5809ca68dbd7e5452361700f905740a783f9451c
https://github.com/placaille/nmt-comp550/tree/5809ca68dbd7e5452361700f905740a783f9451c
Bicubic
# 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 from torch.nn import Module ...
ShivanshuPurohit/Diffusion
Bicubic
false
1,057
[ "MIT" ]
0
9a190d9aa4ed9767cf223e4ef57d0c31690f92cc
https://github.com/ShivanshuPurohit/Diffusion/tree/9a190d9aa4ed9767cf223e4ef57d0c31690f92cc
BetaMish
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.gu...
dcrmg/Efficient-Segmentation-Networks
BetaMish
false
3,429
[ "MIT" ]
0
e2f2d90d69e4e9af464678b0f02bc754c28f643d
https://github.com/dcrmg/Efficient-Segmentation-Networks/tree/e2f2d90d69e4e9af464678b0f02bc754c28f643d
LReluCustom
import torch from torch import nn class LReluCustom(nn.Module): def __init__(self, leak=0.1): super(LReluCustom, self).__init__() self.leak = leak def forward(self, x): return torch.max(x, self.leak * x) 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 from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
kkulczak/phrases_reconstruction_GAN
LReluCustom
false
3,835
[ "MIT" ]
0
5cf273416eb714f813a8d603942a442f0933cbff
https://github.com/kkulczak/phrases_reconstruction_GAN/tree/5cf273416eb714f813a8d603942a442f0933cbff
styleLoss_v2
import torch import torch.nn as nn def calc_mean_std(feat, eps=1e-05): size = feat.size() assert len(size) == 4 N, C = size[:2] feat_var = feat.view(N, C, -1).var(dim=2) + eps feat_std = feat_var.sqrt().view(N, C, 1, 1) feat_mean = feat.view(N, C, -1).mean(dim=2).view(N, C, 1, 1) return fe...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
Holmes-Alan/Photo2Sketch
styleLoss_v2
false
539
[ "MIT" ]
0
43a0ca6bb8a8e645b35a2ab23d11ed5efe117e09
https://github.com/Holmes-Alan/Photo2Sketch/tree/43a0ca6bb8a8e645b35a2ab23d11ed5efe117e09
Mean
# 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...
WillyChen123/CDFNet
Mean
false
1,230
[ "MIT" ]
0
12d6b288aa2a8301683395a75bd44a7be44b7f2a
https://github.com/WillyChen123/CDFNet/tree/12d6b288aa2a8301683395a75bd44a7be44b7f2a
WorldNet
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cu...
tim-ts-chu/mbpo
WorldNet
false
10,854
[ "MIT" ]
0
0d98e6e80499a82812d3361658e0707c0b489fc5
https://github.com/tim-ts-chu/mbpo/tree/0d98e6e80499a82812d3361658e0707c0b489fc5
GL
# 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...
wofmanaf/ResT
GL
false
16,728
[ "Apache-2.0" ]
178
508e30b28036e2cb882a03d24268dc70eb0c82a3
https://github.com/wofmanaf/ResT/tree/508e30b28036e2cb882a03d24268dc70eb0c82a3
PreActBlock
# 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...
cwmok/LapIRN
PreActBlock
false
15,095
[ "MIT" ]
53
d8f96770a704b1f190955cc26297c7b01a270b0a
https://github.com/cwmok/LapIRN/tree/d8f96770a704b1f190955cc26297c7b01a270b0a
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....
ChHanXiao/mmdetection
MultiheadAttention
false
9,169
[ "Apache-2.0" ]
0
324aa5a042857a9b57abe37385e1210709a20d02
https://github.com/ChHanXiao/mmdetection/tree/324aa5a042857a9b57abe37385e1210709a20d02
ResNetBlockGroupNorm
import torch import torch.nn as nn def conv3x3(in_planes, out_planes, stride=1): """3x3 convolution with padding""" return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, padding=1, bias=False) class ResNetBlockGroupNorm(nn.Module): def __init__(self, inplanes, planes, num_groups...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
TRUMANCFY/wolf
ResNetBlockGroupNorm
false
2,965
[ "Apache-2.0" ]
0
1a21479256e4f51885e2d2fdd449b1faa61277a6
https://github.com/TRUMANCFY/wolf/tree/1a21479256e4f51885e2d2fdd449b1faa61277a6
GLU
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.parallel import torch.onnx assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strid...
Nakachi-S/AttnGAN
GLU
false
869
[ "MIT" ]
0
2dfd1e38f78f2a58895d81131cd8c17e74dbacb2
https://github.com/Nakachi-S/AttnGAN/tree/2dfd1e38f78f2a58895d81131cd8c17e74dbacb2
MseCriterion
# 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.modules.loss import _Loss from torch.optim.lr_scheduler import * assert_siz...
anlewy/mt-dnn
MseCriterion
false
14,863
[ "MIT" ]
2,075
eeb6f01ce0630e61a52b8c9c6f7537cd34978e45
https://github.com/anlewy/mt-dnn/tree/eeb6f01ce0630e61a52b8c9c6f7537cd34978e45
TVLoss
# 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...
Holmes-Alan/Photo2Sketch
TVLoss
false
530
[ "MIT" ]
0
43a0ca6bb8a8e645b35a2ab23d11ed5efe117e09
https://github.com/Holmes-Alan/Photo2Sketch/tree/43a0ca6bb8a8e645b35a2ab23d11ed5efe117e09
DiscriminatorLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch.nn import Module import torch.utils.data import torch.nn.functional import tor...
techthiyanes/annotated_deep_learning_paper_implementations
DiscriminatorLoss
false
16,545
[ "MIT" ]
3,714
8af24da2dd39a9a87482a4d18c2dc829bbd3fd47
https://github.com/techthiyanes/annotated_deep_learning_paper_implementations/tree/8af24da2dd39a9a87482a4d18c2dc829bbd3fd47
PositionwiseFeedForward
import torch import torch.nn as nn class LayerNorm(nn.Module): """ Layer Normalization class """ def __init__(self, features, eps=1e-06): super(LayerNorm, self).__init__() self.weight = nn.Parameter(torch.ones(features)) self.bias = nn.Parameter(torch.zeros(features)) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
chengjunyan1/Graph-Sparse-Transformer
PositionwiseFeedForward
false
6,425
[ "Apache-2.0" ]
1
2c3b77f81789ca80e0c30c32f0c702b2d3bac048
https://github.com/chengjunyan1/Graph-Sparse-Transformer/tree/2c3b77f81789ca80e0c30c32f0c702b2d3bac048
AttentionPool
import torch import torch.nn as nn class AttentionPool(nn.Module): """docstring for AttentionPool""" def __init__(self, inputdim, outputdim=10, pooldim=1, **kwargs): super().__init__() self.inputdim = inputdim self.outputdim = outputdim self.pooldim = pooldim self.tran...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
AjianIronSide/Datadriven-GPVAD
AttentionPool
false
8,898
[ "MIT" ]
0
8590b5f794beb9640b8fe70ac1f5add5944425b3
https://github.com/AjianIronSide/Datadriven-GPVAD/tree/8590b5f794beb9640b8fe70ac1f5add5944425b3
Classifier
# 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 reinterpret_tensor = torch._C._dynamo.guards._reinterp...
Project-Agni/Detection
Classifier
false
947
[ "MIT" ]
0
6b2c8ec25f8bd2bd15995d67f2808352cec9e2af
https://github.com/Project-Agni/Detection/tree/6b2c8ec25f8bd2bd15995d67f2808352cec9e2af
TokenMixer
import torch import torch.nn as nn class TokenMixer(nn.Module): def __init__(self, input_size, hidden_size, dropout=None): super(TokenMixer, self).__init__() self.fc1 = nn.Linear(input_size, hidden_size) self.fc2 = nn.Linear(hidden_size, input_size) self.dropout = None if ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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
RegularizedLinear
# 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....
krayyalasomayajula/inferno
RegularizedLinear
false
3,947
[ "Apache-2.0" ]
0
1c56f34ff19c69dec3d3cb6287b659345bce3492
https://github.com/krayyalasomayajula/inferno/tree/1c56f34ff19c69dec3d3cb6287b659345bce3492
TVLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
vlbthambawita/polyp-inpainting
TVLoss
false
4,504
[ "MIT" ]
0
f1d754f8ffb3f6d991206b2a661933ff32de0d7a
https://github.com/vlbthambawita/polyp-inpainting/tree/f1d754f8ffb3f6d991206b2a661933ff32de0d7a
L1_Charbonnier_loss
import torch import torch.nn as nn class L1_Charbonnier_loss(nn.Module): """L1 Charbonnierloss loss function where the epsilon has been taken as 1e-3 from the paper""" def __init__(self): super(L1_Charbonnier_loss, self).__init__() self.eps = 0.001 def forward(self, X, Y): diff =...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert...
ankurbhatia24/image-super-resolution
L1_Charbonnier_loss
false
9,752
[ "Apache-2.0" ]
0
7ebc2be70e1a940addb6ba886a663f88167e6007
https://github.com/ankurbhatia24/image-super-resolution/tree/7ebc2be70e1a940addb6ba886a663f88167e6007
Router
from torch.nn import Module import torch from torch import nn import torch.utils.data import torch.nn.functional import torch.autograd class Squash(Module): '\n ## Squash\n\n This is **squashing** function from paper, given by equation $(1)$.\n\n $$\\mathbf{v}_j = \x0crac{{\\lVert \\mathbf{s}_j \rVert}^2...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
techthiyanes/annotated_deep_learning_paper_implementations
Router
false
16,649
[ "MIT" ]
3,714
8af24da2dd39a9a87482a4d18c2dc829bbd3fd47
https://github.com/techthiyanes/annotated_deep_learning_paper_implementations/tree/8af24da2dd39a9a87482a4d18c2dc829bbd3fd47
D_V
from _paritybench_helpers import _mock_config import torch import torch.nn as nn class D_V(nn.Module): def __init__(self, args): super(D_V, self).__init__() self._relu = nn.ReLU() self._ws1 = nn.Linear(args.video_feature_dim, args. DV_middle_feature_dim, bias=False) se...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
HCShi/IONet
D_V
false
18,364
[ "MIT" ]
4
42e3c0455a1ecb610f458e814d7310d685b2be7b
https://github.com/HCShi/IONet/tree/42e3c0455a1ecb610f458e814d7310d685b2be7b
TransformerEncoderLayer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
cimeister/neural-transducer
TransformerEncoderLayer
false
1,744
[ "MIT" ]
0
e4dfc718bbcf93254ce23750e5428c5131ddfb98
https://github.com/cimeister/neural-transducer/tree/e4dfc718bbcf93254ce23750e5428c5131ddfb98
patch_extractor
import torch import torch.nn as nn class patch_extractor(nn.Module): """ Module for creating custom patch extractor """ def __init__(self, patch_size, pad=False): super(patch_extractor, self).__init__() self.im2pat = nn.Unfold(kernel_size=patch_size) self.pad = pad sel...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
Xmaster6y/wgenpatex
patch_extractor
false
18,119
[ "MIT" ]
8
08079dc131cc2e9c74ee4f9e16cf9b58667f2b07
https://github.com/Xmaster6y/wgenpatex/tree/08079dc131cc2e9c74ee4f9e16cf9b58667f2b07
SMOEScaleMap
# 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 as nn import torch.autograd assert_size_stride = torch._C._dyna...
LLNL/fastcam
SMOEScaleMap
false
8,423
[ "BSD-3-Clause" ]
25
99cefe37528014247319468cf05f54fef259d3bf
https://github.com/LLNL/fastcam/tree/99cefe37528014247319468cf05f54fef259d3bf
BatchSpectralPenalizationLoss
import torch import torch.nn as nn import torch.utils.data class BatchSpectralPenalizationLoss(nn.Module): """Batch spectral penalization loss from `Transferability vs. Discriminability: Batch Spectral Penalization for Adversarial Domain Adaptation (ICML 2019) <http://ise.thss.tsinghua.edu.cn/~mlong/doc/b...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C....
XianyuanLiu/Transfer-Learning-Library
BatchSpectralPenalizationLoss
false
10,144
[ "MIT" ]
0
25f83f32437032df88ca6101ecd1f63ec7a0aa2c
https://github.com/XianyuanLiu/Transfer-Learning-Library/tree/25f83f32437032df88ca6101ecd1f63ec7a0aa2c
GLU
# 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...
aagnone3/dc19t2
GLU
false
1,348
[ "Apache-2.0" ]
0
cc7baf2a8fe73d28c224f0bf68b5355efd96c24f
https://github.com/aagnone3/dc19t2/tree/cc7baf2a8fe73d28c224f0bf68b5355efd96c24f
SpatialGatherModule
# 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....
Atten4Vis/DemystifyLocalViT
SpatialGatherModule
false
13,346
[ "MIT" ]
64
2e2327caec6d56ae2c8aa861b32bb62f3cdb786e
https://github.com/Atten4Vis/DemystifyLocalViT/tree/2e2327caec6d56ae2c8aa861b32bb62f3cdb786e
PositiveLinear
import torch import torch.nn as nn import torch.nn.functional as F class PositiveLinear(nn.Linear): def forward(self, input): return F.linear(input, self.weight ** 2, self.bias) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {'in_features': 4, 'out_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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
oguzserbetci/monotone-network
PositiveLinear
false
10,593
[ "MIT" ]
0
33a317a1dde1a3d3e74dcbe3eb12d1a81e745c95
https://github.com/oguzserbetci/monotone-network/tree/33a317a1dde1a3d3e74dcbe3eb12d1a81e745c95
FullAttention
# 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....
francescodisalvo05/LoFTR
FullAttention
false
12,401
[ "Apache-2.0" ]
0
66372ebbe1ea97d57fe6cb8b5acf5cd92a87ef8d
https://github.com/francescodisalvo05/LoFTR/tree/66372ebbe1ea97d57fe6cb8b5acf5cd92a87ef8d
FC
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn import torch....
AndrejOrsula/O-CNN
FC
false
9,038
[ "MIT" ]
0
e17290a206c3fe23d80873fb21d7243f71e2e9df
https://github.com/AndrejOrsula/O-CNN/tree/e17290a206c3fe23d80873fb21d7243f71e2e9df
CDCM
import torch import torch.nn as nn class CDCM(nn.Module): """ Compact Dilation Convolution based Module """ def __init__(self, in_channels, out_channels): super(CDCM, self).__init__() self.relu1 = nn.ReLU() self.conv1 = nn.Conv2d(in_channels, out_channels, kernel_size=1, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
arkel23/mmgeneration
CDCM
false
9,943
[ "Apache-2.0" ]
0
41a30e2972f2037f6aac60ed761bed3fe47bfe4d
https://github.com/arkel23/mmgeneration/tree/41a30e2972f2037f6aac60ed761bed3fe47bfe4d
FBetaLoss
# 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...
quqixun/ECG-MLC
FBetaLoss
false
10,729
[ "MIT" ]
0
582d68200b79e3b2ac322c1ed17630727e283605
https://github.com/quqixun/ECG-MLC/tree/582d68200b79e3b2ac322c1ed17630727e283605
BaselineNN
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_s...
severilov/master-thesis
BaselineNN
false
4,301
[ "MIT" ]
0
145382d5d551761fcdbd2b77d7b96fabcc8f78ec
https://github.com/severilov/master-thesis/tree/145382d5d551761fcdbd2b77d7b96fabcc8f78ec
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_...
DeVriesMatt/PyTorch-GAN
LayerNorm
false
11,336
[ "MIT" ]
0
dc6488b1f7af06a954ae3ff5a33816e1a892046f
https://github.com/DeVriesMatt/PyTorch-GAN/tree/dc6488b1f7af06a954ae3ff5a33816e1a892046f
ArcMarginProduct
# 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....
Casyfill/catalyst
ArcMarginProduct
false
9,006
[ "Apache-2.0" ]
0
7f63545dbc53902c3dd959463def28a67a16a989
https://github.com/Casyfill/catalyst/tree/7f63545dbc53902c3dd959463def28a67a16a989
SimplifiedScaledDotProductAttention
import torch import numpy as np from torch import nn from torch.nn import init class SimplifiedScaledDotProductAttention(nn.Module): """ Scaled dot-product attention """ def __init__(self, d_model, h, dropout=0.1): """ :param d_model: Output dimensionality of the model :param ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Nitin-Mane/External-Attention-pytorch
SimplifiedScaledDotProductAttention
false
14,110
[ "MIT" ]
4,466
1ceda306c41063af11c956334747763444a4d83f
https://github.com/Nitin-Mane/External-Attention-pytorch/tree/1ceda306c41063af11c956334747763444a4d83f
F1Loss
import torch import torch._C import torch.serialization from torch import nn import torch.nn.functional as F from typing import * def reduce_loss(loss, reduction): """Reduce loss as specified. Args: loss (Tensor): Elementwise loss tensor. reduction (str): Options are "none", "mean" and "sum"....
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._C import torch.serialization from torch import nn import torch.nn.functional as F from typing import * assert_size_stride = to...
shuaizzZ/mmsegmentation
F1Loss
false
4,331
[ "Apache-2.0" ]
0
a6c6b348dbf8c4a0a39ffbdb832a1e82309c533c
https://github.com/shuaizzZ/mmsegmentation/tree/a6c6b348dbf8c4a0a39ffbdb832a1e82309c533c
BlobDoG
import torch from torch import Tensor from typing import Optional import torch.nn as nn from typing import List def KORNIA_CHECK_IS_TENSOR(x, msg: 'Optional[str]'=None): if not isinstance(x, Tensor): raise TypeError(f'Not a Tensor type. Got: {type(x)}.\n{msg}') def KORNIA_CHECK_SHAPE(x, shape: 'List[str...
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 Tensor from typing import Optional import torch.nn as nn from typing import List assert_size_stride = torch._C._dynamo.gua...
YanivHollander/kornia
BlobDoG
false
14,636
[ "ECL-2.0", "Apache-2.0" ]
418
ccd258d0956da89b1feca96448eff8e4969d405a
https://github.com/YanivHollander/kornia/tree/ccd258d0956da89b1feca96448eff8e4969d405a
CNNNet
import torch import torch.nn.functional as F import torch.nn as nn class CNNNet(nn.Module): def __init__(self): super(CNNNet, self).__init__() self.conv1 = nn.Conv2d(3, 64, 5) self.pool = nn.MaxPool2d(2, 2) self.conv2 = nn.Conv2d(64, 128, 5) self.fc1 = nn.Linear(128 * 5 * ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
fangkaimin/pytorch_classification_new
CNNNet
false
10,128
[ "MIT" ]
0
21032e7ab91f0f3106ba07aa97657a023b1cc717
https://github.com/fangkaimin/pytorch_classification_new/tree/21032e7ab91f0f3106ba07aa97657a023b1cc717
Quantize
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.functional as F assert_size_stride = torch...
unilight/crank
Quantize
false
4,482
[ "MIT" ]
0
0dc5d9df17f3186155b1c9583ab604ff218ad9a6
https://github.com/unilight/crank/tree/0dc5d9df17f3186155b1c9583ab604ff218ad9a6
Encoder
import torch import torch.nn as nn class Encoder(nn.Module): def __init__(self, input_dim, hidden_dim, latent_dim): super(Encoder, self).__init__() self.FC_input = nn.Linear(input_dim, hidden_dim) self.FC_mean = nn.Linear(hidden_dim, latent_dim) self.FC_var = nn.Linear(hidden_dim,...
import torch from torch import device from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
RasmusJuul/dtu_mlops
Encoder
false
979
[ "Apache-2.0" ]
0
98bca082067aa7575bb8e8193991723d474f0850
https://github.com/RasmusJuul/dtu_mlops/tree/98bca082067aa7575bb8e8193991723d474f0850
InceptionA
# 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...
HuangCongQing/pytorch
InceptionA
false
8,237
[ "MIT" ]
12
2b2b01d74b45cbe4e467da229798609e79cec97c
https://github.com/HuangCongQing/pytorch/tree/2b2b01d74b45cbe4e467da229798609e79cec97c
DiceLoss
import torch from torch import nn from torch.autograd import Variable def flatten(tensor): """Flattens a given tensor such that the channel axis is first. The shapes are transformed as follows: (N, C, D, H, W) -> (C, N * D * H * W) """ C = tensor.size(1) axis_order = (1, 0) + tuple(range(2,...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
joowlim/pytorch-3dunet
DiceLoss
false
10,400
[ "MIT" ]
0
d08049f60b619627521efd0fb171247e1536b262
https://github.com/joowlim/pytorch-3dunet/tree/d08049f60b619627521efd0fb171247e1536b262
MHSA
import torch import torch.utils.data import torch.nn as nn class MHSA(nn.Module): def __init__(self, n_dims, width=14, height=14, heads=4): super(MHSA, self).__init__() self.heads = heads self.query = nn.Conv2d(n_dims, n_dims, kernel_size=1) self.key = nn.Conv2d(n_dims, n_dims, ke...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
binghuiwu98/discriminatory-yolov5
MHSA
false
12,172
[ "Apache-2.0" ]
0
831bfdb8e0df38e247a72ca029ee3301fc14a311
https://github.com/binghuiwu98/discriminatory-yolov5/tree/831bfdb8e0df38e247a72ca029ee3301fc14a311
Cos
import torch import torch.nn as nn class Cos(nn.Module): def __init__(self): super().__init__() def forward(self, X: 'torch.Tensor'): return torch.cos(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 math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
alartum/sngp-pytorch
Cos
false
6,141
[ "Apache-2.0" ]
1
8d1f6c22d7ae635feeff0c0912624589e31e2e62
https://github.com/alartum/sngp-pytorch/tree/8d1f6c22d7ae635feeff0c0912624589e31e2e62
AvgPool2d
# 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.nn import Module assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._em...
Kritikalcoder/PySyft
AvgPool2d
false
5,447
[ "Apache-2.0" ]
1
4c418084607de74cac7b7795f91168992c555f50
https://github.com/Kritikalcoder/PySyft/tree/4c418084607de74cac7b7795f91168992c555f50
ChannelMixer
import torch import torch.nn as nn class ChannelMixer(nn.Module): def __init__(self, input_size, hidden_size, dropout=None): super(ChannelMixer, self).__init__() self.fc1 = nn.Linear(input_size, hidden_size) self.fc2 = nn.Linear(hidden_size, input_size) self.dropout = None ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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
ChannelMixer
false
1,136
[ "MIT" ]
0
2124cb5c5adfc7af473cab535095471d4943adab
https://github.com/TheRealMarVin/mlp-mixer/tree/2124cb5c5adfc7af473cab535095471d4943adab
RON
# 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 math import sqrt as sqrt from itertools import produc...
KaiOtter/pytorch_DSOD_variants
RON
false
5,422
[ "MIT" ]
1
f29088b13b24f24e2cf20e9a2dc800cd6dbde145
https://github.com/KaiOtter/pytorch_DSOD_variants/tree/f29088b13b24f24e2cf20e9a2dc800cd6dbde145
FourLayerSemSegNetWideView
import torch import torch.nn as nn class FourLayerSemSegNetWideView(nn.Module): def __init__(self, in_channel, out_channel): super().__init__() self.conv1 = torch.nn.Conv2d(in_channel, 6, kernel_size=3, padding= 1, stride=1) self.conv1d100 = torch.nn.Conv2d(in_channel, 2, kern...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
benkoger/kasanka
FourLayerSemSegNetWideView
false
12,165
[ "Apache-2.0" ]
0
d5b1d32b7abf54845af0832da577137397089001
https://github.com/benkoger/kasanka/tree/d5b1d32b7abf54845af0832da577137397089001
Attention
import math import torch import torch.nn as nn import torch.nn.functional as F import torch.optim class Attention(nn.Module): def __init__(self, embed_dim, hidden_dim=None, out_dim=None, n_head=1, score_function='dot_product', dropout=0): """ Attention Mechanism :param embed_dim: ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
NouamaneTazi/conv-emotion
Attention
false
14,123
[ "MIT" ]
488
0c9dcb9cc5234a7ca8cf6af81aabe28ef3814d0e
https://github.com/NouamaneTazi/conv-emotion/tree/0c9dcb9cc5234a7ca8cf6af81aabe28ef3814d0e
TransformerNet
import functools import torch def get_norm_layer(norm_type='instance', affine_state=True): if norm_type == 'batch': norm_layer = functools.partial(torch.nn.BatchNorm2d, affine=True) elif norm_type == 'instance': norm_layer = functools.partial(torch.nn.InstanceNorm2d, affine= affine...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
JunhongH/CP-GAN
TransformerNet
false
17,543
[ "Apache-2.0" ]
9
5ac129da8cf6d010dc0da03bb4637d20c822d50b
https://github.com/JunhongH/CP-GAN/tree/5ac129da8cf6d010dc0da03bb4637d20c822d50b
Conv_Blocks
# 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....
HRHLALALA/GoalGAN
Conv_Blocks
false
9,098
[ "MIT" ]
0
01443f2a578333a0d5ab3a449bc7da69f5023190
https://github.com/HRHLALALA/GoalGAN/tree/01443f2a578333a0d5ab3a449bc7da69f5023190
LayerReLU6
import torch import torch.nn as nn class LayerReLU6(nn.Module): """ Test for nn.layers based types """ def __init__(self): super(LayerReLU6, self).__init__() self.relu = nn.ReLU6() def forward(self, x): x = self.relu(x) return x def get_inputs(): return [tor...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
dawnclaude/onnx2keras
LayerReLU6
false
15,150
[ "MIT" ]
115
3d2a47c0a228b91fd434232274e216e491da36e3
https://github.com/dawnclaude/onnx2keras/tree/3d2a47c0a228b91fd434232274e216e491da36e3
Encoder
import torch import torch.nn as nn import torch.nn.functional as F class Encoder(nn.Module): """Estimation of the nonnegative mixture weight by a 1-D conv layer. """ def __init__(self, L, N): super(Encoder, self).__init__() self.L, self.N = L, N self.conv1d_U = nn.Conv1d(1, N, ker...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
zhangxinaaaa/Conv-TasNet
Encoder
false
11,037
[ "MIT" ]
0
4622d93d0b9dbe23584addd4f4b9463255651652
https://github.com/zhangxinaaaa/Conv-TasNet/tree/4622d93d0b9dbe23584addd4f4b9463255651652
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....
coolgrasshopper/amodal_road_segmentation
CPAMDec
false
6,534
[ "MIT" ]
1
462209242973815055f085ada99772af32082f5c
https://github.com/coolgrasshopper/amodal_road_segmentation/tree/462209242973815055f085ada99772af32082f5c
AnyHead
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dyn...
Pre-release/BAKE
AnyHead
false
14,234
[ "MIT" ]
67
2899b38d556a9151f55079c1b9888d462369aec8
https://github.com/Pre-release/BAKE/tree/2899b38d556a9151f55079c1b9888d462369aec8
WeightedFeatureFusion
# 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....
CaptainEven/MCMOT-ByteTrack
WeightedFeatureFusion
false
7,837
[ "MIT" ]
20
e014275cfb25147dfa6f49cdbed24e91e5d6c41e
https://github.com/CaptainEven/MCMOT-ByteTrack/tree/e014275cfb25147dfa6f49cdbed24e91e5d6c41e
OHEM_CrossEntroy_Loss
import torch from torch import nn class OHEM_CrossEntroy_Loss(nn.Module): def __init__(self, threshold, keep_num): super(OHEM_CrossEntroy_Loss, self).__init__() self.threshold = threshold self.keep_num = keep_num self.loss_function = nn.CrossEntropyLoss(reduction='none') def ...
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...
HaowenWeiJohn/CV_Project
OHEM_CrossEntroy_Loss
false
584
[ "MIT" ]
0
8e2414796f60a8c3fe452f3721e4a6ef7edfdb11
https://github.com/HaowenWeiJohn/CV_Project/tree/8e2414796f60a8c3fe452f3721e4a6ef7edfdb11
ContinuousNet
import math import torch import torch.nn as nn import torch.nn.functional as F def set_init(layers): for layer in layers: nn.init.normal_(layer.weight, mean=0.0, std=0.1) nn.init.constant_(layer.bias, 0.0) class ContinuousNet(nn.Module): def __init__(self, s_dim, a_dim): super(Conti...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
lws803/pytorch-A3C
ContinuousNet
false
10,467
[ "MIT" ]
0
944e7f42a8fa54b7d6efbe169d8a3467b20a0f7f
https://github.com/lws803/pytorch-A3C/tree/944e7f42a8fa54b7d6efbe169d8a3467b20a0f7f
T2A
# 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.cuda import torch.distributed assert_size_str...
InitialBug/BiSET
T2A
false
13,833
[ "MIT" ]
47
a697a3c61014281bbd83cd37ede29b1263c8832f
https://github.com/InitialBug/BiSET/tree/a697a3c61014281bbd83cd37ede29b1263c8832f
SEBlock
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn from tor...
WenmuZhou/crnn.pytorch
SEBlock
false
14,601
[ "Apache-2.0" ]
46
bf7a7c62376eee93943ca7c68e88e3d563c09aa8
https://github.com/WenmuZhou/crnn.pytorch/tree/bf7a7c62376eee93943ca7c68e88e3d563c09aa8
GAT
# 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....
juaduan/babybrainguardian
GAT
false
6,992
[ "MIT" ]
1
b871e3a83fef98c2e05dd8857721a3c964a46418
https://github.com/juaduan/babybrainguardian/tree/b871e3a83fef98c2e05dd8857721a3c964a46418
AR
import torch import torch.nn as nn class AR(nn.Module): def __init__(self, window): super(AR, self).__init__() self.linear = nn.Linear(window, 1) def forward(self, x): x = torch.transpose(x, 1, 2) x = self.linear(x) x = torch.transpose(x, 1, 2) return x def ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
chenghaoliu89/TSForecasting_FT
AR
false
9,990
[ "MIT" ]
0
e29227e67f754919672eab9002a1b37b13ed28a0
https://github.com/chenghaoliu89/TSForecasting_FT/tree/e29227e67f754919672eab9002a1b37b13ed28a0
SEBlock
import torch from torch import nn class SEBlock(nn.Module): def __init__(self, num_channels): super(SEBlock, self).__init__() self.lin1 = nn.Conv2d(num_channels, num_channels, 1) self.lin2 = nn.Conv2d(num_channels, num_channels, 1) def forward(self, x): h = nn.functional.avg_...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
Keleas/Wafer_maps
SEBlock
false
17,553
[ "MIT" ]
7
ee555cafab213a86baf2d9e3b7fb392e1b89a832
https://github.com/Keleas/Wafer_maps/tree/ee555cafab213a86baf2d9e3b7fb392e1b89a832
GCN
# 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....
NightmareNyx/pygcn
GCN
false
2,705
[ "MIT" ]
0
3972f167ce7fcc41cb21284d75816dfd9a15f7ef
https://github.com/NightmareNyx/pygcn/tree/3972f167ce7fcc41cb21284d75816dfd9a15f7ef
ChannelPool
# 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...
ananyaganesh/ftmp
ChannelPool
false
6,193
[ "MIT" ]
1
9ee23939f0c1da854846b8ce1a9abe4e9b377031
https://github.com/ananyaganesh/ftmp/tree/9ee23939f0c1da854846b8ce1a9abe4e9b377031
AdjDecoder
import torch from torch import nn import torch.utils.data class AdjDecoder(nn.Module): u""" Decode an input (parent) feature into a left-child and a right-child feature """ def __init__(self, feature_size, hidden_size): super(AdjDecoder, self).__init__() self.mlp = nn.Linear(feature_size, hid...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import n...
kevin-kaixu/grass_pytorch
AdjDecoder
false
15,809
[ "Apache-2.0" ]
85
1d8dc6dcc0ab3ca029e449f57c37ba3910a4f90a
https://github.com/kevin-kaixu/grass_pytorch/tree/1d8dc6dcc0ab3ca029e449f57c37ba3910a4f90a
Actor
import torch import torch.nn as nn import torch.nn.functional as F class Actor(nn.Module): def __init__(self, state_dim, action_dim, max_action, phi=0.05): super(Actor, self).__init__() self.l1 = nn.Linear(state_dim + action_dim, 400) self.l2 = nn.Linear(400, 300) self.l3 = nn.Lin...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
DanielTakeshi/DCUR
Actor
false
355
[ "MIT" ]
0
1cdb00e7e68060ad3bba9a497106c327f6b5a663
https://github.com/DanielTakeshi/DCUR/tree/1cdb00e7e68060ad3bba9a497106c327f6b5a663
PatchEmbedding
# 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...
avniculae/segmenter
PatchEmbedding
false
9,769
[ "MIT" ]
0
ca9683399b7dae13a8ccbadc744826306b8dbf94
https://github.com/avniculae/segmenter/tree/ca9683399b7dae13a8ccbadc744826306b8dbf94
ShakeResNeXt
import math import torch from torch import nn 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.size(0)).uniform_() alp...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
AustinCai/gmaxup-augmentation
ShakeResNeXt
false
94
[ "MIT" ]
0
a64ca0a76eb333e5ce6b217c301d27ca04d73bce
https://github.com/AustinCai/gmaxup-augmentation/tree/a64ca0a76eb333e5ce6b217c301d27ca04d73bce
Gaussian
import torch from torch import Tensor import torch.utils.tensorboard import torch.utils.data class Gaussian(torch.nn.Module): """Gaussian activation""" def forward(self, x: 'Tensor') ->Tensor: return torch.exp(-x * x) 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.triton_helpers import math as tl_math import torch.utils.tensorboard import torch.utils.data assert_size_stride...
raimis/torchani
Gaussian
false
7,628
[ "MIT" ]
1
19882c6e18174e08423706a536366f89029a740a
https://github.com/raimis/torchani/tree/19882c6e18174e08423706a536366f89029a740a
MSE
import torch import torch.nn as nn class MSE(nn.Module): def __init__(self): super(MSE, self).__init__() def forward(self, x_true, x_pred): return torch.sqrt(torch.mean(torch.pow(x_pred - x_true, 2), dim=-1)) def get_inputs(): return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])]...
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_...
Jiangtong-Li/ZHSIR
MSE
false
17,494
[ "Apache-2.0" ]
8
fd2c0a7e79f22cbf565ccd5e13342f1b317ac9b7
https://github.com/Jiangtong-Li/ZHSIR/tree/fd2c0a7e79f22cbf565ccd5e13342f1b317ac9b7
layer_basic
import torch import numpy as np import torch.nn as nn class layer_basic(nn.Module): """ :param name: name of layer :param input_depth: D :param output_depth: S :param inputs: N x D x m x m tensor :return: output: N x S x m x m tensor """ def __init__(self, input_depth, output_depth, 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 import numpy as np import torch.nn as nn assert_size_stride = torch._C._dynamo.g...
HyTruongSon/InvariantGraphNetworks-PyTorch
layer_basic
false
17,435
[ "Apache-2.0" ]
7
da9fdaa4f858d6fcae14b08a59d4b172a2aabaf8
https://github.com/HyTruongSon/InvariantGraphNetworks-PyTorch/tree/da9fdaa4f858d6fcae14b08a59d4b172a2aabaf8
LsqQuan
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch as t import tor...
HumberMe/lsq-net
LsqQuan
false
556
[ "MIT" ]
0
7dcd75bff4aa7ff2d9c8a7902198fe411a38eb4c
https://github.com/HumberMe/lsq-net/tree/7dcd75bff4aa7ff2d9c8a7902198fe411a38eb4c
CeCriterion
# 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.nn.modules....
johnson7788/mt-dnn
CeCriterion
false
3,888
[ "MIT" ]
0
26e5c4a5bfdbf1a1dd1c903e606db1c070568237
https://github.com/johnson7788/mt-dnn/tree/26e5c4a5bfdbf1a1dd1c903e606db1c070568237
EqualLinear
from torch.autograd import Function import math import torch import torch.utils.data from torch.nn import functional as F from torch.utils import data as data import torch.nn as nn from torch.nn import init as init from torchvision.models import vgg as vgg from torch import autograd as autograd def fused_leaky_relu(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.autograd import Function import math import torch.utils.data from tor...
achrefjarray/ESRGANplus-master
EqualLinear
false
1,381
[ "Apache-2.0" ]
0
ba470ec5c565a6dc8b48575b1e185ef6b796aec6
https://github.com/achrefjarray/ESRGANplus-master/tree/ba470ec5c565a6dc8b48575b1e185ef6b796aec6
ATOCAttentionUnit
import torch from typing import Union from typing import Dict import torch.nn as nn class ATOCAttentionUnit(nn.Module): """ Overview: the attention unit of the atoc network. We now implement it as two-layer MLP, same as the original paper Interface: __init__, forward .. note:: ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
PaParaZz1/DI-engine
ATOCAttentionUnit
false
11,855
[ "Apache-2.0" ]
0
b38144117c1ebc6eb860d8637ec8866dfbcdf2de
https://github.com/PaParaZz1/DI-engine/tree/b38144117c1ebc6eb860d8637ec8866dfbcdf2de
Downsample
import torch from torch import nn class Downsample(nn.Module): def __init__(self, dim): super().__init__() self.conv = nn.Conv2d(dim, dim, 3, 2, 1) def forward(self, x): return self.conv(x) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
DavidRuhe/simple-variational-diffusion-models
Downsample
false
17,221
[ "MIT" ]
4
a32355bf052a8f08e9c1919080588d0b22c8de4e
https://github.com/DavidRuhe/simple-variational-diffusion-models/tree/a32355bf052a8f08e9c1919080588d0b22c8de4e
ConvRelu
import torch import torch.utils.data import torch.nn as nn import torch.backends.cudnn class ConvRelu(nn.Module): """3x3 convolution followed by ReLU activation building block. """ def __init__(self, num_in, num_out): """Creates a `ConvReLU` building block. Args: num_in: number...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.utils.data impor...
Iceofsky/Roofpedia
ConvRelu
false
8,268
[ "MIT" ]
16
933dd3ff6e77ace78be6d2a23ac6692281475073
https://github.com/Iceofsky/Roofpedia/tree/933dd3ff6e77ace78be6d2a23ac6692281475073
RankCrossEntropyLoss
# 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 ...
zfjsail/MatchZoo-py
RankCrossEntropyLoss
false
4,695
[ "Apache-2.0" ]
0
c93e52e7db7e257b46bb8bf8df8ce1ab1944e2f2
https://github.com/zfjsail/MatchZoo-py/tree/c93e52e7db7e257b46bb8bf8df8ce1ab1944e2f2
GlobalAvgPool2d
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
ChenyangWang1/face_parsing
GlobalAvgPool2d
false
2,084
[ "MIT" ]
0
506e74eb8a2094920c03f2fe0774656b1043e8a6
https://github.com/ChenyangWang1/face_parsing/tree/506e74eb8a2094920c03f2fe0774656b1043e8a6
Custom_dropout
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.parallel assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C...
QMrpy/deepchem
Custom_dropout
false
2,738
[ "MIT" ]
0
f38a21c71e7bc4fd1fa59601be2b79ce7d744bd6
https://github.com/QMrpy/deepchem/tree/f38a21c71e7bc4fd1fa59601be2b79ce7d744bd6
TransformerNet
# 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....
Ali-ry/azureml-examples
TransformerNet
false
2,058
[ "MIT" ]
0
817ae89d2766dcafd70937a22cb3a80f100a2906
https://github.com/Ali-ry/azureml-examples/tree/817ae89d2766dcafd70937a22cb3a80f100a2906
OnnxSoftmaxV1V11
import torch from torch import nn class OnnxToTorchModule: """ Marker class for onnx2torch modules. """ pass class OnnxSoftmaxV1V11(nn.Module, OnnxToTorchModule): def __init__(self, axis: 'int'=1, is_log: 'bool'=False): super().__init__() self.axis = axis self.is_log = 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 from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch import nn a...
ENOT-AutoDL/onnx2torch
OnnxSoftmaxV1V11
false
13,633
[ "Apache-2.0" ]
144
2391987b3349bed1670ac3c1bc9062a37323abe3
https://github.com/ENOT-AutoDL/onnx2torch/tree/2391987b3349bed1670ac3c1bc9062a37323abe3
TanhTransform
# 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 as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
knalbant/oppel
TanhTransform
false
7,048
[ "MIT" ]
1
03f840565ef64587ddb7a8b4145d8df7fb0279a3
https://github.com/knalbant/oppel/tree/03f840565ef64587ddb7a8b4145d8df7fb0279a3