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
chroma_subsampling
# 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...
Liamkuo/SAIR
chroma_subsampling
false
17,573
[ "MIT" ]
6
0fb289cd975b5a196b58e7d16bac00e31fd41d39
https://github.com/Liamkuo/SAIR/tree/0fb289cd975b5a196b58e7d16bac00e31fd41d39
KLDivergence
# 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 ...
HIT-cwh/mmrazor
KLDivergence
false
13,743
[ "Apache-2.0" ]
553
2dad24044d7f1dad88f20221f8fc071dd40fdd4f
https://github.com/HIT-cwh/mmrazor/tree/2dad24044d7f1dad88f20221f8fc071dd40fdd4f
My_loss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice from torch import nn as nn i...
wtomin/MIMA-Net
My_loss
false
16,732
[ "MIT" ]
58
c0330777313ac04b25e53b137dbecd78b5c8dde6
https://github.com/wtomin/MIMA-Net/tree/c0330777313ac04b25e53b137dbecd78b5c8dde6
ScalarMix
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
attardi/parser
ScalarMix
false
1,490
[ "MIT" ]
0
1978ba94ba649ad0a723d71bb2ca225c7e705702
https://github.com/attardi/parser/tree/1978ba94ba649ad0a723d71bb2ca225c7e705702
TripletMarginLoss
# 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...
jce2090/palmprint-recognition
TripletMarginLoss
false
3,713
[ "MIT" ]
0
d2d93c6817afe1b67650dae6516a3d180aaeca38
https://github.com/jce2090/palmprint-recognition/tree/d2d93c6817afe1b67650dae6516a3d180aaeca38
AffineConstantFlow
import torch import torch.nn as nn class AffineConstantFlow(nn.Module): """ Scales + Shifts the flow by (learned) constants per dimension. In NICE paper there is a Scaling layer which is a special case of this where t is None """ def __init__(self, dim, scale=True, shift=True): super()._...
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...
LamaLenny/DeepGenerativeModels
AffineConstantFlow
false
2,648
[ "MIT" ]
0
c2a40e4e71af844f8357da5267b1d017f762a235
https://github.com/LamaLenny/DeepGenerativeModels/tree/c2a40e4e71af844f8357da5267b1d017f762a235
BertPreTrainingHeads
# 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 ...
PKU-DAIR/2021_CCF_BDCI_LargeBERT_Rank1st
BertPreTrainingHeads
false
17,789
[ "Apache-2.0" ]
4
6382433cda69c655f03c3cc284dc076407f18dc9
https://github.com/PKU-DAIR/2021_CCF_BDCI_LargeBERT_Rank1st/tree/6382433cda69c655f03c3cc284dc076407f18dc9
FeedForward
import torch import torch.nn as nn import torch.nn.functional as F class FeedForward(nn.Module): def __init__(self, d_model, d_ff=2048, dropout=0.1): super().__init__() self.linear_1 = nn.Linear(d_model, d_ff) self.dropout = nn.Dropout(dropout) self.linear_2 = nn.Linear(d_ff, d_mo...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
AviVarma/torchASN-Transformer
FeedForward
false
88
[ "MIT" ]
0
55bccf4cdb099cd8e9ac99f5f87f989ce2add983
https://github.com/AviVarma/torchASN-Transformer/tree/55bccf4cdb099cd8e9ac99f5f87f989ce2add983
FocalLoss
import torch from torch import nn import torch.nn.functional as F class FocalLoss(nn.Module): def __init__(self, focusing_param=2, balance_param=0.25): super(FocalLoss, self).__init__() self.focusing_param = focusing_param self.balance_param = balance_param def forward(self, output, ...
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...
wanghao15536870732/plants_disease_classify
FocalLoss
false
4,521
[ "Apache-2.0" ]
0
6d0d1d39f0ec15fc2bd523142c5c403a1577da84
https://github.com/wanghao15536870732/plants_disease_classify/tree/6d0d1d39f0ec15fc2bd523142c5c403a1577da84
Net
# 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....
blockide/Chess-ML
Net
false
12,198
[ "MIT" ]
0
3b1572f715ed710f5ce240c76bb79ae8f186f32a
https://github.com/blockide/Chess-ML/tree/3b1572f715ed710f5ce240c76bb79ae8f186f32a
TreeLSTM
# 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 ...
Devin-Taylor/pytorch-dynamic-batching-benchmark
TreeLSTM
false
2,177
[ "Apache-2.0" ]
0
aaf913b13a77a2898dfdf8d92cd25b01789a548a
https://github.com/Devin-Taylor/pytorch-dynamic-batching-benchmark/tree/aaf913b13a77a2898dfdf8d92cd25b01789a548a
ps_FNNDenoiser
from torch.nn import Module import torch from torch.nn import Linear from torch.nn.init import xavier_normal_ from torch.nn.functional import relu class ps_FNNDenoiser(Module): def __init__(self, input_dim): """The FNN enc and FNN dec of the Denoiser. :param input_dim: The input dimensionality. ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch.nn import Module f...
ddcas/singing-language-identification
ps_FNNDenoiser
false
1,817
[ "MIT" ]
0
d104419b196d56d4de37cff47c32e88e28c58690
https://github.com/ddcas/singing-language-identification/tree/d104419b196d56d4de37cff47c32e88e28c58690
SimpleLeakyReluModule
import torch import torch.jit import torch.onnx import torch.nn class SimpleLeakyReluModule(torch.nn.Module): def __init__(self, negative_slope=0.01, inplace=False): super(SimpleLeakyReluModule, self).__init__() self.negative_slope = negative_slope self.inplace = inplace def forward(...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.jit import torch.onnx import torch.nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
YaronBenAtar/glow
SimpleLeakyReluModule
false
14,675
[ "Apache-2.0" ]
2,838
a13706a4239fa7eaf059c670dc573e3eb0768f86
https://github.com/YaronBenAtar/glow/tree/a13706a4239fa7eaf059c670dc573e3eb0768f86
Discriminator
import torch import torch.nn as nn import torch.nn.functional as F class Discriminator(nn.Module): def __init__(self, gen_out_dim): super().__init__() self.l1 = torch.nn.Linear(gen_out_dim, 256) self.l2 = torch.nn.Linear(256, 256) self.l3 = torch.nn.Linear(256, 256) self.l...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
Phutoast/Win-or-Learn-Fast
Discriminator
false
17,807
[ "MIT" ]
7
5a6b4ee0dee3bce87a2b75c90269ef431e54c2d7
https://github.com/Phutoast/Win-or-Learn-Fast/tree/5a6b4ee0dee3bce87a2b75c90269ef431e54c2d7
BasicModel2
import torch import torch.nn as nn import torch.nn.functional as F class BasicModel2(nn.Module): """ Example model one from the paper https://arxiv.org/pdf/1703.01365.pdf f(x1, x2) = RELU(ReLU(x1) - 1 - ReLU(x2)) """ def __init__(self) ->None: super().__init__() def forward(self...
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...
aravipati12/captum
BasicModel2
false
10,093
[ "BSD-3-Clause" ]
0
ef3e81d89c8c4404a49c384cf0727f2e7d393f5f
https://github.com/aravipati12/captum/tree/ef3e81d89c8c4404a49c384cf0727f2e7d393f5f
DiceLossWithLogits
import torch import torch.nn as nn import torch.utils.data def flatten_samples(input_): """ Flattens a tensor or a variable such that the channel axis is first and the sample axis is second. The shapes are transformed as follows: (N, C, H, W) --> (C, N * H * W) (N, C, D, H, W) --> (C, N * ...
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...
JonasHell/torch-em
DiceLossWithLogits
false
8,383
[ "MIT" ]
13
2e008e0cd2f0ea6681581374fce4f9f47b986d55
https://github.com/JonasHell/torch-em/tree/2e008e0cd2f0ea6681581374fce4f9f47b986d55
SKL
import torch import torch.nn as nn import torch.nn.functional as F class SKL(nn.Module): def __init__(self, epsilon=1e-08): super(SKL, self).__init__() self.epsilon = epsilon def forward(self, input, target): logit = input.view(-1, input.size(-1)).float() target = target.view...
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 ...
lonePatient/TorchBlocks
SKL
false
15,960
[ "MIT" ]
82
4a65d746cc8a396cb7df73ed4644d97ddf843e29
https://github.com/lonePatient/TorchBlocks/tree/4a65d746cc8a396cb7df73ed4644d97ddf843e29
Critic
import torch import torch.nn as nn import torch.nn.functional as F class Critic(nn.Module): def __init__(self, dim_input, dim_output): super(Critic, self).__init__() self._dim_input = dim_input self._dim_output = dim_output H_LAYER1 = 50 H_LAYER2 = 20 self.linear1 ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
cheng-xie/dpgfddagger
Critic
false
3,283
[ "MIT" ]
0
5264d5b9e0ab76fc9620da63bcfd78b25dadcbec
https://github.com/cheng-xie/dpgfddagger/tree/5264d5b9e0ab76fc9620da63bcfd78b25dadcbec
TemporalAttentionLayer
import torch import torch.nn as nn class TemporalAttentionLayer(nn.Module): """Single Graph Temporal Attention Layer :param n_features: number of input features/nodes :param window_size: length of the input sequence :param dropout: percentage of nodes to dropout :param alpha: negative slope used i...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
lawson-source/mtad-gat-pytorch
TemporalAttentionLayer
false
15,879
[ "MIT" ]
93
9e671ea99dedd82ac55f53e53af1d1b56c13ebff
https://github.com/lawson-source/mtad-gat-pytorch/tree/9e671ea99dedd82ac55f53e53af1d1b56c13ebff
MultiHeadAttention
import math import torch import torch.cuda from torch import nn import torch.distributed import torch.utils.data import torch.optim class MultiHeadAttention(nn.Module): """ Multi-head scaled dot-product attention layer. Args: hidden_size: size of the embeddings in the model, also known as d_model...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Oreoluwa1234/NeMo
MultiHeadAttention
false
9,717
[ "Apache-2.0" ]
0
b01e3ceed34efe31fd43866685dbdd19a6b30928
https://github.com/Oreoluwa1234/NeMo/tree/b01e3ceed34efe31fd43866685dbdd19a6b30928
InversePose
import torch import torch.nn as nn def inverse_pose(pose, eps=1e-06): """Function that inverts a 4x4 pose. Args: points (Tensor): tensor with poses. Returns: Tensor: tensor with inverted poses. Shape: - Input: :math:`(N, 4, 4)` - Output: :math:`(N, 4, 4)` Exampl...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
Wizaron/torchgeometry
InversePose
false
5,987
[ "Apache-2.0" ]
1
59a8d25dd811ded6a139d5c0c2442b06f43dc775
https://github.com/Wizaron/torchgeometry/tree/59a8d25dd811ded6a139d5c0c2442b06f43dc775
L1_Charbonnier_loss
import torch import torch.utils.data from torch.nn.modules.loss import _Loss class L1_Charbonnier_loss(_Loss): """ L1 Charbonnierloss """ def __init__(self, para): super(L1_Charbonnier_loss, self).__init__() self.eps = 0.001 def forward(self, X, Y): diff = torch.add(X, -Y...
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.utils.data from...
YDDDDG/3D2Unet
L1_Charbonnier_loss
false
6,002
[ "MIT" ]
1
daca056958fb2ae319dc18a350e04b3cefe0d99f
https://github.com/YDDDDG/3D2Unet/tree/daca056958fb2ae319dc18a350e04b3cefe0d99f
kernelPredictor
import torch import torch.nn as nn class kernelPredictor(nn.Module): def __init__(self, in_ch, hid_ch, pred_kernel_size=21): super(kernelPredictor, self).__init__() self.act = nn.ReLU() self.conv1 = nn.Conv2d(in_ch, hid_ch, kernel_size=1) self.conv2 = nn.Conv2d(hid_ch, pred_kernel...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
qbhan/pathembed
kernelPredictor
false
7,515
[ "MIT" ]
1
c21823529840593bf606e10696f5879e5adb51b2
https://github.com/qbhan/pathembed/tree/c21823529840593bf606e10696f5879e5adb51b2
SubjObjSpan
import torch import numpy as np from typing import Iterable from typing import Optional import torch.nn as nn def find_closest_span_pairs(head: 'Iterable', tail: 'Iterable', backtrace: 'Optional[bool]'=True): """ Find all span pairs. Args: head: list of start position predictions, either 1 or...
import torch from torch._inductor.select_algorithm import extern_kernels import 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 typing import Iterable from typing import Optional impor...
Spico197/REx
SubjObjSpan
false
17,945
[ "MIT" ]
4
bb3cdb845765a63e9bd18070068af52a1b2db3f3
https://github.com/Spico197/REx/tree/bb3cdb845765a63e9bd18070068af52a1b2db3f3
my_BinaryCross
# 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 ...
carsault/chord_sequence_prediction
my_BinaryCross
false
1,679
[ "MIT" ]
0
6eb539a963ca6350bcf0c88b8d8756775ad7c488
https://github.com/carsault/chord_sequence_prediction/tree/6eb539a963ca6350bcf0c88b8d8756775ad7c488
FeatLoss
# 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...
CityU-AIM-Group/SIGMA
FeatLoss
false
17,408
[ "MIT" ]
5
19f89777db8d42f750a9b87756d3326c7efd18f5
https://github.com/CityU-AIM-Group/SIGMA/tree/19f89777db8d42f750a9b87756d3326c7efd18f5
MaxOut
import torch import torch.nn as nn class MaxOut(nn.Module): def __init__(self, pool_size): super(MaxOut, self).__init__() self.pool_size = pool_size def forward(self, ipt): """ input: reduce_size: """ input_size = list(ipt.size()) assert input_...
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...
YuxiXie/Semantic-Graphs-for-Generating-Deep-Questions
MaxOut
false
14,698
[ "MIT" ]
62
6e5ef241c64b5b30a6ff54ddad31e610013b8388
https://github.com/YuxiXie/Semantic-Graphs-for-Generating-Deep-Questions/tree/6e5ef241c64b5b30a6ff54ddad31e610013b8388
Multi_Head_Attention
import torch import torch.nn as nn import torch.nn.functional as F class Scaled_Dot_Product_Attention(nn.Module): """Scaled Dot-Product Attention """ def __init__(self): super(Scaled_Dot_Product_Attention, self).__init__() def forward(self, Q, K, V, scale=None): """ Args: ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
Moon-xm/Chinese-Text-Classification-Pytorch
Multi_Head_Attention
false
11,725
[ "MIT" ]
0
19fe64006418bf4296f884e4d1f038c17b34d3de
https://github.com/Moon-xm/Chinese-Text-Classification-Pytorch/tree/19fe64006418bf4296f884e4d1f038c17b34d3de
Sum
import torch import torch.nn as nn import torch.utils.data class Sum(nn.Module): def __init__(self, n, weight=False): super(Sum, self).__init__() self.weight = weight self.iter = range(n - 1) if weight: self.w = nn.Parameter(-torch.arange(1.0, n) / 2, requires_grad=Tru...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C....
ChaokunChang/SVAS
Sum
false
254
[ "Apache-2.0" ]
0
61af6eb39269edff8ea5147311628b3200c3a3d2
https://github.com/ChaokunChang/SVAS/tree/61af6eb39269edff8ea5147311628b3200c3a3d2
SSE
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dyn...
ColinWine/Accurate-and-rapid-pulmonary-tuberculosis-diagnosis-system
SSE
false
303
[ "Apache-2.0" ]
0
7be433b3a495a7c4db2b850a79dc505e413909c4
https://github.com/ColinWine/Accurate-and-rapid-pulmonary-tuberculosis-diagnosis-system/tree/7be433b3a495a7c4db2b850a79dc505e413909c4
Encoder
import torch import torch.nn as nn import torch.nn.functional as F class Lambda(nn.Module): """An easy way to create a pytorch layer for a simple `func`.""" def __init__(self, func): """create a layer that simply calls `func` with `x`""" super().__init__() self.func = func def fo...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
eminem171333491/PaddleOCR2Pytorch
Encoder
false
3,471
[ "Apache-2.0" ]
0
ec466bb3a689eccb9290e9f80812a45301d3b030
https://github.com/eminem171333491/PaddleOCR2Pytorch/tree/ec466bb3a689eccb9290e9f80812a45301d3b030
GaussianNoise
import torch import torch.nn as nn class GaussianNoise(nn.Module): """A gaussian noise module. Args: stddev (float): The standard deviation of the normal distribution. Default: 0.1. Shape: - Input: (batch, *) - Output: (batch, *) (same shape as input) ...
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...
eezkni/UEGAN
GaussianNoise
false
15,285
[ "MIT" ]
73
a6616ac559819d487cae0f301d98cf2922a11a09
https://github.com/eezkni/UEGAN/tree/a6616ac559819d487cae0f301d98cf2922a11a09
SeperableConv
# 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_...
AksultanMukhanbet/proctoring_intellectual_part
SeperableConv
false
8,831
[ "MIT" ]
0
f85db9d31025cb57a732f64ab22358651bc93c69
https://github.com/AksultanMukhanbet/proctoring_intellectual_part/tree/f85db9d31025cb57a732f64ab22358651bc93c69
HeatmapLoss
import torch import torch.nn as nn import torch.utils.data import torch.nn.parallel import torch.optim import torch.utils.data.distributed import torch.multiprocessing class HeatmapLoss(nn.Module): def __init__(self): super().__init__() def forward(self, pred, gt, mask): assert pred.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 import torch.utils.data import torch.nn.parallel import torch.optim import torch.utils.data.distributed import torch.m...
chaowentao/DEKRv2
HeatmapLoss
false
3,280
[ "MIT" ]
0
e092c3eb10766b099a8a9681dc26f9eb781ec070
https://github.com/chaowentao/DEKRv2/tree/e092c3eb10766b099a8a9681dc26f9eb781ec070
MultiHeadAttention
import math import torch import torch.nn.functional as F from torch import nn class MultiHeadAttention(nn.Module): def __init__(self, heads, d_model, dropout=0.1): super().__init__() self.d_model = d_model self.d_k = d_model // heads self.h = heads self.q_linear = nn.Linea...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
HebatallaTarek/Empathy-Mental-Health
MultiHeadAttention
false
13,782
[ "BSD-3-Clause" ]
66
16e2a5f93aabd22803bb39805f8e76c8bea0ccf2
https://github.com/HebatallaTarek/Empathy-Mental-Health/tree/16e2a5f93aabd22803bb39805f8e76c8bea0ccf2
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_...
johnson7788/pymarl2
RNNAgent
false
3,907
[ "Apache-2.0" ]
0
8ec3e58fc3325ae82165cae0a5ea8a391ce42bd5
https://github.com/johnson7788/pymarl2/tree/8ec3e58fc3325ae82165cae0a5ea8a391ce42bd5
DownSample
import torch import torch.nn as M def DepthwiseConv(in_channels, kernel_size, stride, padding): return M.Conv2d(in_channels=in_channels, out_channels=in_channels, kernel_size=kernel_size, stride=stride, padding=padding, groups= in_channels, bias=False) def PointwiseConv(in_channels, out_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 import torch.nn as M assert_s...
SuperbTUM/RAW-image-denoising
DownSample
false
17,973
[ "MIT" ]
4
9f81be8da6a576f641022707d98b8c37f5c599ab
https://github.com/SuperbTUM/RAW-image-denoising/tree/9f81be8da6a576f641022707d98b8c37f5c599ab
L1Loss
import functools import torch import torch.nn.functional as F import torch.nn as nn def reduce_loss(loss, reduction): """Reduce loss as specified. Args: loss (Tensor): Elementwise loss tensor. reduction (str): Options are "none", "mean" and "sum". Return: Tensor: Reduced loss ten...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import functools impor...
ChHanXiao/mmdetection
L1Loss
false
9,145
[ "Apache-2.0" ]
0
324aa5a042857a9b57abe37385e1210709a20d02
https://github.com/ChHanXiao/mmdetection/tree/324aa5a042857a9b57abe37385e1210709a20d02
ycbcr_to_rgb_jpeg
# 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.nn as nn assert_size_stride = torch._C._dynamo.g...
DazhiZhong/DiffJPEG
ycbcr_to_rgb_jpeg
false
9,001
[ "MIT" ]
0
e20de92539f31a57906ae4c32a41dc46e774c316
https://github.com/DazhiZhong/DiffJPEG/tree/e20de92539f31a57906ae4c32a41dc46e774c316
SegmentalTransformerEncoder
# 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....
cmdowney88/XLSLM
SegmentalTransformerEncoder
false
3,302
[ "MIT" ]
0
7fe266bd0f0ad8a79a30052a18104b974d1c32e8
https://github.com/cmdowney88/XLSLM/tree/7fe266bd0f0ad8a79a30052a18104b974d1c32e8
HardSigmoid
import torch import torch.nn as nn class HardSigmoid(nn.Module): def __init__(self, bias=1.0, divisor=2.0, min_value=0.0, max_value=1.0): super(HardSigmoid, self).__init__() assert divisor != 0, 'divisor is not allowed to be equal to zero' self.bias = bias self.divisor = divisor ...
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...
DetectionBLWX/WSDDN.pytorch
HardSigmoid
false
17,216
[ "MIT" ]
7
05020d9d0445af90ba0af3f095aa12b18e3da7d2
https://github.com/DetectionBLWX/WSDDN.pytorch/tree/05020d9d0445af90ba0af3f095aa12b18e3da7d2
MSEloss_mod
# 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...
DemainWang/TP2Net
MSEloss_mod
false
11,337
[ "MIT" ]
0
ebdd509ac674c107de59062382a9f9d59f86b492
https://github.com/DemainWang/TP2Net/tree/ebdd509ac674c107de59062382a9f9d59f86b492
TSA_Fusion
# 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_...
CM-BF/FeatureFlow
TSA_Fusion
false
13,550
[ "MIT" ]
161
06642697922f17211e5faa353e24b1a0946885b1
https://github.com/CM-BF/FeatureFlow/tree/06642697922f17211e5faa353e24b1a0946885b1
ScaledDotProductAttention
import torch def masked_softmax(vector: 'torch.Tensor', mask: 'torch.Tensor', dim: 'int' =-1, memory_efficient: 'bool'=False, mask_fill_value: 'float'=-1e+32 ) ->torch.Tensor: """ https://github.com/allenai/allennlp/blob/b6cc9d39651273e8ec2a7e334908ffa9de5c2026/allennlp/nn/util.py#L231 ``torch.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 from torch._inductor.runtime....
IouJenLiu/AFK
ScaledDotProductAttention
false
5,347
[ "MIT" ]
1
db2b47bb3a5614b61766114b87f143e4a61a4a8d
https://github.com/IouJenLiu/AFK/tree/db2b47bb3a5614b61766114b87f143e4a61a4a8d
SiamFC
import torch import torch.nn as nn import torch.nn.functional as F class SiamFC(nn.Module): def __init__(self, out_scale=0.001): super(SiamFC, self).__init__() self.out_scale = out_scale def forward(self, z, x): return self._fast_xcorr(z, x) * self.out_scale def _fast_xcorr(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 import torch.nn as nn import torch.nn.functional as F assert_size_stride = torch...
LIANGKE23/Siamese-FC-KF-CF
SiamFC
false
17,608
[ "MIT" ]
10
3d9db19c0f39f0588a5061cd182bfbfc37dca76f
https://github.com/LIANGKE23/Siamese-FC-KF-CF/tree/3d9db19c0f39f0588a5061cd182bfbfc37dca76f
DenseCrossEntropy
import torch import torch.nn as nn import torch.nn.functional as F class DenseCrossEntropy(nn.Module): def __init__(self): super(DenseCrossEntropy, self).__init__() def forward(self, logits, labels): logits = logits.float() labels = labels.float() logprobs = F.log_softmax(log...
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 ...
LichenYang-Jeffrey/DCL-with-Efficient-B7
DenseCrossEntropy
false
17,569
[ "MIT" ]
4
84940c96a8c7926c630a7a6d5bfd5c6e52a57c2e
https://github.com/LichenYang-Jeffrey/DCL-with-Efficient-B7/tree/84940c96a8c7926c630a7a6d5bfd5c6e52a57c2e
KeyValueAttention
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import torch.nn.init class KeyValueAttention(nn.Module): def __init__(self, query_size, key_size, value_size, hid_size, init_range): super(KeyValueAttention, self).__init__() self.key2hid = nn.L...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
haojiepan1/CrossWOZ
KeyValueAttention
false
6,811
[ "Apache-2.0" ]
1
6d7b4c4cfb73a528b76074764687906abecc90b6
https://github.com/haojiepan1/CrossWOZ/tree/6d7b4c4cfb73a528b76074764687906abecc90b6
StyleEmbedAttention
# 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....
ishine/Comprehensive-Transformer-TTS
StyleEmbedAttention
false
15,622
[ "MIT" ]
147
dca252cae50a18464ce2410aa85a21c557c72d7a
https://github.com/ishine/Comprehensive-Transformer-TTS/tree/dca252cae50a18464ce2410aa85a21c557c72d7a
RMSELoss
import torch class RMSELoss(torch.nn.Module): def __init__(self, eps=1e-08): super(RMSELoss, self).__init__() self.eps = eps self.criterion = torch.nn.MSELoss() def forward(self, y_hat, y): return torch.sqrt(self.criterion(y_hat, y) + self.eps) def get_inputs(): return ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice assert_size_stride = torch._...
cvpr22sub7201/SpeechDrivenTongueAnimation
RMSELoss
false
6,500
[ "MIT" ]
1
82caf9d7f4331e039e3b2f0d31df6393d24ccb1c
https://github.com/cvpr22sub7201/SpeechDrivenTongueAnimation/tree/82caf9d7f4331e039e3b2f0d31df6393d24ccb1c
L2Norm
import torch class L2Norm(torch.nn.Module): def __init__(self): super(L2Norm, self).__init__() self.eps = 1e-10 def forward(self, x): norm = torch.sqrt(torch.sum(x * x, dim=1) + self.eps) if len(norm.size()) == 1: x = x / norm.unsqueeze(-1).expand_as(x) el...
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
L2Norm
false
2,778
[ "Apache-2.0" ]
0
19fa984b3bfde0e3b7acbce87dd40177cd64f9b0
https://github.com/RiyaoDong/HGSL/tree/19fa984b3bfde0e3b7acbce87dd40177cd64f9b0
DiceLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
manuelhz/dissertation
DiceLoss
false
3,972
[ "MIT" ]
0
ca89475f79505dfb6d8a3645ca85451df7fce3b6
https://github.com/manuelhz/dissertation/tree/ca89475f79505dfb6d8a3645ca85451df7fce3b6
DepthWiseSeparableConvBlock
import torch import torch.nn as nn class DepthWiseSeparableConvBlock(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, bias=True, padding_mode='zeros', inner_kernel_size=1, inner_stride=1, inner_padding=0): """Depthwise separable 2D Co...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
pppyykknen/LFDisplay-PyTorch
DepthWiseSeparableConvBlock
false
4,135
[ "MIT" ]
0
d19261dac1717a799bb5ba5f96563be1d2383340
https://github.com/pppyykknen/LFDisplay-PyTorch/tree/d19261dac1717a799bb5ba5f96563be1d2383340
Wav2Vec2ClassificationHead
# 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_...
HLasse/wav2vec_finetune
Wav2Vec2ClassificationHead
false
18,359
[ "MIT" ]
6
084ab432ba4acbf5ce81267e2791fb36a0b70daa
https://github.com/HLasse/wav2vec_finetune/tree/084ab432ba4acbf5ce81267e2791fb36a0b70daa
ResidualBlock
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
HuangCongQing/pytorch
ResidualBlock
false
8,231
[ "MIT" ]
12
2b2b01d74b45cbe4e467da229798609e79cec97c
https://github.com/HuangCongQing/pytorch/tree/2b2b01d74b45cbe4e467da229798609e79cec97c
SNNBlock
from torch.nn import Module import math import torch from torch.nn import SELU from torch.nn import AlphaDropout from torch.nn import Identity from torch.nn import Parameter from torch.nn.functional import conv2d class SNNBlock(Module): """Block for a self-normalizing fully-connected layer. This block consis...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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.nn impor...
rharish101/CIL-Project
SNNBlock
false
4,186
[ "MIT" ]
0
fed1be8b22bb4228329b719a301f74459a7bf13b
https://github.com/rharish101/CIL-Project/tree/fed1be8b22bb4228329b719a301f74459a7bf13b
NTM
from _paritybench_helpers import _mock_config import logging import torch import numpy as np from torch.nn import functional as F import torch.utils.data import torch.nn as nn class NTM(nn.Module): def __init__(self, opt, hidden_dim=500, l1_strength=0.001): super(NTM, self).__init__() self.input_...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Nullius-2020/TAKG-Paddle
NTM
false
14,423
[ "MIT" ]
130
7ebb5c4cdd1d2c68b1ca4a518b73c5e815fc5812
https://github.com/Nullius-2020/TAKG-Paddle/tree/7ebb5c4cdd1d2c68b1ca4a518b73c5e815fc5812
Attention
# 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....
Moymix/BERT-pytorch
Attention
false
5,599
[ "Apache-2.0" ]
1
f0b9c3ae53e05c00adcc761e0422e4222d8b5619
https://github.com/Moymix/BERT-pytorch/tree/f0b9c3ae53e05c00adcc761e0422e4222d8b5619
SpatialAttention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.utils.data from ...
ljjyxz123/CenterMask
SpatialAttention
false
7,112
[ "BSD-2-Clause" ]
1
443eebde30e209eeb3b953f7ef35d3f7f14aaca5
https://github.com/ljjyxz123/CenterMask/tree/443eebde30e209eeb3b953f7ef35d3f7f14aaca5
DeepContinuor
# 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_...
simonverret/deep_continuation
DeepContinuor
false
4,346
[ "MIT" ]
0
986bfba7f6806dc4869a023ff1fc1d0d18324b25
https://github.com/simonverret/deep_continuation/tree/986bfba7f6806dc4869a023ff1fc1d0d18324b25
RobertaHierarchyHead
# 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...
abrinkmann/productCategorization
RobertaHierarchyHead
false
18,216
[ "MIT" ]
5
75732e4b1c9da941a793db80b5fe2245bae45e87
https://github.com/abrinkmann/productCategorization/tree/75732e4b1c9da941a793db80b5fe2245bae45e87
MDNLayer
import torch from torch import nn from torch.nn import functional as F class MDNLayer(nn.Module): """ Mixture Density Network layer The input maps to the parameters of a Mixture of Gaussians (MoG) probability distribution, where each Gaussian has out_dim dimensions and diagonal covariance. If dim_wis...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
oatsu-gh/nnsvs
MDNLayer
false
16,206
[ "MIT" ]
298
510f37bc1d1f15282646e4d34435b5d63686cf40
https://github.com/oatsu-gh/nnsvs/tree/510f37bc1d1f15282646e4d34435b5d63686cf40
ACELoss
import torch import torch.nn as nn class ACELoss(nn.Module): """ Ref: [1] Aggregation Cross-Entropy for Sequence Recognition. CVPR-2019 """ def __init__(self, character, eps=1e-10): """ Args: character (dict): recognition dictionary eps (float): margin of erro...
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 ...
hikopensource/DAVAR-Lab-OCR
ACELoss
false
15,509
[ "Apache-2.0" ]
387
c65285f6668864cca7a12770ae4c8d083ea1cf1b
https://github.com/hikopensource/DAVAR-Lab-OCR/tree/c65285f6668864cca7a12770ae4c8d083ea1cf1b
L2loss
# 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...
Elameri/ivadomed
L2loss
false
9,295
[ "MIT" ]
0
76b5cea46f90f938aafd5ec26e072d559c764b43
https://github.com/Elameri/ivadomed/tree/76b5cea46f90f938aafd5ec26e072d559c764b43
ExternalAttention
# 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....
LiChengChen666/DetectDee
ExternalAttention
false
9,814
[ "Apache-2.0" ]
0
1e6aaa0d15b1fc12d1342d8a922004e372b5f437
https://github.com/LiChengChen666/DetectDee/tree/1e6aaa0d15b1fc12d1342d8a922004e372b5f437
DiceLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
zzz123xyz/pytorch-3dunet
DiceLoss
false
11,039
[ "MIT" ]
0
5bab6968b23cff5c6ae456b343285bfa9b104294
https://github.com/zzz123xyz/pytorch-3dunet/tree/5bab6968b23cff5c6ae456b343285bfa9b104294
Net
from torch.nn import Module import torch from torch.nn import Conv2d from torch.nn import Dropout2d from torch.nn import Linear from torch.nn.functional import relu from torch.nn.functional import max_pool2d from torch.nn.functional import log_softmax from torch import flatten class Net(Module): def __init__(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 from torch._inductor.runtime....
AhmetTavli/Olivetti-CNN
Net
false
11,237
[ "MIT" ]
0
174747382f17e02c0e5f964d08a449429ac6fbd8
https://github.com/AhmetTavli/Olivetti-CNN/tree/174747382f17e02c0e5f964d08a449429ac6fbd8
Similarity
# 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....
zhu-y11/multilingual_treelstm
Similarity
false
13,180
[ "MIT" ]
0
39c211f3c03db733f776aa8fe73cd615aaa47465
https://github.com/zhu-y11/multilingual_treelstm/tree/39c211f3c03db733f776aa8fe73cd615aaa47465
ResidualSequential
import torch import torch.optim import torch.nn as nn import torch.nn.init class ResidualSequential(nn.Sequential): def __init__(self, *args): super(ResidualSequential, self).__init__(*args) def forward(self, x): out = super(ResidualSequential, self).forward(x) x_ = None if o...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.optim import torch.nn as nn import torch.nn.init assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_...
ChongYou/robust-image-recovery
ResidualSequential
false
7,881
[ "MIT" ]
13
5bb23142509f307d31fd435de12787a70ec3a5bc
https://github.com/ChongYou/robust-image-recovery/tree/5bb23142509f307d31fd435de12787a70ec3a5bc
MLP
import torch from torch import Tensor from torch import nn class MLP(nn.Module): def __init__(self, dim, hidden_dim, out_dim=None) ->None: super().__init__() out_dim = out_dim or dim self.fc1 = nn.Conv2d(dim, hidden_dim, 1, 1, 0) self.act = nn.ReLU6(True) self.fc2 = 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 from torch._inductor.runtime import triton_helpers from torch import nn assert_s...
sithu31296/image_classification
MLP
false
16,459
[ "MIT" ]
57
6b8cbce96100225621cee3166a73e852ba216cc3
https://github.com/sithu31296/image_classification/tree/6b8cbce96100225621cee3166a73e852ba216cc3
PatchMerging
# 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 ...
billpsomas/ibot
PatchMerging
false
1,553
[ "Apache-2.0" ]
0
c6fbce7e2a59780f39ad7304ed9a8b1acf038d2d
https://github.com/billpsomas/ibot/tree/c6fbce7e2a59780f39ad7304ed9a8b1acf038d2d
SimpleModel
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
bratao/DeepSpeed
SimpleModel
false
6,359
[ "MIT" ]
1
c50d8955e942e5e26cf81835d59ec3f20ef8540d
https://github.com/bratao/DeepSpeed/tree/c50d8955e942e5e26cf81835d59ec3f20ef8540d
RegLoss
import torch import torch.nn as nn from itertools import product as product from math import sqrt as sqrt import torch.utils.data def _reg_loss(regr, gt_regr, mask): """ L1 regression loss Arguments: regr (batch x max_objects x dim) gt_regr (batch x max_objects x dim) mask (batch x max_objec...
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 ...
XiangLiK/cv_course
RegLoss
false
18,114
[ "MIT" ]
8
da7c2318fd4128bbdab96db26ddbb2524f37d0a0
https://github.com/XiangLiK/cv_course/tree/da7c2318fd4128bbdab96db26ddbb2524f37d0a0
Discriminator
# 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.utils.data import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C....
XrosLiang/GraphCL
Discriminator
false
6,003
[ "MIT" ]
1
fdf9fabcdaddbc17e5c8b7ac9e9d2bdfe4acc56c
https://github.com/XrosLiang/GraphCL/tree/fdf9fabcdaddbc17e5c8b7ac9e9d2bdfe4acc56c
GCNSynthetic
import math import torch import torch.nn.functional as F import torch.nn as nn from torch.nn.parameter import Parameter class GraphConvolution(nn.Module): """ Simple GCN layer, similar to https://arxiv.org/abs/1609.02907 """ def __init__(self, in_features, out_features, bias=True): super(Grap...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Armagaan/cf-gnnexplainer
GCNSynthetic
false
7,735
[ "MIT" ]
15
22b415e114c52d8d60ca45a40c3cb33c1947400c
https://github.com/Armagaan/cf-gnnexplainer/tree/22b415e114c52d8d60ca45a40c3cb33c1947400c
TorchDiv
# 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...
bunderhi/torch2trt
TorchDiv
false
1,612
[ "MIT" ]
0
fa5e31e742a0f0c9a9ee38909a6fa56bb07ba96d
https://github.com/bunderhi/torch2trt/tree/fa5e31e742a0f0c9a9ee38909a6fa56bb07ba96d
FocusLayer
import torch import torch.nn as nn class FocusLayer(nn.Module): def __init__(self, c1, c2, k=1): super(FocusLayer, self).__init__() def forward(self, x): return torch.cat([x[..., ::2], x[..., 1::2]], dim=1) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
OrigamiSL/TCCT2021-Neurocomputing-
FocusLayer
false
17,777
[ "Apache-2.0" ]
4
c98c7add5d68510db61f49038970d145393d42a5
https://github.com/OrigamiSL/TCCT2021-Neurocomputing-/tree/c98c7add5d68510db61f49038970d145393d42a5
NormalizeImages
import torch import torch.nn as nn class NormalizeImages(nn.Module): def __init__(self): super().__init__() def forward(self, x): flat = x.view(x.size(0), -1) mp = torch.mean(flat, dim=1) sp = torch.std(flat, dim=1) + 1e-07 return (x - mp.detach().unsqueeze(-1).unsque...
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_...
matteo-ronchetti/IKA
NormalizeImages
false
7,178
[ "MIT" ]
1
29d1752a059c3ab7659b332b72bf8c1506e7dd20
https://github.com/matteo-ronchetti/IKA/tree/29d1752a059c3ab7659b332b72bf8c1506e7dd20
ResNNFlow
# 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.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_...
nicola-decao/M-NAF-experiments-VAE
ResNNFlow
false
4,086
[ "MIT" ]
0
b8e127205e84d94ae50618e95734f20d259f7934
https://github.com/nicola-decao/M-NAF-experiments-VAE/tree/b8e127205e84d94ae50618e95734f20d259f7934
SigmoidFocalClassificationLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
ElodieShan/OpenPCDet
SigmoidFocalClassificationLoss
false
9,030
[ "Apache-2.0" ]
0
d23959d70c73b29f3f14462628fa8520a64f2eae
https://github.com/ElodieShan/OpenPCDet/tree/d23959d70c73b29f3f14462628fa8520a64f2eae
BuildBlock
# 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.functional as...
YacobBY/ICDAR2019-ArT-Recognition-Alchemy
BuildBlock
false
14,852
[ "MIT" ]
209
911c572c2aff4599a74b7974d46ef4cfb17078b9
https://github.com/YacobBY/ICDAR2019-ArT-Recognition-Alchemy/tree/911c572c2aff4599a74b7974d46ef4cfb17078b9
BinaryReg
import torch import torch.nn as nn import torch.utils.data class BinaryReg(nn.Module): """Regularization for encouraging the outputs to be binary. """ def __init__(self, alpha=1.0): super().__init__() self.alpha = alpha def forward(self, input): diff = input - 0.5 dif...
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 ...
pragyasingh7/pytorch_connectomics
BinaryReg
false
4,134
[ "MIT" ]
0
fdc8e1900b0a38d19ea50f78f8c81da2a4f015a9
https://github.com/pragyasingh7/pytorch_connectomics/tree/fdc8e1900b0a38d19ea50f78f8c81da2a4f015a9
Pooling
import torch import torch.nn as nn class Pooling(nn.Module): """ Implementation of pooling for PoolFormer --pool_size: pooling size """ def __init__(self, pool_size=3): super().__init__() self.pool = nn.AvgPool2d(pool_size, stride=1, padding=pool_size // 2, count_incl...
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...
TranNhiem/MVAR_SSL
Pooling
false
5,910
[ "MIT" ]
1
339964db4d40f06a92866675ff99ef67cd968cca
https://github.com/TranNhiem/MVAR_SSL/tree/339964db4d40f06a92866675ff99ef67cd968cca
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....
Jeffyrao/translate
MultiheadAttention
false
2,422
[ "BSD-3-Clause" ]
0
ab928e0b692f476c0a43ee7f9d0fbd3ecbada2b4
https://github.com/Jeffyrao/translate/tree/ab928e0b692f476c0a43ee7f9d0fbd3ecbada2b4
ExpModule
import torch import torch.nn as nn class ExpModule(nn.Module): def __init__(self): super(ExpModule, self).__init__() def forward(self, x): return torch.exp(x) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
SimonTreu/sdvae
ExpModule
false
1,096
[ "MIT" ]
0
e0270b9b2acf2d66eec93870f1c5633c8f04d9ab
https://github.com/SimonTreu/sdvae/tree/e0270b9b2acf2d66eec93870f1c5633c8f04d9ab
PointLoss
import torch import torch.nn as nn import torch.nn.parallel import torch.utils.data def array2samples_distance(array1, array2): """ arguments: array1: the array, size: (num_point, num_feature) array2: the samples, size: (num_point, num_feature) returns: distances: each entry is th...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.nn.parallel import torch.utils.data assert_size_stride...
DreamBlack/APCNet
PointLoss
false
385
[ "MIT" ]
0
d76bc9e46c3b631035c5c67e2367b6fb80621333
https://github.com/DreamBlack/APCNet/tree/d76bc9e46c3b631035c5c67e2367b6fb80621333
KLDLoss
# 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 ...
SebyakinAndrei/MichiGAN
KLDLoss
false
1,047
[ "MIT" ]
0
6584c9a106b33096f38e8f5b11d0320f7065fd26
https://github.com/SebyakinAndrei/MichiGAN/tree/6584c9a106b33096f38e8f5b11d0320f7065fd26
Clamp
import torch import torch.optim class Clamp(torch.nn.Module): min_value: 'float' max_value: 'float' def __init__(self, min_value: 'float'=0.0, max_value: 'float'=1.0): super(Clamp, self).__init__() self.min_value = min_value self.max_value = max_value def forward(self, x: '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 import torch.optim assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_...
ai-in-motion/moai
Clamp
false
18,321
[ "Apache-2.0" ]
10
e38cac046c059d2e2331ef4883bbabc5a500a5cf
https://github.com/ai-in-motion/moai/tree/e38cac046c059d2e2331ef4883bbabc5a500a5cf
QNet
# 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...
ven-kyoshiro/PILCO-1
QNet
false
10,966
[ "MIT" ]
0
61c4ef18a6bbecbeb6a10784a7925d31f46dd23b
https://github.com/ven-kyoshiro/PILCO-1/tree/61c4ef18a6bbecbeb6a10784a7925d31f46dd23b
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....
DocYard-ai/UCR
EncoderLayer
false
8,026
[ "Apache-2.0" ]
10
7618aa336f56e71d9fd8cdc2d591e3d138e3dc68
https://github.com/DocYard-ai/UCR/tree/7618aa336f56e71d9fd8cdc2d591e3d138e3dc68
_GLUBlock
import torch import torch.nn as nn import torch.nn.parallel import torch.utils.data class _GLUBlock(nn.Module): def __init__(self, n_c_in, n_c_out): super(_GLUBlock, self).__init__() self.pad = nn.ConstantPad1d((1, 2), 0) self.conv_data = nn.Conv1d(n_c_in, n_c_out, 4, stride=1, bias=True)...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
KaibinBao/neuralnilm-pytorch
_GLUBlock
false
17,530
[ "Apache-2.0" ]
4
017b85fc921f0638f93a0e16f615028f60b7d279
https://github.com/KaibinBao/neuralnilm-pytorch/tree/017b85fc921f0638f93a0e16f615028f60b7d279
AffineConstantFlow
import torch from torch import nn class AffineConstantFlow(nn.Module): """ Scales + Shifts the flow by (learned) constants per dimension. In NICE paper there is a Scaling layer which is a special case of this where t is None """ def __init__(self, dim, scale=True, shift=True): super().__...
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_...
JannerM/gamma-models
AffineConstantFlow
false
8,329
[ "MIT" ]
32
4b40d828bf228385c3081d359cdc3494d70de4a1
https://github.com/JannerM/gamma-models/tree/4b40d828bf228385c3081d359cdc3494d70de4a1
tofp16
# 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...
AnonymousAuthors444/VEC_VAD
tofp16
false
13,240
[ "MIT" ]
67
0072bf857030e621e2f9c12689407b81e45ed603
https://github.com/AnonymousAuthors444/VEC_VAD/tree/0072bf857030e621e2f9c12689407b81e45ed603
LogSoftMax
# 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 ...
mshmoon/siamrpn-lightweight
LogSoftMax
false
7,291
[ "MIT" ]
1
f6527e34c9eaaeb45817b12babd78ee73b1c7525
https://github.com/mshmoon/siamrpn-lightweight/tree/f6527e34c9eaaeb45817b12babd78ee73b1c7525
MAELoss
# 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 ...
anglixjtu/MSG_CHN_WACV20
MAELoss
false
14,841
[ "Apache-2.0" ]
61
6910894cf3caed2ffde27586f96b132b0c1d1a98
https://github.com/anglixjtu/MSG_CHN_WACV20/tree/6910894cf3caed2ffde27586f96b132b0c1d1a98
Keypoint3DLoss
# 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...
michael-p-sachen/ProHMR
Keypoint3DLoss
false
10,575
[ "BSD-3-Clause" ]
0
0167d05a9a45939a217d02b4ef8fd67977c15f82
https://github.com/michael-p-sachen/ProHMR/tree/0167d05a9a45939a217d02b4ef8fd67977c15f82
RPNHead
import torch import torch.nn.functional as F from torch import nn class RPNHead(nn.Module): def __init__(self, in_channels, num_anchors): super().__init__() self.conv = nn.Conv2d(in_channels, in_channels, 3, 1, 1) self.cls_logits = nn.Conv2d(in_channels, num_anchors, 1) self.bbox_...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
yokosyun/instance-segmentation
RPNHead
false
4,628
[ "MIT" ]
0
5779ae864b24c28300b0ddc4c314e63490215606
https://github.com/yokosyun/instance-segmentation/tree/5779ae864b24c28300b0ddc4c314e63490215606
ScaledDotProductAttention
import torch import numpy as np from torch import nn class ScaledDotProductAttention(nn.Module): """ Scaled Dot-Product Attention """ def __init__(self, temperature, attn_dropout=0.1): super().__init__() self.temperature = temperature self.dropout = nn.Dropout(attn_dropout) 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....
AutuanLiu/LeetCode2019
ScaledDotProductAttention
false
4,875
[ "MIT" ]
1
8efc7c5475fd888f7d86c3b08a3c1c9e55c1ac30
https://github.com/AutuanLiu/LeetCode2019/tree/8efc7c5475fd888f7d86c3b08a3c1c9e55c1ac30
CriticNet
# 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....
geektoni/AlphaNPI
CriticNet
false
3,534
[ "MIT" ]
0
ab48cb9cfb74f3960e264da4f3eb2d6917bfb9c9
https://github.com/geektoni/AlphaNPI/tree/ab48cb9cfb74f3960e264da4f3eb2d6917bfb9c9
CXLoss
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel import torch.utils.data class CXLoss(nn.Module): def __init__(self, sigma=0.1, b=1.0, similarity='consine'): super(CXLoss, self).__init__() self.similarity = similarity self.sigma = sigma s...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
drgripa1/deepvecfont
CXLoss
false
15,263
[ "MIT" ]
68
a44d81ba19a22e43b4e576cd8ebc5c2fd961a621
https://github.com/drgripa1/deepvecfont/tree/a44d81ba19a22e43b4e576cd8ebc5c2fd961a621
MultiheadAttention
import torch import torch.nn as nn import torch.nn.functional as F from torch.nn import Parameter class MultiheadAttention(nn.Module): def __init__(self, embed_dim, num_heads, attn_dropout=0.0, bias=True, add_bias_kv=False, add_zero_attn=False): """ Multi-headed attention. This module can...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
SCUT-IEL/CMAA
MultiheadAttention
false
11,845
[ "MIT" ]
0
1af9e7a7a75e754a7208e361d8128ef58b716941
https://github.com/SCUT-IEL/CMAA/tree/1af9e7a7a75e754a7208e361d8128ef58b716941