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
MeanEmbedding
import torch from torch import nn import torch.nn.modules.loss from scipy.sparse import * class MeanEmbedding(nn.Module): """Mean embedding class. """ def __init__(self): super(MeanEmbedding, self).__init__() def forward(self, emb, len_): """Compute average embeddings. Param...
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 import torch.nn.modules.loss from scipy.sparse import * assert_size_stride = torch._C._dynamo.guards.assert_size_stride...
IBM/graph4nlp
MeanEmbedding
false
8,348
[ "Apache-2.0" ]
18
a9bf20b23fa1ec368d9bd40cc8c557f86a9f8297
https://github.com/IBM/graph4nlp/tree/a9bf20b23fa1ec368d9bd40cc8c557f86a9f8297
Quantization
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.utils.data impo...
AbnerVictor/HCFlow
Quantization
false
9,093
[ "Apache-2.0" ]
0
e55938ac9f58c117898e3d161ddc73b14d15289b
https://github.com/AbnerVictor/HCFlow/tree/e55938ac9f58c117898e3d161ddc73b14d15289b
Actor
import torch import torch.nn as nn import torch.nn.functional as F class Actor(nn.Module): def __init__(self, hidden_size, num_inputs, action_space): super(Actor, self).__init__() self.action_space = action_space num_outputs = action_space.shape[0] self.linear1 = nn.Linear(num_inp...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
JieFeng-cse/power-system-rl
Actor
false
9,191
[ "MIT" ]
0
8295d14da83a40c755b8e6a14785c53a238f9a64
https://github.com/JieFeng-cse/power-system-rl/tree/8295d14da83a40c755b8e6a14785c53a238f9a64
PatchEmbedding
import torch import torch.nn as nn class PatchEmbedding(nn.Module): def __init__(self, image_size, patch_size, embed_dim, channels): super().__init__() self.image_size = image_size if image_size[0] % patch_size != 0 or image_size[1] % patch_size != 0: raise ValueError( ...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
avniculae/segmenter
PatchEmbedding
false
9,769
[ "MIT" ]
0
ca9683399b7dae13a8ccbadc744826306b8dbf94
https://github.com/avniculae/segmenter/tree/ca9683399b7dae13a8ccbadc744826306b8dbf94
LayerNorm
import torch from torch import nn class LayerNorm(nn.Module): def __init__(self, size, eps=1e-06): super(LayerNorm, self).__init__() self.eps = eps self.weight = nn.Parameter(torch.ones(size, 1, 1)) self.bias = nn.Parameter(torch.zeros(size, 1, 1)) def forward(self, x): ...
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...
ParadoxZW/CosAttention2d
LayerNorm
false
5,708
[ "Apache-2.0" ]
1
19b3e655cf0ebc40721b806eb46a3132c488a188
https://github.com/ParadoxZW/CosAttention2d/tree/19b3e655cf0ebc40721b806eb46a3132c488a188
one_conv
# 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...
Holmes-Alan/RefVAE
one_conv
false
8,261
[ "MIT" ]
13
836b8f1168f1b0f923b609a48e202ace7806f79c
https://github.com/Holmes-Alan/RefVAE/tree/836b8f1168f1b0f923b609a48e202ace7806f79c
DeConv
# 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.onnx assert_size_stride = torch._C._dynamo.gua...
TriceHelix/ASMAGAN
DeConv
false
14,512
[ "Apache-2.0" ]
121
6e2b5b587f88f641fdcc05a81cf5f0b4d6a9f3e1
https://github.com/TriceHelix/ASMAGAN/tree/6e2b5b587f88f641fdcc05a81cf5f0b4d6a9f3e1
SimpleNet
import torch import torch.cuda import torch.backends.cudnn import torch.backends.mkl class SimpleNet(torch.nn.Module): def __init__(self): super(SimpleNet, self).__init__() self.conv = torch.nn.Conv2d(64, 128, (3, 3), stride=(2, 2), padding =(1, 1), bias=False) def forward(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.cuda import torch.backends.cudnn import torch.backends.mkl assert_s...
JudeDavis1/intel-extension-for-pytorch
SimpleNet
false
2,590
[ "Apache-2.0" ]
0
364e34cb4917a709f5108c07d4005bf82f3d5067
https://github.com/JudeDavis1/intel-extension-for-pytorch/tree/364e34cb4917a709f5108c07d4005bf82f3d5067
FixedSubnetConv
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math import torch.multiprocessing import torch.nn as nn import torch.nn.p...
adityakusupati/LLC-2.0
FixedSubnetConv
false
18,218
[ "MIT" ]
10
38608bbaa425b15dcf5c971000b7a1b08120fb5c
https://github.com/adityakusupati/LLC-2.0/tree/38608bbaa425b15dcf5c971000b7a1b08120fb5c
ShearX
# 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 import torch.nn as ...
Hayoung93/UDA
ShearX
false
966
[ "Apache-2.0" ]
0
a587b01c76141d64e7cead55b62e0f3ed75890bf
https://github.com/Hayoung93/UDA/tree/a587b01c76141d64e7cead55b62e0f3ed75890bf
Div
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
PogChamper/torch2trt
Div
false
14,188
[ "MIT" ]
3,363
43b12627ec0de4d212efb6d02b07570205085ccc
https://github.com/PogChamper/torch2trt/tree/43b12627ec0de4d212efb6d02b07570205085ccc
GCN
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch.nn import Module i...
ZhihuaLiuEd/canetbrats
GCN
false
18,199
[ "MIT" ]
7
a23f008b2876a21026b2564588f4f51692083ae2
https://github.com/ZhihuaLiuEd/canetbrats/tree/a23f008b2876a21026b2564588f4f51692083ae2
LinkClassifier
import torch import torch.nn as nn import torch.nn.functional as F class LinkClassifier(nn.Module): def __init__(self, in_features, dropout=0.2): super(LinkClassifier, self).__init__() self.input = nn.Linear(in_features, 32) self.hidden1 = nn.Linear(32, 16) self.hidden2 = nn.Linea...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
BlackReap-er/Sia
LinkClassifier
false
7,801
[ "MIT" ]
13
70654d55caa3315187282c88a59cf9b6e0b7c52b
https://github.com/BlackReap-er/Sia/tree/70654d55caa3315187282c88a59cf9b6e0b7c52b
SumNorm
# 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...
RosarioAndolina/psychXRF
SumNorm
false
1,003
[ "MIT" ]
0
e2adadbd17664d7f74c10304f84b3751c571226e
https://github.com/RosarioAndolina/psychXRF/tree/e2adadbd17664d7f74c10304f84b3751c571226e
Conv2dSWD
# 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.utils.data import torch.nn as nn import torch assert_size_stride = ...
FVL2020/MSWSR
Conv2dSWD
false
8,112
[ "MIT" ]
27
0844e78ee68fb0465efd5c4a2215ce815980526b
https://github.com/FVL2020/MSWSR/tree/0844e78ee68fb0465efd5c4a2215ce815980526b
NormalKLLoss
import torch from torch import distributions from torch.nn.modules.loss import _Loss class NormalKLLoss(_Loss): def __init__(self, reduction='mean'): super(NormalKLLoss, self).__init__() assert reduction in ['none', 'sum', 'mean'] self.reduction = reduction def forward(self, q_mu, q_...
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 from torch.nn.modules.loss import _Loss assert_size_stride = t...
imguozhen/proactive-chat
NormalKLLoss
false
10,292
[ "Apache-2.0" ]
0
80d13e28cb93c26a65ace0a028c53fd0bafcdbf9
https://github.com/imguozhen/proactive-chat/tree/80d13e28cb93c26a65ace0a028c53fd0bafcdbf9
ClippedReLU
import torch import torch.nn as nn class ClippedReLU(nn.Module): def __init__(self): super(ClippedReLU, self).__init__() def forward(self, x): return x.clamp(min=0.0, max=255.0) 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
Bovbene/WSCCSN
ClippedReLU
false
161
[ "Apache-2.0" ]
0
7f454050218e7f2162b0bdc1cdff938d876efc0b
https://github.com/Bovbene/WSCCSN/tree/7f454050218e7f2162b0bdc1cdff938d876efc0b
BDiceLoss
import torch import torch.nn as nn def centercrop(image, w, h): _nt, _ct, ht, wt = image.size() padw, padh = (wt - w) // 2, (ht - h) // 2 if padw > 0 and padh > 0: image = image[:, :, padh:-padh, padw:-padw] return image def flatten(x): x_flat = x.clone() x_flat = x_flat.view(x.shape...
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...
CarlosPena00/pytorch-unet
BDiceLoss
false
197
[ "MIT" ]
0
8365bace23e4b04b9c5b75cd6720807ea8cac5ab
https://github.com/CarlosPena00/pytorch-unet/tree/8365bace23e4b04b9c5b75cd6720807ea8cac5ab
AdversarialNetwork
# 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...
pwjworks/MS-MDA
AdversarialNetwork
false
4,148
[ "MIT" ]
0
21f921a933a318820239541adb26b9fc6feba699
https://github.com/pwjworks/MS-MDA/tree/21f921a933a318820239541adb26b9fc6feba699
FocalLossV1
import torch import torch.nn as nn class FocalLossV1(nn.Module): def __init__(self, alpha=0.25, gamma=2, reduction='mean'): super(FocalLossV1, self).__init__() self.alpha = alpha self.gamma = gamma self.reduction = reduction self.crit = nn.BCEWithLogitsLoss(reduction='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 from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
imvladikon/pytorch-loss
FocalLossV1
false
6,875
[ "MIT" ]
1
6cfaabe1be898e1ff000b3dffb46d0ef09096f6b
https://github.com/imvladikon/pytorch-loss/tree/6cfaabe1be898e1ff000b3dffb46d0ef09096f6b
KnowledgeDistillationLoss
# 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 ...
VitoPalmisano/MiB
KnowledgeDistillationLoss
false
9,625
[ "MIT" ]
0
4b3d81e593471f2fb57abd852114a389ead3905c
https://github.com/VitoPalmisano/MiB/tree/4b3d81e593471f2fb57abd852114a389ead3905c
BaselineModel
# 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 ...
Purple-PI/rlstructures
BaselineModel
false
14,247
[ "MIT" ]
281
9b201b083715bbda2f3534b010c84e11dfc0a1c7
https://github.com/Purple-PI/rlstructures/tree/9b201b083715bbda2f3534b010c84e11dfc0a1c7
Generator
# 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....
RowitZou/RankAE
Generator
false
8,727
[ "MIT" ]
23
d47ab58aa4fda203c551e36cbe04edd564b76d89
https://github.com/RowitZou/RankAE/tree/d47ab58aa4fda203c551e36cbe04edd564b76d89
DownBlock
import torch import torch.utils.data from torchvision.transforms import * class ConvBlock(torch.nn.Module): def __init__(self, input_size, output_size, kernel_size=3, stride=1, padding=1, bias=True, activation='prelu', norm=None): super(ConvBlock, self).__init__() self.conv = torch.nn.Con...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data from torchvision.transforms import * assert_size_stride ...
HamsterBiz/iSeeBetter
DownBlock
false
11,669
[ "MIT" ]
0
a71cee61583bdedab1f3b368e2cb7dc5ad969aed
https://github.com/HamsterBiz/iSeeBetter/tree/a71cee61583bdedab1f3b368e2cb7dc5ad969aed
AFMS
# 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...
ishine/RawNet
AFMS
false
15,633
[ "MIT" ]
199
cddec5afa27049a4b507f3d48bb02b993ea838bb
https://github.com/ishine/RawNet/tree/cddec5afa27049a4b507f3d48bb02b993ea838bb
SimpleAttention
import torch import torch.nn as nn import torch.nn.functional as F class SimpleAttention(nn.Module): def __init__(self, input_dim): super(SimpleAttention, self).__init__() self.input_dim = input_dim self.scalar = nn.Linear(self.input_dim, 1, bias=False) def forward(self, M, x=None): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Anshul044/Project-NN
SimpleAttention
false
60
[ "MIT" ]
0
ef080846715a95b735f0381e4f60742e40791630
https://github.com/Anshul044/Project-NN/tree/ef080846715a95b735f0381e4f60742e40791630
PolicyNet
import torch import torch.nn as nn import torch.nn.functional as F class PolicyNet(nn.Module): def __init__(self): super(PolicyNet, self).__init__() self.fc1 = nn.Linear(64, 32) self.fc2 = nn.Linear(32, 16) self.fc3 = nn.Linear(16, 4) def forward(self, x): x = torch.f...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
Jontahan/kvad
PolicyNet
false
9,173
[ "MIT" ]
0
1b22db801048beb948b34bdd615ebe8630d13d9f
https://github.com/Jontahan/kvad/tree/1b22db801048beb948b34bdd615ebe8630d13d9f
UpBlock
import torch import torch.nn as nn from torch.nn import functional as F class UpBlock(nn.Module): """Upsample block for DRRG and TextSnake.""" def __init__(self, in_channels, out_channels): super().__init__() assert isinstance(in_channels, int) assert isinstance(out_channels, int) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
jeffreykuang/mmocr-1
UpBlock
false
15,678
[ "Apache-2.0" ]
206
b17304edeb493b0a4d7224c23d23b952350d0db5
https://github.com/jeffreykuang/mmocr-1/tree/b17304edeb493b0a4d7224c23d23b952350d0db5
CausalSelfAttention
from _paritybench_helpers import _mock_config import math import torch import torchvision.transforms.functional as F import torch.nn.functional as F import torch.nn as nn from torchvision.transforms import functional as F from torch.nn import functional as F class CausalSelfAttention(nn.Module): def __init__(sel...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
DQiaole/ZITS
CausalSelfAttention
false
8,809
[ "Apache-2.0" ]
40
5f7a060167790789d5e29a3d14d3c2ef8a34e765
https://github.com/DQiaole/ZITS/tree/5f7a060167790789d5e29a3d14d3c2ef8a34e765
PlanarFlow
# 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, math as tl_math import torch.utils.data import torch.nn as nn assert_size_stri...
gpoesia/variational-item-response-theory-public
PlanarFlow
false
12,476
[ "MIT" ]
0
6a0db81068695422dddec8832ce353879c5acb82
https://github.com/gpoesia/variational-item-response-theory-public/tree/6a0db81068695422dddec8832ce353879c5acb82
SimpleConv2dModule
import torch import torch.jit import torch.nn.functional as F import torch.onnx import torch.nn class SimpleConv2dModule(torch.nn.Module): def __init__(self, stride=1, padding=0, dilation=1, groups=1): super(SimpleConv2dModule, self).__init__() self.stride = stride self.padding = padding ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
YaronBenAtar/glow
SimpleConv2dModule
false
14,670
[ "Apache-2.0" ]
2,838
a13706a4239fa7eaf059c670dc573e3eb0768f86
https://github.com/YaronBenAtar/glow/tree/a13706a4239fa7eaf059c670dc573e3eb0768f86
LocalNorm2d
# 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...
rdguez-mariano/affnet
LocalNorm2d
false
16,320
[ "MIT" ]
211
a3f0bb32d9001d1daf024f38d29867f37816ea78
https://github.com/rdguez-mariano/affnet/tree/a3f0bb32d9001d1daf024f38d29867f37816ea78
Upsample
import torch from torch import nn class Upsample(nn.Module): """ Since the number of channels of the feature map changes after upsampling in HRNet. we have to write a new Upsample class. """ def __init__(self, in_channels, out_channels, scale_factor, mode): super(Upsample, self)._...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
hjk0918/style-transfer-pytorch
Upsample
false
3,593
[ "MIT" ]
0
acbc054c734aa9c723a3a9bb36e33afb9bd7833b
https://github.com/hjk0918/style-transfer-pytorch/tree/acbc054c734aa9c723a3a9bb36e33afb9bd7833b
MeanStdExtractor
import torch from torch import nn class MeanStdExtractor(nn.Module): def __init__(self): super().__init__() def forward(self, feature_maps_batch): feature_maps_batch = feature_maps_batch.view(*feature_maps_batch. shape[:2], -1) feature_means_batch = feature_maps_batch.mea...
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...
YangXuanyue/Neural-Unaligned-Phoneme-Sequence-Prediction
MeanStdExtractor
false
18,160
[ "BSD-3-Clause" ]
5
91ef1c95478367f5b421da125f07660cfc9bed98
https://github.com/YangXuanyue/Neural-Unaligned-Phoneme-Sequence-Prediction/tree/91ef1c95478367f5b421da125f07660cfc9bed98
L2Norm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
AlphaLFC/mmdetection
L2Norm
false
4,841
[ "Apache-2.0" ]
1
45619c5b8aca0ca3e6ddc211210a8946c94694d8
https://github.com/AlphaLFC/mmdetection/tree/45619c5b8aca0ca3e6ddc211210a8946c94694d8
DoubleInputNet
# 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_...
cbekar/DRL_Project
DoubleInputNet
false
9,879
[ "MIT" ]
0
90d197773c7746b253ee7d997d0526e15d05578a
https://github.com/cbekar/DRL_Project/tree/90d197773c7746b253ee7d997d0526e15d05578a
ResidualLayer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math from torch import Tensor from torch.nn import Linear from torch.nn i...
douglasrizzo/pytorch_geometric
ResidualLayer
false
12,307
[ "MIT" ]
0
effc617c6ad6daad506038bb79e4407082e74740
https://github.com/douglasrizzo/pytorch_geometric/tree/effc617c6ad6daad506038bb79e4407082e74740
NNet
import torch import torch.nn as nn import torch.nn.functional as F class NNet(nn.Module): def __init__(self, input_dim, output_dim): super(NNet, self).__init__() self.linear1 = nn.Linear(input_dim, 64) self.linear2 = nn.Linear(64, 256) self.linear3 = nn.Linear(256, output_dim) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
gautam-sharma1/openRL
NNet
false
6,730
[ "MIT" ]
1
14310a97a328fe5682a01ee85d83a6b5e1ae29ca
https://github.com/gautam-sharma1/openRL/tree/14310a97a328fe5682a01ee85d83a6b5e1ae29ca
ShiftedSoftplus
import torch import torch.nn.functional as F import torch.utils.data class ShiftedSoftplus(torch.nn.Module): def __init__(self): super(ShiftedSoftplus, self).__init__() self.shift = torch.log(torch.tensor(2.0)).item() def forward(self, x): return F.softplus(x) - self.shift def get_...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torch.utils.data assert_size_stride = torch._C._dynamo....
beneisner/pytorch_geometric
ShiftedSoftplus
false
6,324
[ "MIT" ]
1
53d44a96bd2de2753b1ab1d7153c026c92606a81
https://github.com/beneisner/pytorch_geometric/tree/53d44a96bd2de2753b1ab1d7153c026c92606a81
HighwayNetwork
# 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_...
YoghesWaran/tacotron
HighwayNetwork
false
18,133
[ "MIT" ]
10
0b97486da7698229bad09e2072cfa3313ae7effe
https://github.com/YoghesWaran/tacotron/tree/0b97486da7698229bad09e2072cfa3313ae7effe
SoftmaxLoss
# 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...
mfredriksz/semanticGAN_code
SoftmaxLoss
false
16,035
[ "BSD-2-Clause", "MIT" ]
107
c6e7b490086afd8a7593e2892452295555910494
https://github.com/mfredriksz/semanticGAN_code/tree/c6e7b490086afd8a7593e2892452295555910494
LabelSmoothSoftmaxCEV1
# 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 ...
chizhu/pytorch-loss
LabelSmoothSoftmaxCEV1
false
6,443
[ "MIT" ]
1
c8fbd78771f11a910b0b51ae3697c09761dd9696
https://github.com/chizhu/pytorch-loss/tree/c8fbd78771f11a910b0b51ae3697c09761dd9696
BertOutput
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import n...
Stephen0808/WebQA
BertOutput
false
11,908
[ "Apache-2.0" ]
0
b9758932a9d0d75167ec837bb6ee8bc571c64681
https://github.com/Stephen0808/WebQA/tree/b9758932a9d0d75167ec837bb6ee8bc571c64681
PlainRefiner
# 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_...
Jason-Khan/mmediting
PlainRefiner
false
646
[ "Apache-2.0" ]
0
d187f95a675dff3eb975a575bd9278d643b5b645
https://github.com/Jason-Khan/mmediting/tree/d187f95a675dff3eb975a575bd9278d643b5b645
PARALoss
# 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...
igorvlnascimento/open-nre
PARALoss
false
12,517
[ "MIT" ]
0
a6e42ef074d62be4d3ceb571f412d5be8c0502d7
https://github.com/igorvlnascimento/open-nre/tree/a6e42ef074d62be4d3ceb571f412d5be8c0502d7
FC
import torch import torch.utils.data from torch import nn import torch.nn.functional as F class FC(nn.Module): def __init__(self, in_channels, out_channels, gain=2 ** 0.5, use_wscale =False, lrmul=1.0, bias=True): super(FC, self).__init__() he_std = gain * in_channels ** -0.5 if u...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data from torch import nn assert_size_stride = torch._C._dyna...
Archjbald/PoseStylizer
FC
false
1,979
[ "BSD-3-Clause" ]
0
95aae02d1f4ac83536d91b8db5f78d12e7830f97
https://github.com/Archjbald/PoseStylizer/tree/95aae02d1f4ac83536d91b8db5f78d12e7830f97
Policy
import torch import torch.nn as nn import torch.nn.functional as F class Policy(nn.Module): def __init__(self, input_size, num_actions): super(Policy, self).__init__() self.affines = nn.Linear(input_size, 100) self.action_head = nn.Linear(100, num_actions) self.saved_actions = [] ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Dookas/Robust-Multitask-RL
Policy
false
13,615
[ "MIT" ]
106
7970e20cbdf91703c88edcb84568d7354e2525bc
https://github.com/Dookas/Robust-Multitask-RL/tree/7970e20cbdf91703c88edcb84568d7354e2525bc
_GatedResidualNetwork
# 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 ...
amadejkocbek/darts
_GatedResidualNetwork
false
12,112
[ "Apache-2.0" ]
0
074be2a76eee11258da066878c564badf40834e9
https://github.com/amadejkocbek/darts/tree/074be2a76eee11258da066878c564badf40834e9
TemporalFusion
import torch import torch.nn as nn class TemporalFusion(nn.Module): def __init__(self, nf, n_frame): super(TemporalFusion, self).__init__() self.n_frame = n_frame self.ref_conv = nn.Conv2d(nf, nf, 3, 1, 1, bias=True) self.nbr_conv = nn.Conv2d(nf, nf, 3, 1, 1, bias=True) se...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
myeldib/Simple-SR
TemporalFusion
false
12,822
[ "MIT" ]
0
583456b1f231574d9e0b45c29266cf41603d161d
https://github.com/myeldib/Simple-SR/tree/583456b1f231574d9e0b45c29266cf41603d161d
LatentDecoder
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import n...
UKPLab/MMT-Retrieval
LatentDecoder
false
14,524
[ "MIT" ]
98
a31caaeb0da680131bf39dc855e38fdda949f38e
https://github.com/UKPLab/MMT-Retrieval/tree/a31caaeb0da680131bf39dc855e38fdda949f38e
FocalLoss2d
# 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 ...
WHU-YH-jx/bionetwork_segmentation
FocalLoss2d
false
5,945
[ "MIT" ]
1
556c5b61a1a3784875b31eacb8c6bb418d70ee9a
https://github.com/WHU-YH-jx/bionetwork_segmentation/tree/556c5b61a1a3784875b31eacb8c6bb418d70ee9a
ResidualSequential
# 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.optim import torch.nn as nn import torch.nn.init assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_...
ChongYou/robust-image-recovery
ResidualSequential
false
7,881
[ "MIT" ]
13
5bb23142509f307d31fd435de12787a70ec3a5bc
https://github.com/ChongYou/robust-image-recovery/tree/5bb23142509f307d31fd435de12787a70ec3a5bc
BartClassificationHead
import torch import torch.utils.data from torch import nn class BartClassificationHead(nn.Module): """Head for sentence-level classification tasks.""" def __init__(self, input_dim, inner_dim, num_classes, pooler_dropout): super().__init__() self.dense = nn.Linear(input_dim, inner_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.triton_helpers import libdevice import torch.utils....
JuruoMP/gap-exp
BartClassificationHead
false
9,223
[ "Apache-2.0" ]
0
2d7af8a1da2f0ff8f9d3a2c6e15cc6383c716c05
https://github.com/JuruoMP/gap-exp/tree/2d7af8a1da2f0ff8f9d3a2c6e15cc6383c716c05
LogisticRegression
import torch import torch.nn as nn class LogisticRegression(nn.Module): """ A logistic regression model of the form P(y = 1 | x) = 1 / (1 + exp(-(mx + b))) """ def __init__(self, init_m=1.0, init_b=1.0): """ Initialize a logistic regression model by defining its initial pa...
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...
jayelm/pytorch-project-template
LogisticRegression
false
6,924
[ "MIT" ]
1
30306ce07b21c97c6993432764cbbe0a73092a0c
https://github.com/jayelm/pytorch-project-template/tree/30306ce07b21c97c6993432764cbbe0a73092a0c
MeanPoolConv
import torch import torch.nn as nn def spectral_norm(layer, n_iters=1): return torch.nn.utils.spectral_norm(layer, n_power_iterations=n_iters) class MeanPoolConv(nn.Module): def __init__(self, input_dim, output_dim, kernel_size=3, biases=True, spec_norm=False): super().__init__() se...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Sriram-Ravula/ncsnv2
MeanPoolConv
false
2,864
[ "MIT" ]
0
f610b59441a34063fae1c02aa06837b7eec95c03
https://github.com/Sriram-Ravula/ncsnv2/tree/f610b59441a34063fae1c02aa06837b7eec95c03
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...
AnKra/deep-reinforcement-learning
Critic
false
4,850
[ "MIT" ]
1
fa906b0a3a21102b5085ce0c934185d2e50c3324
https://github.com/AnKra/deep-reinforcement-learning/tree/fa906b0a3a21102b5085ce0c934185d2e50c3324
A2CActorDisc
import torch from torch.distributions import Categorical import torch as t import torch.nn as nn class A2CActorDisc(nn.Module): def __init__(self, state_dim, action_num): super().__init__() self.fc1 = nn.Linear(state_dim, 16) self.fc2 = nn.Linear(16, 16) self.fc3 = nn.Linear(16, a...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
ikamensh/machin
A2CActorDisc
false
6,860
[ "MIT" ]
1
af7b423c47bc1412530cf6c96c11bd3af9b3e239
https://github.com/ikamensh/machin/tree/af7b423c47bc1412530cf6c96c11bd3af9b3e239
ModAssign
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride @triton.jit d...
NVIDIA-AI-IOT-private/torch2trt
ModAssign
false
10,515
[ "MIT" ]
0
953d60039e0c81e90eea467c3df2e6e3f7040242
https://github.com/NVIDIA-AI-IOT-private/torch2trt/tree/953d60039e0c81e90eea467c3df2e6e3f7040242
AttnScore
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.init as init def sequence_mask(lengths, max_len=None): """ Creates a boolean mask from sequence lengths. """ batch_size = lengths.numel() max_len = max_len or lengths.max() return torch.arange(0, max_len).type_a...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Fengyee/ASER
AttnScore
false
11,425
[ "MIT" ]
0
c284b507ee268a8275456a969b944895cacc54b8
https://github.com/Fengyee/ASER/tree/c284b507ee268a8275456a969b944895cacc54b8
KLLoss
import torch from torch import nn import torch.nn.functional as F import torch.utils.checkpoint class KLLoss(nn.Module): """Loss that uses a 'hinge' on the lower bound. This means that for samples with a label value smaller than the threshold, the loss is zero if the prediction is also smaller than that 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 import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math from torch ...
jiazheng-xing/Swin_Multimodal
KLLoss
false
10,320
[ "MIT" ]
0
7bc41977fe7d8d4f0091852c63a6a32a0fada0fb
https://github.com/jiazheng-xing/Swin_Multimodal/tree/7bc41977fe7d8d4f0091852c63a6a32a0fada0fb
SpatialRescaler
import torch from functools import partial import torch.nn as nn class SpatialRescaler(nn.Module): def __init__(self, n_stages=1, method='bilinear', multiplier=0.5, in_channels=3, out_channels=None, bias=False): super().__init__() self.n_stages = n_stages assert self.n_stages >= 0...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from functools import partial import torch.nn as nn assert_size_stride = torch._C._dynamo...
transat/latent-diffusion
SpatialRescaler
false
10,923
[ "MIT" ]
0
1ea0d5bb3fb0fe3f7e8c42cbae91423780977f83
https://github.com/transat/latent-diffusion/tree/1ea0d5bb3fb0fe3f7e8c42cbae91423780977f83
UpsamplingBilinear
# 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 from torch.quantization import QuantStub from torch.quantization im...
Archermmt/tvm
UpsamplingBilinear
false
11,193
[ "Apache-2.0" ]
0
8b900cec1a9c3cb453e159db4d497ebeb26ed289
https://github.com/Archermmt/tvm/tree/8b900cec1a9c3cb453e159db4d497ebeb26ed289
lp_L1_Loss
import torch from torch.utils.data import * import torch.nn as nn class lp_L1_Loss(nn.Module): def __init__(self): super().__init__() self.loss = nn.L1Loss(reduction='sum') def forward(self, x, y): b = x.shape[0] loss = self.loss(x, y) return loss / b 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 from torch.utils.data ...
loveorchids/local_patch_retrieval
lp_L1_Loss
false
3,935
[ "Apache-2.0" ]
0
52b2e8fdac965d56ef9f89a8c4de96d0b41d3981
https://github.com/loveorchids/local_patch_retrieval/tree/52b2e8fdac965d56ef9f89a8c4de96d0b41d3981
SubSample
# 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....
verages/PaddleOCR2Pytorch
SubSample
false
4,670
[ "Apache-2.0" ]
0
201f0d5d6007f49620c49af7d222c3b220eb3e70
https://github.com/verages/PaddleOCR2Pytorch/tree/201f0d5d6007f49620c49af7d222c3b220eb3e70
TransposeConv2dLayer
import torch import torch.nn as nn from torch.nn import functional as F from torch.nn import Parameter def l2normalize(v, eps=1e-12): return v / (v.norm() + eps) class LayerNorm(nn.Module): def __init__(self, num_features, eps=1e-08, affine=True): super(LayerNorm, self).__init__() self.num_...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from torch.nn import Parameter assert_size_stride = torch....
piggy2303/DeepFillv2_Pytorch
TransposeConv2dLayer
false
7,468
[ "MIT" ]
1
dd35299f11704f878ed7a33e14ccd51a9d64baaf
https://github.com/piggy2303/DeepFillv2_Pytorch/tree/dd35299f11704f878ed7a33e14ccd51a9d64baaf
MSELoss
import functools import torch import torch.nn as nn import torch.cuda.comm from torch.nn import functional as F def reduce_loss(loss, reduction): """Reduce loss as specified. Args: loss (Tensor): Elementwise loss tensor. reduction (str): Options are "none", "mean" and "sum". 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 import functools import torch.nn as nn import torch.cuda.comm from torch.nn import functi...
JasonBoy1/mmhuman3d
MSELoss
false
5,383
[ "Apache-2.0" ]
1
79b2665191115f3ed905e6afdf09990a8d484362
https://github.com/JasonBoy1/mmhuman3d/tree/79b2665191115f3ed905e6afdf09990a8d484362
CriticNetwork
import torch import torch.nn as nn import torch.nn.functional as F class CriticNetwork(nn.Module): def __init__(self, input_shape, output_shape, **kwargs): super().__init__() n_input = input_shape[-1] n_output = output_shape[0] self._h = nn.Linear(n_input, n_output) nn.ini...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
AmmarFahmy/mushroom-rl
CriticNetwork
false
4,855
[ "MIT" ]
1
2625ee7f64d5613b3b9fba00f0b7a39fece88ca5
https://github.com/AmmarFahmy/mushroom-rl/tree/2625ee7f64d5613b3b9fba00f0b7a39fece88ca5
Stack
# 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 import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dy...
angusl95/darts-kbc
Stack
false
1,437
[ "Apache-2.0" ]
0
85fc6f4bdb7ba73c07d96ce47e96634599b346f9
https://github.com/angusl95/darts-kbc/tree/85fc6f4bdb7ba73c07d96ce47e96634599b346f9
BertPredictionHeadTransform
from _paritybench_helpers import _mock_config import math import torch from torch import nn def gelu(x): """Gaussian Error Linear Unitという活性化関数です。 LeLUが0でカクっと不連続なので、そこを連続になるように滑らかにした形のLeLUです。 """ return x * 0.5 * (1.0 + torch.erf(x / math.sqrt(2.0))) class BertLayerNorm(nn.Module): def __init__(...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import math from to...
kimihitosugiyama/text_analysis
BertPredictionHeadTransform
false
3,840
[ "Apache-2.0" ]
0
8f51022957928c31e52af1e0fd407daca3addb40
https://github.com/kimihitosugiyama/text_analysis/tree/8f51022957928c31e52af1e0fd407daca3addb40
RefModel3d
import torch import torch.nn.functional as F class RefModel3d(torch.nn.Module): """The 3D reference model.""" def __init__(self): super().__init__() self.l1 = torch.nn.Conv3d(2, 2, 1, bias=True) self.l2 = torch.nn.InstanceNorm3d(2, affine=True) self.l3 = torch.nn.ReLU() ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
shuohan/pytorch-layers
RefModel3d
false
4,368
[ "MIT" ]
0
020846fd02d501cf477552179c19ba4b5e9a0695
https://github.com/shuohan/pytorch-layers/tree/020846fd02d501cf477552179c19ba4b5e9a0695
Model
# 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_...
PacktPublishing/Hands-On-Reinforcement-Learning-for-Games
Model
false
8,650
[ "MIT" ]
41
045b8846f2558aa8fb8ac8cef5c71ee098cb9b22
https://github.com/PacktPublishing/Hands-On-Reinforcement-Learning-for-Games/tree/045b8846f2558aa8fb8ac8cef5c71ee098cb9b22
outconv
# 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...
BloodAxe/segmentation-networks-benchmark
outconv
false
7,862
[ "MIT" ]
34
2e3feb560102230be9369ab442b4a59cc86dff61
https://github.com/BloodAxe/segmentation-networks-benchmark/tree/2e3feb560102230be9369ab442b4a59cc86dff61
SmoothL1Loss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn import torch.cuda import torch.distributed import t...
krisk84/retinanet-examples
SmoothL1Loss
false
12,690
[ "BSD-3-Clause" ]
0
174d95f3aabe1746d105c66f87aa445607f4eab8
https://github.com/krisk84/retinanet-examples/tree/174d95f3aabe1746d105c66f87aa445607f4eab8
EncoderLayer
import math import torch import torch.nn as nn import torch.nn.functional as F def attention(q, k, v, d_k, mask=None, dropout=None): scores = torch.matmul(q, k.transpose(-2, -1)) / math.sqrt(d_k) if mask is not None: mask = mask.unsqueeze(1) scores = F.softmax(scores, dim=-1) if dropout is not...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
MadanMl/PyTorch-Transformer-for-RUL-Prediction
EncoderLayer
false
8,531
[ "Apache-2.0" ]
25
5bf0a4739abdecbbc88118ea413393997bdc1e24
https://github.com/MadanMl/PyTorch-Transformer-for-RUL-Prediction/tree/5bf0a4739abdecbbc88118ea413393997bdc1e24
IMul
import torch class IMul(torch.nn.Module): def __init__(self): super(IMul, self).__init__() def forward(self, x, y): x *= y return x def get_inputs(): return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride @triton.jit def triton_poi_fused_mul_0(in_ptr0, in_ptr1, out_ptr1, xnumel,...
Akababa/torch2trt
IMul
false
18,411
[ "MIT" ]
2
03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7
https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7
LRN
import torch import torch.nn as nn class LRN(nn.Module): def __init__(self, local_size=1, alpha=1.0, beta=0.75, ACROSS_CHANNELS=True ): super(LRN, self).__init__() self.ACROSS_CHANNELS = ACROSS_CHANNELS if ACROSS_CHANNELS: self.average = nn.AvgPool3d(kernel_size=(local...
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_...
anas-awadalla/dissect
LRN
false
12,075
[ "MIT" ]
0
d74e9147731c6160274405a39ab1c98191929269
https://github.com/anas-awadalla/dissect/tree/d74e9147731c6160274405a39ab1c98191929269
AdaptiveInstanceNorm
import torch import torch.nn as nn from torch.nn.init import _calculate_correct_fan def equalized_lr(module, name='weight', gain=2 ** 0.5, mode='fan_in', lr_mul=1.0): """Equalized Learning Rate. This trick is proposed in: Progressive Growing of GANs for Improved Quality, Stability, and Variation ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
HXWAndCL/mmgeneration
AdaptiveInstanceNorm
false
5,248
[ "Apache-2.0" ]
1
9afb1d740bf56a4ecde5064d5bb2a4e2d777638b
https://github.com/HXWAndCL/mmgeneration/tree/9afb1d740bf56a4ecde5064d5bb2a4e2d777638b
MedianPool2d
import torch import torch.nn.functional as F import torch.nn as nn from torch.nn.modules.utils import _pair from torch.nn.modules.utils import _quadruple class MedianPool2d(nn.Module): """Median pool (usable as median filter when stride=1) module. Args: kernel_size: size of pooling kernel, int or 2-...
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 from torch.nn.modules.utils import _pair from torch...
LuckMonkeys/ATSPrivacy
MedianPool2d
false
8,474
[ "MIT" ]
14
6b580942c6b98b6348d313f2bf90202ec19cefce
https://github.com/LuckMonkeys/ATSPrivacy/tree/6b580942c6b98b6348d313f2bf90202ec19cefce
SoftDetectionModule
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.utils imp...
xmlyqing00/d2-net
SoftDetectionModule
false
4,588
[ "BSD-3-Clause-Clear" ]
0
3454a2862088682a6bdb2532ff049fd6cd82729c
https://github.com/xmlyqing00/d2-net/tree/3454a2862088682a6bdb2532ff049fd6cd82729c
MultipleRegression
import torch import torch.nn as nn class MultipleRegression(nn.Module): def __init__(self, num_features): super(MultipleRegression, self).__init__() self.fc1 = nn.Linear(num_features, 64) self.fc2 = nn.Linear(64, 128) self.output = nn.Linear(128, 1) self.act = nn.Sigmoid()...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
jiruifu-jerry0219/UpperLimbEstimator
MultipleRegression
false
10,277
[ "Apache-2.0" ]
0
d62deef93419934dcb33e43707dd0634a235fb9a
https://github.com/jiruifu-jerry0219/UpperLimbEstimator/tree/d62deef93419934dcb33e43707dd0634a235fb9a
FermiDiracDecoder
from torch.nn import Module import torch from torch.nn.modules.module import Module import torch.optim import torch.nn.modules.loss class FermiDiracDecoder(Module): """Fermi Dirac to compute edge probabilities based on distances.""" def __init__(self, r, t): super(FermiDiracDecoder, self).__init__() ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math from torch.nn import Module from torch.nn.modules.module import Module im...
RingBDStack/ACE-HGNN
FermiDiracDecoder
false
17,836
[ "MIT" ]
5
afc610dd838951dcd6c3910795b472566f0c23ca
https://github.com/RingBDStack/ACE-HGNN/tree/afc610dd838951dcd6c3910795b472566f0c23ca
Mul
import torch class Mul(torch.nn.Module): def __init__(self): super(Mul, self).__init__() def forward(self, x, y): return x * y def get_inputs(): return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
NVIDIA-AI-IOT-private/torch2trt
Mul
false
10,524
[ "MIT" ]
0
953d60039e0c81e90eea467c3df2e6e3f7040242
https://github.com/NVIDIA-AI-IOT-private/torch2trt/tree/953d60039e0c81e90eea467c3df2e6e3f7040242
PLU
# 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...
IrisDinge/YoloV3_DOTA
PLU
false
5,350
[ "MIT" ]
1
cdfe6375a2323e9ee162e50a46478d8a66529e6c
https://github.com/IrisDinge/YoloV3_DOTA/tree/cdfe6375a2323e9ee162e50a46478d8a66529e6c
CustomBatchNormManualModule
import torch import torch.nn as nn class CustomBatchNormManualFunction(torch.autograd.Function): """ This torch.autograd.Function implements a functional custom version of the batch norm operation for MLPs. Using torch.autograd.Function allows you to write a custom backward function. The function will...
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_...
RaymondKoopmanschap/DL_assignment_code
CustomBatchNormManualModule
false
978
[ "MIT" ]
0
68b3290be9fbd6c55433a7585e2cfa18e0f35f5c
https://github.com/RaymondKoopmanschap/DL_assignment_code/tree/68b3290be9fbd6c55433a7585e2cfa18e0f35f5c
CapsuleLoss
import torch import torch.nn as nn import torch.nn.functional as F class CapsuleLoss(nn.Module): def __init__(self): super(CapsuleLoss, self).__init__() def forward(self, inputs, labels, logits, recons): batch_size = inputs.shape[0] left = F.relu(0.9 - logits, inplace=True) ** 2 ...
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...
ashawkey/CapsNet.pytorch
CapsuleLoss
false
6,241
[ "MIT" ]
1
3b796b572bbabe79cc445c35913cd3584733aedf
https://github.com/ashawkey/CapsNet.pytorch/tree/3b796b572bbabe79cc445c35913cd3584733aedf
AsymmetricLoss
# 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...
ChangeTheWorld20191008/query2labels
AsymmetricLoss
false
2,135
[ "MIT" ]
0
cdca1f3519f75cc91ef2aa166c2534691016f04f
https://github.com/ChangeTheWorld20191008/query2labels/tree/cdca1f3519f75cc91ef2aa166c2534691016f04f
NN
import torch import torch.nn as nn class NN(nn.Module): def __init__(self, input_size, num_classes): super(NN, self).__init__() self.fc1 = nn.Linear(in_features=input_size, out_features=50) self.activation1 = nn.ReLU() self.fc2 = nn.Linear(in_features=50, out_features=num_classes)...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
Dutta-SD/Python_Programs
NN
false
5,090
[ "MIT" ]
1
f002dbd49c979a6d8b156f88003a79f364ff01da
https://github.com/Dutta-SD/Python_Programs/tree/f002dbd49c979a6d8b156f88003a79f364ff01da
TreeLSTM
import torch import torch.nn as nn class TreeLSTM(nn.Module): """ Implementation of the Tree-LSTM model: https://arxiv.org/pdf/1503.00075.pdf """ def __init__(self, num_units): super(TreeLSTM, self).__init__() self.left = nn.Linear(num_units, 5 * num_units) self.right = 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 ...
Devin-Taylor/pytorch-dynamic-batching-benchmark
TreeLSTM
false
2,177
[ "Apache-2.0" ]
0
aaf913b13a77a2898dfdf8d92cd25b01789a548a
https://github.com/Devin-Taylor/pytorch-dynamic-batching-benchmark/tree/aaf913b13a77a2898dfdf8d92cd25b01789a548a
My_SmoothL1Loss
# 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...
Jvictor97/AWR-Adaptive-Weighting-Regression
My_SmoothL1Loss
false
690
[ "MIT" ]
0
2c29f8ac3d824edfff07465232ffed8e4d837ebf
https://github.com/Jvictor97/AWR-Adaptive-Weighting-Regression/tree/2c29f8ac3d824edfff07465232ffed8e4d837ebf
Myloss
# 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 ...
cuishuhao/HDA
Myloss
false
15,085
[ "Apache-2.0" ]
58
1733ca74eee7839b455e9ffd7a169bc54b272745
https://github.com/cuishuhao/HDA/tree/1733ca74eee7839b455e9ffd7a169bc54b272745
AdaptiveFeatureNorm
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dy...
XianyuanLiu/Transfer-Learning-Library
AdaptiveFeatureNorm
false
10,130
[ "MIT" ]
0
25f83f32437032df88ca6101ecd1f63ec7a0aa2c
https://github.com/XianyuanLiu/Transfer-Learning-Library/tree/25f83f32437032df88ca6101ecd1f63ec7a0aa2c
BasicModel_ConvNet
# 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....
YNNEKUW/captum
BasicModel_ConvNet
false
12,009
[ "BSD-3-Clause" ]
0
c8b5357b21f2ddf440e5f0ce25635977292aa5d1
https://github.com/YNNEKUW/captum/tree/c8b5357b21f2ddf440e5f0ce25635977292aa5d1
ScaledLeakyReLUSin
import math import torch from torch import nn import torch.nn.functional as F class ScaledLeakyReLUSin(nn.Module): def __init__(self, negative_slope=0.2): super().__init__() self.negative_slope = negative_slope def forward(self, input): out_lr = F.leaky_relu(input[:, ::2], negative_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 math as tl_math from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_...
Ugness/CIPS_SR
ScaledLeakyReLUSin
false
14,533
[ "MIT" ]
172
abce872f5bc1b84afb9634a7dd1991e8c74d7616
https://github.com/Ugness/CIPS_SR/tree/abce872f5bc1b84afb9634a7dd1991e8c74d7616
WeightedSoftDiceLoss
# 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.backends.cudnn import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride em...
ArmenGhambaryan/kaggle_carvana_segmentation
WeightedSoftDiceLoss
false
13,297
[ "MIT" ]
447
648a6b5c807cb69011316fe6501241dacc027db2
https://github.com/ArmenGhambaryan/kaggle_carvana_segmentation/tree/648a6b5c807cb69011316fe6501241dacc027db2
PairwiseLoss
# 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.utils.data import torch.nn as nn import torch.nn.parallel assert_size_stride...
MinesNicaicai/large-scale-pointcloud-matching
PairwiseLoss
false
5,595
[ "MIT" ]
1
cfe140f2be1110ed75b6edd27538021e513a31c9
https://github.com/MinesNicaicai/large-scale-pointcloud-matching/tree/cfe140f2be1110ed75b6edd27538021e513a31c9
GAT
# 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....
Prasath2001/commonsense-rl
GAT
false
2,763
[ "Apache-2.0" ]
0
ef3e83270d34cf211b2d2086120cccae0621477b
https://github.com/Prasath2001/commonsense-rl/tree/ef3e83270d34cf211b2d2086120cccae0621477b
Conv2dSamePadding
import torch from torch import nn import torch.nn.functional as F def conv2d_same_padding(input, weight, bias=None, stride=1, dilation=1, groups=1): input_rows = input.size(2) filter_rows = weight.size(2) effective_filter_size_rows = (filter_rows - 1) * dilation[0] + 1 out_rows = (input_rows + str...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import 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.nn.functional as F assert_size_stride = torch....
DaikiOnodera/pycrop-yield-prediction
Conv2dSamePadding
false
13,544
[ "MIT" ]
93
335685d3aa6e609161737453c090f5c41b769213
https://github.com/DaikiOnodera/pycrop-yield-prediction/tree/335685d3aa6e609161737453c090f5c41b769213
DenseCrossEntropy
import torch import torch.nn.functional as F import torch.nn as nn class DenseCrossEntropy(nn.Module): def __init__(self): super().__init__() def forward(self, logits, labels): logits = logits.float() labels = labels.float() logprobs = F.log_softmax(logits, dim=-1) 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 ...
prakhar154/Cassava-Leaf-Disease-Classification
DenseCrossEntropy
false
4,132
[ "MIT" ]
0
04824834a6a1898c77858e8134bd3767c64789f2
https://github.com/prakhar154/Cassava-Leaf-Disease-Classification/tree/04824834a6a1898c77858e8134bd3767c64789f2
BinaryLoss
import torch import torch.nn as nn import torch.nn.functional as F class BinaryLoss(nn.Module): def __init__(self): super(BinaryLoss, self).__init__() def forward(self, pos_score, neg_score): pos_loss = -F.log_softmax(pos_score)[:, 1] neg_loss = -F.log_softmax(neg_score)[:, 0] ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
huanglianghua/mdnet-light
BinaryLoss
false
12,515
[ "MIT" ]
0
955b61b8555a49fdf2e2310aa0756c68f955212c
https://github.com/huanglianghua/mdnet-light/tree/955b61b8555a49fdf2e2310aa0756c68f955212c
Whitening2d
import torch from torch import nn from torch.cuda.amp import custom_fwd from torch.nn.functional import conv2d class Whitening2d(nn.Module): def __init__(self, output_dim: 'int', eps: 'float'=0.0): """Layer that computes hard whitening for W-MSE using the Cholesky decomposition. Args: ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
DonkeyShot21/cassle
Whitening2d
false
8,000
[ "MIT" ]
13
d25f9c7cb5e822660dc1ef03e7fac09a33d0b1a8
https://github.com/DonkeyShot21/cassle/tree/d25f9c7cb5e822660dc1ef03e7fac09a33d0b1a8