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
SafeLength
import torch from torch import nn class SafeLength(nn.Module): def __init__(self, dim=2, keepdim=False, eps=1e-07): super(SafeLength, self).__init__() self.dim = dim self.keepdim = keepdim self.eps = eps def forward(self, x): squared_norm = torch.sum(torch.square(x), ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
clementpoiret/3D-AGSCaps
SafeLength
false
6,460
[ "MIT" ]
1
475eb1915bc1425cebbd0bec36e9096c9c2cb53c
https://github.com/clementpoiret/3D-AGSCaps/tree/475eb1915bc1425cebbd0bec36e9096c9c2cb53c
MeanPoolConv
import torch import torch.nn.functional as F import torch.nn as nn def l2normalize(v, esp=1e-08): return v / (v.norm() + esp) def sn_weight(weight, u, height, n_power_iterations): weight.requires_grad_(False) for _ in range(n_power_iterations): v = l2normalize(torch.mv(weight.view(height, -1).t(...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn.functional as F import torch.nn as nn assert_size_stride = torch...
tsirif/cortex
MeanPoolConv
false
16,623
[ "BSD-3-Clause" ]
109
2837b220f9fb73279df3815bb18b274106412c08
https://github.com/tsirif/cortex/tree/2837b220f9fb73279df3815bb18b274106412c08
LandmarkHead
import torch from itertools import product as product import torch.nn as nn class LandmarkHead(nn.Module): def __init__(self, inchannels=512, num_anchors=3): super(LandmarkHead, self).__init__() self.conv1x1 = nn.Conv2d(inchannels, num_anchors * 10, kernel_size= (1, 1), stride=1, padd...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from itertools import product as product import torch.nn as nn assert_size_strid...
Jung-Jun-Uk/mixface
LandmarkHead
false
17,538
[ "MIT" ]
10
cee17f99d5e22bf962d9bccbda44a57ab8493173
https://github.com/Jung-Jun-Uk/mixface/tree/cee17f99d5e22bf962d9bccbda44a57ab8493173
TwoLayerFCBodyWithAction
# 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 ...
Sohojoe/UdacityDeepRL-Project2
TwoLayerFCBodyWithAction
false
5,854
[ "MIT" ]
1
7137eea0b606ea32d00424d23130ff213f03ecf1
https://github.com/Sohojoe/UdacityDeepRL-Project2/tree/7137eea0b606ea32d00424d23130ff213f03ecf1
Hsigmoid
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data...
Johnsonms/NNI_master
Hsigmoid
false
11,585
[ "MIT" ]
0
e5e5c7aed89cf3189cffe1056464833c15eb54ff
https://github.com/Johnsonms/NNI_master/tree/e5e5c7aed89cf3189cffe1056464833c15eb54ff
PCEN
import torch import torch.nn as nn from torch.nn.parameter import Parameter import torch.quantization import torch.utils.data.distributed class PCEN(nn.Module): def __init__(self): super(PCEN, self).__init__() """ initialising the layer param with the best parametrised values i searched o...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn from torch.nn.parameter import Parameter import torch.qua...
hovercraft-github/wav2letter.pytorch
PCEN
false
15,544
[ "MIT" ]
121
e2b82b418a7854522540e0925bcf894c0ca80e6a
https://github.com/hovercraft-github/wav2letter.pytorch/tree/e2b82b418a7854522540e0925bcf894c0ca80e6a
LowRankResidualPositionwiseFeedForward
import torch import torch.nn as nn import torch.utils.checkpoint import torch.nn.functional as F from torch.cuda.amp import autocast class LowRankResidualPositionwiseFeedForward(nn.Module): """ A two-feed-forward-layer module """ def __init__(self, d_in, d_hid, dropout=0.1): super().__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....
bahducoup/factorized_training
LowRankResidualPositionwiseFeedForward
false
12,153
[ "MIT" ]
0
0af38f16338a9bcfcc11091b1a6b75befd67f234
https://github.com/bahducoup/factorized_training/tree/0af38f16338a9bcfcc11091b1a6b75befd67f234
SparseDecoder
# 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 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...
charlesxu90/DeepSequence-torch
SparseDecoder
false
10,043
[ "MIT" ]
0
640db39769a93ef3d5bc11d6ad05aa7f5d761972
https://github.com/charlesxu90/DeepSequence-torch/tree/640db39769a93ef3d5bc11d6ad05aa7f5d761972
GramMatrix
import torch import torch.utils.data import torch.nn as nn import torch.nn class GramMatrix(nn.Module): def forward(self, input): b, c, h, w = input.size() F = input.view(b, c, h * w) G = torch.bmm(F, F.transpose(1, 2)) G.div_(h * w) return G def get_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 import torch.utils.data import torch.nn as nn import torch.nn assert_size_stride...
IceClear/MW-GAN
GramMatrix
false
8,279
[ "MIT" ]
36
acb962468c984681c4a21f7b5c14588ca8f58c00
https://github.com/IceClear/MW-GAN/tree/acb962468c984681c4a21f7b5c14588ca8f58c00
TwoNet
import torch import torch.nn as nn class TwoNet(nn.Module): def __init__(self, n_features, embedding_dim=256): super(TwoNet, self).__init__() self.a1 = nn.Linear(n_features, embedding_dim) self.a2 = nn.Linear(embedding_dim, 2) def forward(self, x): x = torch.relu(self.a1(x)) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
SkBlaz/KBNR
TwoNet
false
5,834
[ "MIT" ]
1
4c37fe3fdfa7719572affd617e2dab43a54ba1d5
https://github.com/SkBlaz/KBNR/tree/4c37fe3fdfa7719572affd617e2dab43a54ba1d5
BilinearAttention
# 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...
shabnam-b/crosslingual-nlp
BilinearAttention
false
16,390
[ "MIT" ]
64
ccd91baaea23004eab9c4d871910945ca3e61ab7
https://github.com/shabnam-b/crosslingual-nlp/tree/ccd91baaea23004eab9c4d871910945ca3e61ab7
Critic
import torch import numpy as np import torch.nn.functional as F import torch.nn as nn def hidden_init(layer): fan_in = layer.weight.data.size()[0] lim = 1.0 / np.sqrt(fan_in) return -lim, lim class Critic(nn.Module): def __init__(self, critic_in, action_size, seed, fc1_units=512, fc2_units=...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
davidhtf/drlnd
Critic
false
6,537
[ "MIT" ]
1
221601f38659055824763ce41c6d9edd3d476fd4
https://github.com/davidhtf/drlnd/tree/221601f38659055824763ce41c6d9edd3d476fd4
DecoderBlock
import math import torch from torch.autograd import Variable import torch.nn as nn import torch.optim class LayerNorm(nn.Module): def __init__(self, features, eps=1e-06): super(LayerNorm, self).__init__() self.a_2 = nn.Parameter(torch.ones(features)) self.b_2 = nn.Parameter(torch.zeros(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 import triton_helpers from torch._inductor.runtime....
howardchenhd/Transformer-pytorch
DecoderBlock
false
6,850
[ "MIT" ]
1
ae71ed5767272feb7e717be6d5bfce46f80ec57a
https://github.com/howardchenhd/Transformer-pytorch/tree/ae71ed5767272feb7e717be6d5bfce46f80ec57a
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 from torch._inductor.runtime....
rondagdag/onnx-pected
CNN
false
12,950
[ "MIT" ]
0
63eb1c7edf2ddb3127073dc6c09b8edba32a9530
https://github.com/rondagdag/onnx-pected/tree/63eb1c7edf2ddb3127073dc6c09b8edba32a9530
MINCNet
# 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 ...
NicoleDeer/optimized-super-resolution
MINCNet
false
9,453
[ "Apache-2.0" ]
0
deba8a5cff06ab3bd8bf99e207b582f4ddc1ffd1
https://github.com/NicoleDeer/optimized-super-resolution/tree/deba8a5cff06ab3bd8bf99e207b582f4ddc1ffd1
MaxPoolPad
# 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...
ArronHZG/ABD-Net
MaxPoolPad
false
9,596
[ "MIT" ]
0
4f6d15f4d389a55549ea10a2e00d4a5cdecb5753
https://github.com/ArronHZG/ABD-Net/tree/4f6d15f4d389a55549ea10a2e00d4a5cdecb5753
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....
Giseung-Park/BlockSeq
MultiHeadAttention
false
5,234
[ "MIT" ]
1
73dd55e6e500c765396fb7bcb514c9cbe7d799ac
https://github.com/Giseung-Park/BlockSeq/tree/73dd55e6e500c765396fb7bcb514c9cbe7d799ac
ReLU
# 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 numpy as np import torch.nn as nn from numbers import N...
THAKAORI/SalsaNext
ReLU
false
11,919
[ "MIT" ]
0
855cd7e9ebb83ee62538ba4753a011ada7bbfb6c
https://github.com/THAKAORI/SalsaNext/tree/855cd7e9ebb83ee62538ba4753a011ada7bbfb6c
ODEfunc
# 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....
agrimsharma20/Deep-Continuous-Networks
ODEfunc
false
18,254
[ "MIT" ]
4
6c2b46dea5d0d7f25682d2fb55c4d5386e30997c
https://github.com/agrimsharma20/Deep-Continuous-Networks/tree/6c2b46dea5d0d7f25682d2fb55c4d5386e30997c
PEG
import torch from torch import nn class Residual(nn.Module): def __init__(self, fn): super().__init__() self.fn = fn def forward(self, x, **kwargs): return self.fn(x, **kwargs) + x class PEG(nn.Module): def __init__(self, dim, kernel_size=3): super().__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 import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
onlyrico/vit-pytorch
PEG
false
7,371
[ "MIT" ]
1
e52ac4195550faa9c3372533d325bf649f7354ad
https://github.com/onlyrico/vit-pytorch/tree/e52ac4195550faa9c3372533d325bf649f7354ad
Coxnnet
import torch import numpy as np import torch.nn as nn class Coxnnet(nn.Module): def __init__(self, nfeat): super(Coxnnet, self).__init__() self.fc1 = nn.Linear(nfeat, int(np.ceil(nfeat ** 0.5))) self.dropout = nn.Dropout(0.5) self.fc2 = nn.Linear(int(np.ceil(nfeat ** 0.5)), 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.triton_helpers import libdevice import numpy as np ...
menggerSherry/SAVAE-Cox
Coxnnet
false
7,222
[ "Apache-2.0" ]
1
c087ab4f267da28db7eb497c844bea59e65ed125
https://github.com/menggerSherry/SAVAE-Cox/tree/c087ab4f267da28db7eb497c844bea59e65ed125
TokenMixer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn.fun...
GimmeSpoon/mlp-singer
TokenMixer
false
5,218
[ "MIT" ]
1
36d10a23c46fa7400994ccd063de79ff089efd5e
https://github.com/GimmeSpoon/mlp-singer/tree/36d10a23c46fa7400994ccd063de79ff089efd5e
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....
XiangwenNing/pyGAT
GAT
false
2,980
[ "MIT" ]
0
c4bd8e2be044c6c7481d484875b3c318271cca9c
https://github.com/XiangwenNing/pyGAT/tree/c4bd8e2be044c6c7481d484875b3c318271cca9c
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 import torch.nn as nn assert_...
abhay97ps/visual-control-ppo-procgen
ResidualBlock
false
1,353
[ "MIT" ]
0
765fe1ddb289d384abddc4df8eb865379c8da76a
https://github.com/abhay97ps/visual-control-ppo-procgen/tree/765fe1ddb289d384abddc4df8eb865379c8da76a
BCELoss2c
import torch import torch.nn as nn class BCELoss2c(nn.Module): def __init__(self): super(BCELoss2c, self).__init__() self.bce0 = nn.BCEWithLogitsLoss() self.bce1 = nn.BCEWithLogitsLoss() None def forward(self, y_pred, y_true, weights=None): loss_0 = self.bce0(y_pred[:...
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...
CarlosPena00/pytorch-unet
BCELoss2c
false
198
[ "MIT" ]
0
8365bace23e4b04b9c5b75cd6720807ea8cac5ab
https://github.com/CarlosPena00/pytorch-unet/tree/8365bace23e4b04b9c5b75cd6720807ea8cac5ab
UpscaleBlock
import math import torch import torch.jit import torch.nn as nn import torch.nn.init as init import torch.onnx def _initialize_orthogonal(conv): prelu_gain = math.sqrt(2) init.orthogonal(conv.weight, gain=prelu_gain) if conv.bias is not None: conv.bias.data.zero_() class UpscaleBlock(nn.Module):...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math import torch.jit import torch.nn as nn import torch.nn.init as init ...
jamesr66a/onnx-fb-universe
UpscaleBlock
false
10,337
[ "MIT" ]
0
3c0d1ea06d90c3788c47c0d32d160499afabe2fb
https://github.com/jamesr66a/onnx-fb-universe/tree/3c0d1ea06d90c3788c47c0d32d160499afabe2fb
Flatten
import torch from torch import nn class Flatten(nn.Module): def __init__(self): super(Flatten, self).__init__() def forward(self, x): """ Arguments: x: a float tensor with shape [batch_size, c, h, w]. Returns: a float tensor with shape [batch_size, c*h...
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...
BillyXYB/TransEditor
Flatten
false
17,059
[ "MIT" ]
4
0194cd6f0e96c801d55c0cb9683e1f552bcf6d48
https://github.com/BillyXYB/TransEditor/tree/0194cd6f0e96c801d55c0cb9683e1f552bcf6d48
GraphConvolution
from torch.nn import Module import torch import torch.nn.functional as F from torch.nn.modules.module import Module from torch.nn.parameter import Parameter import torch.nn.modules.loss class GraphConvolution(Module): """ Simple GCN layer, similar to https://arxiv.org/abs/1609.02907 """ def __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.nn import Module i...
PatriciaXiao/gae-pytorch
GraphConvolution
false
11,777
[ "MIT" ]
0
eb0e9bdf9a2f23d38941ac731bd481bd6da737b9
https://github.com/PatriciaXiao/gae-pytorch/tree/eb0e9bdf9a2f23d38941ac731bd481bd6da737b9
RobertaClassificationHead
# 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 from ty...
ZongHR/text
RobertaClassificationHead
false
3,003
[ "BSD-3-Clause" ]
0
856607154be7c784505869f10ae578346868b121
https://github.com/ZongHR/text/tree/856607154be7c784505869f10ae578346868b121
ModelWithDuplicates
import torch from collections import OrderedDict import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data from torch.optim.lr_scheduler import * import torch.optim.lr_scheduler import torch.onnx import torch.testing class ModelWithDuplicates(nn.Module): def __init__(self): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Emily0219/distiller
ModelWithDuplicates
false
5,138
[ "Apache-2.0" ]
1
445ed35b671fb54586acc280b53d951f18bf97ae
https://github.com/Emily0219/distiller/tree/445ed35b671fb54586acc280b53d951f18bf97ae
DuelingDeepQNetwork
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch as T import torc...
MonteyMontey/deep-reinforcement-learning-sandbox
DuelingDeepQNetwork
false
9,953
[ "MIT" ]
0
0e93760a994b6af54f0a665f5bc4f9d5ffd45c0a
https://github.com/MonteyMontey/deep-reinforcement-learning-sandbox/tree/0e93760a994b6af54f0a665f5bc4f9d5ffd45c0a
ZSSRNet
import torch from torch import nn import torch.utils.data import torch class ZSSRNet(nn.Module): def __init__(self, input_channels=3, kernel_size=3, channels=64): super(ZSSRNet, self).__init__() self.conv0 = nn.Conv2d(input_channels, channels, kernel_size= kernel_size, padding=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 import t...
LiFH/MySR
ZSSRNet
false
776
[ "MIT" ]
0
f6075f8711853aba6f0aae9cef18c5da84abb78c
https://github.com/LiFH/MySR/tree/f6075f8711853aba6f0aae9cef18c5da84abb78c
SineLayer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import math i...
etienne87/pytorch-cifar
SineLayer
false
10,089
[ "MIT" ]
0
d9164df8ba0cb9259daf857e006db3fecb762af7
https://github.com/etienne87/pytorch-cifar/tree/d9164df8ba0cb9259daf857e006db3fecb762af7
HirarchicalAttention
from torch.nn import Module import torch from typing import * import torch.utils.data import torch.nn as nn import torch.onnx.operators import torch.optim class HirarchicalAttention(Module): """ ref: Hierarchical Attention Networks for Document Classification """ def __init__(self, hidden_size: 'int')...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
code-backdoor/code-backdoor
HirarchicalAttention
false
15,054
[ "MIT" ]
71
1eeb3d79aa8a54c8f08e8d0156b569de5edd974e
https://github.com/code-backdoor/code-backdoor/tree/1eeb3d79aa8a54c8f08e8d0156b569de5edd974e
GCNModelVAE
# 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...
conf20/Egg
GCNModelVAE
false
6,471
[ "MIT" ]
1
6bd35903d1d7a7430b336545a9ee2b0a7f0e10f3
https://github.com/conf20/Egg/tree/6bd35903d1d7a7430b336545a9ee2b0a7f0e10f3
Critic
import torch import torch.nn as nn import torch.nn.parallel import torch.utils.data import torch.nn.functional as F class Critic(nn.Module): def __init__(self, state_dim, action_dim): super(Critic, self).__init__() self.l1 = nn.Linear(state_dim + action_dim, 400) self.l2 = nn.Linear(400, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
doudoulaile/RL-GAN-Net
Critic
false
15,219
[ "MIT" ]
112
9c221223d1878bc24f0f39ad34928c1bb2974ae3
https://github.com/doudoulaile/RL-GAN-Net/tree/9c221223d1878bc24f0f39ad34928c1bb2974ae3
ToRGB
# 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 torch.nn import functional as F assert_siz...
ozmig77/StyleCLIP-1
ToRGB
false
16,223
[ "MIT" ]
2,732
57b887bba971ef86c107f4805785ce44fca3efef
https://github.com/ozmig77/StyleCLIP-1/tree/57b887bba971ef86c107f4805785ce44fca3efef
SoftDiceLoss
import torch import torch.nn.functional as F import torch.nn as nn import torch.backends.cudnn import torch.utils.data class SoftDiceLoss(nn.Module): def __init__(self, weight=None, size_average=True): super(SoftDiceLoss, self).__init__() def forward(self, logits, targets): smooth = 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 import torch.backends.cudnn import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride em...
jayden-chua/image-mask
SoftDiceLoss
false
3,696
[ "MIT" ]
0
ce2c6a32bf13df582e7b57e506d58518258be292
https://github.com/jayden-chua/image-mask/tree/ce2c6a32bf13df582e7b57e506d58518258be292
lp_KL_divergence
import torch from torch.utils.data import * import torch.nn as nn class lp_KL_divergence(nn.Module): def __init__(self): super().__init__() self.loss = nn.KLDivLoss(reduction='batchmean') self.normalize = nn.Softmax(dim=-1) def forward(self, x, y): embed_dim = x.shape[-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 from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math from torch....
loveorchids/local_patch_retrieval
lp_KL_divergence
false
3,938
[ "Apache-2.0" ]
0
52b2e8fdac965d56ef9f89a8c4de96d0b41d3981
https://github.com/loveorchids/local_patch_retrieval/tree/52b2e8fdac965d56ef9f89a8c4de96d0b41d3981
h_swish
import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data.dataloader import torch.utils.data import torch.backends.cudnn class h_swish(nn.Module): def __init__(self, inplace=True): super(h_swish, self).__init__() self.inplace = inplace def forward(self, x): ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.utils.data.dataloader import torch.utils.data import t...
DeepBrainsMe/PyDoctor_Final
h_swish
false
5,063
[ "MIT" ]
1
49ecfc64b2a2866e7f37cc79c1f32a817975f064
https://github.com/DeepBrainsMe/PyDoctor_Final/tree/49ecfc64b2a2866e7f37cc79c1f32a817975f064
HingeLoss
import torch import torch.utils.data from torch import nn import torch import torch.nn.parallel import torch.optim class HingeLoss(nn.Module): def __init__(self): super(HingeLoss, self).__init__() self.margin = 1.0 def hinge_loss(self, input, target): output = self.margin - input.mul...
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.utils.data from torch import nn import torch import torch.nn.parallel import...
graphbuilder/BNN
HingeLoss
false
6,756
[ "MIT" ]
1
d99eb5c7ef19f8b0c14a135d40a489f154a3c894
https://github.com/graphbuilder/BNN/tree/d99eb5c7ef19f8b0c14a135d40a489f154a3c894
Hardswish
# 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...
AkshayGanesh/yolov5processor
Hardswish
false
4,811
[ "MIT" ]
1
788accfa93798729c002b2c9b4f943284ff97cad
https://github.com/AkshayGanesh/yolov5processor/tree/788accfa93798729c002b2c9b4f943284ff97cad
Transformer
import torch import torch.nn as nn import torch.nn.functional as F class Transformer(nn.Module): def __init__(self, input_size): super(Transformer, self).__init__() self.fc1 = nn.Linear(input_size, 256) self.fc2 = nn.Linear(256, 512) self.parametrized_layers = [self.fc1, self.fc2]...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
xuewanqi/RestoreNet
Transformer
false
10,957
[ "Apache-2.0" ]
0
fc313dc36965c2fab2c4cea9bf1227de75319439
https://github.com/xuewanqi/RestoreNet/tree/fc313dc36965c2fab2c4cea9bf1227de75319439
QuadraticModel
import torch class QuadraticModel(torch.nn.Module): def __init__(self, in_channels, class_num): super(QuadraticModel, self).__init__() x = torch.ones((in_channels, 1)) self.x = torch.nn.parameter.Parameter(x.uniform_(-10.0, 10.0).float()) def forward(self, A): return torch.su...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
alibaba/FederatedScope
QuadraticModel
false
18,276
[ "Apache-2.0" ]
9
fcf6d237624769ea094cfd68803901622f14fc23
https://github.com/alibaba/FederatedScope/tree/fcf6d237624769ea094cfd68803901622f14fc23
Atom_Wise_Convolution
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math im...
Chahalprincy/deepchem
Atom_Wise_Convolution
false
238
[ "MIT" ]
0
9d1a6a879cc74b065694b3ddb763d52151d57b7a
https://github.com/Chahalprincy/deepchem/tree/9d1a6a879cc74b065694b3ddb763d52151d57b7a
Network
import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim class Network(nn.Module): def __init__(self, lr, input_dims, n_hidden=64, output_dims=4): super(Network, self).__init__() self.fc1 = nn.Linear(input_dims, n_hidden) self.fc2 = nn.Linear(n_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 import torch.nn as nn import ...
apoorvaish/mujoco-rl
Network
false
3,120
[ "MIT" ]
0
234bd7689990cdd63db458d0367e14ccd1b62c1f
https://github.com/apoorvaish/mujoco-rl/tree/234bd7689990cdd63db458d0367e14ccd1b62c1f
BCE_loss
import torch import torch.nn as nn class BCE_loss(nn.Module): def __init__(self): super(BCE_loss, self).__init__() def forward(self, pred, gt): bce_loss = nn.BCELoss(size_average=True) bce_out = bce_loss(pred, gt) return bce_out def get_inputs(): return [torch.rand([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 import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
Jianrong-Lu/Head-and-Neck-Tumour-Segmentation-and-Prediction-of-Patient-Survival
BCE_loss
false
642
[ "MIT" ]
0
257cf17ce6d405166dd8449f3b34e305cb5103b2
https://github.com/Jianrong-Lu/Head-and-Neck-Tumour-Segmentation-and-Prediction-of-Patient-Survival/tree/257cf17ce6d405166dd8449f3b34e305cb5103b2
CQConcatenate
# 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....
EGO4D/episodic-memory
CQConcatenate
false
8,073
[ "MIT" ]
27
2a3464882cd4f665c358c1b05a6397339e33c2e1
https://github.com/EGO4D/episodic-memory/tree/2a3464882cd4f665c358c1b05a6397339e33c2e1
MultiHeadedAttention
import math import torch from torch.autograd import Variable import torch.nn as nn import torch.optim class MultiHeadedAttention(nn.Module): """ Multi-Head Attention module from "Attention is All You Need" :cite:`DBLP:journals/corr/VaswaniSPUJGKP17`. Similar to standard `dot` attention but uses ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
howardchenhd/Transformer-pytorch
MultiHeadedAttention
false
6,824
[ "MIT" ]
1
ae71ed5767272feb7e717be6d5bfce46f80ec57a
https://github.com/howardchenhd/Transformer-pytorch/tree/ae71ed5767272feb7e717be6d5bfce46f80ec57a
MAB
# 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....
Behrouz-Babaki/NCG4CVRP
MAB
false
4,901
[ "MIT" ]
1
87d63366c0b461f44ce8e982159a1e207af77b44
https://github.com/Behrouz-Babaki/NCG4CVRP/tree/87d63366c0b461f44ce8e982159a1e207af77b44
resblock
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.utils.data impor...
ananiask8/FFWM
resblock
false
3,131
[ "MIT" ]
0
117f593783da67da9dc910a751910760497ef37f
https://github.com/ananiask8/FFWM/tree/117f593783da67da9dc910a751910760497ef37f
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 import torch.nn as nn assert_...
Anikily/CDinkNet
Fire
false
16,933
[ "MIT" ]
4
490736855475a51bb2984412e88ac7d50d817a3c
https://github.com/Anikily/CDinkNet/tree/490736855475a51bb2984412e88ac7d50d817a3c
Block
# 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....
au55555/classification-pytorch
Block
false
6,354
[ "MIT" ]
1
1937599ae6e688ed7af7470f69964fb6f97241c4
https://github.com/au55555/classification-pytorch/tree/1937599ae6e688ed7af7470f69964fb6f97241c4
BertSelfAttention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
RoshanTanisha/TVCaption
BertSelfAttention
false
1,900
[ "MIT" ]
0
8b14a340134ec69ed87426ee1f0e93e53f6456e5
https://github.com/RoshanTanisha/TVCaption/tree/8b14a340134ec69ed87426ee1f0e93e53f6456e5
PCA_layer
import torch class PCA_layer(torch.nn.Module): def __init__(self, n_pc=2): """ Compute u^T S u as the optimization problem of PCA. Arguments: p: original dataset feature dimension n_pc: number of principal components or dimension of projected space, ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_c...
CompTop/Interleaving-DR
PCA_layer
false
2,108
[ "MIT" ]
0
479c190d9a9315038348cec115793258f067b1ca
https://github.com/CompTop/Interleaving-DR/tree/479c190d9a9315038348cec115793258f067b1ca
PatchEmbed
import torch import torch.nn as nn from torch import optim as optim class PatchEmbed(nn.Module): """ Image to Patch Embedding """ def __init__(self, img_size=224, patch_size=16, in_chans=3, embed_dim=768): super().__init__() num_patches = img_size // patch_size * (img_size // patch_size) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from torch import optim as optim assert_size_stride = torc...
taokong/ibot
PatchEmbed
false
16,529
[ "Apache-2.0" ]
327
a2ee1ae7495d4ea8fb9ba100434c062f1bd3d1f0
https://github.com/taokong/ibot/tree/a2ee1ae7495d4ea8fb9ba100434c062f1bd3d1f0
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 torch.nn as nn import ...
dziganto/DQN
CNN
false
1,870
[ "MIT" ]
0
033de76a2295ddc5d9775cfd2612a9d79634547e
https://github.com/dziganto/DQN/tree/033de76a2295ddc5d9775cfd2612a9d79634547e
ResidualLayer
import torch import torch.nn as nn class ConvLayer(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, stride, norm ='instance'): super().__init__() padding_size = kernel_size // 2 self.reflection_pad = nn.ReflectionPad2d(padding_size) self.conv_layer = ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Gradient-PG/live-nst
ResidualLayer
false
17,333
[ "MIT" ]
5
02244172646375ff4a4a417bc8220064fadae5a9
https://github.com/Gradient-PG/live-nst/tree/02244172646375ff4a4a417bc8220064fadae5a9
nin
# 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 ...
VahidZee/PixelCnnPP
nin
false
2,944
[ "MIT" ]
0
b0d7bffb3cc18263e55d7851f60f5682ba09e5c2
https://github.com/VahidZee/PixelCnnPP/tree/b0d7bffb3cc18263e55d7851f60f5682ba09e5c2
SIMSE
# 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...
Clement25/Multimodal-Attack
SIMSE
false
296
[ "MIT" ]
0
bd04ee099d457e87b6e6ee918c03f65a589bcb9a
https://github.com/Clement25/Multimodal-Attack/tree/bd04ee099d457e87b6e6ee918c03f65a589bcb9a
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....
FranardoHuang/ROAR
Attention
false
5,175
[ "Apache-2.0" ]
1
859e22389907dd0e61c83980ae5ff6dae51341d3
https://github.com/FranardoHuang/ROAR/tree/859e22389907dd0e61c83980ae5ff6dae51341d3
EnsembleFC
# 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...
Weiyuhong-1998/DI-engine
EnsembleFC
false
14,574
[ "Apache-2.0" ]
464
88658ea358298c6e61e95a454284b8853a3e9484
https://github.com/Weiyuhong-1998/DI-engine/tree/88658ea358298c6e61e95a454284b8853a3e9484
PointwiseFeedForward
import torch import torch.nn as nn class PointwiseFeedForward(nn.Module): """ A two-feed-forward-layer module """ def __init__(self, d_hid, d_inner_hid=None, d_out=None, dropout=0): super(PointwiseFeedForward, self).__init__() if d_inner_hid is None: d_inner_hid = d_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 import triton_helpers import torch.nn as nn assert_...
fhamborg/NewsMTSC
PointwiseFeedForward
false
15,348
[ "MIT" ]
46
5a8f88d7fbb921090e984cc378b02d75524c1025
https://github.com/fhamborg/NewsMTSC/tree/5a8f88d7fbb921090e984cc378b02d75524c1025
GlobalAveragePooling2d
import torch import torch as pt import torch.nn as nn class GlobalAveragePooling2d(nn.Module): """class for performing global average pooling on 2d feature maps""" def forward(self, x): """ calculates the average of each feature map in the tensor :param x: input tensor of shape [batc...
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...
IljaManakov/Autoencoders
GlobalAveragePooling2d
false
17,425
[ "MIT" ]
4
bd2ccc6decda37a004cc57a41dcd406752c21d61
https://github.com/IljaManakov/Autoencoders/tree/bd2ccc6decda37a004cc57a41dcd406752c21d61
SimpleTypeasModel
import torch import torch.jit import torch.onnx import torch.nn class SimpleTypeasModel(torch.nn.Module): def __init__(self): super(SimpleTypeasModel, self).__init__() def forward(self, tensor, other=None): other = tensor if other is None else other if tensor.dtype != torch.bool: ...
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
SimpleTypeasModel
false
3,366
[ "Apache-2.0" ]
0
2bbbf8188a2a941e85677c83f2146bbd076a262e
https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e
TonemappedRelativeMSE
import torch def _tonemap(im): """Helper Reinhards tonemapper. Args: im(torch.Tensor): image to tonemap. Returns: (torch.Tensor) tonemaped image. """ im = torch.clamp(im, min=0) return im / (1 + im) class TonemappedRelativeMSE(torch.nn.Module): """Relative mean-squared er...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
Mephisto405/WCMC-Public
TonemappedRelativeMSE
false
8,545
[ "BSD-2-Clause" ]
19
bd54f218d5239db84f404fbe1b465f9497bcf9e4
https://github.com/Mephisto405/WCMC-Public/tree/bd54f218d5239db84f404fbe1b465f9497bcf9e4
Conv2dMtl
from torch.nn import Module import math import torch import torch.nn.functional as F from torch.nn.parameter import Parameter from torch.nn.modules.module import Module from torch.nn.modules.utils import _pair class _ConvNdMtl(Module): def __init__(self, in_channels, out_channels, kernel_size, stride, pa...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch.nn import Module import math from torch.nn.parameter import Parameter...
qianrusun1015/E3BM-1
Conv2dMtl
false
7,523
[ "Apache-2.0" ]
1
d2c957bdff66fe28a288f1518f224a1e034d543f
https://github.com/qianrusun1015/E3BM-1/tree/d2c957bdff66fe28a288f1518f224a1e034d543f
GraphConvolution
from torch.nn import Module import torch import torch.nn.functional as F from torch.nn.parameter import Parameter from torch.nn.modules.module import Module import torch.nn.modules.loss class GraphConvolution(Module): """ Simple GCN layer, similar to https://arxiv.org/abs/1609.02907 """ def __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.nn import Module i...
HongyiZhu/EHI
GraphConvolution
false
545
[ "MIT" ]
0
9fbbc6046546dd7fc6de5d831b4c941bc4404e02
https://github.com/HongyiZhu/EHI/tree/9fbbc6046546dd7fc6de5d831b4c941bc4404e02
CLOSS
# 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...
CharonWangg/Turtle_Soup_Generator
CLOSS
false
2,085
[ "MIT" ]
0
18ab621f8a8e3998b7fcf8c8eb678af7335abf87
https://github.com/CharonWangg/Turtle_Soup_Generator/tree/18ab621f8a8e3998b7fcf8c8eb678af7335abf87
MultiSampleDropout
# 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...
Raiselimit/TorchBlocks
MultiSampleDropout
false
5,750
[ "MIT" ]
1
a5baecb9a2470ff175087475630f2b7db3f7ef51
https://github.com/Raiselimit/TorchBlocks/tree/a5baecb9a2470ff175087475630f2b7db3f7ef51
NICEMLPBlock
import torch import torch.nn as nn class LinearWeightNorm(nn.Module): def __init__(self, in_features, out_features, bias=True): super(LinearWeightNorm, self).__init__() self.linear = nn.Linear(in_features, out_features, bias=bias) self.reset_parameters() def reset_parameters(self): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
TRUMANCFY/wolf
NICEMLPBlock
false
2,970
[ "Apache-2.0" ]
0
1a21479256e4f51885e2d2fdd449b1faa61277a6
https://github.com/TRUMANCFY/wolf/tree/1a21479256e4f51885e2d2fdd449b1faa61277a6
WSConv2d
import torch from torch import nn import torch.utils.data class WSConv2d(nn.Module): """ Weight scaled Conv2d (Equalized Learning Rate) Note that input is multiplied rather than changing weights this will have the same result. Inspired and looked at: https://github.com/nvnbny/progressive_grow...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn import torch.utils.data assert_size_stride = torch._C._dyna...
jiazhi412/Machine-Learning-Collection
WSConv2d
false
3,729
[ "MIT" ]
0
1c30faf1e27a79eeca966c017e956df8f7f6ef17
https://github.com/jiazhi412/Machine-Learning-Collection/tree/1c30faf1e27a79eeca966c017e956df8f7f6ef17
Hardswish
# 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.utils.data assert_size_stride = torch._C._dynamo.guard...
ChaokunChang/SVAS
Hardswish
false
240
[ "Apache-2.0" ]
0
61af6eb39269edff8ea5147311628b3200c3a3d2
https://github.com/ChaokunChang/SVAS/tree/61af6eb39269edff8ea5147311628b3200c3a3d2
WeightedPool
# 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....
IsaacChanghau/VSLNet
WeightedPool
false
13,858
[ "MIT" ]
62
3793c625f2e251a5f19a0d59f0c83b12e386f808
https://github.com/IsaacChanghau/VSLNet/tree/3793c625f2e251a5f19a0d59f0c83b12e386f808
SimpleAndModule
# 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
SimpleAndModule
false
3,322
[ "Apache-2.0" ]
0
2bbbf8188a2a941e85677c83f2146bbd076a262e
https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e
UserEncoder
from _paritybench_helpers import _mock_config import torch import torch.nn as nn import torch.nn.functional as F class AdditiveAttention(torch.nn.Module): """ A general additive attention module. Originally for NAML. """ def __init__(self, query_vector_dim, candidate_vector_dim, writer=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 import triton_helpers from torch._inductor.runtime....
limhj159/NewsRecommendation
UserEncoder
false
15,917
[ "MIT" ]
125
5d19566b63b6cf35b5be0c2b175c5050e51f57b8
https://github.com/limhj159/NewsRecommendation/tree/5d19566b63b6cf35b5be0c2b175c5050e51f57b8
ComplexCompression
from torch.autograd import Function import torch from torch import Tensor from typing import Tuple from torch import nn from torch.nn.parameter import Parameter class angle_re_im(Function): """Similar to torch.angle but robustify the gradient for zero magnitude.""" @staticmethod def forward(ctx, re: 'Ten...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math from torch....
Rikorose/DeepFilterNet
ComplexCompression
false
14,324
[ "ECL-2.0", "Apache-2.0", "MIT" ]
54
afe6bfb53efae70207e18df7ed372c2cfe337fee
https://github.com/Rikorose/DeepFilterNet/tree/afe6bfb53efae70207e18df7ed372c2cfe337fee
SqueezeExcitation
# 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 Tensor from...
connernam/lightweight-human-pose-estimation.pytorch
SqueezeExcitation
false
3,361
[ "Apache-2.0" ]
0
ea30c43dce0d9439345e014e00a5cf7ef34db9e1
https://github.com/connernam/lightweight-human-pose-estimation.pytorch/tree/ea30c43dce0d9439345e014e00a5cf7ef34db9e1
ActivationLoss
import torch import torch.utils.data from torch import nn class ActivationLoss(nn.Module): def __init__(self): super(ActivationLoss, self).__init__() def forward(self, zero, one, labels): loss_act = torch.abs(one - labels.data) + torch.abs(zero - (1.0 - labels.data)) retu...
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.utils.dat...
nviable/ClassNSeg
ActivationLoss
false
16,204
[ "BSD-3-Clause" ]
68
87e506fddb9f36ef14f9bd1f6496f86d7faef0fd
https://github.com/nviable/ClassNSeg/tree/87e506fddb9f36ef14f9bd1f6496f86d7faef0fd
FitnetRegressor
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C...
naver-ai/cgl_fairness
FitnetRegressor
false
7,311
[ "MIT" ]
1
00d3bec233c9b3e0f88496118abaed8321ca3159
https://github.com/naver-ai/cgl_fairness/tree/00d3bec233c9b3e0f88496118abaed8321ca3159
ChannelSELayer3D
# 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_...
HiLab-git/PyMIC
ChannelSELayer3D
false
13,788
[ "Apache-2.0" ]
147
abf5c43de43668b85f4c049c95a8f1b7cf1d9f16
https://github.com/HiLab-git/PyMIC/tree/abf5c43de43668b85f4c049c95a8f1b7cf1d9f16
NoiseInjection
# 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 import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
BinahHu/stylegan2-pytorch
NoiseInjection
false
165
[ "MIT", "BSD-2-Clause", "Apache-2.0" ]
0
9975707ffd93872fce02f7e3654eb588a09e23e4
https://github.com/BinahHu/stylegan2-pytorch/tree/9975707ffd93872fce02f7e3654eb588a09e23e4
Generator
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
RowitZou/CG-nAR
Generator
false
17,856
[ "MIT" ]
8
8e2debeb3170045592b3b674ea6f9b56251e71f4
https://github.com/RowitZou/CG-nAR/tree/8e2debeb3170045592b3b674ea6f9b56251e71f4
CMlp
# 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 ...
pprp/mmsegmentation
CMlp
false
12,905
[ "Apache-2.0" ]
0
5d615401358dea2d6527a033bef505a9c7e0f034
https://github.com/pprp/mmsegmentation/tree/5d615401358dea2d6527a033bef505a9c7e0f034
ConConv
import torch import torch.nn as nn class ConConv(nn.Module): def __init__(self, inplanes_x1, inplanes_x2, planes): super(ConConv, self).__init__() self.conv = nn.Conv2d(inplanes_x1 + inplanes_x2, planes, kernel_size=1, bias=True) def forward(self, x1, x2): x1 = torch.cat(...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
anve96/DE_resnet_unet_hyb
ConConv
false
14,887
[ "BSD-3-Clause" ]
45
f0751854c8707cc4f228bb9d52d93635cc3584ae
https://github.com/anve96/DE_resnet_unet_hyb/tree/f0751854c8707cc4f228bb9d52d93635cc3584ae
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....
PaParaZz1/DI-engine
MultiHeadAttention
false
11,864
[ "Apache-2.0" ]
0
b38144117c1ebc6eb860d8637ec8866dfbcdf2de
https://github.com/PaParaZz1/DI-engine/tree/b38144117c1ebc6eb860d8637ec8866dfbcdf2de
ATANLoss
import torch import torch.nn as nn class ATANLoss(nn.Module): def __init__(self): super(ATANLoss, self).__init__() def forward(self, inputs, targets): loss = torch.mean(torch.atan(torch.abs(inputs - targets))) return loss def get_inputs(): return [torch.rand([4, 4, 4, 4]), torc...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
kamomehz/waveletCodingCNN
ATANLoss
false
3,789
[ "MIT" ]
0
50c7db9d986039ded38999b7e4f4265e2250fb90
https://github.com/kamomehz/waveletCodingCNN/tree/50c7db9d986039ded38999b7e4f4265e2250fb90
MNIST_classifier
import torch from torch import nn import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed class MNIST_classifier(nn.Module): def __init__(self): super(MNIST_classifier, self).__init__() self.conv1 = nn.Conv2d(1, 32, 5, stride=2) self.conv2 =...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn import t...
MorganeAyle/SNIP-it
MNIST_classifier
false
863
[ "MIT" ]
0
df2bf44d6d3f7e4ea7733242a79c916735a7b49e
https://github.com/MorganeAyle/SNIP-it/tree/df2bf44d6d3f7e4ea7733242a79c916735a7b49e
RoundSTE
import torch from torch import nn class RoundSTE(nn.Module): def __init__(self): """ This module perform element-wise rounding with straight through estimator (STE). """ super(RoundSTE, self).__init__() def forward(self, x): """ The forward function of the rou...
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...
UniSerj/ai-research
RoundSTE
false
14,547
[ "Apache-2.0" ]
46
79f0093c93408cc5dd7d3f56aafd7dc1f901421c
https://github.com/UniSerj/ai-research/tree/79f0093c93408cc5dd7d3f56aafd7dc1f901421c
SelfAttentionLayer2
# 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....
RUCAIBox/TG_CRS_Code
SelfAttentionLayer2
false
8,672
[ "Apache-2.0" ]
27
0428a3a069c4d0d4888f2d476dba2cafd7918524
https://github.com/RUCAIBox/TG_CRS_Code/tree/0428a3a069c4d0d4888f2d476dba2cafd7918524
MaxPool
# 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.utils.data assert_size_stride = torch._C._dynamo.guard...
BigFishMaster/tnt
MaxPool
false
17,153
[ "BSD-3-Clause" ]
3
8b80bb3b194eb87ac18924428ef0924c2fb263c5
https://github.com/BigFishMaster/tnt/tree/8b80bb3b194eb87ac18924428ef0924c2fb263c5
Actor
import torch import numpy as np import torch.nn.functional as F import torch.nn as nn def hidden_init(layer): fan_in = layer.weight.data.size()[0] lim = 1.0 / np.sqrt(fan_in) return -lim, lim class Actor(nn.Module): """Actor (Policy) Model.""" def __init__(self, state_size, action_size, seed, 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 from torch._inductor.runtime....
CCThompson82/deep-reinforcement-learning
Actor
false
8,922
[ "MIT" ]
0
f93faf0fb2b2dd8cfafeb8a4480e5520cefe6cb2
https://github.com/CCThompson82/deep-reinforcement-learning/tree/f93faf0fb2b2dd8cfafeb8a4480e5520cefe6cb2
LNN
# 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....
ZEKAICHEN/RecSys
LNN
false
2,986
[ "MIT" ]
0
7ab66b4a6cee620cc4baeb00f916ff329834f903
https://github.com/ZEKAICHEN/RecSys/tree/7ab66b4a6cee620cc4baeb00f916ff329834f903
Abs
import torch import torch.utils.data class Abs(torch.nn.Module): def __init__(self): super(Abs, self).__init__() def forward(self, input): return torch.abs(input) 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.utils.data assert_size_stride = torch._C._dynamo.guards.asse...
CoraJung/end-to-end-spoken-language-understanding
Abs
false
5,018
[ "Apache-2.0" ]
1
d1b15dad1a8f01336bcb0adcbf95d8c6ea279d09
https://github.com/CoraJung/end-to-end-spoken-language-understanding/tree/d1b15dad1a8f01336bcb0adcbf95d8c6ea279d09
ZoneOutBiLSTM
import torch import torch.nn as nn class LinearNorm(nn.Module): """ LinearNorm Projection """ def __init__(self, in_features, out_features, bias=False): super(LinearNorm, self).__init__() self.linear = nn.Linear(in_features, out_features, bias) nn.init.xavier_uniform_(self.linear.weig...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
Seungwoo0326/WaveGrad2-1
ZoneOutBiLSTM
false
14,401
[ "MIT" ]
45
3b202201348449b89353f28bce1596ca7939a810
https://github.com/Seungwoo0326/WaveGrad2-1/tree/3b202201348449b89353f28bce1596ca7939a810
Normalize
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn from itertools import product as product assert_size_stri...
DongChengdongHangZhou/caffe-to-pytorch
Normalize
false
2,215
[ "Apache-2.0" ]
0
5e3104f3aa77d35bad5d2de235b067460c136fd5
https://github.com/DongChengdongHangZhou/caffe-to-pytorch/tree/5e3104f3aa77d35bad5d2de235b067460c136fd5
ATLoss
import torch from torch import Tensor import torch.nn as nn import torch.nn.functional as F class ATLoss(nn.Module): def __init__(self): super().__init__() def forward(self, logits: 'Tensor', labels: 'Tensor') ->float: """ Args: logits: predicted probabilities (shape: bat...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch import Tens...
techthiyanes/DeepPavlov
ATLoss
false
16,568
[ "Apache-2.0" ]
5,893
08555428388fed3c7b036c0a82a70a25efcabcff
https://github.com/techthiyanes/DeepPavlov/tree/08555428388fed3c7b036c0a82a70a25efcabcff
MultiHeadAttn
# 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....
JingzhaoZhang/transformerxl-noise
MultiHeadAttn
false
9,201
[ "Apache-2.0" ]
0
83b91c505217da2a32b6ca592e01b4a1e941937b
https://github.com/JingzhaoZhang/transformerxl-noise/tree/83b91c505217da2a32b6ca592e01b4a1e941937b
PositionwiseFeedForward
import torch import torch.nn as nn import torch.nn.functional as F class PointwiseConv(nn.Module): """ Pointwise Convolution (1x1 Conv) Convolution 1 Dimension (Faster version) (cf. https://github.com/huggingface/pytorch-openai-transformer-lm/blob/ eafc28abdfadfa0732f03a0fc65805c5bfb2ffe7/mode...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
srlee-ai/claf
PositionwiseFeedForward
false
10,884
[ "MIT" ]
0
89b3e5c5ec0486886876ea3bac381508c6a6bf58
https://github.com/srlee-ai/claf/tree/89b3e5c5ec0486886876ea3bac381508c6a6bf58
SamplingSearch
import torch import torch.nn as nn def cuda(): return torch.cuda.is_available() def get_device(): return torch.device('cuda' if cuda() else 'cpu') class Search(nn.Module): """Base search class.""" def __init__(self, *args, **kwargs): super().__init__() self.device = get_device() ...
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 ...
PaccMann/paccmann_chemistry
SamplingSearch
false
18,367
[ "MIT" ]
9
f7e9735aafb936f837c38b5055c654be178f385f
https://github.com/PaccMann/paccmann_chemistry/tree/f7e9735aafb936f837c38b5055c654be178f385f