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
GAPTripletMarginLoss
import torch from torch import nn import torch.utils.data import torch.nn.functional as F from torch.functional import F def global_average_pooling(inp: 'torch.Tensor') ->torch.Tensor: if inp.ndim == 5: return F.adaptive_avg_pool3d(inp, 1) elif inp.ndim == 4: return F.adaptive_avg_pool2d(inp, ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice from torch import nn import ...
ELEKTRONN/elektronn3
GAPTripletMarginLoss
false
13,596
[ "MIT" ]
124
19c751855dffc67b744cd43e757aa4a5bd577d9b
https://github.com/ELEKTRONN/elektronn3/tree/19c751855dffc67b744cd43e757aa4a5bd577d9b
PrimaryCapsLayer
import torch import torch.nn as nn def squash(x): lengths2 = x.pow(2).sum(dim=2) lengths = lengths2.sqrt() x = x * (lengths2 / (1 + lengths2) / lengths).view(x.size(0), x.size(1), 1) return x class PrimaryCapsLayer(nn.Module): def __init__(self, input_channels, output_caps, output_dim, kernel_s...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
shwetasrsh/MNIST-baselines
PrimaryCapsLayer
false
16,437
[ "MIT" ]
61
aa888e201a1dddda13e7b278cab8f940d57538db
https://github.com/shwetasrsh/MNIST-baselines/tree/aa888e201a1dddda13e7b278cab8f940d57538db
OutlookAttention
import math import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel class OutlookAttention(nn.Module): """ Implementation of outlook attention --dim: hidden dim --num_heads: number of heads --kernel_size: kernel size in each window for outlook attention retu...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
QLSong/cv-classify
OutlookAttention
false
2,872
[ "Apache-2.0" ]
0
02f53d03868f299a08b5c97a266b50a7fdcd3f2b
https://github.com/QLSong/cv-classify/tree/02f53d03868f299a08b5c97a266b50a7fdcd3f2b
L2Softmax
# 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 math...
sailfish009/torch-toolbox
L2Softmax
false
7,594
[ "BSD-3-Clause" ]
1
80dfc22c697b9f323e097de72af04f0e5435d7b4
https://github.com/sailfish009/torch-toolbox/tree/80dfc22c697b9f323e097de72af04f0e5435d7b4
VectorQuantizer
import torch from torch import Tensor from torch import nn import torch.nn.functional as F class VectorQuantizer(nn.Module): """ Reference: [1] https://github.com/deepmind/sonnet/blob/v2/sonnet/src/nets/vqvae.py """ def __init__(self, num_embeddings: 'int', embedding_dim: 'int', beta: 'fl...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 Tensor from...
vipavlovic/pyprobml
VectorQuantizer
false
16,687
[ "MIT" ]
4,895
59a2edc682d0163955db5e2f27491ad772b60141
https://github.com/vipavlovic/pyprobml/tree/59a2edc682d0163955db5e2f27491ad772b60141
PatchEmbed
import torch from torch import nn class PatchEmbed(nn.Module): """ Image to Patch Embedding """ def __init__(self, img_size=224, patch_size=16, in_chans=3, embed_dim=768): super().__init__() num_patches = img_size // patch_size * (img_size // patch_size) self.img_size = img_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 import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
YangtaoWANG95/TokenCut
PatchEmbed
false
14,635
[ "MIT" ]
97
ea585c55e631d17c239f875550b2d0b230446b25
https://github.com/YangtaoWANG95/TokenCut/tree/ea585c55e631d17c239f875550b2d0b230446b25
LayerNorm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
TsinghuaAI/CPM-2-Pretrain
LayerNorm
false
14,518
[ "MIT" ]
54
33003865239e7ba13a12aabf9ec2735cef66bf3b
https://github.com/TsinghuaAI/CPM-2-Pretrain/tree/33003865239e7ba13a12aabf9ec2735cef66bf3b
BilinearWithBias
# 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 import math from torch.nn.parameter import Parameter...
ianyfan/depccg
BilinearWithBias
false
15,582
[ "MIT" ]
75
dda01a72ad09ee36fb5d626a473cc2a0d267c57b
https://github.com/ianyfan/depccg/tree/dda01a72ad09ee36fb5d626a473cc2a0d267c57b
DeConvNet3
# 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_...
GloryyrolG/normalized-autoencoders
DeConvNet3
false
533
[ "MIT" ]
0
27ccb74bb725768f9ba9ea6fa03a7a40867eebb1
https://github.com/GloryyrolG/normalized-autoencoders/tree/27ccb74bb725768f9ba9ea6fa03a7a40867eebb1
MeanPoolConv
# 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...
ChiragCD/NR-GAN
MeanPoolConv
false
13,483
[ "MIT" ]
54
fc455c6219b09bc8bf605715504b78b2bb801e48
https://github.com/ChiragCD/NR-GAN/tree/fc455c6219b09bc8bf605715504b78b2bb801e48
CNNCifar
# 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....
ataML/Federated-Learning-PyTorch
CNNCifar
false
12,133
[ "MIT" ]
0
1c28f3e4a2ce2fd4e56d249e358a69408f76e34b
https://github.com/ataML/Federated-Learning-PyTorch/tree/1c28f3e4a2ce2fd4e56d249e358a69408f76e34b
UsBlock_nounpool
# 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_...
MATHplus-Young-Academy/P2-Cardiac-Motion
UsBlock_nounpool
false
5,560
[ "Apache-2.0" ]
1
844995e8e5760f981c425d13c0bd7f2f3bb8baec
https://github.com/MATHplus-Young-Academy/P2-Cardiac-Motion/tree/844995e8e5760f981c425d13c0bd7f2f3bb8baec
TemporalAttentionLayer
# 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....
kj21choi/LATAD
TemporalAttentionLayer
false
7,041
[ "MIT" ]
1
80d91e0f251ad0225342ee30e2461a39fa9cca97
https://github.com/kj21choi/LATAD/tree/80d91e0f251ad0225342ee30e2461a39fa9cca97
AngularPWConv
import torch import torch.nn as nn import torch.nn.functional as F import torch._C import torch.serialization def normalize(x, dim, p=2, eps=1e-12): if torch.onnx.is_in_onnx_export(): return OnnxLpNormalization.apply(x, dim, p, eps) else: return F.normalize(x, dim=dim, p=p, eps=eps) class On...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
AlexanderDokuchaev/mmsegmentation
AngularPWConv
false
11,187
[ "Apache-2.0" ]
0
0c443ee370cce6227661b802184072174c4e3f64
https://github.com/AlexanderDokuchaev/mmsegmentation/tree/0c443ee370cce6227661b802184072174c4e3f64
VectorCrossEntropy
import torch import torch.nn as nn class VectorCrossEntropy(nn.Module): def __init__(self): super().__init__() self._log_softmax = nn.LogSoftmax(dim=1) def forward(self, input, target): input = self._log_softmax(input) loss = -torch.sum(input * target) loss = loss / i...
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 ...
PavelOstyakov/pipeline
VectorCrossEntropy
false
14,156
[ "MIT" ]
214
236c050af3be9dbb534e959589040e9433501e2b
https://github.com/PavelOstyakov/pipeline/tree/236c050af3be9dbb534e959589040e9433501e2b
CombineSlices
import torch from torch import nn import torch.utils.data import torch.utils.data.distributed import torch.optim class CombineSlices(nn.Module): def __init__(self, slice_dim=2): super().__init__() self.slice_dim = slice_dim def forward(self, x): return torch.index_select(x, dim=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 import nn import torch.utils.data import torch.utils.data.distributed import torch.optim assert_size_stride = torch._C._dynamo.gu...
Samuel-van-Gurp/fastMRI
CombineSlices
false
2,858
[ "MIT" ]
0
0b1884a1c218961f81199144057ffcfde29a86ad
https://github.com/Samuel-van-Gurp/fastMRI/tree/0b1884a1c218961f81199144057ffcfde29a86ad
FunctionalRelu
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
PogChamper/torch2trt
FunctionalRelu
false
14,183
[ "MIT" ]
3,363
43b12627ec0de4d212efb6d02b07570205085ccc
https://github.com/PogChamper/torch2trt/tree/43b12627ec0de4d212efb6d02b07570205085ccc
ClipGlobalAvgPool
import torch from torch import nn from torch.optim.lr_scheduler import * from torch.optim import * class FastGlobalAvgPool(nn.Module): def __init__(self, flatten=False, *args, **kwargs): super().__init__() self.flatten = flatten def forward(self, x): if self.flatten: in_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 from torch import nn from torch.optim.lr_scheduler import * from torch.optim import * ass...
Challyfilio/NAIC2021
ClipGlobalAvgPool
false
222
[ "MIT" ]
0
11b38a920dcc902f9b798dc43ae360062862e6e4
https://github.com/Challyfilio/NAIC2021/tree/11b38a920dcc902f9b798dc43ae360062862e6e4
MSECompositionLoss
# 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 functools from torch.nn import functional as F import torch.nn as nn assert_size_s...
Jason-Khan/mmediting
MSECompositionLoss
false
631
[ "Apache-2.0" ]
0
d187f95a675dff3eb975a575bd9278d643b5b645
https://github.com/Jason-Khan/mmediting/tree/d187f95a675dff3eb975a575bd9278d643b5b645
DropoutModel8x8
# 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_...
mwxely/Cross-domain-PCGML-Level-Generator
DropoutModel8x8
false
7,321
[ "MIT" ]
1
baa5d214d6cf22272d144aa6c444a778ac202afe
https://github.com/mwxely/Cross-domain-PCGML-Level-Generator/tree/baa5d214d6cf22272d144aa6c444a778ac202afe
SplitChannels
import torch class SplitChannels(torch.nn.Module): def __init__(self, split_location): super(SplitChannels, self).__init__() self.split_location = split_location def forward(self, x): a, b = x[:, :self.split_location], x[:, self.split_location:] a, b = a.clone(), b.clone() ...
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...
cetmann/iunets
SplitChannels
false
15,004
[ "MIT" ]
86
80ed7cce0e505a0396c42359eaf27819222d71f6
https://github.com/cetmann/iunets/tree/80ed7cce0e505a0396c42359eaf27819222d71f6
CrossAttention
import torch from torch import nn import torch.cuda class MultiHeadAttention(nn.Module): """ Multi head attention for Perceiver https://arxiv.org/pdf/2103.03206.pdf. Args: num_q_channels (`int`): Number of q channels. num_kv_channels (`int`): Number of k or v channe...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
LoveEachDay/towhee
CrossAttention
false
11,661
[ "Apache-2.0" ]
0
513c9c2626676cadaaf0a16ac3c828d96bec91a1
https://github.com/LoveEachDay/towhee/tree/513c9c2626676cadaaf0a16ac3c828d96bec91a1
SiSdr
import torch from torch import Tensor from torch import nn class SiSdr(nn.Module): def __init__(self): super().__init__() def forward(self, input: 'Tensor', target: 'Tensor'): eps = torch.finfo(input.dtype).eps Rss: 'Tensor' = torch.einsum('bi,bi->b', target, target).unsqueeze(-1) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import n...
JinmingChe/DeepFilterNet
SiSdr
false
5,400
[ "ECL-2.0", "Apache-2.0", "MIT" ]
1
0e35a24c33c091b4c34afb3599f2945bf5e87adf
https://github.com/JinmingChe/DeepFilterNet/tree/0e35a24c33c091b4c34afb3599f2945bf5e87adf
ResidualBlock
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
ThomasRanvier/cnn_style_transfer
ResidualBlock
false
1,159
[ "MIT" ]
0
90b6c76c20263c22f4e45184d572284726ecbd7b
https://github.com/ThomasRanvier/cnn_style_transfer/tree/90b6c76c20263c22f4e45184d572284726ecbd7b
MPNetSelfAttention
from _paritybench_helpers import _mock_config import math import torch from torch import nn import torch.utils.checkpoint class MPNetSelfAttention(nn.Module): def __init__(self, config): super().__init__() if (config.hidden_size % config.num_attention_heads != 0 and not hasattr(config...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
jxhe/unify-parameter-efficient-tuning
MPNetSelfAttention
false
15,769
[ "Apache-2.0" ]
101
3222ce2c0079566a28043e22380eb4ab6ad14389
https://github.com/jxhe/unify-parameter-efficient-tuning/tree/3222ce2c0079566a28043e22380eb4ab6ad14389
GCN
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
OuYangg/GNNs
GCN
false
9,461
[ "Apache-2.0" ]
0
ef5b1944490507684d603de3ae0b2aa7b5168f47
https://github.com/OuYangg/GNNs/tree/ef5b1944490507684d603de3ae0b2aa7b5168f47
FeatureEmbedder
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn from to...
Harbar-Inbound/BMT
FeatureEmbedder
false
11,857
[ "MIT" ]
0
ec8826f0633db754c7ea8d206672aa0b6b6048fd
https://github.com/Harbar-Inbound/BMT/tree/ec8826f0633db754c7ea8d206672aa0b6b6048fd
DuRB_p
import torch import numpy as np import torch.serialization import torch import torch.nn as nn import torch.utils.data class ConvLayer(nn.Module): def __init__(self, in_dim, out_dim, kernel_size, stride, dilation=1): super(ConvLayer, self).__init__() self.dilation = dilation if dilation ==...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
vis-opt-group/GTANet
DuRB_p
false
4,500
[ "MIT" ]
0
269ff4418ee5f0267987e1fa4c69bda13e5cb00d
https://github.com/vis-opt-group/GTANet/tree/269ff4418ee5f0267987e1fa4c69bda13e5cb00d
LinearDrop
# 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 ...
CBIIT/NCI-DOE-Collab-Pilot2-Autoencoder_MD_Simulation_Data
LinearDrop
false
13,431
[ "MIT" ]
51
2b1213f944cf5f2c60799099a469989a1f0a6d3a
https://github.com/CBIIT/NCI-DOE-Collab-Pilot2-Autoencoder_MD_Simulation_Data/tree/2b1213f944cf5f2c60799099a469989a1f0a6d3a
ScaledDotProductAttentionMemory
import torch import numpy as np import torch.nn as nn class ScaledDotProductAttentionMemory(nn.Module): """ Scaled dot-product attention with memory """ def __init__(self, d_model, d_k, d_v, h, m): """ :param d_model: Output dimensionality of the model :param d_k: Dimensionali...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
jianqingxie/RSTNet
ScaledDotProductAttentionMemory
false
15,692
[ "BSD-3-Clause" ]
68
aaa7b5be08e5ec9e79e14ed3e6a04fc3d50483be
https://github.com/jianqingxie/RSTNet/tree/aaa7b5be08e5ec9e79e14ed3e6a04fc3d50483be
P_net
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
arnaghosh/VoxNet
P_net
false
1,472
[ "MIT" ]
0
45fe8e9ff28b02f21b8991486317ff61cfa5d553
https://github.com/arnaghosh/VoxNet/tree/45fe8e9ff28b02f21b8991486317ff61cfa5d553
SelfAttention
import torch import torch.nn as nn import torch.utils.data import torch.multiprocessing import torch.nn.modules.loss from scipy.sparse import * class SelfAttention(nn.Module): def __init__(self, input_size, hidden_size): super(SelfAttention, self).__init__() self.W1 = torch.Tensor(input_size, hid...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
LucasAPayne/graph4nlp
SelfAttention
false
9,440
[ "Apache-2.0" ]
0
3b72308f6ed9ce04c535f78b4b21b6ae0a8f5421
https://github.com/LucasAPayne/graph4nlp/tree/3b72308f6ed9ce04c535f78b4b21b6ae0a8f5421
TransformerDecoderLayer
# 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....
IA3005/NLP_ens
TransformerDecoderLayer
false
11,624
[ "MIT" ]
0
794ebbff46d5e6d5476f29b577b40bbb52991246
https://github.com/IA3005/NLP_ens/tree/794ebbff46d5e6d5476f29b577b40bbb52991246
SqueezeExcitation
import torch from torch import Tensor from torch import nn from torch.nn import functional as F from torchvision.models.mobilenetv2 import _make_divisible class SqueezeExcitation(nn.Module): def __init__(self, input_channels: 'int', squeeze_factor: 'int'=4): super().__init__() squeeze_channels = ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import Tensor from...
connernam/lightweight-human-pose-estimation.pytorch
SqueezeExcitation
false
3,361
[ "Apache-2.0" ]
0
ea30c43dce0d9439345e014e00a5cf7ef34db9e1
https://github.com/connernam/lightweight-human-pose-estimation.pytorch/tree/ea30c43dce0d9439345e014e00a5cf7ef34db9e1
SCRM
import torch import torch.nn.functional as F import torch.nn as nn class SCRM(nn.Module): """ spatial & channel wise relation loss """ def __init__(self, gamma=0.1): super(SCRM, self).__init__() self.softmax = nn.Softmax(dim=-1) self.gamma = gamma def spatial_wise(self, x...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
DemoAuguste/ZAQ-code
SCRM
false
9,078
[ "MIT" ]
0
9986a2d217ab5cb284e08c062f8726cabacb311e
https://github.com/DemoAuguste/ZAQ-code/tree/9986a2d217ab5cb284e08c062f8726cabacb311e
SphereLoss
import torch import torch.nn as nn from torchvision.transforms import * class SphereLoss(nn.Module): def __init__(self, in_feats, n_classes, scale=14, *args, **kwargs): super(SphereLoss, self).__init__(*args, **kwargs) self.scale = scale self.cross_entropy = nn.CrossEntropyLoss() ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
modricwang/SphereReID
SphereLoss
false
10,581
[ "MIT" ]
0
d0c39d2ce52cbc35e4d3adc1e90c0e54585aa492
https://github.com/modricwang/SphereReID/tree/d0c39d2ce52cbc35e4d3adc1e90c0e54585aa492
Normalize
# 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.utils.data from torch import nn assert_size_stride = torch._C._dyn...
Archjbald/PoseStylizer
Normalize
false
1,977
[ "BSD-3-Clause" ]
0
95aae02d1f4ac83536d91b8db5f78d12e7830f97
https://github.com/Archjbald/PoseStylizer/tree/95aae02d1f4ac83536d91b8db5f78d12e7830f97
AnyHead
# 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 from torch.optim.lr_scheduler import * from torch.optim imp...
Challyfilio/NAIC2021
AnyHead
false
227
[ "MIT" ]
0
11b38a920dcc902f9b798dc43ae360062862e6e4
https://github.com/Challyfilio/NAIC2021/tree/11b38a920dcc902f9b798dc43ae360062862e6e4
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....
jinga-lala/stupidNMT
MultiHeadedAttention
false
10,280
[ "BSD-3-Clause" ]
0
2a41c072c2bc622c7edd8556f552f38556d70dae
https://github.com/jinga-lala/stupidNMT/tree/2a41c072c2bc622c7edd8556f552f38556d70dae
EPE
import torch import torch.nn as nn class EPE(nn.Module): def __init__(self): super(EPE, self).__init__() def forward(self, flow, gt, loss_mask): loss_map = (flow - gt.detach()) ** 2 loss_map = (loss_map.sum(1, True) + 1e-06) ** 0.5 return loss_map * loss_mask 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.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
Egazaga/arXiv2020-RIFE
EPE
false
393
[ "MIT" ]
0
84b050e168a682905a9dde8aa15437a4994f2abf
https://github.com/Egazaga/arXiv2020-RIFE/tree/84b050e168a682905a9dde8aa15437a4994f2abf
ResidualAttentionBlock
import math import torch import torch.nn as nn import torch as th class LayerNorm(nn.LayerNorm): """ Implementation that supports fp16 inputs but fp32 gains/biases. """ def forward(self, x: 'th.Tensor'): return super().forward(x.float()) class QKVMultiheadAttention(nn.Module): def __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 from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
johnpaulbin/glide-text2im
ResidualAttentionBlock
false
12,646
[ "MIT" ]
0
4897050c4c540316dfb1ec7e6ff95698bcb20487
https://github.com/johnpaulbin/glide-text2im/tree/4897050c4c540316dfb1ec7e6ff95698bcb20487
make_style
# 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 from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
dkurt/cellpose
make_style
false
10,035
[ "BSD-3-Clause" ]
0
975821a5d75ce5f1b40b7a95ed0bd45cf99a0acb
https://github.com/dkurt/cellpose/tree/975821a5d75ce5f1b40b7a95ed0bd45cf99a0acb
DiceLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
aureliedj/OilseedRapeSegmentation
DiceLoss
false
1,511
[ "MIT" ]
0
89056c3295b24354c32b6059854a3a60214c26cb
https://github.com/aureliedj/OilseedRapeSegmentation/tree/89056c3295b24354c32b6059854a3a60214c26cb
SoftmaxLayer
# 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....
luomou97/ELMoForManyLangs
SoftmaxLayer
false
3,942
[ "MIT" ]
0
3e97600baa3a4dde229c1e78c513785e7d50e8e1
https://github.com/luomou97/ELMoForManyLangs/tree/3e97600baa3a4dde229c1e78c513785e7d50e8e1
FCDiscriminator
# 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...
ciampluca/unsupervised_counting
FCDiscriminator
false
3,299
[ "MIT" ]
0
4445d48f68da75359643bcf3003e90ef61d817e3
https://github.com/ciampluca/unsupervised_counting/tree/4445d48f68da75359643bcf3003e90ef61d817e3
LayerNorm
import torch import torch.nn as nn class LayerNorm(nn.Module): """ Layer Normalization (https://arxiv.org/abs/1607.06450) """ def __init__(self, normalized_shape, eps=1e-05): super(LayerNorm, self).__init__() self.gamma = nn.Parameter(torch.ones(normalized_shape)) self.bet...
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_...
DongjunLee/claf
LayerNorm
false
13,611
[ "MIT" ]
225
ef548dda27c9aac8ce4db09774c8a1459d25bde1
https://github.com/DongjunLee/claf/tree/ef548dda27c9aac8ce4db09774c8a1459d25bde1
Message_Passing_Unit_v2
import torch from torchvision.transforms import functional as F import torch.utils.data from torch import nn import torch.nn.functional as F class Message_Passing_Unit_v2(nn.Module): def __init__(self, fea_size, filter_size=128): super(Message_Passing_Unit_v2, self).__init__() self.w = nn.Linear(...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.utils.data from ...
SpartaG117/scene_graph_benchmark
Message_Passing_Unit_v2
false
1,102
[ "MIT" ]
0
e2e49940dd2f752b1faf9ae26707435ba3441bcb
https://github.com/SpartaG117/scene_graph_benchmark/tree/e2e49940dd2f752b1faf9ae26707435ba3441bcb
JS_Divergence
import torch import torch.nn as nn class JS_Divergence(nn.Module): def __init__(self): super().__init__() self.engine = nn.KLDivLoss() def forward(self, x, y): return self.engine(x, y) + self.engine(y, x) def get_inputs(): return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, ...
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...
WorksApplications/omni_torch
JS_Divergence
false
1,226
[ "Apache-2.0" ]
0
10b689d794c8f485e38c765303ef018da17bc641
https://github.com/WorksApplications/omni_torch/tree/10b689d794c8f485e38c765303ef018da17bc641
AlphaScalarMultiplication
import torch import numpy as np from torch import nn from typing import * class AlphaScalarMultiplication(nn.Module): def __init__(self, size_alpha_x, size_alpha_y): super(AlphaScalarMultiplication, self).__init__() self.size_alpha_x = size_alpha_x self.size_alpha_y = size_alpha_y ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import numpy as np from torch import nn from typing import * assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_c...
HughMun/MultiBench
AlphaScalarMultiplication
false
13,787
[ "MIT" ]
148
d5712a0815a9486b0e0c76b54cd63c880188fc8e
https://github.com/HughMun/MultiBench/tree/d5712a0815a9486b0e0c76b54cd63c880188fc8e
WeightedSmoothL1Loss
import torch import torch.nn as nn class WeightedSmoothL1Loss(nn.SmoothL1Loss): def __init__(self, threshold, initial_weight, apply_below_threshold=True): super().__init__(reduction='none') self.threshold = threshold self.apply_below_threshold = apply_below_threshold self.weight =...
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...
BioTrillion/pytorch-3dunet
WeightedSmoothL1Loss
false
4,906
[ "MIT" ]
1
217781197dd94211ee7fe5d53a8b404f0b8391a6
https://github.com/BioTrillion/pytorch-3dunet/tree/217781197dd94211ee7fe5d53a8b404f0b8391a6
ShiftBias
# 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...
shaun95/StarGANv2-VC
ShiftBias
false
16,392
[ "MIT" ]
116
ed20538971a03d699351a349a3631767333baeb7
https://github.com/shaun95/StarGANv2-VC/tree/ed20538971a03d699351a349a3631767333baeb7
Intensity
import torch import torch.nn as nn from torch.cuda.amp import autocast as autocast from torch.cuda.amp import GradScaler as GradScaler class Intensity(nn.Module): def __init__(self, scale): super().__init__() self.scale = scale def forward(self, x): r = torch.randn((x.size(0), 1, 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 import triton_helpers import torch.nn as nn from torch.cuda.amp import autocast as aut...
TomFrederik/EfficientZero
Intensity
false
9,548
[ "MIT" ]
0
d310ec87602076e2ebc84a79f4e54b248ccbe62e
https://github.com/TomFrederik/EfficientZero/tree/d310ec87602076e2ebc84a79f4e54b248ccbe62e
ShiftedSoftplus
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torch.nn as nn import torch.utils.tensorboard assert_si...
Dieg0Alejandr0/3D-Generative-SBDD
ShiftedSoftplus
false
1,220
[ "MIT" ]
0
51ffd36a6cf5048eeff6e68186a4608048feea4c
https://github.com/Dieg0Alejandr0/3D-Generative-SBDD/tree/51ffd36a6cf5048eeff6e68186a4608048feea4c
Net
import torch import torch.nn as nn import torch.nn.init import torch.nn.functional as F class Net(nn.Module): def __init__(self): super(Net, self).__init__() self.conv1 = nn.Conv2d(in_channels=3, out_channels=16, kernel_size= 3, padding=1) self.conv2 = nn.Conv2d(in_channels=16...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
xuanyuyt/pytorch-tutorial
Net
false
4,604
[ "MIT" ]
0
92076ac56d42da98ea61ce06708bb8c537a49af0
https://github.com/xuanyuyt/pytorch-tutorial/tree/92076ac56d42da98ea61ce06708bb8c537a49af0
LogitCond
import torch import torch.nn as nn class LogitCond(nn.Module): """ from the softmax outputs, decides whether the samples are above or below threshold. """ def __init__(self, thres=1.0): super(LogitCond, self).__init__() self.thres = thres self.softmax = nn.Softmax(dim=1) ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
Lee-Gihun/Micronet_GSJ
LogitCond
false
8,451
[ "MIT" ]
12
72289bb66507b6c3b4d14f2e5916dec718a1b198
https://github.com/Lee-Gihun/Micronet_GSJ/tree/72289bb66507b6c3b4d14f2e5916dec718a1b198
Net1
import torch import torch.nn as nn import torch.nn.functional as F class Net1(nn.Module): def __init__(self): super(Net1, self).__init__() self.conv1 = nn.Conv2d(3, 32, 3) self.conv2 = nn.Conv2d(32, 32, 3) self.conv3 = nn.Conv2d(32, 64, 3) self.conv4 = nn.Conv2d(64, 64, 3)...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
SarodYatawatta/federated-pytorch-test
Net1
false
8,760
[ "Apache-2.0" ]
33
42a51ba12a92b32fa19273340d5b61e74e11d8e0
https://github.com/SarodYatawatta/federated-pytorch-test/tree/42a51ba12a92b32fa19273340d5b61e74e11d8e0
UPChannelBAN
# 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.functional as F import torch.nn as nn assert_size_stride = torch...
Edwardsoft/siamban
UPChannelBAN
false
9,207
[ "Apache-2.0" ]
0
f89e70485437fa240bcf4ee4929e3cb6d5211ebc
https://github.com/Edwardsoft/siamban/tree/f89e70485437fa240bcf4ee4929e3cb6d5211ebc
FocalLoss
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel import torch._utils import torch.optim class FocalLoss(nn.Module): def __init__(self, gamma=2, alpha=None, autobalance=False, ignore_index =-100, eps=1e-12, reduction='mean', normalized=False, reduced_thre...
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...
Alicegaz/torchok
FocalLoss
false
16,926
[ "Apache-2.0" ]
8
7b8f95df466a25b1ad8ee93bed1a3c7516440cf4
https://github.com/Alicegaz/torchok/tree/7b8f95df466a25b1ad8ee93bed1a3c7516440cf4
SpatialAttentionGate
# 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 ...
HarshCasper/nni
SpatialAttentionGate
false
5,270
[ "MIT" ]
1
291bbbba9f296382015a77b2c88eb5db5b44bf94
https://github.com/HarshCasper/nni/tree/291bbbba9f296382015a77b2c88eb5db5b44bf94
UNet
import torch from torch import nn from torch.nn import functional as F import torch.nn.parallel class down(nn.Module): """ A class for creating neural network blocks containing layers: Average Pooling --> Convlution + Leaky ReLU --> Convolution + Leaky ReLU This is used in the UNet Class to create a...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn from tor...
DA4EVENT/home
UNet
false
17,387
[ "MIT" ]
5
18cc93a795ce132e05b886aa34565a102915b1c6
https://github.com/DA4EVENT/home/tree/18cc93a795ce132e05b886aa34565a102915b1c6
AveragePooling
# 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...
mpandeydev/SDnetmod
AveragePooling
false
7,272
[ "MIT" ]
1
c8cdf6150e3cd28330359a7d81df236729522a69
https://github.com/mpandeydev/SDnetmod/tree/c8cdf6150e3cd28330359a7d81df236729522a69
VAE
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch import device from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from...
ScorpioDoctor/antares02
VAE
false
1,042
[ "BSD-3-Clause" ]
0
631b817d2e98f351d1173b620d15c4a5efed11da
https://github.com/ScorpioDoctor/antares02/tree/631b817d2e98f351d1173b620d15c4a5efed11da
EntropicLoss
# 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 import Module from torch import Tensor from typing import C...
vishalbelsare/pfhedge
EntropicLoss
false
16,681
[ "MIT" ]
81
4d7ff173995e0795942bc6ec55f3fdc5bfb7a5f1
https://github.com/vishalbelsare/pfhedge/tree/4d7ff173995e0795942bc6ec55f3fdc5bfb7a5f1
SPU
import torch import torch.nn as nn class SPU(nn.Module): def forward(self, x): return torch.where(x > 0, x ** 2 - 0.5, torch.sigmoid(-x) - 1) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
DanDoge/course_ethz
SPU
false
343
[ "MIT" ]
0
73e5f77e3694d6134169127c0500898402683c32
https://github.com/DanDoge/course_ethz/tree/73e5f77e3694d6134169127c0500898402683c32
SFU
import torch import torch.utils.data import torch.nn.functional as F class SFU(torch.nn.Module): """ only two input, one input vector and one fusion vector Args: - input_size: - fusions_size: Inputs: - input: (seq_len, batch, input_size) - fusions: (seq_len, batch, fus...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
xdong73S/Match_LSTM_v2.0
SFU
false
4,570
[ "MIT" ]
0
dfb8cfbc2a5dafc6655eecf151a7dbcf808cd729
https://github.com/xdong73S/Match_LSTM_v2.0/tree/dfb8cfbc2a5dafc6655eecf151a7dbcf808cd729
GCNModelVAE
# 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...
PatriciaXiao/gae-pytorch
GCNModelVAE
false
11,778
[ "MIT" ]
0
eb0e9bdf9a2f23d38941ac731bd481bd6da737b9
https://github.com/PatriciaXiao/gae-pytorch/tree/eb0e9bdf9a2f23d38941ac731bd481bd6da737b9
ResidualBlock
import torch from torch import nn class ResidualBlock(nn.Module): def __init__(self, input_channels): super(ResidualBlock, self).__init__() self.conv1 = nn.Conv2d(input_channels, input_channels, kernel_size= 3, padding=1, padding_mode='reflect') self.conv2 = nn.Conv2d(input_ch...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
diegushko/CycleGAN
ResidualBlock
false
12,271
[ "MIT" ]
0
630d1cd00cef3f09f036d3c734d31c772cc0a786
https://github.com/diegushko/CycleGAN/tree/630d1cd00cef3f09f036d3c734d31c772cc0a786
SoftDiceLoss
import torch import torch.nn as nn import torch.nn.functional as F class SoftDiceLoss(nn.Module): def __init__(self, weight=None, size_average=True): super(SoftDiceLoss, self).__init__() def forward(self, logits, targets): smooth = 1.0 logits = F.sigmoid(logits) iflat = logit...
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...
kryptonite0/Global_Convolutional_Network
SoftDiceLoss
false
15,842
[ "MIT" ]
88
33de71bbe468f485eb38345f4982923945d1a0be
https://github.com/kryptonite0/Global_Convolutional_Network/tree/33de71bbe468f485eb38345f4982923945d1a0be
WPMLoss
# 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...
ZhangJingshu/WMP-loss-for-dereverberation
WPMLoss
false
18,194
[ "MIT" ]
5
9f742634d8f30f0e17b8d4e44bd2e3bf66ced992
https://github.com/ZhangJingshu/WMP-loss-for-dereverberation/tree/9f742634d8f30f0e17b8d4e44bd2e3bf66ced992
ELUPlus
import torch from torch import nn import torch.nn class ELUPlus(nn.Module): def __init__(self): super().__init__() self.elu = nn.ELU() def forward(self, x): return self.elu(x) + 1.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.triton_helpers import libdevice from torch import nn import torch.nn assert_size_stride = torch._C._dynamo.guar...
UzTak/nflows
ELUPlus
false
1,197
[ "MIT" ]
0
7211b129bfd60fabed199a1d2a3272b2aac8bbda
https://github.com/UzTak/nflows/tree/7211b129bfd60fabed199a1d2a3272b2aac8bbda
BCE_disc_sm_v5
import torch import torch.nn as nn import torch.nn.functional as F class BCE_disc_sm_v5(nn.Module): def __init__(self, weight_list=None, lb_sm=0.2): super(BCE_disc_sm_v5, self).__init__() self.weight_list = weight_list self.lb_sm = lb_sm def forward(self, x, labels): assert (...
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 ...
Sampson-Lee/SIB-Net
BCE_disc_sm_v5
false
2,819
[ "MIT" ]
0
650399082e9237327fa38168ccfc7d48153a1db5
https://github.com/Sampson-Lee/SIB-Net/tree/650399082e9237327fa38168ccfc7d48153a1db5
ReOrgLayer
import torch from torch import nn class ReOrgLayer(nn.Module): def __init__(self, stride=2): super(ReOrgLayer, self).__init__() self.stride = stride def forward(self, x): assert x.data.dim() == 4 B, C, H, W = x.data.shape hs = self.stride ws = self.stride ...
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...
MaoXianXin/pytorchx
ReOrgLayer
false
11,687
[ "MIT" ]
0
f46cc9692c3bd11ea9d5d54c20de3ac2f67dabcc
https://github.com/MaoXianXin/pytorchx/tree/f46cc9692c3bd11ea9d5d54c20de3ac2f67dabcc
upsampleBlock
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.functional as F import torch.utils.data as...
tomron27/srganus
upsampleBlock
false
11,007
[ "Apache-2.0" ]
0
5dab73540535138375203bf31e31246cd203f3c0
https://github.com/tomron27/srganus/tree/5dab73540535138375203bf31e31246cd203f3c0
ResBlock
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel class AdaptiveInstanceNorm2d(nn.Module): def __init__(self, num_features, eps=1e-05, momentum=0.1): super(AdaptiveInstanceNorm2d, self).__init__() self.num_features = num_features self.eps = eps ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
FUTUREEEEEE/S2R-DepthNet
ResBlock
false
2,251
[ "MIT" ]
0
415cc40aef10f9540026ff435d14a9ba9e30ad74
https://github.com/FUTUREEEEEE/S2R-DepthNet/tree/415cc40aef10f9540026ff435d14a9ba9e30ad74
TensorClampMax
import torch class TensorClampMax(torch.nn.Module): def forward(self, x): return x.clamp_max(0.1) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
ahangchen/torch2trt
TensorClampMax
false
6,110
[ "MIT" ]
1
53c663f0e0570ef7ffd6771354ae3478f63bd328
https://github.com/ahangchen/torch2trt/tree/53c663f0e0570ef7ffd6771354ae3478f63bd328
MulticlassDiceLoss
import torch import torch.nn as nn class DiceLoss(nn.Module): def __init__(self): super(DiceLoss, self).__init__() def forward(self, input, target): N = target.size(0) smooth = 1 input_flat = input.view(N, -1) target_flat = target.view(N, -1) intersection = in...
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...
phenixcxz/DeepGlobe-Road-Extraction-Challenge
MulticlassDiceLoss
false
10,669
[ "MIT" ]
0
4dee0f0866ff6f06b888afd28a60940b75a8eadd
https://github.com/phenixcxz/DeepGlobe-Road-Extraction-Challenge/tree/4dee0f0866ff6f06b888afd28a60940b75a8eadd
DirichletPolicyTwoLayer
# 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...
wessle/costaware
DirichletPolicyTwoLayer
false
10,997
[ "MIT" ]
0
151502308411528eaa703d353d138fc809e59d8e
https://github.com/wessle/costaware/tree/151502308411528eaa703d353d138fc809e59d8e
DiceLoss
import torch from torch import nn class DiceLoss(nn.Module): def __init__(self, weight=None, size_average=True): super(DiceLoss, self).__init__() def forward(self, inputs, targets, smooth=1): inputs = inputs.view(-1) targets = targets.view(-1) intersection = (inputs * targets...
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...
DeVriesMatt/cellshape-voxel
DiceLoss
false
5,067
[ "BSD-3-Clause" ]
1
64c2c57cc8b8ebe7f6ba1934caaaa3aaa1d6a0c1
https://github.com/DeVriesMatt/cellshape-voxel/tree/64c2c57cc8b8ebe7f6ba1934caaaa3aaa1d6a0c1
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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Tenoke/models
Net
false
9,517
[ "Apache-2.0" ]
0
84baffe34509d2f8b61689e043db2130fec8c171
https://github.com/Tenoke/models/tree/84baffe34509d2f8b61689e043db2130fec8c171
JointsMSELoss
import torch import torch.nn as nn import torch.optim import torch.utils.data from torch.nn.init import * class JointsMSELoss(nn.Module): def __init__(self, use_target_weight): super(JointsMSELoss, self).__init__() self.criterion = nn.MSELoss(size_average=True) self.use_target_weight = us...
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.optim import torch.utils.data from torch.nn.init import * assert_size_stride = torch._C._dynamo.guards.as...
EVA4-RS-Group/Phase2
JointsMSELoss
false
390
[ "Apache-2.0" ]
0
7c551e3894979cc425dd51baeddbfa5a51b7878d
https://github.com/EVA4-RS-Group/Phase2/tree/7c551e3894979cc425dd51baeddbfa5a51b7878d
PatchEmbed3D
import torch import torch.utils.data import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel class PatchEmbed3D(nn.Module): """ Video to Patch Embedding. Args: patch_size (int): Patch token size. Default: (2,4,4). in_channel (int): Number of input video channels. Default...
import torch from torch._inductor.select_algorithm import extern_kernels import 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.nn.parallel assert_si...
HarshSulakhe/pytorch_connectomics
PatchEmbed3D
false
9,874
[ "MIT" ]
0
73402e654afde69a43a5836cc90a32ef75c75dc2
https://github.com/HarshSulakhe/pytorch_connectomics/tree/73402e654afde69a43a5836cc90a32ef75c75dc2
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....
ChrisGeishauser/ConvLab-2
PositionwiseFeedForward
false
2,228
[ "Apache-2.0" ]
0
8f55d033c6e2453fdc092c4f504be3973a55e7ea
https://github.com/ChrisGeishauser/ConvLab-2/tree/8f55d033c6e2453fdc092c4f504be3973a55e7ea
ProdAttention
import torch import torch.nn as nn import torch.optim class ProdAttention(nn.Module): def __init__(self): super(ProdAttention, self).__init__() def forward(self, eh, dhx, ax=None): pax = eh * dhx pax = torch.sum(pax, dim=2) ax = nn.functional.softmax(pax, dim=1) sx = ...
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 ...
AminJun/speech
ProdAttention
false
13,260
[ "Apache-2.0" ]
642
95149ca3780d8590a36d8f1adeb8d6508a0ff1cc
https://github.com/AminJun/speech/tree/95149ca3780d8590a36d8f1adeb8d6508a0ff1cc
MultiHeadAttn
import torch import torch.cuda from torch.nn import functional as F from torch import nn import torch.utils.data import torch.optim class MultiHeadAttn(nn.Module): def __init__(self, n_head, d_model, d_head, dropout, dropatt=0.1, pre_lnorm=False): super(MultiHeadAttn, 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._inductor.runtime import triton_helpers from torch._inductor.runtime....
carolmanderson/NeMo
MultiHeadAttn
false
6,418
[ "Apache-2.0" ]
1
be7114e2d983af751e1af4119465c626682747b7
https://github.com/carolmanderson/NeMo/tree/be7114e2d983af751e1af4119465c626682747b7
DiscrimNet
# 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 ...
AswinRetnakumar/Machina
DiscrimNet
false
13,325
[ "MIT" ]
302
6519935ca4553192ac99fc1c7c1e7cab9dd72693
https://github.com/AswinRetnakumar/Machina/tree/6519935ca4553192ac99fc1c7c1e7cab9dd72693
GaussMembFunc
import torch def _mk_param(val): """Make a torch parameter from a scalar value""" if isinstance(val, torch.Tensor): val = val.item() return torch.nn.Parameter(torch.tensor(val, dtype=torch.float)) class GaussMembFunc(torch.nn.Module): """ Gaussian membership functions, defined by two...
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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_str...
trituenhantaoio/anfis-pytorch
GaussMembFunc
false
16,613
[ "MIT" ]
66
7a6bf123d69b550e46abeddd5b4a776243d43aa6
https://github.com/trituenhantaoio/anfis-pytorch/tree/7a6bf123d69b550e46abeddd5b4a776243d43aa6
Position_wise_Feed_Forward
import torch import torch.nn as nn import torch.nn.functional as F class Position_wise_Feed_Forward(nn.Module): def __init__(self, dim_model, hidden, dropout=0.0): super(Position_wise_Feed_Forward, self).__init__() self.fc1 = nn.Linear(dim_model, hidden) self.fc2 = nn.Linear(hidden, dim_m...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Ergtou/TextWord
Position_wise_Feed_Forward
false
2,201
[ "MIT" ]
0
f05cc5a630fc8d05357b8a9bc0da3ec5cc255a30
https://github.com/Ergtou/TextWord/tree/f05cc5a630fc8d05357b8a9bc0da3ec5cc255a30
Net
import torch import torch.nn as nn import torch.nn.functional as F class Net(nn.Module): def __init__(self, in_channels=3, out_features=2): super(Net, self).__init__() self.conv1 = nn.Conv2d(in_channels=in_channels, out_channels=32, kernel_size=(3, 3), padding=1) self.pool1 = ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
Nicolik/SimpleCNNClassifier
Net
false
8,618
[ "MIT" ]
11
e5cd37fbde90f4096183658abe3f8836be92a8f2
https://github.com/Nicolik/SimpleCNNClassifier/tree/e5cd37fbde90f4096183658abe3f8836be92a8f2
VGG19Decoder1
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch....
chenhsiu48/PytorchWCT
VGG19Decoder1
false
9,924
[ "MIT" ]
0
c3346ebaec95358ad1d4d5a519d5d0e7de73bc75
https://github.com/chenhsiu48/PytorchWCT/tree/c3346ebaec95358ad1d4d5a519d5d0e7de73bc75
PolynomialEnvelope
# 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...
chris-price19/ocp
PolynomialEnvelope
false
1,697
[ "MIT", "BSD-3-Clause" ]
0
0175c5a11dd3aaccd4f4780c8cb559401f1ca15e
https://github.com/chris-price19/ocp/tree/0175c5a11dd3aaccd4f4780c8cb559401f1ca15e
MaxPooling
# 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...
mpandeydev/SDnetmod
MaxPooling
false
7,275
[ "MIT" ]
1
c8cdf6150e3cd28330359a7d81df236729522a69
https://github.com/mpandeydev/SDnetmod/tree/c8cdf6150e3cd28330359a7d81df236729522a69
_ConvReLU_
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_s...
cplusx/SIGN
_ConvReLU_
false
1,736
[ "Apache-2.0" ]
0
9777fc3ddd4c6f799caeefe1e72482d5b1ecd8ae
https://github.com/cplusx/SIGN/tree/9777fc3ddd4c6f799caeefe1e72482d5b1ecd8ae
RMSPool
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel import torch.utils.data class RMSPool(nn.Module): def __init__(self, kernel_size, stride): super(RMSPool, self).__init__() self.kernel_size = kernel_size self.stride = stride 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 import torch.nn.parallel import torch.utils.data assert_s...
cleverhans-lab/model-extraction-iclr
RMSPool
false
1,724
[ "MIT" ]
0
805205287876423621baca9d5e990edfe68ea803
https://github.com/cleverhans-lab/model-extraction-iclr/tree/805205287876423621baca9d5e990edfe68ea803
Linear_Q
# 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....
Jzz24/pytorch_quantization
Linear_Q
false
13,925
[ "MIT" ]
71
0c2d93c8ce4f85dd2c34ea6f36c58d14db21bf8e
https://github.com/Jzz24/pytorch_quantization/tree/0c2d93c8ce4f85dd2c34ea6f36c58d14db21bf8e
PositionwiseFeedForward
import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data import torch.nn.init class PositionwiseFeedForward(nn.Module): """ A two-feed-forward-layer module """ def __init__(self, d_in, d_hid, dropout=0.1): super(PositionwiseFeedForward, self).__init__() 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....
ChrisGeishauser/ConvLab-2
PositionwiseFeedForward
false
2,228
[ "Apache-2.0" ]
0
8f55d033c6e2453fdc092c4f504be3973a55e7ea
https://github.com/ChrisGeishauser/ConvLab-2/tree/8f55d033c6e2453fdc092c4f504be3973a55e7ea
Net
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
ArWeHei/edflow
Net
false
4,891
[ "MIT" ]
1
3383cfbc42a43e906bc7781ad05714fd4fc9616e
https://github.com/ArWeHei/edflow/tree/3383cfbc42a43e906bc7781ad05714fd4fc9616e
SIMSE
# 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 import torch.utils.checkpoint assert_size_stride = torch._C._dynamo...
lyh512796310/MMSA
SIMSE
false
3,952
[ "MIT" ]
0
e1735afd1b4e763995ab7aacb001884a7b7146ff
https://github.com/lyh512796310/MMSA/tree/e1735afd1b4e763995ab7aacb001884a7b7146ff
SSWELoss
import torch import torch.nn as nn class HingeMarginLoss(nn.Module): """ 计算hinge loss 接口 """ def __init__(self): super(HingeMarginLoss, self).__init__() def forward(self, t, tr, delt=None, size_average=False): """ 计算hingle loss """ if delt is None: ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
Cuiqingyao/multilabel
SSWELoss
false
8,931
[ "Apache-2.0" ]
0
f36dc6f1168a3edf8f43565477c096dc0bf31de8
https://github.com/Cuiqingyao/multilabel/tree/f36dc6f1168a3edf8f43565477c096dc0bf31de8
ConvTranspose
import torch from typing import Union import torch.nn as nn import torch.nn.functional as F from typing import Tuple def autopad(k, p=None): if p is None: p = k // 2 if isinstance(k, int) else [(x // 2) for x in k] return p class ConvTranspose(nn.Module): def __init__(self, input_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 typing import Union import torch.nn as nn from typing import Tuple assert_s...
Latterlig96/DCUnet
ConvTranspose
false
8,457
[ "MIT" ]
11
87d1c137a60177d6daf1dfff0483678d5580fda0
https://github.com/Latterlig96/DCUnet/tree/87d1c137a60177d6daf1dfff0483678d5580fda0
JointsMSELoss
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed class JointsMSELoss(nn.Module): def __init__(self, use_target_weight): super(JointsMSELoss, self).__init__() self.criterion = nn.MSELoss(reduction='mean') ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed assert_size_st...
HongJinSeong/COW_KEY_POINT_DETECTION
JointsMSELoss
false
2,357
[ "MIT" ]
0
ea62ed875e9b8533f1c09b56eb8aefba94b1b906
https://github.com/HongJinSeong/COW_KEY_POINT_DETECTION/tree/ea62ed875e9b8533f1c09b56eb8aefba94b1b906