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
BCEBlurWithLogitsLoss
import torch import torch.nn as nn class BCEBlurWithLogitsLoss(nn.Module): def __init__(self, alpha=0.05): super(BCEBlurWithLogitsLoss, self).__init__() self.loss_fcn = nn.BCEWithLogitsLoss(reduction='none') self.alpha = alpha def forward(self, pred, true): loss = self.loss_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 from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
Aditya239233/MDP
BCEBlurWithLogitsLoss
false
16,902
[ "MIT" ]
4
87491e1d67e547c11f4bdd5d784d120473429eae
https://github.com/Aditya239233/MDP/tree/87491e1d67e547c11f4bdd5d784d120473429eae
ScaledDotProductAttention
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Xlinford/TDNet
ScaledDotProductAttention
false
2,968
[ "MIT" ]
0
e7cb59c40b8751b6dab9691d26ad224fd61c24d1
https://github.com/Xlinford/TDNet/tree/e7cb59c40b8751b6dab9691d26ad224fd61c24d1
Attention
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.init as init def sequence_mask(lengths, max_len=None): """ Creates a boolean mask from sequence lengths. """ batch_size = lengths.numel() max_len = max_len or lengths.max() return torch.arange(0, max_len).type_a...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
IndexFziQ/ASER
Attention
false
2,381
[ "MIT" ]
0
67dd1a2a25cec175c15675cc1f8a63ca065b447e
https://github.com/IndexFziQ/ASER/tree/67dd1a2a25cec175c15675cc1f8a63ca065b447e
Div
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
Akababa/torch2trt
Div
false
18,416
[ "MIT" ]
2
03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7
https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7
Layer4NN
import torch import torch.nn import torch.cuda class Layer4NN(torch.nn.Module): def __init__(self, inputSize, numClasses, channels=3): super(Layer4NN, self).__init__() self.cnn_layer1 = torch.nn.Conv2d(channels, 32, kernel_size=3, stride=1, padding=1) self.cnn_layer2 = torch.n...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn import torch....
naruarjun/SADAM-reproducibility
Layer4NN
false
12,821
[ "MIT" ]
0
1654804268ae984f49abc3ab2495c350dc09a3e2
https://github.com/naruarjun/SADAM-reproducibility/tree/1654804268ae984f49abc3ab2495c350dc09a3e2
LinearAttentionBlock
import torch import torch.nn as nn import torch.nn.functional as F class LinearAttentionBlock(nn.Module): def __init__(self, in_features): super(LinearAttentionBlock, self).__init__() self.op = nn.Conv2d(in_channels=in_features, out_channels=1, kernel_size=1, padding=0, bias=False) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
abhay97ps/visual-control-ppo-procgen
LinearAttentionBlock
false
1,355
[ "MIT" ]
0
765fe1ddb289d384abddc4df8eb865379c8da76a
https://github.com/abhay97ps/visual-control-ppo-procgen/tree/765fe1ddb289d384abddc4df8eb865379c8da76a
SimpleModel
import torch import torch.nn as nn class SimpleModel(nn.Module): def __init__(self): super(SimpleModel, self).__init__() def forward(self, x): return x * 2 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
JimmyCai91/tensorboardX
SimpleModel
false
9,148
[ "MIT" ]
0
9bff602008d71f4bbf6e83e99125033629f4ee6f
https://github.com/JimmyCai91/tensorboardX/tree/9bff602008d71f4bbf6e83e99125033629f4ee6f
DenseSAGEConv
# 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 math from torch.nn imp...
douglasrizzo/pytorch_geometric
DenseSAGEConv
false
12,295
[ "MIT" ]
0
effc617c6ad6daad506038bb79e4407082e74740
https://github.com/douglasrizzo/pytorch_geometric/tree/effc617c6ad6daad506038bb79e4407082e74740
BasicNN
import torch import numpy as np from torch import nn from torch.autograd import Variable import torch.nn.functional as F class BasicNN(nn.Module): def __init__(self): super(BasicNN, self).__init__() self.net = nn.Linear(28 * 28, 2) def forward(self, x): if isinstance(x, np.ndarray): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
DNCoelho/clipper
BasicNN
false
13,541
[ "Apache-2.0" ]
1,403
0144078c9da757ee319d60b362d9f51538657ca8
https://github.com/DNCoelho/clipper/tree/0144078c9da757ee319d60b362d9f51538657ca8
Netleaky
import torch import torch.nn as nn import torch.nn.functional as F class Netleaky(nn.Module): def __init__(self, input_dim, output_dim): super(Netleaky, self).__init__() self.linear1 = nn.Linear(input_dim, 32) self.linear2 = nn.Linear(32, 32) self.linear3 = nn.Linear(32, 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 assert_...
gautam-sharma1/Imitation-Learning
Netleaky
false
3,529
[ "MIT" ]
0
20b6fcd2a8d6de8eb95e6831f5b379a083306361
https://github.com/gautam-sharma1/Imitation-Learning/tree/20b6fcd2a8d6de8eb95e6831f5b379a083306361
RPLHead
import torch import torch.nn as nn class RPLHead(nn.Module): def __init__(self, in_channels, num_classes, num_centers=1, init='random'): super(RPLHead, self).__init__() self.feat_dim = in_channels self.num_classes = num_classes self.num_centers = num_centers if init == 'ra...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
Cogito2012/OpenTAL
RPLHead
false
7,909
[ "BSD-3-Clause" ]
16
a7ab938a52b3fb82163eb1ba5403888359eb7e6a
https://github.com/Cogito2012/OpenTAL/tree/a7ab938a52b3fb82163eb1ba5403888359eb7e6a
EncoderLayer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
BHD233/PaddleOCR2Pytorch
EncoderLayer
false
13,393
[ "Apache-2.0" ]
364
f114069b3e2669c6adf0adf9596756205f184c9c
https://github.com/BHD233/PaddleOCR2Pytorch/tree/f114069b3e2669c6adf0adf9596756205f184c9c
Coral
# 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 torch.nn as nn import torch.nn.init assert_size_stride = torch._C._dynamo...
TropComplique/associative-domain-adaptation
Coral
false
18,010
[ "MIT" ]
8
a2ec0a9e678af20624f79e40c8042c969a69e8f3
https://github.com/TropComplique/associative-domain-adaptation/tree/a2ec0a9e678af20624f79e40c8042c969a69e8f3
FTanh
import torch import torch.nn as nn class FTanh(nn.Module): """ Test for nn.functional types """ def __init__(self): super(FTanh, self).__init__() def forward(self, x): from torch.nn import functional as F return F.tanh(x) def get_inputs(): return [torch.rand([4, 4, ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
dawnclaude/onnx2keras
FTanh
false
15,146
[ "MIT" ]
115
3d2a47c0a228b91fd434232274e216e491da36e3
https://github.com/dawnclaude/onnx2keras/tree/3d2a47c0a228b91fd434232274e216e491da36e3
NN
import torch import torch.nn.functional as F import torch.nn as nn class NN(nn.Module): def __init__(self, input_size): super().__init__() self.fc1 = nn.Linear(input_size, 50) self.fc2 = nn.Linear(50, 40) self.fc3 = nn.Linear(40, 20) self.fc4 = nn.Linear(20, 9) sel...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
Meydand2001/Machine-Learning-project
NN
false
11,705
[ "MIT" ]
0
dc73bc3820024939ba66a1a3e2ae130d6bf35f9a
https://github.com/Meydand2001/Machine-Learning-project/tree/dc73bc3820024939ba66a1a3e2ae130d6bf35f9a
ScaleLayer
# 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...
Anurag14/STar-framework
ScaleLayer
false
16,956
[ "MIT" ]
4
6670499c681fce8d76aae1d1910bc849ec5f56ea
https://github.com/Anurag14/STar-framework/tree/6670499c681fce8d76aae1d1910bc849ec5f56ea
ChannelSpatialSELayer3D
import torch import torch.nn as nn import torch.nn.functional as F class ChannelSELayer3D(nn.Module): """ 3D implementation of Squeeze-and-Excitation (SE) block described in: *Hu et al., Squeeze-and-Excitation Networks, arXiv:1709.01507* """ def __init__(self, num_channels, reduction_ratio=2)...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
HiLab-git/PyMIC
ChannelSpatialSELayer3D
false
13,785
[ "Apache-2.0" ]
147
abf5c43de43668b85f4c049c95a8f1b7cf1d9f16
https://github.com/HiLab-git/PyMIC/tree/abf5c43de43668b85f4c049c95a8f1b7cf1d9f16
Normalize01
# 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...
ScarWar/DeepSTORM3D
Normalize01
false
8,736
[ "MIT" ]
25
8ba5bc61120abedba9c1b24a994e616e280bdda2
https://github.com/ScarWar/DeepSTORM3D/tree/8ba5bc61120abedba9c1b24a994e616e280bdda2
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....
mbarnig/vits-train
MultiHeadAttention
false
7,190
[ "MIT" ]
1
cfb8a0fc91daad868fe3d062ebf85d62edbd7506
https://github.com/mbarnig/vits-train/tree/cfb8a0fc91daad868fe3d062ebf85d62edbd7506
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....
yuanweining/DTI
MultiHeadAttention
false
4,653
[ "Apache-2.0" ]
0
11eacb46a221da04d0e9b01d41c89c7ce51ea302
https://github.com/yuanweining/DTI/tree/11eacb46a221da04d0e9b01d41c89c7ce51ea302
Conv_Q
# 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....
ssimonc/NeoRL
Conv_Q
false
16,534
[ "Apache-2.0" ]
50
098c58c8e4c3e43e67803f6384619d3bfe7fce5d
https://github.com/ssimonc/NeoRL/tree/098c58c8e4c3e43e67803f6384619d3bfe7fce5d
KLDivLoss
from torch.nn import Module import torch import torch.utils.data import torch.nn.functional import torch.autograd class KLDivLoss(Module): """ ## KL-Divergence loss This calculates the KL divergence between a given normal distribution and $\\mathcal{N}(0, 1)$ """ def forward(self, sigma_hat: '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 from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch.nn import M...
mcx/annotated_deep_learning_paper_implementations
KLDivLoss
false
7,199
[ "MIT" ]
1
f169f3a71dd2d36eb28ad31062d3475efa367b88
https://github.com/mcx/annotated_deep_learning_paper_implementations/tree/f169f3a71dd2d36eb28ad31062d3475efa367b88
ReCoNet2
# 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....
irsisyphus/reconet
ReCoNet2
false
15,690
[ "MIT" ]
56
863acf8dde4d45c8521634af27878fe04f3b2e56
https://github.com/irsisyphus/reconet/tree/863acf8dde4d45c8521634af27878fe04f3b2e56
MetaAconC
# 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...
GoalballAnalysis/GUI
MetaAconC
false
2,314
[ "MIT" ]
0
c7f1cc27f4fd7f861c3ca09f5ca25d1a3f19a8a7
https://github.com/GoalballAnalysis/GUI/tree/c7f1cc27f4fd7f861c3ca09f5ca25d1a3f19a8a7
NonLocalBlock2D
import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.model_zoo class NonLocalBlock2D(nn.Module): def __init__(self, in_channels, inter_channels): super(NonLocalBlock2D, self).__init__() self.in_channels = in_channels self.inter_channels = inter_channels ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
zhouhuanxiang/EDSR-PyTorch
NonLocalBlock2D
false
13,181
[ "MIT" ]
0
ca2f0eea49476a0acde59dd76aa4ae257389d98c
https://github.com/zhouhuanxiang/EDSR-PyTorch/tree/ca2f0eea49476a0acde59dd76aa4ae257389d98c
tfAvgPool3D
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
Jo951128/2021-2-MIP
tfAvgPool3D
false
2,423
[ "MIT" ]
0
511e0a38816d16fdba9631f76cf913ba51c43138
https://github.com/Jo951128/2021-2-MIP/tree/511e0a38816d16fdba9631f76cf913ba51c43138
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....
wu0004in/vedastr
MultiHeadAttention
false
4,557
[ "Apache-2.0" ]
0
83511a408b68c264561a30daff5154cd0148bebd
https://github.com/wu0004in/vedastr/tree/83511a408b68c264561a30daff5154cd0148bebd
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...
Columbine21/TFR-Net
SIMSE
false
17,126
[ "MIT" ]
7
1da01577542e7f477fdf7323ec0696aebc632357
https://github.com/Columbine21/TFR-Net/tree/1da01577542e7f477fdf7323ec0696aebc632357
AdditiveAttention
import torch import torch.nn as nn class AdditiveAttention(nn.Module): def __init__(self, in_features, att_hidden, out_features, bias=True): super(AdditiveAttention, self).__init__() self.out_size = out_features self.linear1 = nn.Linear(in_features=in_features, out_features= a...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
LindgeW/DomainAdaption4DependencyParsing
AdditiveAttention
false
5,546
[ "Apache-2.0" ]
1
5de136a37d8fe730e4235ed95bf923763fe21ea6
https://github.com/LindgeW/DomainAdaption4DependencyParsing/tree/5de136a37d8fe730e4235ed95bf923763fe21ea6
GraphAttention
import torch import numpy as np import torch.nn as nn import torch.nn.functional as F class GraphAttention(nn.Module): def __init__(self, in_features, out_features, dropout, alpha=0.2, concat=True, return_attention=False): super(GraphAttention, self).__init__() self.dropout = dropout ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Supermaxman/covid19-data
GraphAttention
false
9,602
[ "Apache-2.0" ]
0
13e8e0c30a063c60e2160896458cd290a85ea0e2
https://github.com/Supermaxman/covid19-data/tree/13e8e0c30a063c60e2160896458cd290a85ea0e2
ContrastiveLoss
import torch import torch.nn.functional as F class ContrastiveLoss(torch.nn.Module): def __init__(self, margin=2): super(ContrastiveLoss, self).__init__() self.margin = margin def forward(self, output1, output2, label): euclidean_distance = F.pairwise_distance(output1, output2) ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice assert_size_stride = torch._...
e-Neural/OfflineSignatureVerification
ContrastiveLoss
false
15,283
[ "MIT" ]
51
ea11009a3b2ac82c7091075466c505602a50817a
https://github.com/e-Neural/OfflineSignatureVerification/tree/ea11009a3b2ac82c7091075466c505602a50817a
AvgPool
import torch import torch.nn as nn class AvgPool(nn.Module): """ 给定形如[batch_size, max_len, hidden_size]的输入,在最后一维进行avg pooling. 输出为[batch_size, hidden_size] """ def __init__(self, stride=None, padding=0): super(AvgPool, self).__init__() self.stride = stride self.padding = paddi...
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...
Raiselimit/TorchBlocks
AvgPool
false
5,736
[ "MIT" ]
1
a5baecb9a2470ff175087475630f2b7db3f7ef51
https://github.com/Raiselimit/TorchBlocks/tree/a5baecb9a2470ff175087475630f2b7db3f7ef51
Invertible1x1Conv
import torch import torch.nn.functional as F from torch.autograd import Variable import torch.utils.data import torch.nn class Invertible1x1Conv(torch.nn.Module): """ The layer outputs both the convolution, and the log determinant of its weight matrix. If reverse=True it does convolution with inverse...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn.functional as F from torch.autograd import Variable import torch...
leo0519/TensorRT
Invertible1x1Conv
false
7,075
[ "Apache-2.0" ]
1
498dcb009fe4c2dedbe9c61044d3de4f3c04a41b
https://github.com/leo0519/TensorRT/tree/498dcb009fe4c2dedbe9c61044d3de4f3c04a41b
ln
import torch from torch import nn import torch.utils.data class ln(nn.Module): """ Layer Normalization """ def __init__(self, input): super(ln, self).__init__() self.ln = nn.LayerNorm(input.size()[1:]) def forward(self, x): x = self.ln(x) return x def get_inputs...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn import torch.utils.data assert_size_stride = torch._C._dyn...
ZAKAUDD/-GEU-Net
ln
false
18,201
[ "MIT" ]
8
5251d329afb80c74328e72fd2fc21ff691ef3353
https://github.com/ZAKAUDD/-GEU-Net/tree/5251d329afb80c74328e72fd2fc21ff691ef3353
AlphaModule
import torch from torch import nn from torch.nn.parameter import Parameter import torch.optim class AlphaModule(nn.Module): def __init__(self, shape): super(AlphaModule, self).__init__() if not isinstance(shape, tuple): shape = shape, self.alpha = Parameter(torch.rand(tuple([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 import nn from torch.nn.parameter import Parameter import torch.optim assert_size_stride = torch._C._dynamo.guards.assert_size_st...
albertozurli/mammoth
AlphaModule
false
1,393
[ "MIT" ]
0
849234afe084b4f707de5300e953a2a8c104ea36
https://github.com/albertozurli/mammoth/tree/849234afe084b4f707de5300e953a2a8c104ea36
ClipLayer
import torch import torch.nn as nn def clip_data(data, max_norm): norms = torch.norm(data.reshape(data.shape[0], -1), dim=-1) scale = (max_norm / norms).clamp(max=1.0) data *= scale.reshape(-1, 1, 1, 1) return data class ClipLayer(nn.Module): def __init__(self, max_norm): super(ClipLaye...
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...
skat00sh/Handcrafted-DP
ClipLayer
false
16,479
[ "MIT" ]
48
d1f8bc004adc240d5c424a10bdcc30fc266c8218
https://github.com/skat00sh/Handcrafted-DP/tree/d1f8bc004adc240d5c424a10bdcc30fc266c8218
AttDec
# 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 ...
IacoSimoncini/tfvaegan
AttDec
false
13,204
[ "MIT" ]
0
157b526d65d0b0d5412f4be6fed02fc7d6325827
https://github.com/IacoSimoncini/tfvaegan/tree/157b526d65d0b0d5412f4be6fed02fc7d6325827
AttentionBlock
# 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....
Anjum48/commonlitreadabilityprize
AttentionBlock
false
7,707
[ "MIT" ]
28
b310742520b847b452ced0d27f47a934e834e4de
https://github.com/Anjum48/commonlitreadabilityprize/tree/b310742520b847b452ced0d27f47a934e834e4de
WDV52Linear
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import math import ...
Lollipop321/weight-distillation
WDV52Linear
false
5,568
[ "BSD-3-Clause" ]
1
cfc76ec58e3e88094dde1825287b2968f9718431
https://github.com/Lollipop321/weight-distillation/tree/cfc76ec58e3e88094dde1825287b2968f9718431
CustomGruCell
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import numpy as np ...
NiWaRe/PySyft
CustomGruCell
false
11,750
[ "Apache-2.0" ]
0
b5abe66ea949d60be14a08d2e4e32e9587c7bf5c
https://github.com/NiWaRe/PySyft/tree/b5abe66ea949d60be14a08d2e4e32e9587c7bf5c
LargeNN
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_s...
AustinCai/gmaxup-augmentation
LargeNN
false
86
[ "MIT" ]
0
a64ca0a76eb333e5ce6b217c301d27ca04d73bce
https://github.com/AustinCai/gmaxup-augmentation/tree/a64ca0a76eb333e5ce6b217c301d27ca04d73bce
SelfAttentionLayer
# 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....
Darg-Iztech/quote-detection
SelfAttentionLayer
false
2,133
[ "MIT" ]
0
14a4731139db859f9672f54400d78d77cca8a008
https://github.com/Darg-Iztech/quote-detection/tree/14a4731139db859f9672f54400d78d77cca8a008
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....
Challyfilio/NAIC2021
Block
false
299
[ "MIT" ]
0
11b38a920dcc902f9b798dc43ae360062862e6e4
https://github.com/Challyfilio/NAIC2021/tree/11b38a920dcc902f9b798dc43ae360062862e6e4
IBNbResInitBlock
# 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....
earhian/imgclsmob
IBNbResInitBlock
false
6,629
[ "MIT" ]
1
c87c0942420876941868c016211073dec4392e4d
https://github.com/earhian/imgclsmob/tree/c87c0942420876941868c016211073dec4392e4d
TwoLayerCNN
import torch import torch.nn as nn import torch.nn.functional as F class TwoLayerCNN(nn.Module): def __init__(self, C, M, embedding, channel, mtc_input): super(TwoLayerCNN, self).__init__() self.C = C self.M = M self.embedding = embedding self.mtc_input = C if mtc_input el...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
LFhase/string-embed
TwoLayerCNN
false
9,211
[ "MIT" ]
0
da8eb60186fcd26a94734f265f79fa5fc5096f76
https://github.com/LFhase/string-embed/tree/da8eb60186fcd26a94734f265f79fa5fc5096f76
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....
ekvall93/tape
Attention
false
12,344
[ "BSD-3-Clause" ]
0
1ca4d5a39c72f806f23a36fb7a7c7325f06096ae
https://github.com/ekvall93/tape/tree/1ca4d5a39c72f806f23a36fb7a7c7325f06096ae
Threshold
import torch import torch.optim class Threshold(torch.nn.Module): CAST_OPS = {'float': lambda t: t.float(), 'byte': lambda t: t.byte()} def __init__(self, value: 'float', comparison: 'str'='lower', dtype: 'str'='float'): super(Threshold, self).__init__() self.threshold = value ...
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.optim assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strid...
ai-in-motion/moai
Threshold
false
18,348
[ "Apache-2.0" ]
10
e38cac046c059d2e2331ef4883bbabc5a500a5cf
https://github.com/ai-in-motion/moai/tree/e38cac046c059d2e2331ef4883bbabc5a500a5cf
KLLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math from torch ...
abhisheklalwani/ActionCLIP
KLLoss
false
14,745
[ "MIT" ]
141
dd2ab27db4bf3d5be3a51cd011cb49aa8b679de0
https://github.com/abhisheklalwani/ActionCLIP/tree/dd2ab27db4bf3d5be3a51cd011cb49aa8b679de0
shift
import torch import torch.nn as nn class crop(nn.Module): def __init__(self): super().__init__() def forward(self, x): N, C, H, W = x.shape x = x[0:N, 0:C, 0:H - 1, 0:W] return x class shift(nn.Module): def __init__(self): super().__init__() self.shift_...
import torch import 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...
amonod/udvd
shift
false
1,428
[ "MIT" ]
0
a1ccb777d205255ac68c40efb93dd3996f562c45
https://github.com/amonod/udvd/tree/a1ccb777d205255ac68c40efb93dd3996f562c45
ConformerFeedForward
# 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 import torch.utils.data import torch.optim assert_size_stri...
JINHXu/NeMo
ConformerFeedForward
false
11,615
[ "Apache-2.0" ]
0
835db62e39919436824ce022fd3b3f6bac301cd6
https://github.com/JINHXu/NeMo/tree/835db62e39919436824ce022fd3b3f6bac301cd6
ConvBlock
import torch import torch.nn as nn class Conv3x3(nn.Module): """Layer to pad and convolve input """ def __init__(self, in_channels, out_channels, use_refl=True): super(Conv3x3, self).__init__() if use_refl: self.pad = nn.ReflectionPad2d(1) else: self.pad = ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
Sid1057/sid1057.github.io
ConvBlock
false
17,936
[ "MIT" ]
4
623d1731e308b42b6f86304dcfd671a061b414bf
https://github.com/Sid1057/sid1057.github.io/tree/623d1731e308b42b6f86304dcfd671a061b414bf
SoftTargetCrossEntropy
# 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.utils.dat...
lovelinability/pytorch_image_models
SoftTargetCrossEntropy
false
7,150
[ "Apache-2.0" ]
1
7c54200f3de7611ab1222a37088eb7f66ae2858f
https://github.com/lovelinability/pytorch_image_models/tree/7c54200f3de7611ab1222a37088eb7f66ae2858f
Conv2dWithConstraint
import torch from torch import nn class Conv2dWithConstraint(nn.Conv2d): def __init__(self, *args, max_norm=1, **kwargs): self.max_norm = max_norm super(Conv2dWithConstraint, self).__init__(*args, **kwargs) def forward(self, x): self.weight.data = torch.renorm(self.weight.data, p=2, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import n...
tomMoral/braindecode
Conv2dWithConstraint
false
4,440
[ "BSD-3-Clause" ]
0
09d63b7e32fdfcfbaac7569a003f2611721a78ca
https://github.com/tomMoral/braindecode/tree/09d63b7e32fdfcfbaac7569a003f2611721a78ca
NumericalFeaturesEmbedding
import torch import torch.utils.tensorboard import torch.utils.data import torch.distributed class NumericalFeaturesEmbedding(torch.nn.Module): """Transform a sequence of numerical feature vectors into a single vector. Currently, this module simply aggregates the features by averaging, although more elab...
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.utils.tensorboard import torch.utils.data import torch.distributed assert_size_stride = torch._C._dynamo.guards.assert_size_str...
JoeLambourne/SketchGraphs
NumericalFeaturesEmbedding
false
1,312
[ "MIT" ]
0
183c65f82d71d82c62b253092e9b7fa65846a3e6
https://github.com/JoeLambourne/SketchGraphs/tree/183c65f82d71d82c62b253092e9b7fa65846a3e6
ModulatedConv2d
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch.autograd...
hyunobae/BasicSR
ModulatedConv2d
false
12,528
[ "Apache-2.0" ]
0
f2c2fc6cf28933658816c808f55c95fa20b16483
https://github.com/hyunobae/BasicSR/tree/f2c2fc6cf28933658816c808f55c95fa20b16483
ECA_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 import math import torch.nn as nn import torch.utils.data.distributed assert_siz...
Erfun76/insightface
ECA_Layer
false
9,281
[ "MIT" ]
0
148cef36a43a055f68d2b6a475f4aa38625ad8b4
https://github.com/Erfun76/insightface/tree/148cef36a43a055f68d2b6a475f4aa38625ad8b4
cal_L2Norm
import torch class cal_L2Norm(torch.nn.Module): def __init__(self): super(cal_L2Norm, self).__init__() self.eps = 1e-10 def forward(self, x): norm = torch.sqrt(torch.sum(x * x, dim=1) + self.eps) return norm def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_c...
RiyaoDong/HGSL
cal_L2Norm
false
2,765
[ "Apache-2.0" ]
0
19fa984b3bfde0e3b7acbce87dd40177cd64f9b0
https://github.com/RiyaoDong/HGSL/tree/19fa984b3bfde0e3b7acbce87dd40177cd64f9b0
SelfAttentionConv2d
import math import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed import torch.nn.functional as F import torch.nn.init as init from torch.nn.modules.utils import _pair class SelfAttentionConv2d(nn.Module): def __init__(self, in_...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
MerHS/SASA-pytorch
SelfAttentionConv2d
false
14,020
[ "MIT" ]
47
7d113852dce2e25d4de23caf87ad7d33758c322e
https://github.com/MerHS/SASA-pytorch/tree/7d113852dce2e25d4de23caf87ad7d33758c322e
Attention
import torch import torch.nn as nn import torch.nn.functional as F class Attention(nn.Module): """Calculates attention over the input nodes given the current state.""" def __init__(self, encoder_hidden_size, decoder_hidden_size): super(Attention, self).__init__() self.v = nn.Parameter(torch.z...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Bachery/Shape-driven-Coordinate-Ordering
Attention
false
16,976
[ "MIT" ]
6
6afa933a882cbe7a40ddf1de169537eccfe415b7
https://github.com/Bachery/Shape-driven-Coordinate-Ordering/tree/6afa933a882cbe7a40ddf1de169537eccfe415b7
deepmind
# 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_...
Rowing0914/TF2_RL
deepmind
false
17,908
[ "MIT" ]
8
c1b7f9b376cbecf01deb17f76f8e761035ed336a
https://github.com/Rowing0914/TF2_RL/tree/c1b7f9b376cbecf01deb17f76f8e761035ed336a
LinearDrop
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn import torch.nn.init import torch.optim class Model(nn.Module): """ Class representing sampleable neural network model """ def num_params(self): """ Get the number of model parameters. """ return sum(p.numel() ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
CBIIT/NCI-DOE-Collab-Pilot2-Autoencoder_MD_Simulation_Data
LinearDrop
false
13,431
[ "MIT" ]
51
2b1213f944cf5f2c60799099a469989a1f0a6d3a
https://github.com/CBIIT/NCI-DOE-Collab-Pilot2-Autoencoder_MD_Simulation_Data/tree/2b1213f944cf5f2c60799099a469989a1f0a6d3a
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_...
aishikawa/drl-impl
CriticNetwork
false
9,711
[ "MIT" ]
0
1afe7426494cd94990cb4dae247486a25dfe37bf
https://github.com/aishikawa/drl-impl/tree/1afe7426494cd94990cb4dae247486a25dfe37bf
GlobalAttention
import torch import torch.distributed import torch import torch.nn as nn import torch.nn.functional as F def sequence_mask(lengths, max_len=None): """ Creates a boolean mask from sequence lengths. """ batch_size = lengths.numel() max_len = max_len or lengths.max() return torch.arange(0, max_le...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Katarina11/PreSumm
GlobalAttention
false
11,612
[ "MIT" ]
0
616e72f038d512e9e9112af375d66a0b2e3db6cd
https://github.com/Katarina11/PreSumm/tree/616e72f038d512e9e9112af375d66a0b2e3db6cd
L1CompositionLoss
import functools import torch import torch.nn as nn from torch.nn import functional as F def reduce_loss(loss, reduction): """Reduce loss as specified. Args: loss (Tensor): Elementwise loss tensor. reduction (str): Options are "none", "mean" and "sum". Returns: Tensor: Reduced lo...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import functools impor...
Juggernaut93/mmediting
L1CompositionLoss
false
13,900
[ "Apache-2.0" ]
1,884
8ef46ace29756dd2df1d92f2f73a33646e33e007
https://github.com/Juggernaut93/mmediting/tree/8ef46ace29756dd2df1d92f2f73a33646e33e007
Maxout
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_s...
shadow2496/KAIST_2019_Deep-Learning_HW4
Maxout
false
4,302
[ "MIT" ]
0
f837ee23816c7486952733925b1f338b54d7086f
https://github.com/shadow2496/KAIST_2019_Deep-Learning_HW4/tree/f837ee23816c7486952733925b1f338b54d7086f
wide_basic
# 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...
JunLi-Galios/JEM
wide_basic
false
11,598
[ "Apache-2.0" ]
0
dd4d33f64269d3999458f129ac83a3043ad7e63f
https://github.com/JunLi-Galios/JEM/tree/dd4d33f64269d3999458f129ac83a3043ad7e63f
RNNAgent
from _paritybench_helpers import _mock_config import torch import torch.nn.functional as F import torch.nn as nn class RNNAgent(nn.Module): def __init__(self, input_shape, args): super(RNNAgent, self).__init__() self.args = args self.fc1 = nn.Linear(input_shape, args.rnn_hidden_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 import torch.nn as nn assert_...
Sud0x67/mrmix
RNNAgent
false
18,379
[ "Apache-2.0" ]
4
4f4784e421c768509bd007e21b4455b56edc7cd2
https://github.com/Sud0x67/mrmix/tree/4f4784e421c768509bd007e21b4455b56edc7cd2
DenseSAGEConv
import math import torch import torch.nn.functional as F from torch.nn import Parameter import torch.utils.data def uniform(size, tensor): bound = 1.0 / math.sqrt(size) if tensor is not None: tensor.data.uniform_(-bound, bound) class DenseSAGEConv(torch.nn.Module): """See :class:`torch_geometric...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import math from torch.nn imp...
rbshi/pytorch_geometric
DenseSAGEConv
false
4,180
[ "MIT" ]
0
fcfbad49219974689eb5c6e32365939ae09ace84
https://github.com/rbshi/pytorch_geometric/tree/fcfbad49219974689eb5c6e32365939ae09ace84
UnpoolingAsConvolution
# 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...
ColinKohler/ActionDyanmicsNetwork
UnpoolingAsConvolution
false
330
[ "MIT" ]
0
9cb6ffca111bfb1e1efb31cbac9201a98739a6ed
https://github.com/ColinKohler/ActionDyanmicsNetwork/tree/9cb6ffca111bfb1e1efb31cbac9201a98739a6ed
Conv2d
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import numpy as np import torch.utils.data import torch import torch.nn as nn im...
Rayhane-mamah/Efficient-VDVAE
Conv2d
false
8,682
[ "MIT" ]
41
07bcb8ba58c228ab0ed62c5cf374c19a10932010
https://github.com/Rayhane-mamah/Efficient-VDVAE/tree/07bcb8ba58c228ab0ed62c5cf374c19a10932010
IdentityMessage
import torch import torch.fx import torch.utils.data class IdentityMessage(torch.nn.Module): def __init__(self, raw_msg_dim: 'int', memory_dim: 'int', time_dim: 'int'): super(IdentityMessage, self).__init__() self.out_channels = raw_msg_dim + 2 * memory_dim + time_dim def forward(self, z_src...
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.fx import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynam...
HWSelf/pytorch_geometric
IdentityMessage
false
508
[ "MIT" ]
0
c1214de674079b5e39e57c045d0f844b60caf590
https://github.com/HWSelf/pytorch_geometric/tree/c1214de674079b5e39e57c045d0f844b60caf590
FloorModule
import torch class FloorModule(torch.nn.Module): def __init__(self): super(FloorModule, self).__init__() def forward(self, x): return torch.floor(x) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_c...
MichaelZhero/nncase
FloorModule
false
11,934
[ "Apache-2.0" ]
0
0fae6ce90d7adff386e1a286cd2b42422f4b850a
https://github.com/MichaelZhero/nncase/tree/0fae6ce90d7adff386e1a286cd2b42422f4b850a
PartialConv
# 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.a...
maayan-myheritage/3d-photo-inpainting
PartialConv
false
10,597
[ "MIT" ]
0
6293eecfeb55ceba019655723f6efe31e8ecb177
https://github.com/maayan-myheritage/3d-photo-inpainting/tree/6293eecfeb55ceba019655723f6efe31e8ecb177
ScaleNorm
# 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...
nvski/ST-TR
ScaleNorm
false
4,100
[ "MIT" ]
0
75aa9fb872af217f8616c01cee7ca6548846260b
https://github.com/nvski/ST-TR/tree/75aa9fb872af217f8616c01cee7ca6548846260b
Whitening2d
# 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 import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
DonkeyShot21/cassle
Whitening2d
false
8,000
[ "MIT" ]
13
d25f9c7cb5e822660dc1ef03e7fac09a33d0b1a8
https://github.com/DonkeyShot21/cassle/tree/d25f9c7cb5e822660dc1ef03e7fac09a33d0b1a8
MaxPool2dDynamicSamePadding
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
Kwongy/Pretrained-backbone-Pytorch
MaxPool2dDynamicSamePadding
false
2,478
[ "MIT" ]
0
1b24bb677e0fd420cce32715c1ead8f0c804d707
https://github.com/Kwongy/Pretrained-backbone-Pytorch/tree/1b24bb677e0fd420cce32715c1ead8f0c804d707
CAM_Module
from torch.nn import Module import torch import torch.utils.data import torch from torch.nn import Parameter from torch.nn import Softmax class CAM_Module(Module): """ Channel attention module""" def __init__(self, in_dim): super(CAM_Module, self).__init__() self.chanel_in = in_dim se...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
mlcb-jlu/wsMedSeg
CAM_Module
false
4,021
[ "MIT" ]
0
63bd1fd28583f11444f292f4b961870ea1b12635
https://github.com/mlcb-jlu/wsMedSeg/tree/63bd1fd28583f11444f292f4b961870ea1b12635
LRN
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dy...
VisionLearningGroup/CDS
LRN
false
18,040
[ "MIT" ]
7
5b3644c286f19f76acdc03c6f6021a6f6e4ec4fc
https://github.com/VisionLearningGroup/CDS/tree/5b3644c286f19f76acdc03c6f6021a6f6e4ec4fc
CCAMDec
# 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....
tousifulhaque/DANet
CCAMDec
false
4,464
[ "MIT" ]
0
1a0c91f0e551a071b5e335b4157313780a8a1b1a
https://github.com/tousifulhaque/DANet/tree/1a0c91f0e551a071b5e335b4157313780a8a1b1a
AtLocPlusCriterion
# 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 import torch.nn.init assert_size_stride = torch._C....
xunshengliuyin/ATwvo
AtLocPlusCriterion
false
4,611
[ "MIT" ]
0
7d8b7aeb7893cb59d48864a9a35f7de9dce084b4
https://github.com/xunshengliuyin/ATwvo/tree/7d8b7aeb7893cb59d48864a9a35f7de9dce084b4
ConvMeanPool
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn.functional as F import torch.nn as nn assert_size_stride = torch...
tsirif/cortex
ConvMeanPool
false
16,627
[ "BSD-3-Clause" ]
109
2837b220f9fb73279df3815bb18b274106412c08
https://github.com/tsirif/cortex/tree/2837b220f9fb73279df3815bb18b274106412c08
CaffeNormalize
# 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.utils.data import torch.nn as nn assert_size_stride = torch._C._dy...
cynthiamao98/DepthAwareCNN
CaffeNormalize
false
12,234
[ "MIT" ]
0
824cffaa4159e3dc7cc251a4a659e35c437bb92c
https://github.com/cynthiamao98/DepthAwareCNN/tree/824cffaa4159e3dc7cc251a4a659e35c437bb92c
FitNet
# 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_...
ahu-hpt/AOMD
FitNet
false
3,043
[ "Apache-2.0" ]
0
8d99dbb803feaef55fc089bfb3399d2fb21d55d8
https://github.com/ahu-hpt/AOMD/tree/8d99dbb803feaef55fc089bfb3399d2fb21d55d8
GatedConv2d
import torch import torch.nn as nn from torch.nn import Parameter def l2normalize(v, eps=1e-12): return v / (v.norm() + eps) class LayerNorm(nn.Module): def __init__(self, num_features, eps=1e-08, affine=True): super(LayerNorm, self).__init__() self.num_features = num_features 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.triton_helpers import libdevice, math as tl_math im...
autocomic/https-github.com-autocomic-DeepFillv2_Pytorch
GatedConv2d
false
3,147
[ "MIT" ]
0
7f6712a9b42dfd827879271f13856f1da5d6a032
https://github.com/autocomic/https-github.com-autocomic-DeepFillv2_Pytorch/tree/7f6712a9b42dfd827879271f13856f1da5d6a032
Clamp
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
kmiec96/mlhep-2021-baseline-track_1
Clamp
false
12,678
[ "Apache-2.0" ]
0
6fd2aa1529734204c522c49dba40fdc4b2bce353
https://github.com/kmiec96/mlhep-2021-baseline-track_1/tree/6fd2aa1529734204c522c49dba40fdc4b2bce353
LossPredictionLoss
# 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...
saksman/deepfish_adaptation
LossPredictionLoss
false
7,590
[ "MIT" ]
1
0413def87ec1d3cb67fa043a2fb60ef7e0d73539
https://github.com/saksman/deepfish_adaptation/tree/0413def87ec1d3cb67fa043a2fb60ef7e0d73539
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 import torch.utils assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dyna...
lorylei/DARTS-et
Swish
false
7,128
[ "Apache-2.0" ]
1
f22cfd53c14afd6ba602b8ecfbff9cdf77fc2ff8
https://github.com/lorylei/DARTS-et/tree/f22cfd53c14afd6ba602b8ecfbff9cdf77fc2ff8
ConvDropoutLayerNorm
import torch from torch import nn import torch.utils.checkpoint class SqueezeBertLayerNorm(nn.LayerNorm): """ This is a nn.LayerNorm subclass that accepts NCW data layout and performs normalization in the C dimension. N = batch C = channels W = sequence length """ def __init__(self, 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 from torch import n...
Clemens123/transformers
ConvDropoutLayerNorm
false
11,490
[ "Apache-2.0" ]
0
22abe7bbc587c16ec30f9d1aa549dcbeba6e9e26
https://github.com/Clemens123/transformers/tree/22abe7bbc587c16ec30f9d1aa549dcbeba6e9e26
GatedMultiHeadAttn
# 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....
HKUST-KnowComp/BMGF-RoBERTa
GatedMultiHeadAttn
false
8,216
[ "MIT" ]
16
8e9eebd7e9fb6cc2492131fc8eaa5b5b29d999fd
https://github.com/HKUST-KnowComp/BMGF-RoBERTa/tree/8e9eebd7e9fb6cc2492131fc8eaa5b5b29d999fd
Decoder
# 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 assert_size_stride = torch._C._dynamo.guards.as...
PanagiotisP/demucs
Decoder
false
11,799
[ "MIT" ]
0
d115d0773ca08a081f5b6bfe274cf0e4ed9e2677
https://github.com/PanagiotisP/demucs/tree/d115d0773ca08a081f5b6bfe274cf0e4ed9e2677
SelfAttentionLayer2
import math import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data import * class SelfAttentionLayer2(nn.Module): def __init__(self, dim, da): super(SelfAttentionLayer2, self).__init__() self.dim = dim self.Wq = nn.Parameter(torch.zeros(self.dim, self.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....
RUCAIBox/TG_CRS_Code
SelfAttentionLayer2
false
8,672
[ "Apache-2.0" ]
27
0428a3a069c4d0d4888f2d476dba2cafd7918524
https://github.com/RUCAIBox/TG_CRS_Code/tree/0428a3a069c4d0d4888f2d476dba2cafd7918524
GLU
import torch import torch.nn as nn import torch.nn.parallel import torch.onnx class GLU(nn.Module): def __init__(self): super(GLU, self).__init__() def forward(self, x): nc = x.size(1) assert nc % 2 == 0, 'channels dont divide 2!' nc = int(nc / 2) return x[:, :nc] * t...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.parallel import torch.onnx assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strid...
Nakachi-S/AttnGAN
GLU
false
869
[ "MIT" ]
0
2dfd1e38f78f2a58895d81131cd8c17e74dbacb2
https://github.com/Nakachi-S/AttnGAN/tree/2dfd1e38f78f2a58895d81131cd8c17e74dbacb2
SigmoidFocalClassificationLoss
import torch import torch.nn as nn class SigmoidFocalClassificationLoss(nn.Module): """ Sigmoid focal cross entropy loss. """ def __init__(self, gamma: 'float'=2.0, alpha: 'float'=0.25): """ Args: gamma: Weighting parameter to balance loss for hard and easy examples. ...
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...
Chuxwa/OpenPCDet
SigmoidFocalClassificationLoss
false
5,007
[ "Apache-2.0" ]
1
be064eafee68cb23f4bbe7decf2286ef13a94ebb
https://github.com/Chuxwa/OpenPCDet/tree/be064eafee68cb23f4bbe7decf2286ef13a94ebb
DQN
import random import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable class DQN(nn.Module): def __init__(self, state_dim, out_dim, capacity, bsz, epsilon): super().__init__() self.steps_done = 0 self.position = 0 self.pool = [] ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 random import torch.nn...
NeilWangziyu/torch_light
DQN
false
5,684
[ "MIT" ]
1
daf8fd62f57885cf182f1b3edc3152156d229ef3
https://github.com/NeilWangziyu/torch_light/tree/daf8fd62f57885cf182f1b3edc3152156d229ef3
PatchEmbed
import torch import torch.nn.functional as F import torch.nn as nn import torch._C import torch.serialization class PatchEmbed(nn.Module): """ Image to Patch Embedding Args: patch_size (tuple[int]): Patch token size. Default: (4, 4, 4). in_chans (int): Number of input image channels. Default:...
import torch from torch._inductor.select_algorithm import extern_kernels import 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._C import torch.serialization assert_size_str...
dkswxd/Swin-Transformer-Semantic-Segmentation
PatchEmbed
false
1,861
[ "Apache-2.0" ]
0
6af19736e5492a01d8952d4ee86a6d59b21c2ae1
https://github.com/dkswxd/Swin-Transformer-Semantic-Segmentation/tree/6af19736e5492a01d8952d4ee86a6d59b21c2ae1
QNetwork
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
andreaspts/DRL_CartPole
QNetwork
false
9,733
[ "MIT" ]
0
e4f018ab4adaeeaac2902c541e14933b56957e22
https://github.com/andreaspts/DRL_CartPole/tree/e4f018ab4adaeeaac2902c541e14933b56957e22
MyModel
import torch import torch.nn as nn class MyModel(nn.Module): def __init__(self): super(MyModel, self).__init__() def forward(self, x): return x + 1 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
blagojce95/ai-research-mamo-framework
MyModel
false
1,554
[ "Apache-2.0" ]
0
7f3b5a5a9fb8b19c9eef453b81b03b6046a33bf2
https://github.com/blagojce95/ai-research-mamo-framework/tree/7f3b5a5a9fb8b19c9eef453b81b03b6046a33bf2
NeuralNet
import torch import torch.nn as nn import torch.nn.functional as F class NeuralNet(nn.Module): def __init__(self, input_size, hidden_size, output_size): super(NeuralNet, self).__init__() self.layer1 = nn.Linear(input_size, hidden_size) self.layer2 = nn.Linear(hidden_size, hidden_size) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Silent-Zebra/sequential_social_dilemma_games
NeuralNet
false
2,842
[ "MIT" ]
0
8cf8faebf7de727bac55bd8020be7cd9cc243ccc
https://github.com/Silent-Zebra/sequential_social_dilemma_games/tree/8cf8faebf7de727bac55bd8020be7cd9cc243ccc
LossEnergy
import torch from torch import nn class WaveFunctionLoss(nn.Module): """Base class for all wave function loss functions. Any such loss must be derived from the local energy and wave function values, :math:`L(\\{E_\\text{loc}[\\psi],\\ln|\\psi|,w\\})`, using also importance-sampling weights *w*. ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
PKUfjh/deepqmc
LossEnergy
false
14,141
[ "MIT" ]
224
2a948ce712dd4e40568aa35931527e6c874eba73
https://github.com/PKUfjh/deepqmc/tree/2a948ce712dd4e40568aa35931527e6c874eba73
ShuffleBlock
import torch import torch.nn as nn class ShuffleBlock(nn.Module): def __init__(self, groups=2): super(ShuffleBlock, self).__init__() self.groups = groups def forward(self, x): """Channel shuffle: [N,C,H,W] -> [N,g,C/g,H,W] -> [N,C/g,g,H,w] -> [N,C,H,W]""" N, C, H, W = x.size(...
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...
AlexHoffman9/HAET-2021-competition-baseline-code
ShuffleBlock
false
11,164
[ "MIT" ]
0
1d71c94c68c9903854eceda6caf07442930caa44
https://github.com/AlexHoffman9/HAET-2021-competition-baseline-code/tree/1d71c94c68c9903854eceda6caf07442930caa44