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
VisErrorLossV13
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn.functi...
gathierry/FashionAI-KeyPointsDetectionOfApparel
VisErrorLossV13
false
15,462
[ "Apache-2.0" ]
174
2e0942b42b4a9cd974cdddc151675738dc8a8cb4
https://github.com/gathierry/FashionAI-KeyPointsDetectionOfApparel/tree/2e0942b42b4a9cd974cdddc151675738dc8a8cb4
OnnxSqrt
import torch from torch import nn class OnnxToTorchModule: """ Marker class for onnx2torch modules. """ pass class OnnxSqrt(nn.Module, OnnxToTorchModule): def forward(self, input_tensor: 'torch.Tensor') ->torch.Tensor: return torch.sqrt(input_tensor) def get_inputs(): return [torc...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
ENOT-AutoDL/onnx2torch
OnnxSqrt
false
13,631
[ "Apache-2.0" ]
144
2391987b3349bed1670ac3c1bc9062a37323abe3
https://github.com/ENOT-AutoDL/onnx2torch/tree/2391987b3349bed1670ac3c1bc9062a37323abe3
LinearDiag
import torch import torch.nn as nn class LinearDiag(nn.Module): def __init__(self, num_features, bias=False): super(LinearDiag, self).__init__() weight = torch.FloatTensor(num_features).fill_(1) self.weight = nn.Parameter(weight, requires_grad=True) if bias: bias = tor...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
qianrusun1015/E3BM-1
LinearDiag
false
7,511
[ "Apache-2.0" ]
1
d2c957bdff66fe28a288f1518f224a1e034d543f
https://github.com/qianrusun1015/E3BM-1/tree/d2c957bdff66fe28a288f1518f224a1e034d543f
MultiHeadAttention
import torch import torch.nn as nn class ScaledDotProductAttention(nn.Module): def __init__(self, temperature, dropout=0.1): super(ScaledDotProductAttention, self).__init__() self.temperature = temperature self.dropout = nn.Dropout(p=dropout) def forward(self, q, k, v, mask=None): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
wu0004in/vedastr
MultiHeadAttention
false
4,557
[ "Apache-2.0" ]
0
83511a408b68c264561a30daff5154cd0148bebd
https://github.com/wu0004in/vedastr/tree/83511a408b68c264561a30daff5154cd0148bebd
DiscShiftLoss
# 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...
hejm37/mmediting
DiscShiftLoss
false
12,481
[ "Apache-2.0" ]
0
d4086aaf8a36ae830f1714aad585900d24ad1156
https://github.com/hejm37/mmediting/tree/d4086aaf8a36ae830f1714aad585900d24ad1156
DQN
# 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_...
ulyssesdotcodes/ReaL-Crowds
DQN
false
4,466
[ "BSD-3-Clause" ]
0
9da01fe4d1858c3c26d6387e34f4e76db5385d51
https://github.com/ulyssesdotcodes/ReaL-Crowds/tree/9da01fe4d1858c3c26d6387e34f4e76db5385d51
PatchEmbeddings
from torch.nn import Module import torch from torch import nn import torch.utils.data import torch.nn.functional import torch.autograd class PatchEmbeddings(Module): """ <a id="PatchEmbeddings"> ## Get patch embeddings </a> The paper splits the image into patches of equal size and do a linear tra...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch.nn import Module from torch import nn import torch.utils.data import ...
ppvalluri09/annotated_deep_learning_paper_implementations
PatchEmbeddings
false
11,068
[ "MIT" ]
0
387b6dfd1ef1f6d295e9394c24b5798071d9a3e4
https://github.com/ppvalluri09/annotated_deep_learning_paper_implementations/tree/387b6dfd1ef1f6d295e9394c24b5798071d9a3e4
Simplenet
# 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.optim.lr_scheduler...
ChitienSun/NCTU_DLSR_final_project
Simplenet
false
293
[ "MIT" ]
0
9d647426c274afc7651ea4fe9a11f2a0a0fd1fba
https://github.com/ChitienSun/NCTU_DLSR_final_project/tree/9d647426c274afc7651ea4fe9a11f2a0a0fd1fba
SpaceToDepth
# 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 torchvision import datasets as datasets import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data.distr...
jasonnoy/COMP5329
SpaceToDepth
false
10,314
[ "MIT" ]
0
fc17c80b1ac41d788cc0a92d3a033dbe2f9b8b81
https://github.com/jasonnoy/COMP5329/tree/fc17c80b1ac41d788cc0a92d3a033dbe2f9b8b81
SiamusicLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import...
HongSungRae/SiamRec
SiamusicLoss
false
538
[ "MIT" ]
0
2ab3b973bc6503eeea66c15c563fdd75b8e5bea1
https://github.com/HongSungRae/SiamRec/tree/2ab3b973bc6503eeea66c15c563fdd75b8e5bea1
ConcatConv2d
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
BoyanJIANG/4D-Compositional-Representation
ConcatConv2d
false
7,867
[ "Apache-2.0" ]
12
64d5f4bbd6b8e6bc3bfd8f76736f6d468c71a73c
https://github.com/BoyanJIANG/4D-Compositional-Representation/tree/64d5f4bbd6b8e6bc3bfd8f76736f6d468c71a73c
AdaptiveAvgMaxPool2d
# 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 torchvision import datasets as datasets import torch.nn as nn import torch.nn.functi...
Alibaba-MIIL/ZS_SDL
AdaptiveAvgMaxPool2d
false
8,029
[ "MIT" ]
20
769fe4f57d2d458a7c4b5468a6395c9b296b1dad
https://github.com/Alibaba-MIIL/ZS_SDL/tree/769fe4f57d2d458a7c4b5468a6395c9b296b1dad
CoreNetwork
# 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_...
reinvantveer/topography-detection
CoreNetwork
false
10,707
[ "MIT" ]
0
b471dbaa1bc276584374ed3bb5382e2d63046611
https://github.com/reinvantveer/topography-detection/tree/b471dbaa1bc276584374ed3bb5382e2d63046611
Sampling
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
ICLab4DL/AWN
Sampling
false
1,890
[ "MIT" ]
0
48d6edd85eabd77e9bb410dc5f31f8f937c9a857
https://github.com/ICLab4DL/AWN/tree/48d6edd85eabd77e9bb410dc5f31f8f937c9a857
Attention
import math import torch import torch.nn.functional as F import torch.utils.data def restricted_softmax(src, dim: 'int'=-1, margin: 'float'=0.0): src_max = torch.clamp(src.max(dim=dim, keepdim=True)[0], min=0.0) out = (src - src_max).exp() out = out / (out.sum(dim=dim, keepdim=True) + (margin - src_max).e...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
EricAlcaide/pytorch_geometric
Attention
false
2,204
[ "MIT" ]
0
31cef566cfe22602459155fdf91e9b6ce398bfe7
https://github.com/EricAlcaide/pytorch_geometric/tree/31cef566cfe22602459155fdf91e9b6ce398bfe7
CNN_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....
Koukyosyumei/NAIST-Experiments
CNN_Net
false
17,551
[ "Apache-2.0" ]
4
2795f6d7f59e7881ba4fe08a37881b8c2b7b4498
https://github.com/Koukyosyumei/NAIST-Experiments/tree/2795f6d7f59e7881ba4fe08a37881b8c2b7b4498
Encoder
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dyn...
Weiyuhong-1998/DI-engine
Encoder
false
14,571
[ "Apache-2.0" ]
464
88658ea358298c6e61e95a454284b8853a3e9484
https://github.com/Weiyuhong-1998/DI-engine/tree/88658ea358298c6e61e95a454284b8853a3e9484
SimpleModel
import torch import torch.nn as nn import torch.onnx import torch.nn.functional as F class SimpleModel(nn.Module): def __init__(self): super(SimpleModel, self).__init__() self.conv1 = nn.Conv2d(3, 32, 3) self.conv2 = nn.Conv2d(32, 64, 3) self.conv3 = nn.Conv2d(64, 128, 3) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
PanJinquan/pytorch-base-trainer
SimpleModel
false
8,652
[ "MIT" ]
11
37799c948f72b2f9d3771ff469e06cdbff4a1d07
https://github.com/PanJinquan/pytorch-base-trainer/tree/37799c948f72b2f9d3771ff469e06cdbff4a1d07
Accuracy
# 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...
MachineLearningLifeScience/What-is-a-meaningful-representation-of-protein-sequences
Accuracy
false
17,667
[ "BSD-3-Clause" ]
4
2c24db6ee8763b0b6098d7509cf3325647931c11
https://github.com/MachineLearningLifeScience/What-is-a-meaningful-representation-of-protein-sequences/tree/2c24db6ee8763b0b6098d7509cf3325647931c11
Network
# 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....
Thytu/MLOPS
Network
false
11,940
[ "MIT" ]
0
08e07e8fbe7621da1407276f68dff2dbcc2d8097
https://github.com/Thytu/MLOPS/tree/08e07e8fbe7621da1407276f68dff2dbcc2d8097
CompositeActivation
import torch class CompositeActivation(torch.nn.Module): def forward(self, x): x = torch.atan(x) return torch.cat([x / 0.67, x * x / 0.6], 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 from torch._inductor.runtime.triton_helpers import libdevice assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_c...
nicofirst1/lucent
CompositeActivation
false
12,921
[ "Apache-2.0" ]
0
1e249918e91cc04117368826cd7a192bd8cf2046
https://github.com/nicofirst1/lucent/tree/1e249918e91cc04117368826cd7a192bd8cf2046
L2Norm
import torch import torch.nn as nn from math import sqrt as sqrt from itertools import product as product import torch.nn.init as init class L2Norm(nn.Module): def __init__(self, n_channels, scale): super(L2Norm, self).__init__() self.n_channels = n_channels self.gamma = scale or None ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn from math import sqrt as sqrt from itertools import produ...
ashwath007/amenity-detection
L2Norm
false
6,263
[ "Apache-2.0" ]
1
acb885eb4d791acc6e65237445a4fc6830e4d30c
https://github.com/ashwath007/amenity-detection/tree/acb885eb4d791acc6e65237445a4fc6830e4d30c
Mean
import torch from torchvision.datasets import * import torch.nn as nn from torchvision.transforms import * class Mean(nn.Module): def __init__(self, dim, keep_dim=False): super(Mean, self).__init__() self.dim = dim self.keep_dim = keep_dim def forward(self, input): return inp...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torchvision.datasets import * import torch.nn as nn from torchvision.transforms import * assert_size_stride = torch._C._dynamo.guards.a...
Womcos/SCARF
Mean
false
5,980
[ "MIT" ]
1
b90251bc23410cb810a7082ca75147a7aae21dec
https://github.com/Womcos/SCARF/tree/b90251bc23410cb810a7082ca75147a7aae21dec
HyperpriorSynthesis
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
ahmedfgad/high-fidelity-generative-compression
HyperpriorSynthesis
false
6,148
[ "Apache-2.0" ]
1
f3c6aa3472e3c629cbc35eefb0957119c913054a
https://github.com/ahmedfgad/high-fidelity-generative-compression/tree/f3c6aa3472e3c629cbc35eefb0957119c913054a
L2Norm
import torch import torch.nn as nn import torch._utils from math import sqrt as sqrt from itertools import product as product import torch.nn.init as init class L2Norm(nn.Module): def __init__(self, n_channels, scale): super(L2Norm, self).__init__() self.n_channels = n_channels self.gamma...
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 from math import sqrt as sqrt from it...
BingzheWu/ssd-pytorch
L2Norm
false
17,006
[ "MIT" ]
7
bc3f1f5473170082e3b01adb1f4e5d4fb7e0077e
https://github.com/BingzheWu/ssd-pytorch/tree/bc3f1f5473170082e3b01adb1f4e5d4fb7e0077e
BasicModel
import torch import torch.nn as nn import torch.nn.functional as F class BasicModel(nn.Module): def __init__(self) ->None: super().__init__() def forward(self, input): input = 1 - F.relu(1 - input) return input def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
LMdeLiangMi/captum
BasicModel
false
5,459
[ "BSD-3-Clause" ]
1
8bd9686013fe0ba8996e9b1cbeb0ea8e91512787
https://github.com/LMdeLiangMi/captum/tree/8bd9686013fe0ba8996e9b1cbeb0ea8e91512787
LRN
import torch import torch.nn as nn class LRN(nn.Module): def __init__(self, local_size=1, alpha=0.0001, beta=0.75, ACROSS_CHANNELS=False): super(LRN, self).__init__() self.ACROSS_CHANNELS = ACROSS_CHANNELS if self.ACROSS_CHANNELS: self.average = nn.AvgPool3d(kernel_siz...
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_...
PengJingchao/DFNet
LRN
false
937
[ "MIT" ]
0
49e83501f81515aebca211351e315896da7afc54
https://github.com/PengJingchao/DFNet/tree/49e83501f81515aebca211351e315896da7afc54
SSIM
# 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 ...
minjabenho/image2pcl
SSIM
false
7,242
[ "Apache-2.0" ]
1
7e696ee48edae30814d32f32e605ad6cf8bf702c
https://github.com/minjabenho/image2pcl/tree/7e696ee48edae30814d32f32e605ad6cf8bf702c
NegativeCosineSimilarity
# 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 assert_size_stride = torch._...
jianzhnie/self_supervised
NegativeCosineSimilarity
false
6,941
[ "Apache-2.0" ]
1
d1e0f31ab032150ab0ad007c1e19773135a5fb79
https://github.com/jianzhnie/self_supervised/tree/d1e0f31ab032150ab0ad007c1e19773135a5fb79
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....
Rajathbharadwaj/algorithmic-efficiency
MultiHeadAttention
false
14,274
[ "Apache-2.0" ]
49
47d2928836e0574bc54cc3ad58860dd4daf86cce
https://github.com/Rajathbharadwaj/algorithmic-efficiency/tree/47d2928836e0574bc54cc3ad58860dd4daf86cce
L1Loss
import torch import torch.nn.functional as F import torch.onnx class L1Loss(torch.nn.Module): """ L1 loss """ def __init__(self, **kwargs): super(L1Loss, self).__init__() self.loss_w = kwargs.get('loss_weight', 1) def forward(self, preds, gts): return F.l1_loss(preds.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.onnx asse...
usutdzxych/CenseoQoE
L1Loss
false
16,643
[ "BSD-3-Clause" ]
75
3f653296b223da6190e1e1781e7b9b54ff877102
https://github.com/usutdzxych/CenseoQoE/tree/3f653296b223da6190e1e1781e7b9b54ff877102
CRF
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.init assert_size_stride = torch._C._dynamo...
INK-USC/ConNet
CRF
false
8,271
[ "MIT" ]
11
adb299f160556004561df302c19578200bd3835b
https://github.com/INK-USC/ConNet/tree/adb299f160556004561df302c19578200bd3835b
Blur
import math import torch import torch.nn as nn import torch.nn.functional as F class SamePad(nn.Module): def __init__(self, filter_size, pad_mode='constant', **kwargs): super(SamePad, self).__init__() self.pad_size = [int((filter_size - 1) / 2.0), int(math.ceil(( filter_size - 1) / 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 import math import torch.nn as nn import torch.nn.functional as F assert_size_st...
kimfunn/spatial-smoothing
Blur
false
15,840
[ "Apache-2.0" ]
438
4f849d57c66c2dbdfaa56fc28727e95eddfd337c
https://github.com/kimfunn/spatial-smoothing/tree/4f849d57c66c2dbdfaa56fc28727e95eddfd337c
ValueNetwork
# 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_...
SAMMiCA/DL_based_E2E_Driving
ValueNetwork
false
17,871
[ "MIT" ]
4
01f7d74a0db7ed745cf27b9a1ebab0246015ecbd
https://github.com/SAMMiCA/DL_based_E2E_Driving/tree/01f7d74a0db7ed745cf27b9a1ebab0246015ecbd
GCN
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
CVIR/CoMix
GCN
false
7,907
[ "Apache-2.0" ]
13
593b5b3ba6e060018e4b55ab288dab71c2ee2e18
https://github.com/CVIR/CoMix/tree/593b5b3ba6e060018e4b55ab288dab71c2ee2e18
leakyrelu
# 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 @triton.jit def triton_poi_fused_leaky_relu_0(in_ptr...
yifanpu001/PytorchToCaffe
leakyrelu
false
4,716
[ "MIT" ]
0
37c1ebfc3547e93b1c174721036d03c831c60e48
https://github.com/yifanpu001/PytorchToCaffe/tree/37c1ebfc3547e93b1c174721036d03c831c60e48
MaskedConv1d
import torch import torch.nn as nn class MaskedConv1d(nn.Conv1d): def __init__(self, in_channels, out_channels, kernel_size, dilation=1, groups=1, bias=True, causal=True): if causal: padding = (kernel_size - 1) * dilation else: padding = (kernel_size - 1) * dilatio...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
lonePatient/TorchBlocks
MaskedConv1d
false
15,955
[ "MIT" ]
82
4a65d746cc8a396cb7df73ed4644d97ddf843e29
https://github.com/lonePatient/TorchBlocks/tree/4a65d746cc8a396cb7df73ed4644d97ddf843e29
BiAAttention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from torch.nn.parameter import Parameter assert_size_strid...
krishnamrith12/DCST
BiAAttention
false
12,790
[ "MIT" ]
0
7ba956d7e648aaeb25816ccfc709106db9293270
https://github.com/krishnamrith12/DCST/tree/7ba956d7e648aaeb25816ccfc709106db9293270
Net
import torch import torch.nn as nn class Net(nn.Module): def __init__(self, input_d): super(Net, self).__init__() self.fc1 = nn.Linear(input_d, int(input_d / 2)) def forward(self, x): x = torch.sigmoid(self.fc1(x)) return x def get_inputs(): return [torch.rand([4, 4, 4,...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
Tenoke/models
Net
false
9,517
[ "Apache-2.0" ]
0
84baffe34509d2f8b61689e043db2130fec8c171
https://github.com/Tenoke/models/tree/84baffe34509d2f8b61689e043db2130fec8c171
LSTMClassCriterion
import torch import torch.nn as nn def to_contiguous(tensor): if tensor.is_contiguous(): return tensor else: return tensor.contiguous() class LSTMClassCriterion(nn.Module): def __init__(self): super(LSTMClassCriterion, self).__init__() def forward(self, pred, target, mask):...
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...
LeoZDong/shape2prog
LSTMClassCriterion
false
11,641
[ "BSD-2-Clause" ]
0
2185d1d4eb7a1c4c55e644c6af477fd8e8e70241
https://github.com/LeoZDong/shape2prog/tree/2185d1d4eb7a1c4c55e644c6af477fd8e8e70241
MaxPoolBlock
# 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...
ZombaSY/DeepLPF
MaxPoolBlock
false
1,310
[ "BSD-3-Clause" ]
0
adce64ae01bc9e32f465a354cb1f6534f0d13597
https://github.com/ZombaSY/DeepLPF/tree/adce64ae01bc9e32f465a354cb1f6534f0d13597
DyIntraModalityUpdate
# 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....
TranTony/DFAF-for-VQA.pytorch
DyIntraModalityUpdate
false
11,964
[ "MIT" ]
0
eba1a893e8e5d3d8bf85078611b0bcf4d56eea86
https://github.com/TranTony/DFAF-for-VQA.pytorch/tree/eba1a893e8e5d3d8bf85078611b0bcf4d56eea86
LSoftLoss
# 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...
khodwe56/kaggle-birdsong-recognition
LSoftLoss
false
12,669
[ "MIT" ]
0
95a902c37355619cf02558968f000038e487db47
https://github.com/khodwe56/kaggle-birdsong-recognition/tree/95a902c37355619cf02558968f000038e487db47
ConvLayer
import torch import torch.nn as nn class ConvLayer(nn.Module): def __init__(self, in_channels=10, out_channels=10, kernel_size=5, pooling_size=3, padding='valid') ->None: super().__init__() self.conv1d = nn.Conv1d(in_channels=in_channels, out_channels= out_channels, kernel_siz...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
FabienRoger/Apnea-Detector-Interpretation
ConvLayer
false
11,427
[ "MIT" ]
0
96b95ea5e037d328386256feda53496d28609e81
https://github.com/FabienRoger/Apnea-Detector-Interpretation/tree/96b95ea5e037d328386256feda53496d28609e81
ConvFunc
import torch import torch.nn as nn class ConvFunc(nn.Module): """Convolutional block, non-ODE. Parameters ---------- device : torch.device img_size : tuple of ints Tuple of (channels, height, width). num_filters : int Number of convolutional filters. augment_dim: int ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
anway/augmented-neural-odes
ConvFunc
false
14,889
[ "MIT" ]
449
561cfa540ef292d117ba9cf083758281774f3f22
https://github.com/anway/augmented-neural-odes/tree/561cfa540ef292d117ba9cf083758281774f3f22
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....
Bachery/Shape-driven-Coordinate-Ordering
Attention
false
16,976
[ "MIT" ]
6
6afa933a882cbe7a40ddf1de169537eccfe415b7
https://github.com/Bachery/Shape-driven-Coordinate-Ordering/tree/6afa933a882cbe7a40ddf1de169537eccfe415b7
ClipLoss
# 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....
Vaishaal/open_clip
ClipLoss
false
1,186
[ "MIT" ]
0
8877c4036dacde022da90769c64006d9f2c82e84
https://github.com/Vaishaal/open_clip/tree/8877c4036dacde022da90769c64006d9f2c82e84
SelfAttentionPooling
import torch import torch.nn as nn class SelfAttentionPooling(nn.Module): """ Implementation of SelfAttentionPooling Original Paper: Self-Attention Encoding and Pooling for Speaker Recognition https://arxiv.org/pdf/2008.01077v1.pdf """ def __init__(self, input_dim): super(SelfAttentio...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
ana-kuznetsova/s3prl
SelfAttentionPooling
false
6,204
[ "Apache-2.0" ]
1
1fd3309f693f9cd765f56b12375ed0e7c41ef093
https://github.com/ana-kuznetsova/s3prl/tree/1fd3309f693f9cd765f56b12375ed0e7c41ef093
SimpleLogSoftmaxModel
# 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.jit impor...
YaronBenAtar/glow
SimpleLogSoftmaxModel
false
14,672
[ "Apache-2.0" ]
2,838
a13706a4239fa7eaf059c670dc573e3eb0768f86
https://github.com/YaronBenAtar/glow/tree/a13706a4239fa7eaf059c670dc573e3eb0768f86
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....
RUCAIBox/TG_CRS_Code
SelfAttentionLayer
false
8,675
[ "Apache-2.0" ]
27
0428a3a069c4d0d4888f2d476dba2cafd7918524
https://github.com/RUCAIBox/TG_CRS_Code/tree/0428a3a069c4d0d4888f2d476dba2cafd7918524
layer_1_to_1
import torch import numpy as np import torch.nn as nn def contractions_1_to_1(inputs, dim, normalization='inf', normalization_val=1.0 ): sum_all = torch.sum(inputs, dim=2).unsqueeze(dim=2) op1 = inputs op2 = torch.cat([sum_all for d in range(dim)], dim=2) if normalization is not None: if n...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import numpy as np import torch.nn as nn assert_size_stride = torch._C._dynamo.g...
HyTruongSon/InvariantGraphNetworks-PyTorch
layer_1_to_1
false
17,411
[ "Apache-2.0" ]
7
da9fdaa4f858d6fcae14b08a59d4b172a2aabaf8
https://github.com/HyTruongSon/InvariantGraphNetworks-PyTorch/tree/da9fdaa4f858d6fcae14b08a59d4b172a2aabaf8
Upconv
import math import torch import torch.nn.functional as F from torch.nn import Conv2d from torch.nn import Upsample class PadSameConv2d(torch.nn.Module): def __init__(self, kernel_size, stride=1): """ Imitates padding_mode="same" from tensorflow. :param kernel_size: Kernelsize of the convo...
import torch from torch._inductor.select_algorithm import extern_kernels import 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.functional as F from torch.nn import Conv2d from tor...
pc2005/MonoRec
Upconv
false
12,863
[ "MIT" ]
0
6e1628eeef9987b1acce3e5e8bb6a6a324fc8d2c
https://github.com/pc2005/MonoRec/tree/6e1628eeef9987b1acce3e5e8bb6a6a324fc8d2c
RankCrossEntropyLoss
import torch import torch.nn as nn import torch.nn.functional as F class RankCrossEntropyLoss(nn.Module): """Creates a criterion that measures rank cross entropy loss.""" __constants__ = ['num_neg'] def __init__(self, num_neg: 'int'=1): """ :class:`RankCrossEntropyLoss` constructor. ...
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 ...
Ambitioner-c/MatchZoo-py
RankCrossEntropyLoss
false
13,242
[ "Apache-2.0" ]
468
bb088edce8e01c2c2326ca1a8ac647f0d23f088d
https://github.com/Ambitioner-c/MatchZoo-py/tree/bb088edce8e01c2c2326ca1a8ac647f0d23f088d
ReluWithStats
import torch import torch.nn as nn import torch.nn.functional as F class ReluWithStats(nn.Module): def __init__(self): super(ReluWithStats, self).__init__() self.collect_preact = True self.avg_preacts = [] def forward(self, preact): if self.collect_preact: self.av...
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 ...
thudzj/SPAT
ReluWithStats
false
4,422
[ "MIT" ]
0
65632c157f40c05c9aee59080e26457bed5b484c
https://github.com/thudzj/SPAT/tree/65632c157f40c05c9aee59080e26457bed5b484c
AsymmetricLossMultiLabel
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
ChenMnZ/CF-ViT
AsymmetricLossMultiLabel
false
7,853
[ "Apache-2.0" ]
18
afc7ba54510cfbd410921a8b5eb5d6f0243718e7
https://github.com/ChenMnZ/CF-ViT/tree/afc7ba54510cfbd410921a8b5eb5d6f0243718e7
Net
import torch import torch.nn as nn class Net(nn.Module): def __init__(self): super(Net, self).__init__() self.conv1 = nn.Conv2d(kernel_size=5, in_channels=3, out_channels=3) self.pool1 = nn.MaxPool2d(kernel_size=2, stride=2) self.conv2 = nn.Conv2d(kernel_size=5, in_channels=3, out...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
pippinhio/image-recognition
Net
false
7,482
[ "MIT" ]
1
89569a0d66ae144d2f6e6f2d73a8577ef8b2272b
https://github.com/pippinhio/image-recognition/tree/89569a0d66ae144d2f6e6f2d73a8577ef8b2272b
ConvBlock
# 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 ...
CPJKU/audio_conditioned_unet
ConvBlock
false
7,857
[ "MIT" ]
20
68f20f5280079e99be260f9fe9933c0064eb2d7f
https://github.com/CPJKU/audio_conditioned_unet/tree/68f20f5280079e99be260f9fe9933c0064eb2d7f
LayerNorm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
NickSchoelkopf/SummerTime
LayerNorm
false
891
[ "Apache-2.0" ]
0
9a89aab8e1544e3c52c043b9c47ab325e665e11e
https://github.com/NickSchoelkopf/SummerTime/tree/9a89aab8e1544e3c52c043b9c47ab325e665e11e
RMSELoss
# 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 import ...
rgbayrak/multi-task-physio
RMSELoss
false
4,182
[ "MIT" ]
0
01ea98f26cc9b96ec94105d5213cb1ef93673c2c
https://github.com/rgbayrak/multi-task-physio/tree/01ea98f26cc9b96ec94105d5213cb1ef93673c2c
SEBlock
import torch from torch import nn import torch.nn.functional as F class HardSigmoid(nn.Module): def __init__(self, slope=0.2, offset=0.5): super().__init__() self.slope = slope self.offset = offset def forward(self, x): x = self.slope * x + self.offset x = F.threshold...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn import t...
Vivianyzw/Dual.DBNet.pytorch
SEBlock
false
1,193
[ "Apache-2.0", "MIT" ]
0
19d823ed7c05076c087a3f7ad1127c71c1c0d692
https://github.com/Vivianyzw/Dual.DBNet.pytorch/tree/19d823ed7c05076c087a3f7ad1127c71c1c0d692
PositionwiseFeedForward
import math import torch from torch import nn import torch.utils.checkpoint def gelu(x): return 0.5 * x * (1 + torch.tanh(math.sqrt(2 / math.pi) * (x + 0.044715 * torch.pow(x, 3)))) class PositionwiseFeedForward(nn.Module): """A two-layer Feed-Forward-Network with residual layer norm. 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 import math from to...
Clemens123/transformers
PositionwiseFeedForward
false
11,491
[ "Apache-2.0" ]
0
22abe7bbc587c16ec30f9d1aa549dcbeba6e9e26
https://github.com/Clemens123/transformers/tree/22abe7bbc587c16ec30f9d1aa549dcbeba6e9e26
BasicBlock
import torch import torch.utils.data import torch.nn as nn from collections import OrderedDict from torch.nn.functional import relu def conv3x3(in_planes, out_planes, stride=1): return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, padding=1, bias=False) class BasicBlock(nn.Module): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
suulkyy/GPM
BasicBlock
false
10,833
[ "MIT" ]
0
f094012a6ea6ea145bd100d1481a984783ae14dd
https://github.com/suulkyy/GPM/tree/f094012a6ea6ea145bd100d1481a984783ae14dd
MaxPool3x3
# 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...
VascoLopes/GEA
MaxPool3x3
false
18,024
[ "MIT" ]
4
ab80dbb9851dfc215102e5222e8d5f70e855dd15
https://github.com/VascoLopes/GEA/tree/ab80dbb9851dfc215102e5222e8d5f70e855dd15
UpscaleBlock
# 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...
grofit/traiNNer
UpscaleBlock
false
15,479
[ "Apache-2.0" ]
78
12d006fd44ed304e4178839c53b1f3d95ca25dcb
https://github.com/grofit/traiNNer/tree/12d006fd44ed304e4178839c53b1f3d95ca25dcb
GaussianFilter
import torch import torch.utils.data from torch import nn import torch.jit class GaussianFilter(nn.Module): def __init__(self, kernel_size=13, stride=1, padding=6): super(GaussianFilter, self).__init__() mean = (kernel_size - 1) / 2.0 variance = ((kernel_size - 1) / 6.0) ** 2.0 x_...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data from torch import nn import torch.jit assert_size_stride...
BlueAmulet/BasicSR
GaussianFilter
false
7,833
[ "Apache-2.0" ]
12
7040913d8659a05af4c2428feb71c260efbf1e9c
https://github.com/BlueAmulet/BasicSR/tree/7040913d8659a05af4c2428feb71c260efbf1e9c
PPMConcat
import torch import torch.nn as nn import torch._C import torch.serialization class PPMConcat(nn.ModuleList): """Pyramid Pooling Module that only concat the features of each layer. Args: pool_scales (tuple[int]): Pooling scales used in Pooling Pyramid Module. """ def __init__(sel...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch._C import torch.serialization assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strid...
HusterRC/mmsegmentation
PPMConcat
false
5,328
[ "Apache-2.0" ]
1
c3e4dbc2e06de3f47f75098f76772b4ee7e91e35
https://github.com/HusterRC/mmsegmentation/tree/c3e4dbc2e06de3f47f75098f76772b4ee7e91e35
USConv2d
import torch import torch.nn as nn import torch.utils def make_divisible(v, divisor=8, min_value=1): """ forked from slim: https://github.com/tensorflow/models/blob/ 0344c5503ee55e24f0de7f37336a6e08f10976fd/ research/slim/nets/mobilenet/mobilenet.py#L62-L69 """ if min_value is None: ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils assert_size_stride = torch._C._dynamo.g...
jameslong95/FasterSeg
USConv2d
false
6,918
[ "MIT" ]
1
872e04964ea46494a6018d9915cee5476e361c27
https://github.com/jameslong95/FasterSeg/tree/872e04964ea46494a6018d9915cee5476e361c27
HighwayMLP
import torch import torch.nn as nn class HighwayMLP(nn.Module): def __init__(self, input_size, gate_bias=-2, activation_function=nn. functional.relu, gate_activation=nn.functional.softmax): super(HighwayMLP, self).__init__() self.activation_function = activation_function self.gate...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
okcd00/glyce
HighwayMLP
false
10,676
[ "Apache-2.0" ]
0
010d88ac5cff4969308d2f8d105831ddcb352a02
https://github.com/okcd00/glyce/tree/010d88ac5cff4969308d2f8d105831ddcb352a02
SmallMnistNoDropoutWithPassThrough
# 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....
quic-akhobare/aimet
SmallMnistNoDropoutWithPassThrough
false
11,115
[ "BSD-3-Clause" ]
0
1811a0ef58a75d103e173731b436876ee5dc4c49
https://github.com/quic-akhobare/aimet/tree/1811a0ef58a75d103e173731b436876ee5dc4c49
RankingLoss
# 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...
alipay/Parameter_Inference_Efficient_PIE
RankingLoss
false
3,087
[ "Apache-2.0" ]
0
660add7705432a526aa3335fff3d8cf1c7d015a4
https://github.com/alipay/Parameter_Inference_Efficient_PIE/tree/660add7705432a526aa3335fff3d8cf1c7d015a4
Quantizer
# 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.quantization import torch.nn as nn import torch.utils.data assert_...
Orange-OpenSource/AIVC
Quantizer
false
8,632
[ "BSD-3-Clause" ]
18
8534111d1e08cdbf7efa92ebbb105af3c9044521
https://github.com/Orange-OpenSource/AIVC/tree/8534111d1e08cdbf7efa92ebbb105af3c9044521
PositionwiseFeedForward
# 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 ...
GraphGrailAi/summ-abs-dev
PositionwiseFeedForward
false
2,368
[ "MIT" ]
0
512f253bf72b6529589b29d06959b560b79f1cde
https://github.com/GraphGrailAi/summ-abs-dev/tree/512f253bf72b6529589b29d06959b560b79f1cde
AverageRC
# 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...
banwang27/models
AverageRC
false
12,141
[ "MIT" ]
0
59db29e46f76b630b78c864fb607388dd927b93c
https://github.com/banwang27/models/tree/59db29e46f76b630b78c864fb607388dd927b93c
FSM
import torch from torch import Tensor from torch import nn from torch.nn import functional as F class FSM(nn.Module): def __init__(self, c1, c2): super().__init__() self.conv_atten = nn.Conv2d(c1, c1, 1, bias=False) self.conv = nn.Conv2d(c1, c2, 1, bias=False) def forward(self, x: 'T...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
Genevievekim/semantic-segmentation-1
FSM
false
13,709
[ "BSD-3-Clause" ]
196
f28b026e44cff80fe3ca4cac94cea27e4073821b
https://github.com/Genevievekim/semantic-segmentation-1/tree/f28b026e44cff80fe3ca4cac94cea27e4073821b
BinaryLoss
# 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.functional as F assert_size_stride ...
DerekRay/2020-instanceSeg
BinaryLoss
false
7,952
[ "MIT" ]
25
a08ad95e64726db53cc32a5f90aaa13ae3cdb6a3
https://github.com/DerekRay/2020-instanceSeg/tree/a08ad95e64726db53cc32a5f90aaa13ae3cdb6a3
MultiHeadAttn
import torch import torch.nn as nn import torch.nn.functional as F def seq_dropout(x, p=0, training=False): """ x: batch * len * input_size """ if training is False or p == 0: return x dropout_mask = 1.0 / (1 - p) * torch.bernoulli((1 - p) * (x.new_zeros(x .size(0), x.size(2)) + 1)...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
CallMeSp/My_flowQA
MultiHeadAttn
false
214
[ "Apache-2.0" ]
0
87d82551f614b089771b22a1992e2be41a2995b3
https://github.com/CallMeSp/My_flowQA/tree/87d82551f614b089771b22a1992e2be41a2995b3
Classify
import torch import torch.nn as nn def autopad(k, p=None): if p is None: p = k // 2 if isinstance(k, int) else [(x // 2) for x in k] return p class Classify(nn.Module): def __init__(self, c1, c2, k=1, s=1, p=None, g=1): super().__init__() self.aap = nn.AdaptiveAvgPool2d(1) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Lalihoo/yolov5-detect
Classify
false
9,628
[ "MIT" ]
0
265c3137ea3586d913541501a1562488fbe59e9e
https://github.com/Lalihoo/yolov5-detect/tree/265c3137ea3586d913541501a1562488fbe59e9e
MultiSampleDropout
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
lonePatient/TorchBlocks
MultiSampleDropout
false
15,957
[ "MIT" ]
82
4a65d746cc8a396cb7df73ed4644d97ddf843e29
https://github.com/lonePatient/TorchBlocks/tree/4a65d746cc8a396cb7df73ed4644d97ddf843e29
WeightedMSELoss
import torch from torch import nn def assert_(condition, message='', exception_type=AssertionError): """Like assert, but with arbitrary exception types.""" if not condition: raise exception_type(message) class WeightedMSELoss(nn.Module): NEGATIVE_CLASS_WEIGHT = 1.0 def __init__(self, positi...
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 assert_...
krayyalasomayajula/inferno
WeightedMSELoss
false
3,949
[ "Apache-2.0" ]
0
1c56f34ff19c69dec3d3cb6287b659345bce3492
https://github.com/krayyalasomayajula/inferno/tree/1c56f34ff19c69dec3d3cb6287b659345bce3492
MidNet4
import torch import torch.nn as nn class MidNet4(nn.Module): def forward(self, x_in): """Network with dilation rate 4 :param x_in: input convolutional features :returns: processed convolutional features :rtype: Tensor """ x = self.lrelu(self.conv1(x_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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
DevilMayNotCry/My_curl
MidNet4
false
9,131
[ "BSD-3-Clause" ]
0
a8f65a3e58cbdeefb4679aa2f0c3d9d800b67381
https://github.com/DevilMayNotCry/My_curl/tree/a8f65a3e58cbdeefb4679aa2f0c3d9d800b67381
L1_Charbonnier_loss
import torch import torch.nn as nn import torch.utils.data class L1_Charbonnier_loss(nn.Module): """L1 Charbonnierloss.""" def __init__(self): super(L1_Charbonnier_loss, self).__init__() self.eps = 1e-06 def forward(self, X, Y): diff = torch.add(X, -Y) error = torch.sqrt(...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import...
AnonymityCode/FastLFnet
L1_Charbonnier_loss
false
16,921
[ "MIT" ]
8
cc4c1d9620fef5e75798f40084729d8d7fdd5a9a
https://github.com/AnonymityCode/FastLFnet/tree/cc4c1d9620fef5e75798f40084729d8d7fdd5a9a
Net2
import torch import numpy as np from torch import as_tensor from torch import no_grad import torch.nn as nn import torch.nn.functional as F import torch.optim as optim class AsModelNet(nn.Module): @staticmethod def chunk_it(xx): d = [] for x in xx: d.append(x) if len(d...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
firemark/eye-detector
Net2
false
3,500
[ "MIT" ]
0
1efc4ccd0f0fc5d52e16b130d336eefd14324a02
https://github.com/firemark/eye-detector/tree/1efc4ccd0f0fc5d52e16b130d336eefd14324a02
SimplifiedScaledDotProductAttention
import torch import numpy as np from torch import nn from torch.nn import init class SimplifiedScaledDotProductAttention(nn.Module): """ Scaled dot-product attention """ def __init__(self, d_model, h, dropout=0.1): """ :param d_model: Output dimensionality of the model :param ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
LiChengChen666/DetectDee
SimplifiedScaledDotProductAttention
false
9,820
[ "Apache-2.0" ]
0
1e6aaa0d15b1fc12d1342d8a922004e372b5f437
https://github.com/LiChengChen666/DetectDee/tree/1e6aaa0d15b1fc12d1342d8a922004e372b5f437
SLN
import torch import torch.nn as nn class SLN(nn.Module): """ Self-modulated LayerNorm """ def __init__(self, num_features): super(SLN, self).__init__() self.ln = nn.LayerNorm(num_features) self.gamma = nn.Parameter(torch.randn(1, 1, 1)) self.beta = nn.Parameter(torch.r...
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_...
nandkishore1/TransformersInVision
SLN
false
16,130
[ "MIT" ]
94
134ef26b63916d2b9ae384124de7365a97102b06
https://github.com/nandkishore1/TransformersInVision/tree/134ef26b63916d2b9ae384124de7365a97102b06
KDLoss
# 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...
Pre-release/BAKE
KDLoss
false
14,244
[ "MIT" ]
67
2899b38d556a9151f55079c1b9888d462369aec8
https://github.com/Pre-release/BAKE/tree/2899b38d556a9151f55079c1b9888d462369aec8
down
import torch import torch.nn.functional as F import torch.nn as nn class down(nn.Module): """ A class for creating neural network blocks containing layers: Average Pooling --> Convlution + Leaky ReLU --> Convolution + Leaky ReLU This is used in the UNet Class to create a UNet like NN architecture. ...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
Remosy/v2e
down
false
11,836
[ "MIT" ]
0
efc81cbcc113ca55d1631603323150be5ef8eb30
https://github.com/Remosy/v2e/tree/efc81cbcc113ca55d1631603323150be5ef8eb30
IAdd
import torch class IAdd(torch.nn.Module): def __init__(self): super(IAdd, self).__init__() def forward(self, x, y): x += y return x def get_inputs(): return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride @triton.jit def triton_poi_fused_add_0(in_ptr0, in_ptr1, out_ptr1, xnumel,...
PogChamper/torch2trt
IAdd
false
14,185
[ "MIT" ]
3,363
43b12627ec0de4d212efb6d02b07570205085ccc
https://github.com/PogChamper/torch2trt/tree/43b12627ec0de4d212efb6d02b07570205085ccc
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 from torch._inductor.select_algorithm import extern_kernels import 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 from collections impor...
pgplus1628/dgl
Discriminator
false
7,453
[ "Apache-2.0" ]
1
bf3994eea68b5841349f1616f41d0f70123a11ec
https://github.com/pgplus1628/dgl/tree/bf3994eea68b5841349f1616f41d0f70123a11ec
MaskedMSE
import torch import torch.nn as nn class MaskedMSE(nn.Module): def __init__(self): super(MaskedMSE, self).__init__() self.criterion = nn.MSELoss() def forward(self, input, target, gamma=2.0): mask = gamma * target / (target + 1e-07) self.loss = self.criterion(input * mask, ta...
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...
dhruvramani/MaskedMSE
MaskedMSE
false
12,262
[ "MIT" ]
0
76ff94add5659217a3f4f21e60a4f069defede29
https://github.com/dhruvramani/MaskedMSE/tree/76ff94add5659217a3f4f21e60a4f069defede29
CBAM_Module
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn from tor...
wangxing001/project-for-ReID
CBAM_Module
false
13,100
[ "MIT" ]
0
68a216dbbc7f7036fa72e49e1a806edc9b8e152d
https://github.com/wangxing001/project-for-ReID/tree/68a216dbbc7f7036fa72e49e1a806edc9b8e152d
MultinomialKLDivergenceLoss
import torch from torch import nn class MultinomialKLDivergenceLoss(nn.Module): def __init__(self): super().__init__() def forward(self, p_proba, q_proba): loss = q_proba * (torch.log(q_proba) - torch.log(p_proba)) loss = torch.sum(loss) return loss / (p_proba.size(1) * p_pro...
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...
AuCson/SEDST
MultinomialKLDivergenceLoss
false
7,714
[ "MIT" ]
23
1c1691e2abc50eb2120ed49c874090f6c4f741d3
https://github.com/AuCson/SEDST/tree/1c1691e2abc50eb2120ed49c874090f6c4f741d3
RPLHead
# 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...
Cogito2012/OpenTAL
RPLHead
false
7,909
[ "BSD-3-Clause" ]
16
a7ab938a52b3fb82163eb1ba5403888359eb7e6a
https://github.com/Cogito2012/OpenTAL/tree/a7ab938a52b3fb82163eb1ba5403888359eb7e6a
NegPearson
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data class NegPearson(nn.Module): def __init__(self): super(NegPearson, self).__init__() return def forward(self, preds, labels): loss = 0 for i in range(preds.shape[0]): ...
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.nn.parallel import torch.optim import torch....
Oichii/resnet3D_pulse
NegPearson
false
17,773
[ "MIT" ]
4
d123abfdb14eedc972ab1e0c4c3026fe8c4074af
https://github.com/Oichii/resnet3D_pulse/tree/d123abfdb14eedc972ab1e0c4c3026fe8c4074af
PartialViewPredictionModule
from _paritybench_helpers import _mock_config import torch import torch.nn as nn class PartialViewPredictionModule(nn.Module): def __init__(self, config, task_name, n_classes, activate=True): super(PartialViewPredictionModule, self).__init__() self.config = config self.projection = nn.Lin...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
Impavidity/relogic
PartialViewPredictionModule
false
8,803
[ "MIT" ]
24
f647106e143cd603b95b63e06ea530cdd516aefe
https://github.com/Impavidity/relogic/tree/f647106e143cd603b95b63e06ea530cdd516aefe
SentenceMatrixLayer
# 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...
Yottaxx/T-LSTM
SentenceMatrixLayer
false
18,155
[ "MIT" ]
9
92618d8c3ee2418b194a2e1592512548da955b77
https://github.com/Yottaxx/T-LSTM/tree/92618d8c3ee2418b194a2e1592512548da955b77
AveragePoolingLayer
import torch import torch.nn as nn from torch.nn import functional as F class AveragePoolingLayer(nn.Module): """Implements the average pooling layer. Basically, this layer can be used to downsample feature maps from spatial domain. """ def __init__(self, scale_factor=2): super().__init__() ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
Hsintien-Ng/idinvert_pytorch-reproduced
AveragePoolingLayer
false
8,239
[ "MIT" ]
20
cf3302510573138cf16202add06feae7c93624ea
https://github.com/Hsintien-Ng/idinvert_pytorch-reproduced/tree/cf3302510573138cf16202add06feae7c93624ea
BMNLoss
# 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 import device import triton import triton.language as tl from 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_ma...
giahaowjx/mmaction2
BMNLoss
false
10,339
[ "Apache-2.0" ]
0
4f95e9b91354acdcae768ce94e01d3821bba0154
https://github.com/giahaowjx/mmaction2/tree/4f95e9b91354acdcae768ce94e01d3821bba0154
MetaPathAttention
# 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....
Hui-Li/MCRec_PyTorch
MetaPathAttention
false
17,401
[ "MIT" ]
9
da4da77d2cade40c0a1961481c8e47ac396d12ee
https://github.com/Hui-Li/MCRec_PyTorch/tree/da4da77d2cade40c0a1961481c8e47ac396d12ee
Divide
# 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 import torch.utils.data import torch.utils.tensorboard._pytorch_graph import torch.onnx.symbolic_caffe2 assert_size_stride =...
Rohan-Chaudhury/aimet
Divide
false
17,960
[ "BSD-3-Clause" ]
3
1c38cac8cc0fd32dca40ce5e39940805d29f7a4a
https://github.com/Rohan-Chaudhury/aimet/tree/1c38cac8cc0fd32dca40ce5e39940805d29f7a4a
rpn_head
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C...
peckjon/detectorch
rpn_head
false
16,329
[ "Apache-2.0" ]
627
69d31250d79a72b12b7419638ef59163f833bbba
https://github.com/peckjon/detectorch/tree/69d31250d79a72b12b7419638ef59163f833bbba