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
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 import numpy as np import tor...
biemann/rl-testbed-for-energyplus
PolicyNetwork
false
9,804
[ "MIT" ]
0
a01be4d12eda970b352729ff6cb4a3eea8ddee6a
https://github.com/biemann/rl-testbed-for-energyplus/tree/a01be4d12eda970b352729ff6cb4a3eea8ddee6a
StaticArchGenerator
# 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 numpy as np import torch.nn as nn import torch.nn.init as weight_init from torch.nn import Parameter assert_size_stride = torch._C._d...
RaoefTaki/MNTDP-forked
StaticArchGenerator
false
8,700
[ "MIT" ]
15
d9ea59a6638f6cdc93eca180ab02672f5bf5d2a1
https://github.com/RaoefTaki/MNTDP-forked/tree/d9ea59a6638f6cdc93eca180ab02672f5bf5d2a1
MinibatchStd
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import torch.utils.tensorboard import torch.nn assert_siz...
Klanly/StyleFlowPytorch
MinibatchStd
false
8,751
[ "MIT" ]
24
4552108ea1de69e9e9c027909738bbc755ab5cf6
https://github.com/Klanly/StyleFlowPytorch/tree/4552108ea1de69e9e9c027909738bbc755ab5cf6
CrossEntropyBayesRisk
from torch.nn import Module import torch import torch.utils.data import torch.nn.functional import torch.autograd class CrossEntropyBayesRisk(Module): """ <a id="CrossEntropyBayesRisk"></a> ## Bayes Risk with Cross Entropy Loss Bayes risk is the overall maximum cost of making incorrect estimates. ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch.nn import Module import torch.utils.data import torch.nn.functional import torch.autograd assert_size_stride = torch._C._dynamo.g...
mcx/annotated_deep_learning_paper_implementations
CrossEntropyBayesRisk
false
7,197
[ "MIT" ]
1
f169f3a71dd2d36eb28ad31062d3475efa367b88
https://github.com/mcx/annotated_deep_learning_paper_implementations/tree/f169f3a71dd2d36eb28ad31062d3475efa367b88
MumfordShah_Loss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
HiLab-git/WSL4MIS
MumfordShah_Loss
false
8,283
[ "MIT" ]
29
9683e7c7409b95c0ac2169fe7964f6ca04c80d9a
https://github.com/HiLab-git/WSL4MIS/tree/9683e7c7409b95c0ac2169fe7964f6ca04c80d9a
MaxPoolWithMask
# 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...
lonePatient/TorchBlocks
MaxPoolWithMask
false
15,958
[ "MIT" ]
82
4a65d746cc8a396cb7df73ed4644d97ddf843e29
https://github.com/lonePatient/TorchBlocks/tree/4a65d746cc8a396cb7df73ed4644d97ddf843e29
_GlobalConvModule
import torch from torch import nn class _GlobalConvModule(nn.Module): def __init__(self, in_dim, out_dim, kernel_size): super(_GlobalConvModule, self).__init__() pad0 = (kernel_size[0] - 1) // 2 pad1 = (kernel_size[1] - 1) // 2 super(_GlobalConvModule, self).__init__() sel...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
BloodAxe/segmentation-networks-benchmark
_GlobalConvModule
false
7,877
[ "MIT" ]
34
2e3feb560102230be9369ab442b4a59cc86dff61
https://github.com/BloodAxe/segmentation-networks-benchmark/tree/2e3feb560102230be9369ab442b4a59cc86dff61
SimpleATanModule
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.jit import torch.onnx import torch.nn assert_size_stride = torch._...
YaronBenAtar/glow
SimpleATanModule
false
14,649
[ "Apache-2.0" ]
2,838
a13706a4239fa7eaf059c670dc573e3eb0768f86
https://github.com/YaronBenAtar/glow/tree/a13706a4239fa7eaf059c670dc573e3eb0768f86
DropConnect
import torch class DropConnect(torch.nn.Module): def __init__(self, p): super(DropConnect, self).__init__() self.p = p def forward(self, inputs): batch_size = inputs.shape[0] inputs.shape[2] inputs.shape[3] channel_size = inputs.shape[1] keep_prob = 1 ...
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.triton_helpers import libdevice assert_size_stride = torch._C._dynamo.guards.assert_si...
KelvinYang0320/nas-without-training
DropConnect
false
13,923
[ "MIT" ]
385
5ed77a06726a73233a5a93b8f70a7172ce570029
https://github.com/KelvinYang0320/nas-without-training/tree/5ed77a06726a73233a5a93b8f70a7172ce570029
LunarLanderDQN
# 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_...
breno-aberle/rl-pong-project
LunarLanderDQN
false
6,348
[ "MIT" ]
1
9dc0d12e4bbcdb2905d46f66e84fac6d70c7831d
https://github.com/breno-aberle/rl-pong-project/tree/9dc0d12e4bbcdb2905d46f66e84fac6d70c7831d
SpatialAttention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
WhuEven/multi_hyp_cc
SpatialAttention
false
5,969
[ "MIT" ]
1
53a6bc438b865d606f5e6a53a442efbd8a04fe5b
https://github.com/WhuEven/multi_hyp_cc/tree/53a6bc438b865d606f5e6a53a442efbd8a04fe5b
CELoss
import torch import torch.nn as nn import torch.nn.functional as F class CELoss(nn.Module): def __init__(self): super(CELoss, self).__init__() def forward(self, y_pred, y_true): return -torch.mean(torch.sum(y_true * torch.log(F.softmax(y_pred, dim=1)), dim=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 from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
PARMAGroup/UNet-Instance-Cell-Segmentation
CELoss
false
8,620
[ "MIT" ]
30
79655a2c5781d2e20c7d5760f631fbb0be392292
https://github.com/PARMAGroup/UNet-Instance-Cell-Segmentation/tree/79655a2c5781d2e20c7d5760f631fbb0be392292
VisibilityFOV
import torch import torch.optim class VisibilityFOV(torch.nn.Module): def __init__(self, width: 'int'=1, height: 'int'=1, coord_type: 'str'= 'coord'): super(VisibilityFOV, self).__init__() self.coord_type = coord_type self.width = width self.height = height def forwar...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.optim assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strid...
ai-in-motion/moai
VisibilityFOV
false
18,329
[ "Apache-2.0" ]
10
e38cac046c059d2e2331ef4883bbabc5a500a5cf
https://github.com/ai-in-motion/moai/tree/e38cac046c059d2e2331ef4883bbabc5a500a5cf
UpsampleConv
import torch import torch.nn as nn class UpsampleConv(nn.Module): def __init__(self, input_dim, output_dim, kernel_size=3, biases=True): super().__init__() self.conv = nn.Conv2d(input_dim, output_dim, kernel_size, stride=1, padding=kernel_size // 2, bias=biases) self.pixelshuf...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
henryaddison/score_sde_pytorch
UpsampleConv
false
12,499
[ "Apache-2.0" ]
0
be07c3a3346bf8ceadabf6a3b436db5d5c3d0252
https://github.com/henryaddison/score_sde_pytorch/tree/be07c3a3346bf8ceadabf6a3b436db5d5c3d0252
QNetwork
import torch import torch.nn as nn class QNetwork(nn.Module): def __init__(self, state_size, action_size, seed): super(QNetwork, self).__init__() self.seed = torch.manual_seed(seed) self.fc1 = nn.Linear(state_size, 32) self.relu1 = nn.PReLU() self.fc2 = nn.Linear(32, 32) ...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
bluebibi/rl_book_codes
QNetwork
false
3,227
[ "MIT" ]
0
ef7fc9993eb66618e4b4e80e59cc2879a8db3522
https://github.com/bluebibi/rl_book_codes/tree/ef7fc9993eb66618e4b4e80e59cc2879a8db3522
PADEACTIVATION_Function_based
# 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 numpy as np import torch.nn as nn from numpy.random.mtrand import ...
ChristophReich1996/Cell-DETR
PADEACTIVATION_Function_based
false
13,519
[ "MIT" ]
55
4d0c3a2d3ffd19184c8443e5b3a6dccc053c77ea
https://github.com/ChristophReich1996/Cell-DETR/tree/4d0c3a2d3ffd19184c8443e5b3a6dccc053c77ea
down
import torch import torch.nn as nn import torch.nn.functional as F class down(nn.Module): def __init__(self, inChannels, outChannels, filterSize): super(down, self).__init__() self.conv1 = nn.Conv2d(inChannels, outChannels, filterSize, stride= 1, padding=int((filterSize - 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 torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
brainma/ASRNet
down
false
9,870
[ "MIT" ]
0
b88edbcfbcee2cc77f7f4b2a8d139ced303a4f14
https://github.com/brainma/ASRNet/tree/b88edbcfbcee2cc77f7f4b2a8d139ced303a4f14
ComplexConv
# 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...
litcoderr/ComplexCNN
ComplexConv
false
15,910
[ "MIT" ]
154
97db7c94b1ad91fc689faf36693977cc476818e9
https://github.com/litcoderr/ComplexCNN/tree/97db7c94b1ad91fc689faf36693977cc476818e9
OnnxGeneralLinear
# 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...
ENOT-AutoDL/onnx2torch
OnnxGeneralLinear
false
13,632
[ "Apache-2.0" ]
144
2391987b3349bed1670ac3c1bc9062a37323abe3
https://github.com/ENOT-AutoDL/onnx2torch/tree/2391987b3349bed1670ac3c1bc9062a37323abe3
PPMConcat
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch._C import torch.serialization assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strid...
AnonSubmission6150/submission6150
PPMConcat
false
8,998
[ "Apache-2.0" ]
0
571633d9a12b4fd7a9546947787fc068966dab04
https://github.com/AnonSubmission6150/submission6150/tree/571633d9a12b4fd7a9546947787fc068966dab04
NeuralNet1
# 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_...
jaykasundra2/pytorchTutorial
NeuralNet1
false
12,608
[ "MIT" ]
0
954a96797353d463cb96c66596272e180c602134
https://github.com/jaykasundra2/pytorchTutorial/tree/954a96797353d463cb96c66596272e180c602134
offset_pos
# 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 ...
FrancesC0de/Pedestron
offset_pos
false
9,100
[ "Apache-2.0" ]
0
9ef6a408f97f8c8af98096b7945df18c9d3656ca
https://github.com/FrancesC0de/Pedestron/tree/9ef6a408f97f8c8af98096b7945df18c9d3656ca
NoiseInjection
import torch from torch import nn class NoiseInjection(nn.Module): def __init__(self): super().__init__() self.weight = nn.Parameter(torch.zeros(1)) def forward(self, image, noise=None): if noise is None: batch, _, height, width = image.shape noise = image.new...
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...
ArashVahabpour/encoder4editing-contrastive
NoiseInjection
false
13,271
[ "MIT" ]
1,051
1b91afe1693e01a41118e1ce2451b7d14bec51f4
https://github.com/ArashVahabpour/encoder4editing-contrastive/tree/1b91afe1693e01a41118e1ce2451b7d14bec51f4
Seedloss
# 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...
yaoqi-zd/SGAN
Seedloss
false
16,771
[ "MIT" ]
48
43d8a859b03967e2423a73ef1ba332ee71714ba4
https://github.com/yaoqi-zd/SGAN/tree/43d8a859b03967e2423a73ef1ba332ee71714ba4
SmallDecoder4_16x
# 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....
MingSun-Tse/Collaborative-Distillation
SmallDecoder4_16x
false
14,044
[ "MIT" ]
172
915712674af82ff91d926d922c14988cce0430f3
https://github.com/MingSun-Tse/Collaborative-Distillation/tree/915712674af82ff91d926d922c14988cce0430f3
Conv2dNormActiv
# 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....
DLR-RM/instr
Conv2dNormActiv
false
7,936
[ "MIT" ]
22
ec1461cd4f31bbc1e692a45925e5dbaeed54843f
https://github.com/DLR-RM/instr/tree/ec1461cd4f31bbc1e692a45925e5dbaeed54843f
Gaussian_Kernel_Function
import torch import torch.nn as nn class Gaussian_Kernel_Function(nn.Module): def __init__(self, std): super(Gaussian_Kernel_Function, self).__init__() self.sigma = std ** 2 def forward(self, fa, fb): asize = fa.size() bsize = fb.size() fa1 = fa.view(-1, 1, asize[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.triton_helpers import libdevice, math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.gu...
LOUEY233/Toward-Mutual-Information
Gaussian_Kernel_Function
false
9,229
[ "MIT" ]
0
cde9ce5c9920bbc9c6e39dafb61ff1dd0c97772f
https://github.com/LOUEY233/Toward-Mutual-Information/tree/cde9ce5c9920bbc9c6e39dafb61ff1dd0c97772f
ScaledLeakyReLU
import math import torch from torch import nn import torch.nn.functional as F class ScaledLeakyReLU(nn.Module): def __init__(self, negative_slope=0.2): super().__init__() self.negative_slope = negative_slope def forward(self, input): out = F.leaky_relu(input, negative_slope=self.nega...
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...
ArashVahabpour/encoder4editing
ScaledLeakyReLU
false
1,959
[ "MIT" ]
0
819b90ecd7397fbe2ab7cb30eb451dab0f3149fd
https://github.com/ArashVahabpour/encoder4editing/tree/819b90ecd7397fbe2ab7cb30eb451dab0f3149fd
Ceil
# 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.onnx import torch.nn as nn assert_size_stride = torch._C._dynamo.g...
mil-tokyo/webdnn
Ceil
false
16,060
[ "MIT" ]
1,967
38a60fd3e1a4e72bc01108189a3aa51e0752aecd
https://github.com/mil-tokyo/webdnn/tree/38a60fd3e1a4e72bc01108189a3aa51e0752aecd
MY_NGM_FFNN
# 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....
calpoly-bioinf/knowledge_driven_modeling
MY_NGM_FFNN
false
1,644
[ "MIT" ]
0
dbe55d5bb07f7c5a1834a21fde8833f295e3ac96
https://github.com/calpoly-bioinf/knowledge_driven_modeling/tree/dbe55d5bb07f7c5a1834a21fde8833f295e3ac96
DistanceWiseRKD
# 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 ...
HIT-cwh/mmrazor
DistanceWiseRKD
false
13,742
[ "Apache-2.0" ]
553
2dad24044d7f1dad88f20221f8fc071dd40fdd4f
https://github.com/HIT-cwh/mmrazor/tree/2dad24044d7f1dad88f20221f8fc071dd40fdd4f
Norm
import torch import torch.nn as nn class Norm(nn.Module): def __init__(self, d_model, eps=1e-06): super().__init__() self.size = d_model self.alpha = nn.Parameter(torch.ones(self.size)) self.bias = nn.Parameter(torch.zeros(self.size)) self.eps = eps def forward(self, ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
Daniangio/pheno_phases
Norm
false
11,323
[ "MIT" ]
0
c7229f4ec56fea42988768b02e8deb8615f683fa
https://github.com/Daniangio/pheno_phases/tree/c7229f4ec56fea42988768b02e8deb8615f683fa
Network
import torch import torch.nn as nn import torch.nn.functional as F class Network(nn.Module): def __init__(self, input_size, nb_action): super(Network, self).__init__() self.input_size = input_size self.nb_action = nb_action self.fc1 = nn.Linear(input_size, 32) self.fc2 = n...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
cheapmouse94/Machine_Learning-Gates-python
Network
false
1,670
[ "MIT" ]
0
1e159ccf8f9a5db9104fa3926b85750787676e15
https://github.com/cheapmouse94/Machine_Learning-Gates-python/tree/1e159ccf8f9a5db9104fa3926b85750787676e15
Sum
import torch import torch.nn as nn class Sum(nn.Module): def __init__(self, n, weight=False): super(Sum, self).__init__() self.weight = weight self.iter = range(n - 1) if weight: self.w = nn.Parameter(-torch.arange(1.0, n) / 2, requires_grad=True ) ...
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...
AkshayGanesh/yolov5processor
Sum
false
4,808
[ "MIT" ]
1
788accfa93798729c002b2c9b4f943284ff97cad
https://github.com/AkshayGanesh/yolov5processor/tree/788accfa93798729c002b2c9b4f943284ff97cad
Conditional_Contrastive_loss_plus
# 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 nump...
fywang0327/PyTorch-ECGAN
Conditional_Contrastive_loss_plus
false
12,418
[ "MIT" ]
0
7c7c8c28c609b1bd2d3aecaeec4bffeb4c9cda6c
https://github.com/fywang0327/PyTorch-ECGAN/tree/7c7c8c28c609b1bd2d3aecaeec4bffeb4c9cda6c
TwoLayerNet
# 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....
JohnlNguyen/FLSim
TwoLayerNet
false
13,904
[ "BSD-3-Clause" ]
79
a5ed7c0b84499cd9dbc5fe95f8bcb4ba8ab5a5cb
https://github.com/JohnlNguyen/FLSim/tree/a5ed7c0b84499cd9dbc5fe95f8bcb4ba8ab5a5cb
CPUForgetMult
# 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 typing import * assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
DineshChauhan/fastai_docs
CPUForgetMult
false
11,342
[ "Apache-2.0" ]
0
cf4d88073fb6f3ef7331b5360618b8dd95eb9345
https://github.com/DineshChauhan/fastai_docs/tree/cf4d88073fb6f3ef7331b5360618b8dd95eb9345
LossesOfConVIRT
# 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...
funnyzhou/REFERS
LossesOfConVIRT
false
15,374
[ "MIT" ]
46
392eddf13cbf3c3a7dc0bf8bfffd108ca4a65a19
https://github.com/funnyzhou/REFERS/tree/392eddf13cbf3c3a7dc0bf8bfffd108ca4a65a19
EncoderCNN
import torch import torch.nn as nn import torch.nn.functional as F class EncoderCNN(nn.Module): def __init__(self, latent_dim=1024): super(EncoderCNN, self).__init__() self.latent_dim = latent_dim self.conv1_1 = nn.Conv2d(8, 8, 4, stride=2, dilation=1, padding=1) self.conv1_2 = 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 import torch.nn as ...
SarodYatawatta/federated-pytorch-test
EncoderCNN
false
8,754
[ "Apache-2.0" ]
33
42a51ba12a92b32fa19273340d5b61e74e11d8e0
https://github.com/SarodYatawatta/federated-pytorch-test/tree/42a51ba12a92b32fa19273340d5b61e74e11d8e0
eca_layer
import torch import torch.nn as nn import torch.nn.parallel import torch.utils.data.distributed class eca_layer(nn.Module): """Constructs a ECA module. Args: channel: Number of channels of the input feature map k_size: Adaptive selection of kernel size """ def __init__(self, channel, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.parallel import torch.utils.data.distribut...
SSusantAchary/OctaveConv_pytorch
eca_layer
false
14,355
[ "MIT" ]
633
079f7da29d55c2eeed8985d33f0b2f765d7a469e
https://github.com/SSusantAchary/OctaveConv_pytorch/tree/079f7da29d55c2eeed8985d33f0b2f765d7a469e
MultiSampleDropout
import torch import torch.nn as nn class MultiSampleDropout(nn.Module): """ # multisample dropout (wut): https://arxiv.org/abs/1905.09788 """ def __init__(self, hidden_size, num_labels, K=5, p=0.5): super().__init__() self.K = K self.dropout = nn.Dropout(p) self.classi...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
Raiselimit/TorchBlocks
MultiSampleDropout
false
5,750
[ "MIT" ]
1
a5baecb9a2470ff175087475630f2b7db3f7ef51
https://github.com/Raiselimit/TorchBlocks/tree/a5baecb9a2470ff175087475630f2b7db3f7ef51
GaussianSmearing
# 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...
chris-price19/ocp
GaussianSmearing
false
1,703
[ "MIT", "BSD-3-Clause" ]
0
0175c5a11dd3aaccd4f4780c8cb559401f1ca15e
https://github.com/chris-price19/ocp/tree/0175c5a11dd3aaccd4f4780c8cb559401f1ca15e
GLU
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.model_zoo assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
Aitical/ADspeech2face
GLU
false
4,785
[ "MIT" ]
1
2e811ff8cc7333729f4b77d1b1067296253e8e38
https://github.com/Aitical/ADspeech2face/tree/2e811ff8cc7333729f4b77d1b1067296253e8e38
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....
wikeex/pytorch-learning
Net
false
10,932
[ "MIT" ]
0
8cd710d65a52b58b1593fbba6c4134e08ea18d9f
https://github.com/wikeex/pytorch-learning/tree/8cd710d65a52b58b1593fbba6c4134e08ea18d9f
depthwise_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 import torch.nn as nn import ...
whiteking64/lang-seg
depthwise_block
false
16,703
[ "MIT" ]
202
9d063b126f1b64e38ddb20cc75fc74435bfdcbd3
https://github.com/whiteking64/lang-seg/tree/9d063b126f1b64e38ddb20cc75fc74435bfdcbd3
DeepNeuralNet
import torch class DeepNeuralNet(torch.nn.Module): """ This is a six-layer neural network. This is the default network for initializing sigma and center parameters """ def __init__(self, n_feature, n_hidden1, n_hidden2, n_hidden3, n_hidden4, n_hidden5, n_hidden6, n_output): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
cassberk/xps_peakfit
DeepNeuralNet
false
6,396
[ "MIT" ]
1
bbdd62dbfc4d64ec2af0c509361de81b0762bd41
https://github.com/cassberk/xps_peakfit/tree/bbdd62dbfc4d64ec2af0c509361de81b0762bd41
BinaryFocalLossWithLogits
import torch import torch.nn as nn def binary_focal_loss_with_logits(input: 'torch.Tensor', target: 'torch.Tensor', alpha: 'float'=0.25, gamma: 'float'=2.0, reduction: 'str'='none', eps: 'float'=1e-08) ->torch.Tensor: """Function that computes Binary Focal loss. .. math:: \\text{FL}(p_t) = -\\...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
Danish-VSL/deep-person-reid
BinaryFocalLossWithLogits
false
13,557
[ "MIT" ]
244
2e3a4b6706b84c77203f9905683b917ab0871b93
https://github.com/Danish-VSL/deep-person-reid/tree/2e3a4b6706b84c77203f9905683b917ab0871b93
PrimaryCapsules
# 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 ...
richardsun-voyager/capsule-network
PrimaryCapsules
false
7,550
[ "MIT" ]
1
349cec1caa9ab95ff4b3333c33d04b1bdb442f67
https://github.com/richardsun-voyager/capsule-network/tree/349cec1caa9ab95ff4b3333c33d04b1bdb442f67
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.nn import Module from torch import Tensor assert_size_stride = torch._C._dynam...
bharadwaj1098/sparseml
Accuracy
false
6,327
[ "Apache-2.0" ]
1
b43dc3edc9f7e6cd32368937b7ed3352180abe52
https://github.com/bharadwaj1098/sparseml/tree/b43dc3edc9f7e6cd32368937b7ed3352180abe52
DecoderAttention
# 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....
ArrowLuo/GRACE
DecoderAttention
false
8,781
[ "Apache-2.0" ]
17
f27b500ba905685c03eee6d91d87adc9ef78b4d1
https://github.com/ArrowLuo/GRACE/tree/f27b500ba905685c03eee6d91d87adc9ef78b4d1
GatedConvTranspose
import torch import torch.nn as nn class GatedConvTranspose(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, output_padding=0, groups=1): super(GatedConvTranspose, self).__init__() self.layer_f = nn.ConvTranspose2d(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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
D-hash-code/ffjord-rnode-finalweek-mnist
GatedConvTranspose
false
2,141
[ "MIT" ]
0
4cabcbadda79c68df53ec25f1f8fe03cfeee78f9
https://github.com/D-hash-code/ffjord-rnode-finalweek-mnist/tree/4cabcbadda79c68df53ec25f1f8fe03cfeee78f9
RSubInt
import torch class RSubInt(torch.nn.Module): def __init__(self): super(RSubInt, self).__init__() def forward(self, x): return 1 - x def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
ahangchen/torch2trt
RSubInt
false
6,109
[ "MIT" ]
1
53c663f0e0570ef7ffd6771354ae3478f63bd328
https://github.com/ahangchen/torch2trt/tree/53c663f0e0570ef7ffd6771354ae3478f63bd328
EqualLinearActModule
# 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 copy import deepcopy from functools import partial fr...
HXWAndCL/mmgeneration
EqualLinearActModule
false
5,260
[ "Apache-2.0" ]
1
9afb1d740bf56a4ecde5064d5bb2a4e2d777638b
https://github.com/HXWAndCL/mmgeneration/tree/9afb1d740bf56a4ecde5064d5bb2a4e2d777638b
T5LayerNorm
# 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.utils.checkpoint assert_size_stride = torch....
Elvisambition/bert_seq2seq
T5LayerNorm
false
5,167
[ "Apache-2.0" ]
1
643ac537c16872f0d13200de06001d8201a54fbb
https://github.com/Elvisambition/bert_seq2seq/tree/643ac537c16872f0d13200de06001d8201a54fbb
CocoLinear
# 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....
Mymoza/pyannote-audio
CocoLinear
false
5,621
[ "MIT" ]
1
9ac612ee6b854a1a65c3d8992856550304969674
https://github.com/Mymoza/pyannote-audio/tree/9ac612ee6b854a1a65c3d8992856550304969674
Encoder5
import torch import numpy as np import torch.nn as nn class Encoder5(nn.Module): def __init__(self, model=None, fixed=False): super(Encoder5, self).__init__() self.fixed = fixed self.conv0 = nn.Conv2d(3, 3, 1, 1, 0) self.conv0.weight = nn.Parameter(torch.from_numpy(np.array([[[[0]...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
EndyWon/Texture-Reformer
Encoder5
false
8,220
[ "MIT" ]
11
f84f95accb3574c7b759a7f03c0b0b4e150314b5
https://github.com/EndyWon/Texture-Reformer/tree/f84f95accb3574c7b759a7f03c0b0b4e150314b5
BasicModel5_MultiArgs
# 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...
LMdeLiangMi/captum
BasicModel5_MultiArgs
false
5,470
[ "BSD-3-Clause" ]
1
8bd9686013fe0ba8996e9b1cbeb0ea8e91512787
https://github.com/LMdeLiangMi/captum/tree/8bd9686013fe0ba8996e9b1cbeb0ea8e91512787
PrecomputedNorm
import torch import torch.nn as nn class PrecomputedNorm(nn.Module): """Normalization using Pre-computed Mean/Std. Args: stats: Precomputed (mean, std). axis: Axis setting used to calculate mean/variance. """ def __init__(self, stats, axis=[1, 2]): super().__init__() 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
albertvillanova/s3prl
PrecomputedNorm
false
6,154
[ "MIT" ]
1
b127ade4ed2f80a1027901bbd2f204b4fb1aaf03
https://github.com/albertvillanova/s3prl/tree/b127ade4ed2f80a1027901bbd2f204b4fb1aaf03
SeparableConv2d
import torch from torch import nn class SeparableConv2d(nn.Module): """Implements a depthwise separable 2D convolution as described in MobileNet (https://arxiv.org/abs/1704.04861) See: [SeparableConv2D in Keras](https://www.tensorflow.org/api_docs/python/tf/keras/layers/SeparableConv2D) Impl...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import 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...
aidan-fitz/SolarTracer
SeparableConv2d
false
6,123
[ "Apache-2.0" ]
1
31cc77ca974640be277d00c6ca23d82292f178c1
https://github.com/aidan-fitz/SolarTracer/tree/31cc77ca974640be277d00c6ca23d82292f178c1
GumbelSoftMax
import torch import torch.nn as nn import torch.nn.functional as F from math import sqrt as sqrt from itertools import product as product class _GumbelSoftMax(torch.autograd.Function): """ implementing the MixedOp, but carried out in a different way as DARTS DARTS adds all operations together, then selec...
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...
MinliangLin/lightDSFD
GumbelSoftMax
false
14,034
[ "MIT" ]
87
5f04ab89ac08eaf69d16c96f6c9e237701f80281
https://github.com/MinliangLin/lightDSFD/tree/5f04ab89ac08eaf69d16c96f6c9e237701f80281
LSTMRegressCriterion
import torch import torch.nn as nn class LSTMRegressCriterion(nn.Module): def __init__(self): super(LSTMRegressCriterion, self).__init__() def forward(self, pred, target, mask): pred = pred.clone() target = target.clone() mask = mask.clone() target = target[:, :pred.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 import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
aluo-x/shape2prog
LSTMRegressCriterion
false
14,823
[ "BSD-2-Clause" ]
109
1177e5205b99bb293e353688b564c94a14211c75
https://github.com/aluo-x/shape2prog/tree/1177e5205b99bb293e353688b564c94a14211c75
_ImpalaResBlock
import torch from torch import nn class _ImpalaResBlock(nn.Module): def __init__(self, n_channels: 'int'): super().__init__() self.n_channels = n_channels kernel_size = 3 padding = 1 self.relu = nn.ReLU() self.relu_inplace = nn.ReLU() self.conv1 = nn.Conv2d...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_s...
IBM/vsrl-framework
_ImpalaResBlock
false
8,273
[ "MIT" ]
44
42e0853bffb5efbb66cd97178aff9e10ad18c5a9
https://github.com/IBM/vsrl-framework/tree/42e0853bffb5efbb66cd97178aff9e10ad18c5a9
CMVN
# 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_...
czlwang/s3prl
CMVN
false
12,277
[ "Apache-2.0" ]
0
81d4bb8d051cee20fa87c083b8478999e1766172
https://github.com/czlwang/s3prl/tree/81d4bb8d051cee20fa87c083b8478999e1766172
PoseNetFeat
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel import torch.utils.data import torch.utils.cpp_extension class PoseNetFeat(nn.Module): def __init__(self, num_points): super(PoseNetFeat, self).__init__() self.conv1 = torch.nn.Conv1d(3, 64, 1) sel...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
LiCHOTHU/ocean-kp
PoseNetFeat
false
1,891
[ "MIT" ]
0
2102bda2e51233baad0da12a6b1f168a7882564b
https://github.com/LiCHOTHU/ocean-kp/tree/2102bda2e51233baad0da12a6b1f168a7882564b
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....
icemansina/protein-transformer
MultiHeadedAttention
false
6,861
[ "BSD-3-Clause" ]
1
4e73b17f2a4b89ba1a9f6703976d1a31b7a8a5eb
https://github.com/icemansina/protein-transformer/tree/4e73b17f2a4b89ba1a9f6703976d1a31b7a8a5eb
MHAttentionMap
# 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....
dingmyu/mmclassification
MHAttentionMap
false
12,290
[ "Apache-2.0" ]
0
c600b22907fb9423899f7c308c659168c2d01cd8
https://github.com/dingmyu/mmclassification/tree/c600b22907fb9423899f7c308c659168c2d01cd8
LatentAtten
import math import torch import torch.nn as nn class LatentAtten(nn.Module): """ Attention on latent representation """ def __init__(self, h_dim, key_dim=None) ->None: super(LatentAtten, self).__init__() if key_dim is None: key_dim = h_dim self.key_dim = key_dim ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
kage08/CAMul
LatentAtten
false
10,376
[ "MIT" ]
0
79f8a27f472943229fb087bae8e405e38e5e0b47
https://github.com/kage08/CAMul/tree/79f8a27f472943229fb087bae8e405e38e5e0b47
DummyLayer
import torch import torch.nn as nn class DummyLayer(nn.Module): def __init__(self): super().__init__() self.dummy = nn.Parameter(torch.ones(1, dtype=torch.float)) def forward(self, x): return x + self.dummy - self.dummy def get_inputs(): return [torch.rand([4, 4, 4, 4])] def ...
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...
jishnujayakumar/specter
DummyLayer
false
3,738
[ "Apache-2.0" ]
0
40e3b5e538004b00b0955f17dd3d71fb1f96b922
https://github.com/jishnujayakumar/specter/tree/40e3b5e538004b00b0955f17dd3d71fb1f96b922
MultichannelIamge
import math import torch import torch.nn as nn import torch.nn.functional as F class ModulatedConv2d(nn.Module): def __init__(self, channels_in, channels_out, style_dim, kernel_size, demodulate=True): super().__init__() self.weight = nn.Parameter(torch.randn(channels_out, channels_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 math import torch.nn as nn import torch.nn.functional as F assert_size_st...
nhorton04/mobile_styletransfer
MultichannelIamge
false
7,333
[ "Apache-2.0" ]
1
db8b9a61b67fd58b9e4d61457ee58e36800cfbbe
https://github.com/nhorton04/mobile_styletransfer/tree/db8b9a61b67fd58b9e4d61457ee58e36800cfbbe
AttLayer
import torch import torch.nn as nn import torch.nn.functional as fn class AttLayer(nn.Module): """Calculate the attention signal(weight) according the input tensor. Args: infeatures (torch.FloatTensor): A 3D input tensor with shape of[batch_size, M, embed_dim]. Returns: torch.FloatTensor...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
geekinglcq/HRec
AttLayer
false
15,420
[ "MIT" ]
49
b3a67f7721e6e73a7af37d308b5b00e9df68d495
https://github.com/geekinglcq/HRec/tree/b3a67f7721e6e73a7af37d308b5b00e9df68d495
HLoss
import torch import torch.nn as nn class HLoss(nn.Module): def __init__(self): super(HLoss, self).__init__() def forward(self, x): b = x * torch.log(x) b[torch.isnan(b)] = 0 b = -1.0 * b.sum() return b def get_inputs(): return [torch.rand([4, 4, 4, 4])] def ge...
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...
AayushGrover/ViscaNet
HLoss
false
4,771
[ "MIT" ]
1
41786e10b84f2264b638567bdce1c189c1b66b00
https://github.com/AayushGrover/ViscaNet/tree/41786e10b84f2264b638567bdce1c189c1b66b00
RewardEstimator
import math import torch import torch.nn as nn import torch.nn.functional as F def reset_parameters_util_x(model): for module in model.modules(): if isinstance(module, nn.Linear): nn.init.xavier_normal_(module.weight.data, 1) if module.bias is not None: module.bias....
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import math import torch.nn a...
olipinski/MultimodalGame
RewardEstimator
false
10,633
[ "BSD-3-Clause" ]
0
cfacc66baebfadb6ed6a8b44b3dd71a298285d68
https://github.com/olipinski/MultimodalGame/tree/cfacc66baebfadb6ed6a8b44b3dd71a298285d68
outblock
import torch import torch.nn as nn from torch.distributions.normal import Normal import torch.nn.functional class outblock(nn.Module): def __init__(self, in_ch, out_ch, stride=2, output_padding=1): super(outblock, self).__init__() self.upconv = nn.Conv3d(in_ch, out_ch, 3, padding=1, stride=stride...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from torch.distributions.normal import Normal import torch...
junyuchen245/TransMorph_Transformer_for_Medical_Image_Registration
outblock
false
15,761
[ "MIT" ]
82
dfa24a47a564a000aa9b4eea95a6e83a24568359
https://github.com/junyuchen245/TransMorph_Transformer_for_Medical_Image_Registration/tree/dfa24a47a564a000aa9b4eea95a6e83a24568359
MaskedBCE
# 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...
ngerstle/soccerontable
MaskedBCE
false
16,166
[ "BSD-2-Clause" ]
465
25426ff0f8fe0ce008b99c5c0fdbb35091d8d92c
https://github.com/ngerstle/soccerontable/tree/25426ff0f8fe0ce008b99c5c0fdbb35091d8d92c
SoftmaxAffineLayer
import torch import torch.nn.functional as F import torch.nn def to_device(device_object, tensor): """ Select device for non-parameters tensor w.r.t model or tensor which has been specified a device. """ if isinstance(device_object, torch.nn.Module): next(device_object.parameters()).device ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
fancyliumeng/asv-subtools
SoftmaxAffineLayer
false
6,691
[ "Apache-2.0" ]
1
56a13484472e7ae6eb00d762c00d57e581e78eb4
https://github.com/fancyliumeng/asv-subtools/tree/56a13484472e7ae6eb00d762c00d57e581e78eb4
NormalizedDistance
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import torch.jit import torch.nn assert_size_stride = tor...
ankmathur96/torchsupport
NormalizedDistance
false
3,181
[ "MIT" ]
0
77bf4a90b8770a408665e2604428808c3ed2f979
https://github.com/ankmathur96/torchsupport/tree/77bf4a90b8770a408665e2604428808c3ed2f979
ClampNorm
import torch from torch import nn class ClampNorm(nn.Module): def __init__(self): super(ClampNorm, self).__init__() def forward(self, x): out = x.clamp(0.0, 1.0) return out / out.sum(1, keepdim=True) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
NREL/ml-combustion-pdf-models
ClampNorm
false
17,725
[ "Apache-2.0" ]
6
0505b9c54ab4c1e2b7ef8ca9f59f76bfb2e3732d
https://github.com/NREL/ml-combustion-pdf-models/tree/0505b9c54ab4c1e2b7ef8ca9f59f76bfb2e3732d
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 import triton_helpers from torch._inductor.runtime....
Jincheng-Sun/Kylearn-pytorch
PositionwiseFeedForward
false
661
[ "MIT" ]
0
e72f2ab45a3f4724e843a27bec37664d3612fdca
https://github.com/Jincheng-Sun/Kylearn-pytorch/tree/e72f2ab45a3f4724e843a27bec37664d3612fdca
GVPLayerNorm
import torch from torch import nn class GVPLayerNorm(nn.Module): """ Normal layer norm for scalars, nontrainable norm for vectors. """ def __init__(self, feats_h_size, eps=1e-08): super().__init__() self.eps = eps self.feat_norm = nn.LayerNorm(feats_h_size) def forward(self, feat...
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...
blazingsiyan/geometric-vector-perceptron
GVPLayerNorm
false
12,178
[ "MIT" ]
0
eee1ee8e71148cfdb3e02b660d80f12cf1cecd0a
https://github.com/blazingsiyan/geometric-vector-perceptron/tree/eee1ee8e71148cfdb3e02b660d80f12cf1cecd0a
GEGLU
import torch from torch import nn import torch.nn.functional as F import torch.utils.checkpoint class GEGLU(nn.Module): def forward(self, x): x, gate = x.chunk(2, dim=-1) return F.gelu(gate) * x def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn import torch.utils.checkpoint assert_size_stride = torch._...
ClashLuke/gpt-neox
GEGLU
false
428
[ "MIT" ]
0
3291d0e6c867d9d328b96e8377f5b77c6f66c323
https://github.com/ClashLuke/gpt-neox/tree/3291d0e6c867d9d328b96e8377f5b77c6f66c323
TSA_Fusion
import torch import torch.nn as nn import torch.nn.functional as F from torch.functional import F from torch.nn import functional as F class TSA_Fusion(nn.Module): """ Temporal Spatial Attention fusion module Temporal: correlation; Spatial: 3 pyramid levels. """ def __init__(self, nf=64, nframes=...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
CM-BF/FeatureFlow
TSA_Fusion
false
13,550
[ "MIT" ]
161
06642697922f17211e5faa353e24b1a0946885b1
https://github.com/CM-BF/FeatureFlow/tree/06642697922f17211e5faa353e24b1a0946885b1
SeparableBlock
# 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 import Module from torch.nn import Linear assert_size_stride = tor...
RoyNijhuis/FaceFormer
SeparableBlock
false
9,435
[ "Apache-2.0", "BSD-2-Clause", "MIT" ]
0
197d6598b705b988a4ad275c2333bcde6a5eaf9f
https://github.com/RoyNijhuis/FaceFormer/tree/197d6598b705b988a4ad275c2333bcde6a5eaf9f
MovingAverage
import torch from torch import Tensor import torch as pt from torch import nn class MovingAverage(nn.Module): def __init__(self, cond_size: 'int', pred_size: 'int') ->None: super().__init__() self.left_window = cond_size // 2 self.right_window = cond_size - self.left_window def forwa...
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...
Gandor26/cacovid
MovingAverage
false
2,279
[ "MIT" ]
0
2b966579dba1eac6e33f439515de6de9e802d08a
https://github.com/Gandor26/cacovid/tree/2b966579dba1eac6e33f439515de6de9e802d08a
Flatten
# 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...
CTPLab/IID_representation_learning
Flatten
false
4,944
[ "MIT" ]
1
b9dc13536963f9af332b039f7cc772e2f1090c62
https://github.com/CTPLab/IID_representation_learning/tree/b9dc13536963f9af332b039f7cc772e2f1090c62
MultiLabelSoftMarginLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math from torch.nn.modules.loss import _WeightedLoss import torch.nn.parallel ...
NIRVANALAN/microscopy
MultiLabelSoftMarginLoss
false
5,624
[ "MIT" ]
1
4e48e51ebb11d8af44b71e8b497cc5da3b097c9b
https://github.com/NIRVANALAN/microscopy/tree/4e48e51ebb11d8af44b71e8b497cc5da3b097c9b
TransformerDecoderLayer
import torch import torch.nn.functional as F import torch.nn as nn import torch.utils.data class Linear(nn.Linear): def __init__(self, in_dim, out_dim, bias=True, w_init_gain='linear'): super(Linear, self).__init__(in_dim, out_dim, bias) nn.init.xavier_uniform_(self.weight, gain=nn.init.calculate...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Deepest-Project/AlignTTS
TransformerDecoderLayer
false
13,598
[ "MIT" ]
70
ed9c29d845f65ceb44c87f293b2919b9bbc6a6de
https://github.com/Deepest-Project/AlignTTS/tree/ed9c29d845f65ceb44c87f293b2919b9bbc6a6de
MultiHeadAttn
import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.collect_env class MultiHeadAttn(nn.Module): def __init__(self, n_head, d_model, d_head, dropout, dropatt=0, pre_lnorm=False): super(MultiHeadAttn, self).__init__() self.n_head = n_head self.d_mod...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Vatican-X-Formers/xl
MultiHeadAttn
false
11,960
[ "Apache-2.0" ]
0
216b16cdf0af6a8244e9494a60f870972c2a2524
https://github.com/Vatican-X-Formers/xl/tree/216b16cdf0af6a8244e9494a60f870972c2a2524
Discriminator
import torch import numpy as np from torch import nn from torch.nn import functional as F class Discriminator(nn.Module): def __init__(self, img_shape, hidden_dim=1024): super().__init__() in_dim = int(np.prod(img_shape)) self.fc1 = nn.Linear(in_dim, hidden_dim) self.fc2 = nn.Line...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import numpy as np from torch import nn assert_size_stride = torch._C._dynamo.gu...
bzrry/lightning-bolts
Discriminator
false
14,993
[ "Apache-2.0" ]
822
bd392ad858039290c72c20cc3f10df39384e90b9
https://github.com/bzrry/lightning-bolts/tree/bd392ad858039290c72c20cc3f10df39384e90b9
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.triton_helpers import libdevice import torch.nn as ...
dongminlee94/supplement4deeprl
Net
false
6,596
[ "MIT" ]
1
4db1a83f5dd3254abd8135fe94734a0d8d14a957
https://github.com/dongminlee94/supplement4deeprl/tree/4db1a83f5dd3254abd8135fe94734a0d8d14a957
ComplexConv
import torch import torch.nn as nn class ComplexConv(nn.Module): def __init__(self, rank, in_channels, out_channels, kernel_size, stride =1, padding=0, output_padding=0, dilation=1, groups=1, bias=True, normalize_weight=False, epsilon=1e-07, conv_transposed=False): super(ComplexConv, self...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
wizofe/urus-mri-recon
ComplexConv
false
4,539
[ "MIT" ]
0
eab8e48dca31d2b936ce69ccc251ec5a4a10facc
https://github.com/wizofe/urus-mri-recon/tree/eab8e48dca31d2b936ce69ccc251ec5a4a10facc
DurationPredictorLoss
# 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.multiproc...
Cardroid/Muskits
DurationPredictorLoss
false
8,958
[ "Apache-2.0" ]
0
91708bb243bc671e48893a734aee710c356e4bd8
https://github.com/Cardroid/Muskits/tree/91708bb243bc671e48893a734aee710c356e4bd8
Decoder
import torch import torch.nn as nn class Decoder(nn.Module): def __init__(self, latent_size, out_size): super().__init__() self.linear1 = nn.Linear(latent_size, int(out_size / 4)) self.linear2 = nn.Linear(int(out_size / 4), int(out_size / 2)) self.linear3 = nn.Linear(int(out_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 import torch.nn as nn assert_...
hcgcarry/usad
Decoder
false
3,586
[ "BSD-3-Clause" ]
0
4e99a6acd43ef109be4d89b80e96978b9ad61c2f
https://github.com/hcgcarry/usad/tree/4e99a6acd43ef109be4d89b80e96978b9ad61c2f
FCDiscriminator_Local
# 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_...
shiyutang/CLAN
FCDiscriminator_Local
false
4,683
[ "MIT" ]
0
920bd7cb592ba79ee5058f8cd662d20eda50457e
https://github.com/shiyutang/CLAN/tree/920bd7cb592ba79ee5058f8cd662d20eda50457e
Attention
import math import torch import torch.nn.functional as F import torch.utils.data def restricted_softmax(src, dim=-1, margin=0): src_max = torch.clamp(src.max(dim=dim, keepdim=True)[0], min=0) out = (src - src_max).exp() out = out / (out.sum(dim=dim, keepdim=True) + (margin - src_max).exp()) return 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 from torch._inductor.runtime....
GrumpyZhou/pytorch_geometric
Attention
false
5,239
[ "MIT" ]
1
88c54e72d3e26ad48e9ccd99e5696c7f19269d94
https://github.com/GrumpyZhou/pytorch_geometric/tree/88c54e72d3e26ad48e9ccd99e5696c7f19269d94
VarifocalLoss
import torch import torch.nn.functional as F import torch.nn as nn def reduce_loss(loss, reduction): """Reduce loss as specified. Args: loss (Tensor): Elementwise loss tensor. reduction (str): Options are "none", "mean" and "sum". Return: Tensor: Reduced loss tensor. """ ...
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...
Sundrops/mmdetection
VarifocalLoss
false
14,447
[ "Apache-2.0" ]
549
d3cf38d91c454b1a6881e8c36c1e4a66dc5521b8
https://github.com/Sundrops/mmdetection/tree/d3cf38d91c454b1a6881e8c36c1e4a66dc5521b8
BlendConv2d
import torch import torch.nn as nn import torch.utils.data class BlendConv2d(nn.Module): def __init__(self, dim_in, dim_out, ksize=3, stride=1, padding=0, dilation=1, groups=1, bias=True, transpose=False, **unused_kwargs): super(BlendConv2d, self).__init__() module = nn.ConvTranspose2d if...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
D-hash-code/ffjord
BlendConv2d
false
11,375
[ "MIT" ]
0
3647ab35537a8bac3b4dc1e45a593819ac8e2c18
https://github.com/D-hash-code/ffjord/tree/3647ab35537a8bac3b4dc1e45a593819ac8e2c18
ActorCriticPPO
import torch import torch as tor from torch import nn from torch.distributions import Normal def gauss_weights_init(mu, std): def init(m): classname = m.__class__.__name__ if classname.find('Linear') != -1: m.weight.data.normal_(mu, std) return init class SaveableModel(object): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math im...
JimmyMVP/plain_rl
ActorCriticPPO
false
17,489
[ "MIT" ]
10
4780f05fffb62533a339197b49de487cdc9d9954
https://github.com/JimmyMVP/plain_rl/tree/4780f05fffb62533a339197b49de487cdc9d9954
ClampNorm
# 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...
NREL/ml-combustion-pdf-models
ClampNorm
false
17,725
[ "Apache-2.0" ]
6
0505b9c54ab4c1e2b7ef8ca9f59f76bfb2e3732d
https://github.com/NREL/ml-combustion-pdf-models/tree/0505b9c54ab4c1e2b7ef8ca9f59f76bfb2e3732d
ChannelPool
# 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...
VictorSuciu/ICCV2019_MirrorNet
ChannelPool
false
14,557
[ "BSD-3-Clause" ]
48
e7ce3c269feaf33a0b156091beebbaebdabf6155
https://github.com/VictorSuciu/ICCV2019_MirrorNet/tree/e7ce3c269feaf33a0b156091beebbaebdabf6155
ODEfunc
import torch from torch import nn def norm(dim): return nn.GroupNorm(min(32, dim), dim) class ConcatConv2d(nn.Module): def __init__(self, dim_in, dim_out, ksize=3, stride=1, padding=0, dilation=1, groups=1, bias=True, transpose=False): super(ConcatConv2d, self).__init__() module = n...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
BoyanJIANG/4D-Compositional-Representation
ODEfunc
false
7,836
[ "Apache-2.0" ]
12
64d5f4bbd6b8e6bc3bfd8f76736f6d468c71a73c
https://github.com/BoyanJIANG/4D-Compositional-Representation/tree/64d5f4bbd6b8e6bc3bfd8f76736f6d468c71a73c