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
ShiftedSoftplus
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torch.utils.data assert_size_stride = torch._C._dynamo....
CFF-Dream/pytorch_geometric
ShiftedSoftplus
false
2,034
[ "MIT" ]
0
7c19ad74957409ee9e07314ce81524b3113b9c84
https://github.com/CFF-Dream/pytorch_geometric/tree/7c19ad74957409ee9e07314ce81524b3113b9c84
L2Norm
# 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.nn import Module ...
HAOCHENYE/Silent-Face-Anti-Spoofing-master-yehc
L2Norm
false
500
[ "Apache-2.0" ]
0
014c781d4109733f87a50b10d10508ba5e431581
https://github.com/HAOCHENYE/Silent-Face-Anti-Spoofing-master-yehc/tree/014c781d4109733f87a50b10d10508ba5e431581
BERTEmbedding3
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data from itertools import chain as chain import torch.hub class LearnedPositionalEmbedding(nn.Module): def __init__(self, d_model, max_len=512): super().__init__() pe = torch.zeros(max_len, d_model)...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data from itertools import chain as chain import torch....
EddieMG/LateTemporalModeling3DCNN
BERTEmbedding3
false
2,268
[ "MIT" ]
0
94c87dc1d31d09bc310d0e735a2e55453976cb0d
https://github.com/EddieMG/LateTemporalModeling3DCNN/tree/94c87dc1d31d09bc310d0e735a2e55453976cb0d
SHR_Block
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Vegetebird/MHFormer
SHR_Block
false
14,585
[ "MIT" ]
83
68d793414e13c256249431a45ac49949930c8e7f
https://github.com/Vegetebird/MHFormer/tree/68d793414e13c256249431a45ac49949930c8e7f
InnerProductNetwork
import torch import torch.utils.data class InnerProductNetwork(torch.nn.Module): def forward(self, x): """ :param x: Float tensor of size ``(batch_size, num_fields, embed_dim)`` """ num_fields = x.shape[1] row, col = list(), list() for i in range(num_fields - 1): ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_...
lipmedusea/pytorch
InnerProductNetwork
false
12,709
[ "MIT" ]
0
5d94694b9e1193a93dd7f75ea2042b5a1cf178bc
https://github.com/lipmedusea/pytorch/tree/5d94694b9e1193a93dd7f75ea2042b5a1cf178bc
Critic
import torch import numpy as np import torch.nn.functional as F import torch.nn as nn def hidden_init(layer): fan_in = layer.weight.data.size()[0] lim = 1.0 / np.sqrt(fan_in) return -lim, lim class Critic(nn.Module): """Critic (Value) Model.""" def __init__(self, state_size, action_size, seed, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import numpy as np import tor...
brabeem/deep-reinforcement-learning
Critic
false
12,187
[ "MIT" ]
0
aff919545a1b6d9d44f5aaaa13b9981c888e7169
https://github.com/brabeem/deep-reinforcement-learning/tree/aff919545a1b6d9d44f5aaaa13b9981c888e7169
ImgPatchConverter
import torch from torch import nn import torch as t class ImgPatchConverter(nn.Module): def __init__(self): super(ImgPatchConverter, self).__init__() def forward(self, x): x = t.flatten(x, start_dim=2) x = t.transpose(x, 1, 2).contiguous() return x def get_inputs(): ret...
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...
Asichurter/MalFusionFSL
ImgPatchConverter
false
16,977
[ "MIT" ]
4
713bf64cc07a3489f42941fd2299837075575ac0
https://github.com/Asichurter/MalFusionFSL/tree/713bf64cc07a3489f42941fd2299837075575ac0
Abs
import torch import torch.utils.data class Abs(torch.nn.Module): def __init__(self): super(Abs, self).__init__() def forward(self, input): return torch.abs(input) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.utils.data assert_size_stride = torch._C._dynamo.guards.asse...
CoraJung/flexible-input-slu
Abs
false
17,139
[ "Apache-2.0" ]
7
6a1a6bf105f1a0c07e8d483aa6da1df7a554392d
https://github.com/CoraJung/flexible-input-slu/tree/6a1a6bf105f1a0c07e8d483aa6da1df7a554392d
EQ
# 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...
NVIDIA-AI-IOT-private/torch2trt
EQ
false
10,502
[ "MIT" ]
0
953d60039e0c81e90eea467c3df2e6e3f7040242
https://github.com/NVIDIA-AI-IOT-private/torch2trt/tree/953d60039e0c81e90eea467c3df2e6e3f7040242
PolicyNetwork
# 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....
JieRen98/Popular-RL-Algorithms
PolicyNetwork
false
13,914
[ "Apache-2.0" ]
273
7f2bb74a51cf9cbde92a6ccfa42e97dc129dd145
https://github.com/JieRen98/Popular-RL-Algorithms/tree/7f2bb74a51cf9cbde92a6ccfa42e97dc129dd145
TimeEncode
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import numpy ...
linhthi/tgn
TimeEncode
false
12,711
[ "Apache-2.0" ]
0
bb83f82d89aba07d07da3b173803fb0df32ebbbc
https://github.com/linhthi/tgn/tree/bb83f82d89aba07d07da3b173803fb0df32ebbbc
NormalizeScaleController
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math assert_size_stride = t...
niloofar17/MetaDialog
NormalizeScaleController
false
16,181
[ "Apache-2.0" ]
204
d75b84a02807d53d9596e72c2f698e5a4f180369
https://github.com/niloofar17/MetaDialog/tree/d75b84a02807d53d9596e72c2f698e5a4f180369
CoordConvSinAct
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math from torch im...
xh-liu-tech/CIPS-3D
CoordConvSinAct
false
11,110
[ "MIT" ]
0
8910dfcf19bb86aab2287d652ae4e3666806b511
https://github.com/xh-liu-tech/CIPS-3D/tree/8910dfcf19bb86aab2287d652ae4e3666806b511
ShiftedSoftplus
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torch.utils.data assert_size_stride = torch._C._dynamo....
MINATILO/pytroch-geometric
ShiftedSoftplus
false
9,395
[ "MIT" ]
0
706aba3b4a6477a83a1fb73eb3cf0ee9661b70e4
https://github.com/MINATILO/pytroch-geometric/tree/706aba3b4a6477a83a1fb73eb3cf0ee9661b70e4
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 import torch.nn as nn from ma...
Sup3Legacy/TIPE
Net
false
2,868
[ "BSD-3-Clause" ]
0
7e01cef869183c4d609c45d5fcf0bb371a9579f5
https://github.com/Sup3Legacy/TIPE/tree/7e01cef869183c4d609c45d5fcf0bb371a9579f5
Linear_softmax
# 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....
Alfo5123/ConcreteDropout
Linear_softmax
false
16,866
[ "MIT" ]
7
c442871553e20a2de078c0fbac7fa52302d50abf
https://github.com/Alfo5123/ConcreteDropout/tree/c442871553e20a2de078c0fbac7fa52302d50abf
McDalNetLoss
# 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 ...
YBZh/MultiClassDA
McDalNetLoss
false
14,615
[ "MIT" ]
53
b0f61a5fe82f8b5414a14e8d77753fbf5d4bcb93
https://github.com/YBZh/MultiClassDA/tree/b0f61a5fe82f8b5414a14e8d77753fbf5d4bcb93
VisErrorLoss
import torch import torch.nn.functional as F from torch import nn class VisErrorLoss(nn.Module): def __init__(self): super(VisErrorLoss, self).__init__() def compute_l1_weighted_loss(self, hm_targets, hm_preds, vismap, ohem=1.0): """ :param hm_targets: [batch size, keypoint number, h...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn.functi...
gathierry/FashionAI-KeyPointsDetectionOfApparel
VisErrorLoss
false
15,426
[ "Apache-2.0" ]
174
2e0942b42b4a9cd974cdddc151675738dc8a8cb4
https://github.com/gathierry/FashionAI-KeyPointsDetectionOfApparel/tree/2e0942b42b4a9cd974cdddc151675738dc8a8cb4
EqualLinear
import math import torch from torch import nn from torch.nn import functional as F from torch.nn.functional import leaky_relu def fused_leaky_relu(input_, bias, negative_slope=0.2, scale=2 ** 0.5): return scale * leaky_relu(input_ + bias[:input_.shape[1]], negative_slope, inplace=True) class EqualLinear...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math from torch import nn from torch.nn.functional import leaky_relu asse...
jchetboun/anycost-gan
EqualLinear
false
10,388
[ "MIT" ]
0
7e0005e50b915e2dfeb90fe7a9846c5df38d7c06
https://github.com/jchetboun/anycost-gan/tree/7e0005e50b915e2dfeb90fe7a9846c5df38d7c06
EmissionModel
import torch from torch import nn import torch.distributions as tdist class EmissionModel(nn.Module): """ Emission Model of the HMM, it represents the probability of emitting an observation based on the current state """ def __init__(self): super(EmissionModel, self).__init__() self.d...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math from torch import nn import torch.distributions as tdist assert_size_stri...
ishine/Neural-HMM
EmissionModel
false
15,621
[ "MIT" ]
66
c0bc23ab88f831173d2d4db29a84503b80c5cdc4
https://github.com/ishine/Neural-HMM/tree/c0bc23ab88f831173d2d4db29a84503b80c5cdc4
LatentZ
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch import device from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math...
ekrell/learn-planning-space
LatentZ
false
3,467
[ "MIT" ]
0
730e448bffa4996b2b1ef3a5b00500dc172962ec
https://github.com/ekrell/learn-planning-space/tree/730e448bffa4996b2b1ef3a5b00500dc172962ec
Conv2d
import torch import numpy as np import torch.utils.data import torch import torch.nn as nn import torch.nn.init as init import torch.nn.functional as F def get_causal_padding(kernel_size, strides, dilation_rate, n_dims=2): p_ = [] for i in range(n_dims - 1, -1, -1): if strides[i] > 1 and dilation_rate...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import numpy as np import torch.utils.data import torch import torch.nn as nn im...
Rayhane-mamah/Efficient-VDVAE
Conv2d
false
8,682
[ "MIT" ]
41
07bcb8ba58c228ab0ed62c5cf374c19a10932010
https://github.com/Rayhane-mamah/Efficient-VDVAE/tree/07bcb8ba58c228ab0ed62c5cf374c19a10932010
focal_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.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
iMED-Lab/ROSE
focal_loss
false
15,568
[ "Apache-2.0" ]
64
8d99a2a06fc645410b1d388193b3148404e61230
https://github.com/iMED-Lab/ROSE/tree/8d99a2a06fc645410b1d388193b3148404e61230
WeightedSumLoss
# 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 from torchvision import models as models import torch.nn.parallel import torch.optim import torch.utils.data import tor...
JinYAnGHe/openvino_training_extensions
WeightedSumLoss
false
2,718
[ "Apache-2.0" ]
0
a0b4456a3c9fe6c1b7eabc9d5eb4e74d01453dee
https://github.com/JinYAnGHe/openvino_training_extensions/tree/a0b4456a3c9fe6c1b7eabc9d5eb4e74d01453dee
SimmatModule
# 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.triton_helpers import libdevice assert_size_stride ...
alpers/FlexNeuART
SimmatModule
false
12,082
[ "Apache-2.0" ]
0
2ae263f46b6eb2f1435b9073dad629a2fef23ab9
https://github.com/alpers/FlexNeuART/tree/2ae263f46b6eb2f1435b9073dad629a2fef23ab9
ScaledDotProductAttentionMemory
import torch import numpy as np import torch.nn as nn import torch.utils.data import torch.nn class ScaledDotProductAttentionMemory(nn.Module): """ Scaled dot-product attention with memory """ def __init__(self, d_model, d_k, d_v, h, m): """ :param d_model: Output dimensionality of th...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
GavinGuan95/Generative-VQA
ScaledDotProductAttentionMemory
false
5,226
[ "MIT" ]
1
0912e3a2426809ef4d4eb40bae667b31c2269161
https://github.com/GavinGuan95/Generative-VQA/tree/0912e3a2426809ef4d4eb40bae667b31c2269161
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 import torch.optim assert_size_stride = torch._C._dynamo....
Arvindkrishna1997/comet-dataset
LayerNorm
false
4,874
[ "Apache-2.0" ]
1
2cb42a4aefdea6d0e81f544f94830d44730e9853
https://github.com/Arvindkrishna1997/comet-dataset/tree/2cb42a4aefdea6d0e81f544f94830d44730e9853
AdaIN
import torch import torch.nn as nn class AdaIN(nn.Module): def __init__(self, style_dim, num_features): super().__init__() self.norm = nn.InstanceNorm2d(num_features, affine=False) self.fc = nn.Linear(style_dim, num_features * 2) def forward(self, x, s): h = self.fc(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.triton_helpers import libdevice import torch.nn as ...
fpaupier/stargan-v2
AdaIN
false
6,697
[ "MIT" ]
1
18d2e04ed6e6df963b84345e798d94383757aaa2
https://github.com/fpaupier/stargan-v2/tree/18d2e04ed6e6df963b84345e798d94383757aaa2
MyElementwiseModule
import torch import torch.nn.parallel import torch.utils.data import torch.onnx import torch.fx import torch.optim import torch.utils.data.distributed class MyElementwiseModule(torch.nn.Module): def forward(self, x, y): return x * y + y def get_inputs(): return [torch.rand([4, 4, 4, 4]), torch.rand...
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.parallel import torch.utils.data import torch.onnx import torch.fx import torch.optim import torch.utils.data.distributed as...
lenaguignard/examples
MyElementwiseModule
false
15,899
[ "BSD-3-Clause" ]
19,783
973e77b725a6028289a90170f0b237ea2e71d4f2
https://github.com/lenaguignard/examples/tree/973e77b725a6028289a90170f0b237ea2e71d4f2
SoftTargetCrossEntropy
import torch import torch.nn as nn import torch.nn.functional as F class SoftTargetCrossEntropy(nn.Module): def __init__(self): super(SoftTargetCrossEntropy, self).__init__() def forward(self, x: 'torch.Tensor', target: 'torch.Tensor' ) ->torch.Tensor: loss = torch.sum(-target * F.lo...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
Paddle-Team-7/PiT-Paddle-master
SoftTargetCrossEntropy
false
9,342
[ "Apache-2.0" ]
0
125268471ca34be3161cce5364c728341c3711e0
https://github.com/Paddle-Team-7/PiT-Paddle-master/tree/125268471ca34be3161cce5364c728341c3711e0
AddNorm
import torch from torch import nn class AddNorm(nn.Module): def __init__(self, features, dropout=0.0, **kwargs): super(AddNorm, self).__init__(**kwargs) self.dropout = nn.Dropout(dropout) self.ln = nn.LayerNorm(features) def forward(self, x, y): return self.ln(self.dropout(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.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
sudarshan85/transformer_tutorial
AddNorm
false
10,791
[ "MIT" ]
0
a7fc327f0d952d38b3f711fe21ba416616ba8d7e
https://github.com/sudarshan85/transformer_tutorial/tree/a7fc327f0d952d38b3f711fe21ba416616ba8d7e
ConvTemporalGraphical
# 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...
Levigty/AimCLR
ConvTemporalGraphical
false
8,439
[ "MIT" ]
25
6cd73767f17748792508647355fa324fa63e235d
https://github.com/Levigty/AimCLR/tree/6cd73767f17748792508647355fa324fa63e235d
GlobalAveragePool
# 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...
BeomyeolYu/symmetrizer
GlobalAveragePool
false
149
[ "MIT" ]
0
4617c82dc8ab05ac02ac50846799e0b820ff51ce
https://github.com/BeomyeolYu/symmetrizer/tree/4617c82dc8ab05ac02ac50846799e0b820ff51ce
CO2Regularizer
# 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._...
lightly-ai/lightly
CO2Regularizer
false
15,911
[ "MIT" ]
1,515
0b98bda640d13d842fd13f9354271d0cef116ba5
https://github.com/lightly-ai/lightly/tree/0b98bda640d13d842fd13f9354271d0cef116ba5
RobertaClassificationHead
from _paritybench_helpers import _mock_config import torch import torch.nn as nn class RobertaClassificationHead(nn.Module): """Head for sentence-level classification tasks.""" def __init__(self, config): super().__init__() self.dense = nn.Linear(config.hidden_size * 2, config.hidden_size) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
claudiosv/CodeBERT
RobertaClassificationHead
false
11,128
[ "MIT" ]
0
a276f5c2d2ea726837002f3d9f840e4bd1baa2aa
https://github.com/claudiosv/CodeBERT/tree/a276f5c2d2ea726837002f3d9f840e4bd1baa2aa
SkipConnection
import torch import torch.utils.data import torch.nn as nn def _init_weights(layer): """ Init weights of the layer :param layer: :return: """ nn.init.xavier_uniform_(layer.weight) if layer.bias is not None: nn.init.zeros_(layer.bias) class SkipConnection(nn.Module): """ C...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data import torch.nn as nn assert_size_stride = torch._C._dyn...
AntoBcc/benchmarking-gnns
SkipConnection
false
1,967
[ "MIT" ]
0
c5750054b2f4ba0822f203fa18d382f6a3b16542
https://github.com/AntoBcc/benchmarking-gnns/tree/c5750054b2f4ba0822f203fa18d382f6a3b16542
Squareplus
import torch import torch as t import torch.nn as nn class Squareplus(nn.Module): def __init__(self, a=2): super().__init__() self.a = a def forward(self, x): """The 'squareplus' activation function: has very similar properties to softplus, but is far cheaper computationally....
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_...
MaximeRobeyns/BDRL
Squareplus
false
838
[ "Apache-2.0" ]
0
55e295d5aaca6745d35525114b472ad118c14a6d
https://github.com/MaximeRobeyns/BDRL/tree/55e295d5aaca6745d35525114b472ad118c14a6d
TensorRepeat
# 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...
georand/distributedpytorch
TensorRepeat
false
10,063
[ "MIT" ]
0
69341b364830ad62968ea5646e485dff6b0b24f2
https://github.com/georand/distributedpytorch/tree/69341b364830ad62968ea5646e485dff6b0b24f2
PNet
# 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....
galbiati/mtcnn
PNet
false
3,525
[ "MIT" ]
0
6caa8e47ee6c7a01f6f990193129964a2d7e4b52
https://github.com/galbiati/mtcnn/tree/6caa8e47ee6c7a01f6f990193129964a2d7e4b52
Feedback
from _paritybench_helpers import _mock_config import torch import torch.nn as nn def weights_init(m): classname = m.__class__.__name__ if classname.find('Linear') != -1: m.weight.data.normal_(0.0, 0.02) if m.bias is not None: m.bias.data.fill_(0) elif classname.find('BatchNorm'...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
e96031413/tfvaegan
Feedback
false
10,096
[ "MIT" ]
0
4d0512c6ce98155b9e8ba37fbcf90d43cd5bbe90
https://github.com/e96031413/tfvaegan/tree/4d0512c6ce98155b9e8ba37fbcf90d43cd5bbe90
CosineLinear
import math import torch import torch.nn as nn import torch.nn.functional as F class CosineLinear(nn.Module): def __init__(self, in_features, out_features, sigma=True): super(CosineLinear, self).__init__() self.in_features = in_features self.out_features = out_features self.weight...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
QIU023/continual-learning-reproduce
CosineLinear
false
9,482
[ "MIT" ]
0
772faa6904b3488fa5deee14f03d86f3b3664a87
https://github.com/QIU023/continual-learning-reproduce/tree/772faa6904b3488fa5deee14f03d86f3b3664a87
FullyConnected
import torch import torch.nn as nn class FullyConnected(nn.Module): def __init__(self, hidden_size, output_size): super(FullyConnected, self).__init__() self.lrelu = nn.LeakyReLU(0.1) self.linear_layer = nn.Linear(hidden_size, output_size, bias=False) def forward(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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
qweas120/Active_VLN
FullyConnected
false
7,520
[ "MIT" ]
1
d5dabd5fe6127bcfec023b90f14a4ba5ac671f9b
https://github.com/qweas120/Active_VLN/tree/d5dabd5fe6127bcfec023b90f14a4ba5ac671f9b
Entmax15
from torch.autograd import Function import torch from torch import nn def _make_ix_like(X, dim): d = X.size(dim) rho = torch.arange(1, d + 1, device=X.device, dtype=X.dtype) view = [1] * X.dim() view[0] = -1 return rho.view(view).transpose(0, dim) def _roll_last(X, dim): if dim == -1: ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice from torch.autograd import F...
Sologa/awesome-align
Entmax15
false
14,428
[ "BSD-3-Clause" ]
173
62eaae7eac9bac06c10627fac6cc942c07a50e64
https://github.com/Sologa/awesome-align/tree/62eaae7eac9bac06c10627fac6cc942c07a50e64
SimpleMulModule
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.jit import torch.onnx import torch.nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
briancoutinho/glow
SimpleMulModule
false
12,588
[ "Apache-2.0" ]
0
4c919d60b3c33296c4109aec8020a1733c98f5b5
https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5
FixupResidualChain
import torch import numpy as np import torch as th import torch.utils.data import torch.nn as nn from collections import OrderedDict def _get_activation(activation): valid = ['relu', 'leaky_relu', 'lrelu', 'tanh', 'sigmoid'] assert activation in valid, 'activation should be one of {}'.format(valid) if act...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import numpy as np import tor...
sutkarsh/ttools
FixupResidualChain
false
10,939
[ "MIT" ]
0
a2e5fbf308566c0c54ab9d6ad1d9f8bc63f8fe99
https://github.com/sutkarsh/ttools/tree/a2e5fbf308566c0c54ab9d6ad1d9f8bc63f8fe99
FocalDiceLoss
import torch import torch.nn as nn class FocalDiceLoss(nn.Module): def __init__(self, gamma=2.0): super().__init__() self.gamma = gamma def forward(self, score, target): target = target.float() smooth = 1e-06 intersect = torch.sum(score * target) y_sum = torch...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert...
xuyangcao/AttD2UNet
FocalDiceLoss
false
11,046
[ "MIT" ]
0
b76ed8104a4183140b3cbd7f9671ca99d36e3b3e
https://github.com/xuyangcao/AttD2UNet/tree/b76ed8104a4183140b3cbd7f9671ca99d36e3b3e
DfAlphaLoss
import torch from torch import Tensor from typing import Optional from torch import nn from typing import Final class DfAlphaLoss(nn.Module): """Add a penalty to use DF for very noisy segments. Starting from lsnr_thresh, the penalty is increased and has its maximum at lsnr_min. """ factor: 'Final[flo...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch import Tens...
JinmingChe/DeepFilterNet
DfAlphaLoss
false
5,402
[ "ECL-2.0", "Apache-2.0", "MIT" ]
1
0e35a24c33c091b4c34afb3599f2945bf5e87adf
https://github.com/JinmingChe/DeepFilterNet/tree/0e35a24c33c091b4c34afb3599f2945bf5e87adf
SimpleCNN
# 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_...
AnweshCR7/autonomous_greenhouse
SimpleCNN
false
4,867
[ "MIT" ]
1
a29cfe37d0152001d2544216ed65c3472f572b4e
https://github.com/AnweshCR7/autonomous_greenhouse/tree/a29cfe37d0152001d2544216ed65c3472f572b4e
TensorClampMin
import torch class TensorClampMin(torch.nn.Module): def forward(self, x): return x.clamp_min(-0.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 import triton_helpers assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
ahangchen/torch2trt
TensorClampMin
false
6,107
[ "MIT" ]
1
53c663f0e0570ef7ffd6771354ae3478f63bd328
https://github.com/ahangchen/torch2trt/tree/53c663f0e0570ef7ffd6771354ae3478f63bd328
ResNetV2
# 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....
matsuolab/DomainBed
ResNetV2
false
7,630
[ "MIT" ]
1
00e0e3d183b36fd4d0c50442012149794a6504c2
https://github.com/matsuolab/DomainBed/tree/00e0e3d183b36fd4d0c50442012149794a6504c2
NasAvgPoolBlock
import torch import torch.nn as nn import torch.utils.data class NasAvgPoolBlock(nn.Module): """ NASNet specific 3x3 Average pooling layer with extra padding. Parameters: ---------- extra_padding : bool, default False Whether to use extra padding. """ def __init__(self, extra_pad...
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....
earhian/imgclsmob
NasAvgPoolBlock
false
6,625
[ "MIT" ]
1
c87c0942420876941868c016211073dec4392e4d
https://github.com/earhian/imgclsmob/tree/c87c0942420876941868c016211073dec4392e4d
GluMlp
import torch import torch.nn as nn import torch.utils.collect_env class GluMlp(nn.Module): """ MLP w/ GLU style gating See: https://arxiv.org/abs/1612.08083, https://arxiv.org/abs/2002.05202 """ def __init__(self, in_features, hidden_features=None, out_features=None, act_layer=nn.Sigmoid, dro...
import torch from torch._inductor.select_algorithm import extern_kernels import 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.collect_env assert_size_stride = torch....
HaotianUpenn/scatterbrain
GluMlp
false
13,748
[ "Apache-2.0" ]
49
c026128d7362ae627641d11d4e5627bc1f400eb1
https://github.com/HaotianUpenn/scatterbrain/tree/c026128d7362ae627641d11d4e5627bc1f400eb1
CReLU
import torch import torch.nn as nn import torch.nn.functional as F class CReLU(nn.Module): def __init__(self): super(CReLU, self).__init__() def forward(self, x): return torch.cat((F.leaky_relu(x, 0.01, inplace=True), F.leaky_relu (-x, 0.01, inplace=True)), 1) def get_inputs():...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
cnzeki/PSENet
CReLU
false
3,306
[ "Apache-2.0" ]
0
c7e0785404e12866171e9da678736abae9cdb8cb
https://github.com/cnzeki/PSENet/tree/c7e0785404e12866171e9da678736abae9cdb8cb
FocalLoss
import torch import torch.nn as nn class FocalLoss(nn.Module): def __init__(self, gamma=0): super(FocalLoss, self).__init__() self.gamma = gamma self.ce = torch.nn.CrossEntropyLoss() def forward(self, input, target): logp = self.ce(input, target) p = torch.exp(-logp) ...
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 ...
EnochMHforever/CCF-BDCI2019-Multi-person-Face-Recognition-Competition-Baseline-master
FocalLoss
false
11,418
[ "MIT" ]
0
5a1ac28dbfe1099f62e61975b0c1d7c43980e067
https://github.com/EnochMHforever/CCF-BDCI2019-Multi-person-Face-Recognition-Competition-Baseline-master/tree/5a1ac28dbfe1099f62e61975b0c1d7c43980e067
MyLinear
# 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...
NeuralBending/StyleCLIP
MyLinear
false
14,094
[ "MIT" ]
91
190d3a0d48823ccdbdd15c7f8af6e08703a6dbd8
https://github.com/NeuralBending/StyleCLIP/tree/190d3a0d48823ccdbdd15c7f8af6e08703a6dbd8
UNET
import torch import torch.nn as nn def concat(c1, c2): return torch.cat([c1, c2], dim=1) def conv1x1(in_c, out_c, k, s): return nn.ConvTranspose2d(in_c, out_c, kernel_size=k, stride=s) def conv3x3(in_c, out_c, k, s): return nn.Conv2d(in_c, out_c, kernel_size=k, stride=s) def cut(c1, c2): x1, y1 ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
TerenceChen95/Retina-Unet-Pytorch
UNET
false
18,067
[ "MIT" ]
5
fad5a9a0bcab5d81a0f1bb2537b9a2ead87828ca
https://github.com/TerenceChen95/Retina-Unet-Pytorch/tree/fad5a9a0bcab5d81a0f1bb2537b9a2ead87828ca
decoder4
import torch import torch.nn as nn class decoder4(nn.Module): def __init__(self): super(decoder4, self).__init__() self.reflecPad11 = nn.ReflectionPad2d((1, 1, 1, 1)) self.conv11 = nn.Conv2d(512, 256, 3, 1, 0) self.relu11 = nn.ReLU(inplace=True) self.unpool = nn.Upsampling...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
czczup/URST
decoder4
false
15,109
[ "Apache-2.0" ]
119
000ec9f7728f12ffad989ec1d07b1dd579514133
https://github.com/czczup/URST/tree/000ec9f7728f12ffad989ec1d07b1dd579514133
Backbone
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cu...
dmoebius-dm/prototorch_models
Backbone
false
3,435
[ "MIT" ]
0
71602bf38a09148eab13d98c9f89589b345ac570
https://github.com/dmoebius-dm/prototorch_models/tree/71602bf38a09148eab13d98c9f89589b345ac570
InnerProductModel
import torch class InnerProductModel(torch.nn.Module): @staticmethod def is_valid_model_type(model_type): raise NotImplementedError @staticmethod def get_model_from_type(model_type): raise NotImplementedError @property def loss_criterion(self): return torch.nn.MSELos...
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 reinterpret...
cuiboyuan/plato
InnerProductModel
false
15,084
[ "Apache-2.0" ]
135
260b785cbbf8588c92331d6343211ff72321f90e
https://github.com/cuiboyuan/plato/tree/260b785cbbf8588c92331d6343211ff72321f90e
MultiHeadedAttention
# 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....
Merterm/-Modeling-Intensification-for-SLG
MultiHeadedAttention
false
17,718
[ "MIT" ]
5
800fff3d3c7bacc86c1db8382f7c2e68d2f0c074
https://github.com/Merterm/-Modeling-Intensification-for-SLG/tree/800fff3d3c7bacc86c1db8382f7c2e68d2f0c074
FeatureCorrelation
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
swpang/xray-align-AR
FeatureCorrelation
false
13,015
[ "MIT" ]
0
43cb0173ada9d1d71a6a923d605cb6fdae4d27aa
https://github.com/swpang/xray-align-AR/tree/43cb0173ada9d1d71a6a923d605cb6fdae4d27aa
down_shifted_conv2d
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
VahidZee/PixelCnnPP
down_shifted_conv2d
false
2,947
[ "MIT" ]
0
b0d7bffb3cc18263e55d7851f60f5682ba09e5c2
https://github.com/VahidZee/PixelCnnPP/tree/b0d7bffb3cc18263e55d7851f60f5682ba09e5c2
L1CosineSim
import torch import torch.nn as nn class L1CosineSim(nn.Module): """ L1 loss with Cosine similarity. Can be used to replace L1 pixel loss, but includes a cosine similarity term to ensure color correctness of the RGB vectors of each pixel. lambda is a constant factor that adjusts the contribution of 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 from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
grofit/traiNNer
L1CosineSim
false
15,467
[ "Apache-2.0" ]
78
12d006fd44ed304e4178839c53b1f3d95ca25dcb
https://github.com/grofit/traiNNer/tree/12d006fd44ed304e4178839c53b1f3d95ca25dcb
AELoss
# 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...
houweidong/FCOS
AELoss
false
3,618
[ "BSD-2-Clause" ]
0
ad7d5e5d1b162398af408a9635ce8a2012f7db8a
https://github.com/houweidong/FCOS/tree/ad7d5e5d1b162398af408a9635ce8a2012f7db8a
CharbonnierPenalty
import torch import torch.utils.data import torch.nn as nn class CharbonnierPenalty(nn.Module): def __init__(self, n=0.001, total_variation=False, lam=1e-06, per_pixel =False): super().__init__() self.n = n self.total_variation = total_variation self.lam = lam 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 from torch._inductor.runtime.triton_helpers import libdevice import torch.utils.data impo...
ChristinaRunkel/HighSpeedImaging
CharbonnierPenalty
false
5,012
[ "MIT" ]
1
392437e6c1f4b125fc4771c98b16c85155684d09
https://github.com/ChristinaRunkel/HighSpeedImaging/tree/392437e6c1f4b125fc4771c98b16c85155684d09
NestedNetInnerModule
# 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 typing import Counter from collections import Counter...
johnanthonyjose/fvcore
NestedNetInnerModule
false
15,723
[ "Apache-2.0" ]
1,137
af30fd4028553c1d1e4e5d389f309f52e046e67d
https://github.com/johnanthonyjose/fvcore/tree/af30fd4028553c1d1e4e5d389f309f52e046e67d
BasicGraphConvolutionLayer
# 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.nn.parameter import Parameter assert_size_stride = torch._C._dynamo.g...
mbrukman/machine-learning-book
BasicGraphConvolutionLayer
false
7,183
[ "MIT" ]
1
f29a0f8aafa63a77081f3bcec68866e33dd41776
https://github.com/mbrukman/machine-learning-book/tree/f29a0f8aafa63a77081f3bcec68866e33dd41776
IdentityMessage
# 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.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_...
yinyee/pytorch_geometric
IdentityMessage
false
4,619
[ "MIT" ]
0
c61469c761b279047f162d2baba75f8c2155eb7a
https://github.com/yinyee/pytorch_geometric/tree/c61469c761b279047f162d2baba75f8c2155eb7a
HLoss
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch.nn.functional as F class HLoss(nn.Module): def __init__(self): super(HLoss, self).__init__() def forward(self, x): b = F.softmax(x, dim=1) * F.log_softmax(x, dim=1) b =...
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 ...
jfc43/robust-ood-detection
HLoss
false
15,686
[ "Apache-2.0" ]
55
fbeb63017f44b16b2911e61a1f7b7982a2621ee5
https://github.com/jfc43/robust-ood-detection/tree/fbeb63017f44b16b2911e61a1f7b7982a2621ee5
make_residual_dense_ver2
import torch import torch.nn as nn import torch.nn.functional as F class make_residual_dense_ver2(nn.Module): def __init__(self, nChannels, nChannels_, growthRate, kernel_size=3): super(make_residual_dense_ver2, self).__init__() if nChannels == nChannels_: self.conv = nn.Conv2d(nChann...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
BJTU-MIMO/Channel_estimation_MRDN
make_residual_dense_ver2
false
129
[ "MIT" ]
0
f41972998a5403c901bc3e5d68d4acd05e9a7f6c
https://github.com/BJTU-MIMO/Channel_estimation_MRDN/tree/f41972998a5403c901bc3e5d68d4acd05e9a7f6c
FocalLoss
# 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...
taconite/PTF
FocalLoss
false
16,524
[ "MIT" ]
62
a8789c9f752aea2944c2a75e04cc2aa21c7e4a00
https://github.com/taconite/PTF/tree/a8789c9f752aea2944c2a75e04cc2aa21c7e4a00
Attention
import torch import torch.nn as nn import torch.nn.functional as F class Attention(nn.Module): def __init__(self, device, hidden_size): super(Attention, self).__init__() self.device = device self.hidden_size = hidden_size self.concat_linear = nn.Linear(self.hidden_size * 2, self.h...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
ekvall93/tape
Attention
false
12,344
[ "BSD-3-Clause" ]
0
1ca4d5a39c72f806f23a36fb7a7c7325f06096ae
https://github.com/ekvall93/tape/tree/1ca4d5a39c72f806f23a36fb7a7c7325f06096ae
MseCriterion
import torch import torch.nn.functional as F from torch.nn.modules.loss import _Loss from torch.optim.lr_scheduler import * class Criterion(_Loss): def __init__(self, alpha=1.0, name='criterion'): super().__init__() """Alpha is used to weight each loss term """ self.alpha = alpha ...
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.nn.modules.loss import _Loss from torch.optim.lr_scheduler import * assert_siz...
johnson7788/mt-dnn
MseCriterion
false
3,895
[ "MIT" ]
0
26e5c4a5bfdbf1a1dd1c903e606db1c070568237
https://github.com/johnson7788/mt-dnn/tree/26e5c4a5bfdbf1a1dd1c903e606db1c070568237
ScaledDotProductAttention
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
AutuanLiu/PyTorch-ML
ScaledDotProductAttention
false
16,966
[ "MIT" ]
9
884c7723843d9ffb4da09d95eb97886b2cc38f28
https://github.com/AutuanLiu/PyTorch-ML/tree/884c7723843d9ffb4da09d95eb97886b2cc38f28
FeedForward
import torch import torch.nn.functional as F from torch import nn class FeedForward(nn.Module): def __init__(self, num_features, expansion_factor, dropout): super().__init__() num_hidden = expansion_factor * num_features self.fc1 = nn.Linear(num_features, num_hidden) self.fc2 = 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.triton_helpers import libdevice from torch import n...
GimmeSpoon/mlp-singer
FeedForward
false
5,210
[ "MIT" ]
1
36d10a23c46fa7400994ccd063de79ff089efd5e
https://github.com/GimmeSpoon/mlp-singer/tree/36d10a23c46fa7400994ccd063de79ff089efd5e
FMul
import torch import torch.nn as nn class FMul(nn.Module): def __init__(self): super(FMul, self).__init__() def forward(self, x, y): x = x * y x = x * 10.0 return x def get_inputs(): return [torch.rand([4, 4, 4, 4]), 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...
dawnclaude/onnx2keras
FMul
false
15,129
[ "MIT" ]
115
3d2a47c0a228b91fd434232274e216e491da36e3
https://github.com/dawnclaude/onnx2keras/tree/3d2a47c0a228b91fd434232274e216e491da36e3
CaffeNormalize
import torch import torch.utils.data import torch.nn as nn class CaffeNormalize(nn.Module): def __init__(self, features, eps=1e-07): super(CaffeNormalize, self).__init__() self.scale = nn.Parameter(10.0 * torch.ones(features)) self.eps = eps def forward(self, x): x_size = x.s...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.utils.data import torch.nn as nn assert_size_stride = torch._C._dy...
E18301194/DepthAwareCNN
CaffeNormalize
false
13,609
[ "MIT" ]
278
8ae98f7f18b69f79e7df03397dec2543d3d0c8eb
https://github.com/E18301194/DepthAwareCNN/tree/8ae98f7f18b69f79e7df03397dec2543d3d0c8eb
SimpleConvTranspose2dModule
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.jit import torch...
briancoutinho/glow
SimpleConvTranspose2dModule
false
12,558
[ "Apache-2.0" ]
0
4c919d60b3c33296c4109aec8020a1733c98f5b5
https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5
LSGANLossGenerator
import torch import torch.nn as nn class LSGANLossGenerator(nn.Module): """ This class implements the least squares generator GAN loss proposed in: https://openaccess.thecvf.com/content_ICCV_2017/papers/Mao_Least_Squares_Generative_ICCV_2017_paper.pdf """ def __init__(self) ->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 import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
ChristophReich1996/Mode_Collapse
LSGANLossGenerator
false
7,915
[ "MIT" ]
14
937ee8bf96510fbf4070fc7e14b78276ab036b8c
https://github.com/ChristophReich1996/Mode_Collapse/tree/937ee8bf96510fbf4070fc7e14b78276ab036b8c
FCN8s
# 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 numpy as np from torch...
Design-AILab/Attention-Tracker
FCN8s
false
9,564
[ "MIT" ]
0
3dfe5edabdff0cb6db9c99ed59afd8c0383b6233
https://github.com/Design-AILab/Attention-Tracker/tree/3dfe5edabdff0cb6db9c99ed59afd8c0383b6233
LinearFeedforward
# 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 ...
Jonathan-Chin328/genienlp
LinearFeedforward
false
671
[ "BSD-3-Clause" ]
0
6449140bfea2651523abc3500b212c37955aa39e
https://github.com/Jonathan-Chin328/genienlp/tree/6449140bfea2651523abc3500b212c37955aa39e
Gate
from _paritybench_helpers import _mock_config import torch import torch.nn as nn import torch.nn.functional as F class Gate(nn.Module): def __init__(self, args): super(Gate, self).__init__() self.d_model = args.d_model self.weight_proj = nn.Linear(2 * self.d_model, 1) self.tanh = ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
djz233/GraphMask
Gate
false
12,296
[ "MIT" ]
0
4b699a1685f0d26973bb90cd75b09d74726cdc2f
https://github.com/djz233/GraphMask/tree/4b699a1685f0d26973bb90cd75b09d74726cdc2f
SupportEncoder
import torch import torch.nn as nn from torch.autograd import * import torch.nn.init as init class LayerNormalization(nn.Module): """ Layer normalization module """ def __init__(self, d_hid, eps=0.001): super(LayerNormalization, self).__init__() self.eps = eps self.a_2 = nn.Parameter(...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
RussellMcGrady/Multi-head-attention-based-MetaR
SupportEncoder
false
2,788
[ "Apache-2.0" ]
0
4e47546da35bd57ff7ab16d0fed19be31c063563
https://github.com/RussellMcGrady/Multi-head-attention-based-MetaR/tree/4e47546da35bd57ff7ab16d0fed19be31c063563
NavigatorUnit
import torch import torch.utils.data import torch.nn as nn def conv1x1(in_channels, out_channels, stride=1, groups=1, bias=False): """ Convolution 1x1 layer. Parameters: ---------- in_channels : int Number of input channels. out_channels : int Number of output channels. st...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.utils.data impor...
HyperGAN/imgclsmob
NavigatorUnit
false
17,792
[ "MIT" ]
9
88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3
https://github.com/HyperGAN/imgclsmob/tree/88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3
InnerProductNetwork
# 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.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_...
lipmedusea/pytorch
InnerProductNetwork
false
12,709
[ "MIT" ]
0
5d94694b9e1193a93dd7f75ea2042b5a1cf178bc
https://github.com/lipmedusea/pytorch/tree/5d94694b9e1193a93dd7f75ea2042b5a1cf178bc
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....
XuMayi/PyABSA
Attention
false
1,265
[ "MIT" ]
0
3d71c0cdaea7ea1eff600d9091c3c63f61c111e5
https://github.com/XuMayi/PyABSA/tree/3d71c0cdaea7ea1eff600d9091c3c63f61c111e5
ComplexConv1d
import torch from torch import nn import torch.utils class ComplexConv1d(nn.Module): def __init__(self, in_channels, out_channels, kernel_size=3, stride=1, padding=0, dilation=1, groups=1, bias=True): super(ComplexConv1d, self).__init__() self.conv_r = nn.Conv1d(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 import nn import torch.utils assert_size_stride = torch._C._dynamo.gu...
muqiaoy/dl_signal
ComplexConv1d
false
16,119
[ "MIT" ]
54
3a30d14982016644bfc96a7d1ca0109b441f17fd
https://github.com/muqiaoy/dl_signal/tree/3a30d14982016644bfc96a7d1ca0109b441f17fd
HypergradTransform
import torch class HypergradTransform(torch.nn.Module): """Hypergradient-style per-parameter learning rates""" def __init__(self, param, lr=0.01): super(HypergradTransform, self).__init__() self.lr = lr * torch.ones_like(param, requires_grad=True) self.lr = torch.nn.Parameter(self.lr)...
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...
OliverWang-Au/learn2learn
HypergradTransform
false
5,686
[ "MIT" ]
1
df3c3291b4681440a80a69a7815090a4bd3cd661
https://github.com/OliverWang-Au/learn2learn/tree/df3c3291b4681440a80a69a7815090a4bd3cd661
SimpleOrModule
import torch import torch.jit import torch.onnx import torch.nn class SimpleOrModule(torch.nn.Module): def __init__(self): super(SimpleOrModule, self).__init__() def forward(self, a, b): c = torch.logical_or(a, b) return torch.logical_or(c, c) def get_inputs(): return [torch.ra...
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
SimpleOrModule
false
14,671
[ "Apache-2.0" ]
2,838
a13706a4239fa7eaf059c670dc573e3eb0768f86
https://github.com/YaronBenAtar/glow/tree/a13706a4239fa7eaf059c670dc573e3eb0768f86
SoftEntropy
import torch import torch.nn.functional as F import torch.nn as nn from torch.nn import * class SoftEntropy(nn.Module): def __init__(self): super(SoftEntropy, self).__init__() self.logsoftmax = nn.LogSoftmax(dim=1) def forward(self, inputs, targets): log_probs = self.logsoftmax(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 from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
LunarShen/SECRET
SoftEntropy
false
2,598
[ "MIT" ]
0
0f652e63ce760ece8690cbad013f0d9bdb341e84
https://github.com/LunarShen/SECRET/tree/0f652e63ce760ece8690cbad013f0d9bdb341e84
EncoderBias
import torch import torch.nn as nn class EncoderBias(nn.Module): def __init__(self, input_dim1, input_dim2, batch_feature, latent_dim, bias=False): """[summary] Args: input_dim1 ([type]): [mod1 dimemsion] input_dim2 ([type]): [mod2 dimemsion] batch_feat...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
xiaoyanLi629/single_cell_data_analysis
EncoderBias
false
13,114
[ "MIT" ]
0
39d6bbd64249385d2005a775ea1d05e210f41fbe
https://github.com/xiaoyanLi629/single_cell_data_analysis/tree/39d6bbd64249385d2005a775ea1d05e210f41fbe
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 import nn import torch.utils.data assert_size_stride = torch._C._dyna...
Wulfsta/SuperResolution
ResidualBlock
false
2,966
[ "MIT" ]
0
ced152e57da001074856b0c085d499c2825358d6
https://github.com/Wulfsta/SuperResolution/tree/ced152e57da001074856b0c085d499c2825358d6
Depth_Pointwise_Conv1d
# 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...
rushirajsherlocked/External-Attention-pytorch
Depth_Pointwise_Conv1d
false
4,214
[ "MIT" ]
0
7d6814b2d90909adf81c62f3f8a89e30a59d6481
https://github.com/rushirajsherlocked/External-Attention-pytorch/tree/7d6814b2d90909adf81c62f3f8a89e30a59d6481
MaxPool3x3
import torch import torch.nn as nn class MaxPool3x3(nn.Module): """3x3 max pool with no subsampling.""" def __init__(self, in_channels, out_channels, kernel_size=3, stride=1, padding=1): super(MaxPool3x3, self).__init__() self.maxpool = nn.MaxPool2d(kernel_size, stride, padding) ...
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...
KelvinYang0320/nas-without-training
MaxPool3x3
false
13,932
[ "MIT" ]
385
5ed77a06726a73233a5a93b8f70a7172ce570029
https://github.com/KelvinYang0320/nas-without-training/tree/5ed77a06726a73233a5a93b8f70a7172ce570029
residualUnit
# 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....
ForrestPi/Unsupervised-Defect-Segmentation
residualUnit
false
8,219
[ "MIT" ]
17
e366ac7c757bb1b45f38ebbc502dfee7ccb72398
https://github.com/ForrestPi/Unsupervised-Defect-Segmentation/tree/e366ac7c757bb1b45f38ebbc502dfee7ccb72398
BasicBlock
import torch import torch.nn as nn import torch.nn.functional as F class BasicBlock(nn.Module): expansion = 1 def __init__(self, in_planes, planes, stride=1, norm='instancenorm'): super(BasicBlock, self).__init__() self.norm = norm self.conv1 = nn.Conv2d(in_planes, planes, kernel_size...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
cuijiaxing/DatasetCondensation
BasicBlock
false
10,000
[ "MIT" ]
0
aec1f7bf08d10d0f9e5d2fd5c2e4193d9687fefd
https://github.com/cuijiaxing/DatasetCondensation/tree/aec1f7bf08d10d0f9e5d2fd5c2e4193d9687fefd
TokenEmbedding
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.quantization import torch.onnx import torch.nn.parallel import torch.utils.data import torch.fx import to...
MartinRenaudin/tutorials
TokenEmbedding
false
2,754
[ "BSD-3-Clause" ]
0
035d6827d77c52fed2a927f105e39fd73516f093
https://github.com/MartinRenaudin/tutorials/tree/035d6827d77c52fed2a927f105e39fd73516f093
SelfAttentionPooling
# 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....
Ethan07902050/s3prl
SelfAttentionPooling
false
2,277
[ "MIT" ]
0
854aff0b3062fc2cff531401923b8745f64701e7
https://github.com/Ethan07902050/s3prl/tree/854aff0b3062fc2cff531401923b8745f64701e7
Upsample
# 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...
CharlesPikachu/CharlesFace
Upsample
false
7,842
[ "MIT" ]
13
90bfe38c58068228d0069dce43b55b2570acaa16
https://github.com/CharlesPikachu/CharlesFace/tree/90bfe38c58068228d0069dce43b55b2570acaa16
LWS
# 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...
zhangyongshun/BagofTricks-LT
LWS
false
16,809
[ "MIT" ]
115
aec4d9a552236c32231374b7b00fa5bf4208dae3
https://github.com/zhangyongshun/BagofTricks-LT/tree/aec4d9a552236c32231374b7b00fa5bf4208dae3