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
RgbaToRgb
import torch import torch.nn as nn def rgba_to_rgb(image: 'torch.Tensor') ->torch.Tensor: """Convert an image from RGBA to RGB. Args: image (torch.Tensor): RGBA Image to be converted to RGB of shape :math:`(*,4,H,W)`. Returns: torch.Tensor: RGB version of the image with shape :math:`(*,3...
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...
ChristophReich1996/kornia
RgbaToRgb
false
280
[ "ECL-2.0", "Apache-2.0" ]
0
35f955b46e8015da1cb9faa28c6943ec2b09cc2a
https://github.com/ChristophReich1996/kornia/tree/35f955b46e8015da1cb9faa28c6943ec2b09cc2a
MLPDecoder
import torch import torch.nn as nn class MLPDecoder(nn.Module): """ MLP based decoder model for edge prediction. """ def __init__(self, input_dim, num_classes, dropout=0.0, bias=False, init='xav_uniform'): super(MLPDecoder, self).__init__() assert init in ('xav_uniform', 'kaim...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
AlenUbuntu/Fashion-AI
MLPDecoder
false
18,434
[ "Apache-2.0" ]
3
d0e77cea81448fb20697828ee12fa57889df302c
https://github.com/AlenUbuntu/Fashion-AI/tree/d0e77cea81448fb20697828ee12fa57889df302c
IBNbResInitBlock
import torch import torch.utils.data import torch.nn as nn def ibnb_conv7x7_block(in_channels, out_channels, stride=1, padding=3, bias =False, activate=True): """ 7x7 version of the IBN(b)-ResNet specific convolution block. Parameters: ---------- in_channels : int Number of input chan...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
HyperGAN/imgclsmob
IBNbResInitBlock
false
17,689
[ "MIT" ]
9
88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3
https://github.com/HyperGAN/imgclsmob/tree/88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3
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....
Munna-Manoj/Team7_TTS
Attention
false
11,741
[ "MIT" ]
0
5e2d473a2afe429023876bcc51c2ac966a4938b8
https://github.com/Munna-Manoj/Team7_TTS/tree/5e2d473a2afe429023876bcc51c2ac966a4938b8
Auto_Encoder_Model
import torch import torch.nn as nn import torch.nn.functional as F class Auto_Encoder_Model(nn.Module): def __init__(self): super(Auto_Encoder_Model, self).__init__() self.conv1 = nn.Conv2d(1, 64, padding=1, kernel_size=3) self.max_pool1 = nn.MaxPool2d(2) self.conv2 = nn.Conv2d(64...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
sarahESL/MICCAI19-MedVQA
Auto_Encoder_Model
false
4,275
[ "MIT" ]
0
aa751cb905f79cd356ad5746f8a0640f1d81b5d2
https://github.com/sarahESL/MICCAI19-MedVQA/tree/aa751cb905f79cd356ad5746f8a0640f1d81b5d2
LogDepthL1Loss
import torch import torch.nn as nn class LogDepthL1Loss(nn.Module): def __init__(self, eps=1e-05): super(LogDepthL1Loss, self).__init__() self.eps = eps def forward(self, pred, gt): pred = pred.view(-1) gt = gt.view(-1) mask = gt > self.eps diff = torch.abs(to...
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...
ezxzeng/FFB6D
LogDepthL1Loss
false
15,333
[ "MIT" ]
145
fd0ea6471532ab1dc68f9a58b52d9a63f8fb76f2
https://github.com/ezxzeng/FFB6D/tree/fd0ea6471532ab1dc68f9a58b52d9a63f8fb76f2
CosineClassifier
import torch import numpy as np import torch.nn as nn import torch.nn.functional as F def cosine_fully_connected_layer(x_in, weight, scale=None, bias=None, normalize_x=True, normalize_w=True): assert x_in.dim() == 2 assert weight.dim() == 2 assert x_in.size(1) == weight.size(0) if normalize_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....
ZRJMoon/OMIT
CosineClassifier
false
9,630
[ "MIT" ]
0
bb063b4ac5d4fd60b28b17cb8d2119da92f936f4
https://github.com/ZRJMoon/OMIT/tree/bb063b4ac5d4fd60b28b17cb8d2119da92f936f4
coRNNCell
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import n...
lkampoli/coRNN
coRNNCell
false
7,113
[ "MIT" ]
1
c9c2edfebab289f3053eb48030f273e4b977a187
https://github.com/lkampoli/coRNN/tree/c9c2edfebab289f3053eb48030f273e4b977a187
SMAPE
import torch import torch as th class SMAPE(th.nn.Module): """Symmetric Mean Absolute error. :math:`\\frac{|x - y|} {|x| + |y| + \\epsilon}` Args: eps(float): small number to avoid division by 0. """ def __init__(self, eps=0.01): super(SMAPE, self).__init__() self.eps = ...
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 as th ass...
PeterZs/sbmc
SMAPE
false
5,713
[ "Apache-2.0" ]
1
ac3f5452efe0166ea73942f37cc60b1f0e1ee555
https://github.com/PeterZs/sbmc/tree/ac3f5452efe0166ea73942f37cc60b1f0e1ee555
WavePool
# 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 import numpy as np from torch import nn assert_size_stride = torch._C._dynamo.gu...
XHChen0528/ConditionalGAN_Develop
WavePool
false
1,247
[ "MIT" ]
0
4ea6d8ea130589bc3ff8f3117660050ba41cdd0f
https://github.com/XHChen0528/ConditionalGAN_Develop/tree/4ea6d8ea130589bc3ff8f3117660050ba41cdd0f
Conv2dZeros
import torch import torch.nn as nn import torch.utils.data def cpd_mean(tensor, dim=None, keepdims=False): if dim is None: return tensor.mean(tensor) else: if isinstance(dim, int): dim = [dim] dim = sorted(dim) for d in dim: tensor = tensor.mean(dim=d, k...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
Catherine0505/mar-scf-flow
Conv2dZeros
false
17,086
[ "Apache-2.0" ]
10
aa7c3564cb9f2967c5e580a633516dba1b597f98
https://github.com/Catherine0505/mar-scf-flow/tree/aa7c3564cb9f2967c5e580a633516dba1b597f98
MaskedMultiTaskCrossEntropy
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch import nn a...
EricBoittier/graph-neural-networks-for-drug-discovery
MaskedMultiTaskCrossEntropy
false
13,651
[ "MIT" ]
69
12fed5c6e7bbd716d9f713d34067ed83dd539b50
https://github.com/EricBoittier/graph-neural-networks-for-drug-discovery/tree/12fed5c6e7bbd716d9f713d34067ed83dd539b50
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 from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_...
TiagoCortinhal/SR_GAN
TVLoss
false
18,026
[ "MIT" ]
4
9ccceaa25e87e404d20825dbb552fa6a2ef3af47
https://github.com/TiagoCortinhal/SR_GAN/tree/9ccceaa25e87e404d20825dbb552fa6a2ef3af47
BicubicUpsampler
import torch import torch as th import torch.utils.data class BicubicUpsampler(th.nn.Module): def __init__(self, scale=2, channels=1): super(BicubicUpsampler, self).__init__() ksize = 2 * scale * 2 total_pad = ksize - scale // 2 if scale % 2 == 1: ksize += 1 se...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch as th import torch.utils.data assert_size_stride = torch._C._dynamo...
IlyaBizyaev/ttools
BicubicUpsampler
false
8,307
[ "MIT" ]
11
b1435b19f397ce1baff9daed3cb287e52a029fdb
https://github.com/IlyaBizyaev/ttools/tree/b1435b19f397ce1baff9daed3cb287e52a029fdb
Actor
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
LampKang/CityLearn
Actor
false
2,497
[ "MIT" ]
0
d6c178054c385ca991a5384e287f18a1d6380159
https://github.com/LampKang/CityLearn/tree/d6c178054c385ca991a5384e287f18a1d6380159
CriticNetwork
# 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_...
AmmarFahmy/mushroom-rl
CriticNetwork
false
4,855
[ "MIT" ]
1
2625ee7f64d5613b3b9fba00f0b7a39fece88ca5
https://github.com/AmmarFahmy/mushroom-rl/tree/2625ee7f64d5613b3b9fba00f0b7a39fece88ca5
BasicConv
# 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 time import torch.nn a...
Zikoat/musweeper
BasicConv
false
1,764
[ "MIT" ]
0
07e3e5e5e5e4edad4d8b1b6bb05aee2f33f8d9cb
https://github.com/Zikoat/musweeper/tree/07e3e5e5e5e4edad4d8b1b6bb05aee2f33f8d9cb
BlurPool2d
# 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 import torch.nn as nn assert_...
johanofverstedt/comir
BlurPool2d
false
3,751
[ "MIT" ]
0
fced349ebe3a7bf07ac59e25f02ca4780796b041
https://github.com/johanofverstedt/comir/tree/fced349ebe3a7bf07ac59e25f02ca4780796b041
TensorClampMax
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
NVIDIA-AI-IOT-private/torch2trt
TensorClampMax
false
10,527
[ "MIT" ]
0
953d60039e0c81e90eea467c3df2e6e3f7040242
https://github.com/NVIDIA-AI-IOT-private/torch2trt/tree/953d60039e0c81e90eea467c3df2e6e3f7040242
Baseline_FF_Network
import torch from torch import nn import torch.nn.functional as F class Baseline_FF_Network(nn.Module): def __init__(self): super().__init__() h1_dim = 500 h2_dim = 500 self.fc1 = nn.Linear(4, h1_dim) self.fc2 = nn.Linear(h1_dim, h2_dim) self.fc3 = nn.Linear(h1_dim...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math fr...
saulsantos1997/Code
Baseline_FF_Network
false
10,737
[ "MIT" ]
0
fb824e3127c19a66bc9e03a56f9a8766a691bbb9
https://github.com/saulsantos1997/Code/tree/fb824e3127c19a66bc9e03a56f9a8766a691bbb9
Fusion
# 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...
KaihuaTang/VCTree-Visual-Question-Answering
Fusion
false
8,399
[ "MIT" ]
31
b6b0a8bdb01d45d36de3bded91db42544ad6a593
https://github.com/KaihuaTang/VCTree-Visual-Question-Answering/tree/b6b0a8bdb01d45d36de3bded91db42544ad6a593
MultiHeadSelfAttention
from torch.nn import Module import torch from torch.nn import Dropout from torch.nn import Linear from torch.nn.modules import Dropout def masked_softmax(vector: 'torch.Tensor', mask: 'torch.Tensor', dim: 'int'=-1 ) ->torch.Tensor: """ ``torch.nn.functional.softmax(vector)`` does not work if some elements...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
okcd00/glyce
MultiHeadSelfAttention
false
10,682
[ "Apache-2.0" ]
0
010d88ac5cff4969308d2f8d105831ddcb352a02
https://github.com/okcd00/glyce/tree/010d88ac5cff4969308d2f8d105831ddcb352a02
EqualizedWeight
import math import torch import numpy as np from torch import nn import torch.utils.data import torch.nn.functional from typing import List import torch.autograd class EqualizedWeight(nn.Module): """ <a id="equalized_weight"></a> ## Learning-rate Equalized Weights Parameter This is based on equalized...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math import numpy as np from torch import nn import torch.utils.data import torch.nn.functional from typing import List import torch....
Aarsh2001/annotated_deep_learning_paper_implementations
EqualizedWeight
false
4,770
[ "MIT" ]
1
ff0d5c065da1a46769f5f66fddc252c178f8fa37
https://github.com/Aarsh2001/annotated_deep_learning_paper_implementations/tree/ff0d5c065da1a46769f5f66fddc252c178f8fa37
BasicBlock
# 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 to...
krg-nandu/prj-taxRL
BasicBlock
false
7,062
[ "MIT" ]
1
be65d004c196aff73714dcb346c814ae97db30e2
https://github.com/krg-nandu/prj-taxRL/tree/be65d004c196aff73714dcb346c814ae97db30e2
TransformerNet
import torch class ConvLayer(torch.nn.Module): def __init__(self, in_channels, out_channels, kernel_size, stride): super(ConvLayer, self).__init__() reflection_padding = kernel_size // 2 self.reflection_pad = torch.nn.ReflectionPad2d(reflection_padding) self.conv2d = torch.nn.Conv...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Bartolo1024/ignite
TransformerNet
false
5,023
[ "BSD-3-Clause" ]
1
b087fef0bc5f97cda415c1c56f1cd589383c54be
https://github.com/Bartolo1024/ignite/tree/b087fef0bc5f97cda415c1c56f1cd589383c54be
VitMlpHead
import torch def get_args(): parser = argparse.ArgumentParser() group = parser.add_argument_group(title='input data') group.add_argument('--input', type=str, required=True, help= 'Path to input JSON') group.add_argument('--json-keys', nargs='+', default=['text'], help= 'space separate ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
deepakn94/Megatron-DeepSpeed
VitMlpHead
false
10,028
[ "MIT" ]
0
541b967fbf9fd97ce090ca464ccd205b55aae59c
https://github.com/deepakn94/Megatron-DeepSpeed/tree/541b967fbf9fd97ce090ca464ccd205b55aae59c
DiceLoss
import torch from torch import nn class DiceLoss(nn.Module): def __init__(self): super(DiceLoss, self).__init__() def forward(self, predict, target): N = target.size(0) smooth = 1 predict_flat = predict.view(N, -1) target_flat = target.view(N, -1) intersection...
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...
abc008/MT-Brain-Network
DiceLoss
false
1,347
[ "MIT" ]
0
a823722d4d3211c955bc1370bd8399d27c6640f4
https://github.com/abc008/MT-Brain-Network/tree/a823722d4d3211c955bc1370bd8399d27c6640f4
ProteinResNetPooler
from _paritybench_helpers import _mock_config import torch import torch.nn as nn class ProteinResNetPooler(nn.Module): def __init__(self, config): super().__init__() self.attention_weights = nn.Linear(config.hidden_size, 1) self.dense = nn.Linear(config.hidden_size, config.hidden_size) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math im...
rdedhia/tape
ProteinResNetPooler
false
7,542
[ "BSD-3-Clause" ]
1
421feeb589e4469fb18e297d233d12c1e682338a
https://github.com/rdedhia/tape/tree/421feeb589e4469fb18e297d233d12c1e682338a
PAMA
# 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....
sugi-san/PAMA
PAMA
false
13,038
[ "MIT" ]
0
95141ebf0d3b61828a0e545f989f96b8ef569f34
https://github.com/sugi-san/PAMA/tree/95141ebf0d3b61828a0e545f989f96b8ef569f34
ResizeGatedConv2d
import torch from torch import nn import torch.utils.data class GatedConv2d(nn.Module): def __init__(self, input_channels, output_channels, kernel_size, stride, padding, dilation=1, activation=None): super(GatedConv2d, self).__init__() self.activation = activation self.sigmoid = 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 import nn import torch.utils.data assert_size_stride = torch._C._dyna...
RobertYCXu/vae_vampprior
ResizeGatedConv2d
false
9,622
[ "MIT" ]
0
edcec4f5f7af673172c5b5b9aa2a22f993564fab
https://github.com/RobertYCXu/vae_vampprior/tree/edcec4f5f7af673172c5b5b9aa2a22f993564fab
GRU
# 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 ...
LMissher/STGNN
GRU
false
8,485
[ "MIT" ]
26
9c35d994738ad768ca4385273235bd30e994b746
https://github.com/LMissher/STGNN/tree/9c35d994738ad768ca4385273235bd30e994b746
MultiHeadAttentionLayer
# 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....
wenjunyoung/PAN_PLUS
MultiHeadAttentionLayer
false
11,027
[ "Apache-2.0" ]
0
c893ff4775c8ff137a21c15d34fb93b9394dbfe5
https://github.com/wenjunyoung/PAN_PLUS/tree/c893ff4775c8ff137a21c15d34fb93b9394dbfe5
SimpleCeilModule
# 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.jit import torch.onnx import torch.nn assert_size_stride = torch._...
briancoutinho/glow
SimpleCeilModule
false
12,568
[ "Apache-2.0" ]
0
4c919d60b3c33296c4109aec8020a1733c98f5b5
https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5
Model
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
dohmatob/adversarial-robustness-toolbox
Model
false
6,586
[ "MIT" ]
1
7d3ba7d2d6690be69c08754fbc632947c2d10a97
https://github.com/dohmatob/adversarial-robustness-toolbox/tree/7d3ba7d2d6690be69c08754fbc632947c2d10a97
RegressionModel
import torch import torch.nn as nn class RegressionModel(nn.Module): def __init__(self, num_features_in, num_anchors=9, feature_size=256): super(RegressionModel, self).__init__() self.conv1 = nn.Conv2d(num_features_in, feature_size, kernel_size=3, padding=1) self.act1 = nn.ReL...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
AdityaKane2001/answersheet_automation
RegressionModel
false
8,874
[ "Apache-2.0" ]
0
f7f30a514f94bfbdb68ab43a3dfc6e3fd770e8f1
https://github.com/AdityaKane2001/answersheet_automation/tree/f7f30a514f94bfbdb68ab43a3dfc6e3fd770e8f1
CFRB
import torch from collections import OrderedDict import torch.nn as nn import torch.nn.functional as F from torch import autograd as autograd import torch.fft from itertools import product as product def sequential(*args): """Advanced nn.Sequential. Args: nn.Sequential, nn.Module Returns: ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 collections import Order...
hduba/KAIR
CFRB
false
3,622
[ "MIT" ]
0
dbd7596c7e4a4667b9b7baac369fc6c02571fa58
https://github.com/hduba/KAIR/tree/dbd7596c7e4a4667b9b7baac369fc6c02571fa58
self_conv
import torch import torch.nn as nn import torch.nn.functional as F def quantize_w(x): x = Q_W.apply(x) return x def fw(x, bitW): if bitW == 32: return x x = quantize_w(x) return x class Q_W(torch.autograd.Function): @staticmethod def forward(ctx, x): return x.sign() * ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
GakkiChen/TWB-Net
self_conv
false
2,281
[ "MIT" ]
0
bb4917c697c09585bb3fe163a8b429b6dd250f18
https://github.com/GakkiChen/TWB-Net/tree/bb4917c697c09585bb3fe163a8b429b6dd250f18
ConvKernel
from torch.nn import Module import math import torch import torch.nn.functional as F from torch.nn.modules.utils import _pair from torch.nn.parameter import Parameter from torch.nn.modules.module import Module class _ConvNdKernel(Module): def __init__(self, in_channels, out_channels, kernel_size, stride, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch.nn import Module import math from torch.nn.modules.utils import _pair...
JannerM/spatial-reasoning
ConvKernel
false
13,868
[ "MIT" ]
54
e163003a33177e41ca02d5feefee3fdfca5ba154
https://github.com/JannerM/spatial-reasoning/tree/e163003a33177e41ca02d5feefee3fdfca5ba154
MultiHeadAttention
import torch import torch.utils.data from torch import nn import torch.nn.functional as F class MultiHeadAttention(nn.Module): """ input: query --- [N, T_q, query_dim] key --- [N, T_k, key_dim] output: out --- [N, T_q, num_units] """ def __init__(self, query_dim, key_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....
CookiePPP/pag-tacotron2
MultiHeadAttention
false
17,171
[ "BSD-3-Clause" ]
10
503e7e9e892c5c0795f6278e70e72b627ed1cfb7
https://github.com/CookiePPP/pag-tacotron2/tree/503e7e9e892c5c0795f6278e70e72b627ed1cfb7
DistmultCenterSet
# 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_...
google-research/smore
DistmultCenterSet
false
15,463
[ "Apache-2.0" ]
78
e4ba95a7466ef7d018987bce7688b77bf2ea7e4f
https://github.com/google-research/smore/tree/e4ba95a7466ef7d018987bce7688b77bf2ea7e4f
Model
import torch import torch.nn as nn import torch.nn.functional as F class Model(nn.Module): def __init__(self): super(Model, self).__init__() keep_rate = 0.5 self.conv1 = nn.Conv2d(in_channels=1, out_channels=16, kernel_size= 3, stride=1, padding='same', bias=True) 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_...
mntalha/U-NET_Iplementation
Model
false
4,062
[ "MIT" ]
0
7fc2a34352f02a4989659053a6dd8717134913a0
https://github.com/mntalha/U-NET_Iplementation/tree/7fc2a34352f02a4989659053a6dd8717134913a0
BCELoss2c
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
CarlosPena00/pytorch-unet
BCELoss2c
false
198
[ "MIT" ]
0
8365bace23e4b04b9c5b75cd6720807ea8cac5ab
https://github.com/CarlosPena00/pytorch-unet/tree/8365bace23e4b04b9c5b75cd6720807ea8cac5ab
GHMC
# 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 ...
CityU-AIM-Group/HTD
GHMC
false
17,128
[ "MIT" ]
5
0be9fd844118c275abc6053b3cbd5ffb589e62ee
https://github.com/CityU-AIM-Group/HTD/tree/0be9fd844118c275abc6053b3cbd5ffb589e62ee
PairwiseRankerModel
import torch import torch.onnx import torch.nn as nn class PairwiseRankerModel(nn.Module): def __init__(self, embedding_size): super(PairwiseRankerModel, self).__init__() self.query_doc_transform = torch.nn.Linear(in_features= embedding_size * 2, out_features=embedding_size) 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.onnx import torch.nn as nn assert_size_stride = torch._C._dynamo.gu...
mikhail-tsir/vespa-exloration
PairwiseRankerModel
false
10,486
[ "Apache-2.0" ]
0
9bebc00acb43021fa60c6e144fe4f1fa1d7719fc
https://github.com/mikhail-tsir/vespa-exloration/tree/9bebc00acb43021fa60c6e144fe4f1fa1d7719fc
AsymmetricLossMultiLabel
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
MinghuiChen43/CIL-ReID
AsymmetricLossMultiLabel
false
14,026
[ "MIT" ]
58
73c87500c4673db400f2760059aea27de7e08468
https://github.com/MinghuiChen43/CIL-ReID/tree/73c87500c4673db400f2760059aea27de7e08468
GatingMechanism
import torch class GatingMechanism(torch.nn.Module): def __init__(self, d_input, bg=0.1): super(GatingMechanism, self).__init__() self.Wr = torch.nn.Linear(d_input, d_input) self.Ur = torch.nn.Linear(d_input, d_input) self.Wz = torch.nn.Linear(d_input, d_input) self.Uz = 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 from torch._inductor.runtime.triton_helpers import libdevice assert_size_stride ...
victor-psiori/Transformers-RL
GatingMechanism
false
16,680
[ "MIT" ]
50
85b3f2376ba473a45ca18c969aebb1ae82cf8475
https://github.com/victor-psiori/Transformers-RL/tree/85b3f2376ba473a45ca18c969aebb1ae82cf8475
ConvBlock
import torch import torch.nn as nn import torch.nn.functional as F class ConvBlock(nn.Module): def __init__(self, in_channels, out_channels, kernel, stride, padding=0): super(ConvBlock, self).__init__() self.conv = nn.Conv2d(in_channels, out_channels, kernel_size=kernel, stride=stride...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
CPJKU/audio_conditioned_unet
ConvBlock
false
7,857
[ "MIT" ]
20
68f20f5280079e99be260f9fe9933c0064eb2d7f
https://github.com/CPJKU/audio_conditioned_unet/tree/68f20f5280079e99be260f9fe9933c0064eb2d7f
TransformerEncoderLayer
from torch.nn import Module import torch from torch import Tensor import torch.nn.functional as F from typing import Optional from torch.nn.modules import Module from torch.nn.modules.activation import MultiheadAttention from torch.nn.modules.dropout import Dropout from torch.nn.modules.linear import Linear from torch....
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Lingzhi-WANG/Quotation-Recommendation
TransformerEncoderLayer
false
17,595
[ "MIT" ]
4
40a875a41f10a597604206e067a16cbbfc88cdd7
https://github.com/Lingzhi-WANG/Quotation-Recommendation/tree/40a875a41f10a597604206e067a16cbbfc88cdd7
ReidModel
import torch import torch.nn as nn class ReidModel(nn.Module): def __init__(self, num_features_in, num_anchors=1, num_classes=80, prior=0.01, feature_size=256): super(ReidModel, self).__init__() self.num_classes = num_classes self.num_anchors = num_anchors self.conv1 = nn....
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
SajjadPSavoji/CTracker
ReidModel
false
2,869
[ "MIT" ]
0
f345925cccca13d045dea5d435ba3d463df7729a
https://github.com/SajjadPSavoji/CTracker/tree/f345925cccca13d045dea5d435ba3d463df7729a
BasicModel_ConvNet_MaxPool3d
import torch import torch.nn as nn class BasicModel_ConvNet_MaxPool3d(nn.Module): """Same as above, but with the MaxPool1d replaced with a MaxPool3d. This is useful because the MaxPool modules behave differently to other modules from the perspective of the DeepLift Attributions """ 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._inductor.runtime....
aravipati12/captum
BasicModel_ConvNet_MaxPool3d
false
10,121
[ "BSD-3-Clause" ]
0
ef3e81d89c8c4404a49c384cf0727f2e7d393f5f
https://github.com/aravipati12/captum/tree/ef3e81d89c8c4404a49c384cf0727f2e7d393f5f
waspIntrinsicComposer
from _paritybench_helpers import _mock_config import torch import torch.nn as nn import torch.nn.parallel import torch.utils.data class waspIntrinsicComposer(nn.Module): def __init__(self, opt): super(waspIntrinsicComposer, self).__init__() self.ngpu = opt.ngpu self.nc = opt.nc def f...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.parallel import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty...
zhixinshu/DeformingAutoencoders-pytorch
waspIntrinsicComposer
false
16,849
[ "BSD-2-Clause" ]
112
72996c5d11ae25dd0051bb51df353fef88e65742
https://github.com/zhixinshu/DeformingAutoencoders-pytorch/tree/72996c5d11ae25dd0051bb51df353fef88e65742
CNN
import torch import torch.nn as nn import torch.nn.functional as F class CNN(nn.Module): """ Convolutional Neural Network. """ def __init__(self): super().__init__() self.conv1 = nn.Conv2d(1, 20, kernel_size=5, stride=1) self.fc1 = nn.Linear(8 * 8 * 20, 64) 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 from torch._inductor.runtime....
StanislawSwierc/Ax
CNN
false
5,866
[ "MIT" ]
1
175dff2294af4548ae258105346eeaca22a30197
https://github.com/StanislawSwierc/Ax/tree/175dff2294af4548ae258105346eeaca22a30197
MLP
import torch import torch.nn as nn import torch.nn.functional as F class MLP(nn.Module): def __init__(self, state_dim, action_dim, hidden_dim=400): super(MLP, self).__init__() self.fc1 = nn.Linear(state_dim, hidden_dim) self.fc2 = nn.Linear(hidden_dim, hidden_dim) self.fc3 = nn.Li...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
f2010126/DL_Labs
MLP
false
3,484
[ "BSD-3-Clause" ]
0
ee81d8aa6027846fc32c98feb9079211c59aa0e9
https://github.com/f2010126/DL_Labs/tree/ee81d8aa6027846fc32c98feb9079211c59aa0e9
ModuleFallbackMain
# 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 ...
NVIDIA/Torch-TensorRT
ModuleFallbackMain
false
14,092
[ "BSD-3-Clause" ]
430
1a22204fecec690bc3c2a318dab4f57b98c57f05
https://github.com/NVIDIA/Torch-TensorRT/tree/1a22204fecec690bc3c2a318dab4f57b98c57f05
RecursiveNet
# 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...
e-dorigatti/torchinfo
RecursiveNet
false
12,335
[ "MIT" ]
0
9fa0e677fb7002e89afd5b1bb372fe8c1dd813d6
https://github.com/e-dorigatti/torchinfo/tree/9fa0e677fb7002e89afd5b1bb372fe8c1dd813d6
HEL
import torch import torch.nn as nn import torch.nn.functional as F class HEL(nn.Module): def __init__(self): super(HEL, self).__init__() None self.eps = 1e-06 def edge_loss(self, pred, target): edge = target - F.avg_pool2d(target, kernel_size=5, stride=1, padding=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.triton_helpers import math as tl_math import torch.nn as nn import torch.nn.functional as F assert_size_stride ...
lartpang/HDFNet
HEL
false
15,881
[ "MIT" ]
67
e2e4136a336f171481d2a6a954e901568932b8d3
https://github.com/lartpang/HDFNet/tree/e2e4136a336f171481d2a6a954e901568932b8d3
NormLayer
import torch import torch.nn as nn class NormLayer(nn.Module): def __init__(self, mean, std, n=None, eps=1e-08) ->None: super().__init__() self.mean = mean self.std = std self.eps = eps def forward(self, x): return (x - self.mean) / (self.std + self.eps) def get_inp...
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...
sagnik/captum
NormLayer
false
4,350
[ "BSD-3-Clause" ]
0
d6b663745ee6c01f072a4358233dec381324c283
https://github.com/sagnik/captum/tree/d6b663745ee6c01f072a4358233dec381324c283
TransformerDecoderLayer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
HumaticsLAB/GTM-Transformer
TransformerDecoderLayer
false
17,414
[ "MIT" ]
7
94124d3246c7c22d8b952beeda53639a9ad170e3
https://github.com/HumaticsLAB/GTM-Transformer/tree/94124d3246c7c22d8b952beeda53639a9ad170e3
BertMLP
# 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 ...
JunnYu/GlyceBert_tokenizer
BertMLP
false
18,371
[ "MIT" ]
7
27ded9d20421e274ec2e7139e9c79da56d8ad42f
https://github.com/JunnYu/GlyceBert_tokenizer/tree/27ded9d20421e274ec2e7139e9c79da56d8ad42f
GaussianKernel
# 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...
zfjsail/MatchZoo-py
GaussianKernel
false
4,691
[ "Apache-2.0" ]
0
c93e52e7db7e257b46bb8bf8df8ce1ab1944e2f2
https://github.com/zfjsail/MatchZoo-py/tree/c93e52e7db7e257b46bb8bf8df8ce1ab1944e2f2
PredictionHead
import torch import torch.nn as nn class PredictionHead(nn.Module): def __init__(self, in_channels, num_classes, num_anchors): super(PredictionHead, self).__init__() self.classification = nn.Conv2d(in_channels, num_classes * num_anchors, kernel_size=1) self.regression = nn.Con...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
EldritchJS/inference_results_v0.5
PredictionHead
false
415
[ "Apache-2.0" ]
0
5552490e184d9fc342d871fcc410ac423ea49053
https://github.com/EldritchJS/inference_results_v0.5/tree/5552490e184d9fc342d871fcc410ac423ea49053
ConvertPointsToHomogeneous
# 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...
LucaswasTaken/frankmocap
ConvertPointsToHomogeneous
false
773
[ "BSD-3-Clause" ]
0
17c1761326991d0faab58bd10888e9043abf6bd5
https://github.com/LucaswasTaken/frankmocap/tree/17c1761326991d0faab58bd10888e9043abf6bd5
DDM_Encoder
import torch import numpy as np import torch.nn as nn import torch.nn.functional as F import torch.nn.init as init def weights_init(m): classname = m.__class__.__name__ if classname.find('Conv') != -1: weight_shape = list(m.weight.data.size()) fan_in = np.prod(weight_shape[1:4]) fan_ou...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
MLforHealth/state_representations_for_RLinHealth
DDM_Encoder
false
8,523
[ "MIT" ]
24
aa8dbb7d56caa95bf4380e3e745e134996291b66
https://github.com/MLforHealth/state_representations_for_RLinHealth/tree/aa8dbb7d56caa95bf4380e3e745e134996291b66
SoftDiceLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
prateekstark/unet.pytorch
SoftDiceLoss
false
10,631
[ "MIT" ]
0
b6ef6302f35ca93c6c818215c915e05b7f3055dc
https://github.com/prateekstark/unet.pytorch/tree/b6ef6302f35ca93c6c818215c915e05b7f3055dc
GumbelSoftMaxSampler
import torch from torch.nn import functional as F from torch import nn from typing import * class GumbelSoftMaxSampler(nn.Module): def __init__(self, hard=False): super().__init__() self.hard = hard def forward(self, logits): return F.gumbel_softmax(logits=logits, hard=self.hard) d...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch import nn f...
jvrana/deep-learning-guides
GumbelSoftMaxSampler
false
12,641
[ "MIT" ]
0
18b7a0808073dd7b345e7a683dd7ee89e97e47ce
https://github.com/jvrana/deep-learning-guides/tree/18b7a0808073dd7b345e7a683dd7ee89e97e47ce
TCL
# 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.parallel import torch.optim from torch.nn....
Luoyadan/MM2020_ABG
TCL
false
17,629
[ "MIT" ]
8
d74cf915deea7bb425518f5bd40e64a9a7341981
https://github.com/Luoyadan/MM2020_ABG/tree/d74cf915deea7bb425518f5bd40e64a9a7341981
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...
tim885/DeepDepthRefiner
GlobalAvgPool2d
false
10,968
[ "MIT" ]
0
a59f376b5b0ff01b0d166ec8d946a20c81a6b190
https://github.com/tim885/DeepDepthRefiner/tree/a59f376b5b0ff01b0d166ec8d946a20c81a6b190
CrossEntropyLoss
# 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.functi...
CVIU-CSU/M2MRF-Lesion-Segmentation
CrossEntropyLoss
false
17,063
[ "Apache-2.0" ]
10
13af87927f4cdeca70e35d570edd1aec43b387b6
https://github.com/CVIU-CSU/M2MRF-Lesion-Segmentation/tree/13af87927f4cdeca70e35d570edd1aec43b387b6
JS_Divergence
import torch import torch.nn as nn class JS_Divergence(nn.Module): def __init__(self): super().__init__() self.engine = nn.KLDivLoss() def forward(self, x, y): return self.engine(x, y) + self.engine(y, x) def get_inputs(): return [torch.rand([4, 4, 4, 4]), torch.rand([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 import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
loveorchids/omni_torch
JS_Divergence
false
7,126
[ "Apache-2.0" ]
1
9bd654387619c0cbc6aee9e91482ecc9200138ef
https://github.com/loveorchids/omni_torch/tree/9bd654387619c0cbc6aee9e91482ecc9200138ef
PoolFormerBlock
# 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....
sithu31296/image_classification
PoolFormerBlock
false
16,476
[ "MIT" ]
57
6b8cbce96100225621cee3166a73e852ba216cc3
https://github.com/sithu31296/image_classification/tree/6b8cbce96100225621cee3166a73e852ba216cc3
FloorDivAssign
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride @triton.jit d...
Ilyabasharov/torch2trt
FloorDivAssign
false
2,525
[ "MIT" ]
0
76bf298b3da408509665e23e2494922b131afb10
https://github.com/Ilyabasharov/torch2trt/tree/76bf298b3da408509665e23e2494922b131afb10
l1normalization
# 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 assert...
tommy90191/Find_Tiny_but_Important_Image_Changes
l1normalization
false
4,439
[ "MIT" ]
0
429d679606f96f32db4cddf167a9cfb963d3df26
https://github.com/tommy90191/Find_Tiny_but_Important_Image_Changes/tree/429d679606f96f32db4cddf167a9cfb963d3df26
Conv_ReLU_Block
import torch import torch.nn as nn class Conv_ReLU_Block(nn.Module): def __init__(self, channel_in): super(Conv_ReLU_Block, self).__init__() self.conv_0 = nn.Conv2d(in_channels=channel_in, out_channels=128, kernel_size=1, stride=1, padding=0, bias=False) self.conv_1 = nn.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 import torch.nn as nn assert_...
ypf780732/multi-staged-fusion-sr
Conv_ReLU_Block
false
13,160
[ "MIT" ]
0
83d82c4310cc9314544793dc0b299a34956044e0
https://github.com/ypf780732/multi-staged-fusion-sr/tree/83d82c4310cc9314544793dc0b299a34956044e0
LocationLayer
# 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...
Dannynis/NeMo
LocationLayer
false
2,165
[ "Apache-2.0" ]
0
0d703d2c48158ec271d84cca76c3f423195327b2
https://github.com/Dannynis/NeMo/tree/0d703d2c48158ec271d84cca76c3f423195327b2
BasicModulationBlock
import torch class BaseModule(torch.nn.Module): def __init__(self): super(BaseModule, self).__init__() @property def nparams(self): return sum(p.numel() for p in self.parameters() if p.requires_grad) class Conv1dWithInitialization(BaseModule): def __init__(self, **kwargs): ...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
dodoproptit99/WaveGrad
BasicModulationBlock
false
10,039
[ "BSD-3-Clause" ]
0
d5e3cb5d8c1c3d115eeb5f1673b87bdbb36f79e0
https://github.com/dodoproptit99/WaveGrad/tree/d5e3cb5d8c1c3d115eeb5f1673b87bdbb36f79e0
OffsetNet
import torch import torch.nn as nn class OffsetNet(nn.Module): """OffsetNet in Temporal interlace module. The OffsetNet consists of one convolution layer and two fc layers with a relu activation following with a sigmoid function. Following the convolution layer, two fc layers and relu are applied to ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
VisualAnalysisOfHumans/LOVEU_TRACK1_TOP3_SUBMISSION
OffsetNet
false
5,937
[ "MIT" ]
1
6f4d1c7e6883d6b0664fcd04265f437247afab54
https://github.com/VisualAnalysisOfHumans/LOVEU_TRACK1_TOP3_SUBMISSION/tree/6f4d1c7e6883d6b0664fcd04265f437247afab54
AndModule
import torch import torch.nn as nn import torch.nn class AndModule(nn.Module): def forward(self, attn1, attn2): out = torch.min(attn1, attn2) return out def get_inputs(): return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.nn assert_size_stride = torch._C._dynamo.guards.assert...
SpyrosMouselinos/DeltaFormers
AndModule
false
5,841
[ "Apache-2.0" ]
1
38508fa9b85f2c50aa0031b67e7e8feff1a75b27
https://github.com/SpyrosMouselinos/DeltaFormers/tree/38508fa9b85f2c50aa0031b67e7e8feff1a75b27
GraphReasoning
import torch import numpy as np import torch.nn as nn class GraphReasoning(nn.Module): """ Perform the similarity graph reasoning with a full-connected graph Args: - sim_emb: global and local alignments, shape: (batch_size, L+1, 256) Returns; - sim_sgr: reasoned graph nodes after several steps, shape:...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Chris-cbc/SGRAF
GraphReasoning
false
13,507
[ "Apache-2.0" ]
110
785535168ad417dda523888f2f047359231fcbf7
https://github.com/Chris-cbc/SGRAF/tree/785535168ad417dda523888f2f047359231fcbf7
SReLU
import torch import torch.nn as nn from torch.nn.parameter import Parameter class SReLU(nn.Module): """ SReLU (S-shaped Rectified Linear Activation Unit): a combination of three linear functions, which perform mapping R → R with the following formulation: .. math:: h(x_i) = \\left\\{\\begin{matrix...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from torch.nn.parameter import Parameter assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided...
VITA-Group/SViTE
SReLU
false
14,534
[ "MIT" ]
50
b0c62fd153c8b0b99917ab935ee76925c9de1149
https://github.com/VITA-Group/SViTE/tree/b0c62fd153c8b0b99917ab935ee76925c9de1149
SubPixelConvolutionalBlock
import torch from torch import nn class SubPixelConvolutionalBlock(nn.Module): """ A subpixel convolutional block, comprising convolutional, pixel-shuffle, and PReLU activation layers. """ def __init__(self, kernel_size=3, n_channels=64, scaling_factor=2): """ :param kernel_size: 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 import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
DanielLiang1/a-PyTorch-Tutorial-to-Super-Resolution
SubPixelConvolutionalBlock
false
361
[ "MIT" ]
0
cf7b519029687fe9726bb194fe3765934afa18b3
https://github.com/DanielLiang1/a-PyTorch-Tutorial-to-Super-Resolution/tree/cf7b519029687fe9726bb194fe3765934afa18b3
GELU
# 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...
txsing/augmix
GELU
false
4,462
[ "Apache-2.0" ]
0
9127809d8534ccb20a654f631833153e75a277fd
https://github.com/txsing/augmix/tree/9127809d8534ccb20a654f631833153e75a277fd
CoordConv
import torch import torch.nn as nn class AddCoords(nn.Module): def __init__(self, with_r=False): super().__init__() self.with_r = with_r def forward(self, input_tensor): """ Args: input_tensor: shape(batch, channel, x_dim, y_dim) """ batch_size, _,...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
NguyenTheAn/AdaptiveWingLoss
CoordConv
false
9,358
[ "Apache-2.0" ]
0
abaade9521c1382739a158f3ad5ce493948add1d
https://github.com/NguyenTheAn/AdaptiveWingLoss/tree/abaade9521c1382739a158f3ad5ce493948add1d
TanhGaussianDistParams
import torch from typing import Tuple import torch.nn as nn import torch.nn.functional as F from typing import Callable from torch.distributions import Normal def identity(x: 'torch.Tensor') ->torch.Tensor: """Return input without any change.""" return x def init_layer_uniform(layer: 'nn.Linear', init_w: '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....
MrSyee/rl_algorithms
TanhGaussianDistParams
false
5,618
[ "MIT" ]
1
5b5276982032f8a8a614b9466849b7b3ef245b3e
https://github.com/MrSyee/rl_algorithms/tree/5b5276982032f8a8a614b9466849b7b3ef245b3e
PMA
# 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....
ernoult/set_transformer
PMA
false
12,363
[ "MIT" ]
0
4b380106e1f43b7eb6315624c57d4d1d38737b78
https://github.com/ernoult/set_transformer/tree/4b380106e1f43b7eb6315624c57d4d1d38737b78
RAddFloat
import torch class RAddFloat(torch.nn.Module): def __init__(self): super(RAddFloat, self).__init__() def forward(self, x): return 1.0 + x def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
Ilyabasharov/torch2trt
RAddFloat
false
2,548
[ "MIT" ]
0
76bf298b3da408509665e23e2494922b131afb10
https://github.com/Ilyabasharov/torch2trt/tree/76bf298b3da408509665e23e2494922b131afb10
MaskedInstanceNorm1d
import torch import torch.cuda from torch import nn import torch.utils.data import torch.optim class MaskedInstanceNorm1d(nn.Module): """Instance norm + masking.""" MAX_CNT = 100000.0 def __init__(self, d_channel: 'int', unbiased: 'bool'=True, affine: 'bool'=False): super().__init__() ...
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.cuda from torch...
carolmanderson/NeMo
MaskedInstanceNorm1d
false
6,394
[ "Apache-2.0" ]
1
be7114e2d983af751e1af4119465c626682747b7
https://github.com/carolmanderson/NeMo/tree/be7114e2d983af751e1af4119465c626682747b7
ASP
import torch import torch.nn as nn class AttentivePooling(nn.Module): """ Implementation of Attentive Pooling """ def __init__(self, input_dim, **kwargs): super(AttentivePooling, self).__init__() self.W_a = nn.Linear(input_dim, input_dim) self.W = nn.Linear(input_dim, 1) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
AyushExel/s3prl
ASP
false
2,006
[ "MIT" ]
0
6531904e9621a778978b9cfef3ba9f582e56639a
https://github.com/AyushExel/s3prl/tree/6531904e9621a778978b9cfef3ba9f582e56639a
AbsLoss
# 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 assert_size_stride = t...
KevinMusgrave/pytorch-adapt
AbsLoss
false
13,942
[ "MIT" ]
131
ff1491e1bfcc586afb8ee619712c8816ddf10358
https://github.com/KevinMusgrave/pytorch-adapt/tree/ff1491e1bfcc586afb8ee619712c8816ddf10358
EncoderLayer
import math import torch import torch.nn as nn import torch.nn.functional as F def attention(q, k, v, d_k, mask=None, dropout=None): scores = torch.matmul(q, k.transpose(-2, -1)) / math.sqrt(d_k) if mask is not None: mask = mask.unsqueeze(1) scores = scores.masked_fill(mask == 0, -1000000000.0...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
msank00/miniTransformer
EncoderLayer
false
12,826
[ "MIT" ]
0
a264f30982d9e2dbf8c796d495f7a237c0dd53ef
https://github.com/msank00/miniTransformer/tree/a264f30982d9e2dbf8c796d495f7a237c0dd53ef
OutputLayer
# 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.dlpack assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._...
Jaein94/Open3D-ML
OutputLayer
false
9,315
[ "MIT" ]
0
815c111229322d562e11ea3148ad6568ccf13d1d
https://github.com/Jaein94/Open3D-ML/tree/815c111229322d562e11ea3148ad6568ccf13d1d
ResidualBlock
import torch import torch.utils.data import torch from torch import nn class ResidualBlock(nn.Module): def __init__(self, channels): super(ResidualBlock, self).__init__() self.conv1 = nn.Conv2d(channels, channels, kernel_size=3, padding=1) self.prelu = nn.PReLU() self.conv2 = nn.C...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data import torch from torch import nn assert_size_stride = t...
zsameem/real-world-sr
ResidualBlock
false
11,099
[ "MIT" ]
0
ed108f3fd2fe4090c18c871c143f30f480de8fb6
https://github.com/zsameem/real-world-sr/tree/ed108f3fd2fe4090c18c871c143f30f480de8fb6
Swish
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
ahmedfgad/high-fidelity-generative-compression
Swish
false
6,117
[ "Apache-2.0" ]
1
f3c6aa3472e3c629cbc35eefb0957119c913054a
https://github.com/ahmedfgad/high-fidelity-generative-compression/tree/f3c6aa3472e3c629cbc35eefb0957119c913054a
MatchModule
# 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....
amberhuang01/LearningFromFactCheckers
MatchModule
false
18,319
[ "MIT" ]
9
3c21684709bf5e331c4585c7d62596960dd44732
https://github.com/amberhuang01/LearningFromFactCheckers/tree/3c21684709bf5e331c4585c7d62596960dd44732
CausalConv1d
# 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...
LittleGuoKe/Entity-Concept-enhanced-Few-shot-Relation-Extraction
CausalConv1d
false
8,445
[ "MIT" ]
19
b41386bdc70a3b84731bdbf700ff1ba4eda6675d
https://github.com/LittleGuoKe/Entity-Concept-enhanced-Few-shot-Relation-Extraction/tree/b41386bdc70a3b84731bdbf700ff1ba4eda6675d
Model
import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data class Model(nn.Module): def __init__(self): super(Model, self).__init__() self.conv1 = nn.Conv2d(1, 60, kernel_size=5) self.conv2 = nn.Conv2d(60, 60, kernel_size=5) self.conv3 = nn.Conv2d(60...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
kproshakov/SudokuCV
Model
false
10,372
[ "MIT" ]
0
8c29f4f1ac32513e7bd7d194d1fefb249c5d7921
https://github.com/kproshakov/SudokuCV/tree/8c29f4f1ac32513e7bd7d194d1fefb249c5d7921
RegressionSubNet
# 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_...
geez0219/ARC
RegressionSubNet
false
6,748
[ "Apache-2.0" ]
1
f2176f0d442d4a2d6028f0770b1efc1a9ae982b8
https://github.com/geez0219/ARC/tree/f2176f0d442d4a2d6028f0770b1efc1a9ae982b8
AdaptiveSquare
import torch from torch.nn.parameter import Parameter class AdaptiveSquare(torch.nn.Module): """ Implementation of soft exponential activation. Shape: - Input: (N, *) where * means, any number of additional dimensions - Output: (N, *), same shape as the input Parameters: ...
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.parameter import Parameter assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dyna...
ndem0/PINA
AdaptiveSquare
false
10,719
[ "MIT" ]
0
1812ddb8d96a9c8aeb80ce35002dbd115e7d7931
https://github.com/ndem0/PINA/tree/1812ddb8d96a9c8aeb80ce35002dbd115e7d7931
PositionalEncodingImageBoxes
import torch from torch import nn as nn import torch.nn.init from torchvision import models as models class PositionalEncodingImageBoxes(nn.Module): def __init__(self, d_model, mode='project-and-sum'): super().__init__() self.mode = mode if mode == 'project-and-sum': self.map ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import 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 as nn import torch.nn.init from torchvision import models a...
huylb314/TERAN
PositionalEncodingImageBoxes
false
15,564
[ "Apache-2.0" ]
46
f6a380db423e75fcdaa6ef44f1a79d293a38efba
https://github.com/huylb314/TERAN/tree/f6a380db423e75fcdaa6ef44f1a79d293a38efba
Learned_Aggregation_Layer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Uzair-Khattak/deit
Learned_Aggregation_Layer
false
9,641
[ "Apache-2.0" ]
0
896004fc84d4ad2c4c9aa792822df7426af5903d
https://github.com/Uzair-Khattak/deit/tree/896004fc84d4ad2c4c9aa792822df7426af5903d
PSNR
import torch import torch as th import torch.utils.data class PSNR(th.nn.Module): def __init__(self): super(PSNR, self).__init__() self.mse = th.nn.MSELoss() def forward(self, out, ref): mse = self.mse(out, ref) return -10 * th.log10(mse + 1e-12) def get_inputs(): retur...
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 th import to...
IlyaBizyaev/ttools
PSNR
false
8,306
[ "MIT" ]
11
b1435b19f397ce1baff9daed3cb287e52a029fdb
https://github.com/IlyaBizyaev/ttools/tree/b1435b19f397ce1baff9daed3cb287e52a029fdb