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
ConditionTime
# 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 as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._emp...
openclimatefix/MetNet
ConditionTime
false
7,368
[ "MIT" ]
1
06eed550e93da6325641958b0d36c15adde1d928
https://github.com/openclimatefix/MetNet/tree/06eed550e93da6325641958b0d36c15adde1d928
lrBLock_l2
import math import torch import torch.nn as nn import torch.nn.functional as F class resBlock(nn.Module): def __init__(self, channelDepth, windowSize=3): super(resBlock, self).__init__() padding = math.floor(windowSize / 2) self.conv1 = nn.Conv2d(channelDepth, channelDepth, windowSize, 1,...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
SeokjaeLIM/DSLR-release
lrBLock_l2
false
8,758
[ "Apache-2.0" ]
14
861429482faf50ee3d6570948af8c48df1fc7f43
https://github.com/SeokjaeLIM/DSLR-release/tree/861429482faf50ee3d6570948af8c48df1fc7f43
_boundary
import torch from torch import nn class _boundary(nn.Module): def __init__(self, dim): super(_boundary, self).__init__() self.relu = nn.ReLU(inplace=True) self.conv1 = nn.Conv2d(dim, dim, kernel_size=3, padding=1) self.conv2 = nn.Conv2d(dim, dim, kernel_size=3, padding=1) def...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
STARBOYsachin/semantic-segmentation
_boundary
false
1,006
[ "MIT" ]
0
7f553a93b717641edc6c2d463903dfab67267039
https://github.com/STARBOYsachin/semantic-segmentation/tree/7f553a93b717641edc6c2d463903dfab67267039
WavePool
import torch import numpy as np from torch import nn def getWavelet(in_channels, pool=True): """wavelet decomposition using conv2d""" harr_wav_L = 1 / np.sqrt(2) * np.ones((1, 2)) harr_wav_H = 1 / np.sqrt(2) * np.ones((1, 2)) harr_wav_H[0, 0] = -1 * harr_wav_H[0, 0] harr_wav_LL = np.transpose(harr...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import numpy as np from torch import nn assert_size_stride = torch._C._dynamo.gu...
XHChen0528/ConditionalGAN_Develop
WavePool
false
1,247
[ "MIT" ]
0
4ea6d8ea130589bc3ff8f3117660050ba41cdd0f
https://github.com/XHChen0528/ConditionalGAN_Develop/tree/4ea6d8ea130589bc3ff8f3117660050ba41cdd0f
NonBlurryLoss
import torch import torch.nn as nn class NonBlurryLoss(nn.Module): def __init__(self): """ Loss on the distance to 0.5 """ super(NonBlurryLoss, self).__init__() self.mse = nn.MSELoss() def forward(self, x): return 1 - self.mse(x, torch.ones_like(x) * 0.5) de...
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...
GuYuanjie/DeepFusionPrior
NonBlurryLoss
false
5,221
[ "MIT" ]
1
a7126e073ed8c49b6a9a662492b64aaeee56cc01
https://github.com/GuYuanjie/DeepFusionPrior/tree/a7126e073ed8c49b6a9a662492b64aaeee56cc01
WeightedBCEFocalLoss
# 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...
HarshSulakhe/pytorch_connectomics
WeightedBCEFocalLoss
false
9,856
[ "MIT" ]
0
73402e654afde69a43a5836cc90a32ef75c75dc2
https://github.com/HarshSulakhe/pytorch_connectomics/tree/73402e654afde69a43a5836cc90a32ef75c75dc2
CTLSTMCell
import torch import torch.nn as nn import torch.nn.functional as F class CTLSTMCell(nn.Module): def __init__(self, hidden_dim, beta=1.0, device=None): super(CTLSTMCell, self).__init__() device = device or 'cpu' self.device = torch.device(device) self.hidden_dim = hidden_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, math as tl_math im...
LitteleStar/TDPP
CTLSTMCell
false
797
[ "Apache-2.0" ]
0
7b85016bea01c4c018337152599043dc2efbaba8
https://github.com/LitteleStar/TDPP/tree/7b85016bea01c4c018337152599043dc2efbaba8
UpsampleConvLayer
import torch import torch.nn as nn import torch.nn.functional as F class UpsampleConvLayer(nn.Module): """ Upsamples the input and then does a convolution. This method gives better results compared to ConvTranspose2d. """ def __init__(self, in_channels, out_channels, kernel_size, stride, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
hehichens/NeuralStyle
UpsampleConvLayer
false
3,583
[ "Apache-2.0" ]
0
cf28a1eefd8713f85e94f50935562a663a53e8b5
https://github.com/hehichens/NeuralStyle/tree/cf28a1eefd8713f85e94f50935562a663a53e8b5
_CAEAD
# 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_...
Pheobe-Sun/anomaly-detection-challenge-2020
_CAEAD
false
5,753
[ "MIT" ]
1
71e34350023023a17338b7931da70af035b2454c
https://github.com/Pheobe-Sun/anomaly-detection-challenge-2020/tree/71e34350023023a17338b7931da70af035b2454c
Cauchy
import torch import torch.nn as nn import torch.utils.model_zoo class Cauchy(nn.Module): def __init__(self): super(Cauchy, self).__init__() self.c = 1.0 def forward(self, X, Y): r = torch.add(X, -Y) ra = torch.abs(r) error = 0.5 * self.c ** 2 * torch.log(1 + (ra / sel...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
davefiorino/EDSR-PyTorch
Cauchy
false
1,795
[ "MIT" ]
0
97ad32a09a71816a36c45d92cdb2ea7ab42ba685
https://github.com/davefiorino/EDSR-PyTorch/tree/97ad32a09a71816a36c45d92cdb2ea7ab42ba685
Classifier
import torch import torch.nn as nn from abc import * class Classifier(nn.Module): def __init__(self, in_channels, num_classes): super(Classifier, self).__init__() self.avgpool = nn.AdaptiveAvgPool2d((1, 1)) self.fc = nn.Linear(in_channels, num_classes) def forward(self, x): o...
import torch from torch._inductor.select_algorithm import extern_kernels import 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 abc import * assert_size_stride = torch._C._dynamo.gu...
Slime0519/simple-faster-rcnn-pytorch
Classifier
false
1,065
[ "MIT" ]
0
0503e9b4d07a24ae0bc1789a61ed937709f5304c
https://github.com/Slime0519/simple-faster-rcnn-pytorch/tree/0503e9b4d07a24ae0bc1789a61ed937709f5304c
CrossAttention
import torch from torch import nn 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 channels. k has the same...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
jennyli-z/towhee
CrossAttention
false
10,253
[ "Apache-2.0" ]
0
55c55fd961229575b75eae269b55090c839f8dcd
https://github.com/jennyli-z/towhee/tree/55c55fd961229575b75eae269b55090c839f8dcd
CausalConv1d
import torch import torch.nn.functional as F class CausalConv1d(torch.nn.Conv1d): def __init__(self, in_channels, out_channels, kernel_size, stride=1, dilation=1, groups=1, bias=True): super(CausalConv1d, self).__init__(in_channels, out_channels, kernel_size=kernel_size, stride=stride...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cu...
xingtaodhu/logdeep
CausalConv1d
false
10,998
[ "MIT" ]
0
9626fa4b3345799940cb293c7aedb34dd33b5637
https://github.com/xingtaodhu/logdeep/tree/9626fa4b3345799940cb293c7aedb34dd33b5637
BehaviorAggregator
import torch from torch import nn class BehaviorAggregator(nn.Module): def __init__(self, embedding_dim, gamma=0.5, aggregator='mean', dropout_rate=0.0): super(BehaviorAggregator, self).__init__() self.aggregator = aggregator self.gamma = gamma self.W_v = nn.Linear(embeddi...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import 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...
byzhang/OpenMatch
BehaviorAggregator
false
10,036
[ "Apache-2.0" ]
0
28b2d49a5eec2e1dc3934767c747ff0ca6c93d96
https://github.com/byzhang/OpenMatch/tree/28b2d49a5eec2e1dc3934767c747ff0ca6c93d96
ConvRelu
import torch from torch.nn.modules.loss import * import torch.nn as nn import torch.nn.functional as F from torch.nn import * from torch.optim import * from torch.optim.lr_scheduler import * class ConvRelu(nn.Module): """3x3 convolution followed by ReLU activation building block. """ def __init__(self, n...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch.nn.modules.loss im...
DBusAI/catalyst
ConvRelu
false
8,970
[ "Apache-2.0" ]
0
4fbdf477ea93b4d3781bf4eb10ae8da1747e4566
https://github.com/DBusAI/catalyst/tree/4fbdf477ea93b4d3781bf4eb10ae8da1747e4566
VectorQuantizer
# 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_...
GilesLuo/PyTorch-VAE
VectorQuantizer
false
5,232
[ "Apache-2.0" ]
1
dab984c7eb1915be9e7cfa7bfa176ad72f7e7a2f
https://github.com/GilesLuo/PyTorch-VAE/tree/dab984c7eb1915be9e7cfa7bfa176ad72f7e7a2f
ExpPool
import torch import torch.nn as nn class ExpPool(nn.Module): def __init__(self): super(ExpPool, self).__init__() def forward(self, feat_map): """ Numerically stable implementation of the operation Arguments: feat_map(Tensor): tensor with shape (N, C, H, W) ...
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 ...
C3-ASV-Team/torchxrayvision
ExpPool
false
4,921
[ "Apache-2.0" ]
1
7e53f0606986562f17a1ffd9f31d006756eff78d
https://github.com/C3-ASV-Team/torchxrayvision/tree/7e53f0606986562f17a1ffd9f31d006756eff78d
BCE_disc_sm_v8
# AOT ID: ['2_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...
Sampson-Lee/SIB-Net
BCE_disc_sm_v8
false
2,814
[ "MIT" ]
0
650399082e9237327fa38168ccfc7d48153a1db5
https://github.com/Sampson-Lee/SIB-Net/tree/650399082e9237327fa38168ccfc7d48153a1db5
CRF
import torch import torch.nn as nn import torch.nn.init class CRF(nn.Module): """ Conditional Random Field Module Parameters ---------- hidden_dim : ``int``, required. the dimension of the input features. tagset_size : ``int``, required. the size of the target labels. if_b...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.init assert_size_stride = torch._C._dynamo...
LiyuanLucasLiu/LightNER
CRF
false
14,013
[ "Apache-2.0" ]
115
4abb61f473b8144a08ceaf74569cc6c1e9fdb53e
https://github.com/LiyuanLucasLiu/LightNER/tree/4abb61f473b8144a08ceaf74569cc6c1e9fdb53e
Xigmoid
import torch import torch.nn as nn def xigmoid(x, alpha=1.0): cond = x > 0 ax = alpha * x if_x = torch.exp(ax) else_x = 1.0 / if_x if_x = if_x - 1.0 else_x = 1.0 - else_x cond_x = torch.where(cond, if_x, else_x) return torch.sigmoid(alpha * cond_x) class Xigmoid(nn.Module): def ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
privateos/xigmoid
Xigmoid
false
10,788
[ "MIT" ]
0
3d01c65a7f82ce0d851a42d7e38f084eae2b1622
https://github.com/privateos/xigmoid/tree/3d01c65a7f82ce0d851a42d7e38f084eae2b1622
Multiply
# 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 abc import ABC assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_stri...
kvenkman/hummingbird
Multiply
false
3,862
[ "MIT" ]
0
dac08f4ff4a4103df4a8e83329a02f2d804bf34d
https://github.com/kvenkman/hummingbird/tree/dac08f4ff4a4103df4a8e83329a02f2d804bf34d
HardSwish
# 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...
SegmentationBLWX/sssegmentation
HardSwish
false
14,380
[ "MIT" ]
411
0b2e3ff5abd7b97e15ac8daf63ea214688c26541
https://github.com/SegmentationBLWX/sssegmentation/tree/0b2e3ff5abd7b97e15ac8daf63ea214688c26541
PKTCosSim
# 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, math as tl_math im...
Capetian/FaceX-Zoo
PKTCosSim
false
4,977
[ "Apache-2.0" ]
1
029786c40d8aba15d891d33973de25fcd7e5399a
https://github.com/Capetian/FaceX-Zoo/tree/029786c40d8aba15d891d33973de25fcd7e5399a
Network
import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data.distributed import torch class Network(nn.Module): def __init__(self, num_classes): super(Network, self).__init__() self.conv1 = nn.Conv2d(1, 32, kernel_size=3) self.conv2 = nn.Conv2d(32, 64, kernel...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
gregmbi/polyaxon
Network
false
3,559
[ "Apache-2.0" ]
0
8f24089fa9cb5df28fc7b70aec27d6d23ee81e8d
https://github.com/gregmbi/polyaxon/tree/8f24089fa9cb5df28fc7b70aec27d6d23ee81e8d
GaussianKernel
# 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 ...
Liuhong99/CST
GaussianKernel
false
8,488
[ "MIT" ]
20
f6653a4ee7968fa3ba875a182670636f648be783
https://github.com/Liuhong99/CST/tree/f6653a4ee7968fa3ba875a182670636f648be783
DeepHeadModule
import torch import torch.nn as nn import torch.nn.functional as F from math import sqrt as sqrt class DeepHeadModule(nn.Module): def __init__(self, input_channels, output_channels): super(DeepHeadModule, self).__init__() self._input_channels = input_channels self._output_channels = outpu...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn from ma...
juanmed/FaceDetection-DSFD
DeepHeadModule
false
10,321
[ "Apache-2.0" ]
0
23650ca492444f9f052ca9b8db8b068a9be5bc68
https://github.com/juanmed/FaceDetection-DSFD/tree/23650ca492444f9f052ca9b8db8b068a9be5bc68
FeatureVolume
import torch import torch.nn as nn import torch.nn.functional as F class FeatureVolume(nn.Module): def __init__(self, fdim, fsize): super().__init__() self.fsize = fsize self.fdim = fdim var = 0.01 self.fmx = nn.Parameter(torch.randn(1, fdim, fsize, fsize) * var) 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._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
drixs2050/nglod
FeatureVolume
false
6,614
[ "MIT" ]
1
0f3627d3ece82464335b0fab89c2269fcb016308
https://github.com/drixs2050/nglod/tree/0f3627d3ece82464335b0fab89c2269fcb016308
Softmax
import torch import torch.nn as nn def keep_variance_fn(x): return x + 0.001 class Softmax(nn.Module): def __init__(self, dim=1, keep_variance_fn=None): super(Softmax, self).__init__() self.dim = dim self._keep_variance_fn = keep_variance_fn def forward(self, features_mean, fea...
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...
THAKAORI/SalsaNext
Softmax
false
11,904
[ "MIT" ]
0
855cd7e9ebb83ee62538ba4753a011ada7bbfb6c
https://github.com/THAKAORI/SalsaNext/tree/855cd7e9ebb83ee62538ba4753a011ada7bbfb6c
Net
import torch from torch import nn import torch.nn.functional as F class Net(nn.Module): def __init__(self, input, hidden, output): super(Net, self).__init__() self.l1 = nn.Linear(input, hidden) self.l2 = nn.Linear(hidden, hidden) self.l3 = nn.Linear(hidden, hidden) self.l4...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
akapoorx00/machinelearning-stuff
Net
false
3,062
[ "Apache-2.0" ]
0
53184019b77d3387fd15b13d3bfa75529b8ed003
https://github.com/akapoorx00/machinelearning-stuff/tree/53184019b77d3387fd15b13d3bfa75529b8ed003
Hsigmoid
# 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...
eminem171333491/PaddleOCR2Pytorch
Hsigmoid
false
3,482
[ "Apache-2.0" ]
0
ec466bb3a689eccb9290e9f80812a45301d3b030
https://github.com/eminem171333491/PaddleOCR2Pytorch/tree/ec466bb3a689eccb9290e9f80812a45301d3b030
DepthwiseSeparableConv
# 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.cuda from torch....
CoyoteLeo/QANet-pytorch
DepthwiseSeparableConv
false
2,111
[ "MIT" ]
0
a2d5290915c91c4bc84db142e8ce50c47a7a37d0
https://github.com/CoyoteLeo/QANet-pytorch/tree/a2d5290915c91c4bc84db142e8ce50c47a7a37d0
reg_hw_pos
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
FrancesC0de/Pedestron
reg_hw_pos
false
9,101
[ "Apache-2.0" ]
0
9ef6a408f97f8c8af98096b7945df18c9d3656ca
https://github.com/FrancesC0de/Pedestron/tree/9ef6a408f97f8c8af98096b7945df18c9d3656ca
Downsample
# 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...
Rm1n90/SDEdit
Downsample
false
9,442
[ "MIT" ]
0
16bfa4f5d37cd32680359db3405af4ea40a9cd1b
https://github.com/Rm1n90/SDEdit/tree/16bfa4f5d37cd32680359db3405af4ea40a9cd1b
C3D
# 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...
HuaizhengZhang/autovideo
C3D
false
5,511
[ "MIT" ]
1
58817a6e5973efaabae8e9d749a5cf0f3ff5d13b
https://github.com/HuaizhengZhang/autovideo/tree/58817a6e5973efaabae8e9d749a5cf0f3ff5d13b
CNNQNetwork
# 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_...
anindex/deepRL-projects
CNNQNetwork
false
1,456
[ "MIT" ]
0
bed03d1f985c8340fc75f715028b632bdce40641
https://github.com/anindex/deepRL-projects/tree/bed03d1f985c8340fc75f715028b632bdce40641
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.triton_helpers import libdevice import torch.nn as ...
EKami/EzeeML
ResidualBlock
false
8,052
[ "MIT" ]
35
21753a0ede7cc1dc675a2dcd09b6306cea2cad56
https://github.com/EKami/EzeeML/tree/21753a0ede7cc1dc675a2dcd09b6306cea2cad56
Conv2d
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
ClementPla/NNTools
Conv2d
false
306
[ "MIT" ]
0
61562be2d931a7f720ceee1bd91a37a2b9a329af
https://github.com/ClementPla/NNTools/tree/61562be2d931a7f720ceee1bd91a37a2b9a329af
AvgPoolStride1
import torch import torch.nn as nn import torch.nn.functional as F class AvgPoolStride1(nn.Module): def __init__(self): super(AvgPoolStride1, self).__init__() def forward(self, x): x = F.avg_pool2d(F.pad(x, (0, 1, 0, 1), mode='replicate'), 2, stride=1) return x def get_inputs(): ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
ciodar/YOLOv3_PyTorch
AvgPoolStride1
false
9,900
[ "MIT" ]
0
50209393b3e6c1fdc1a7f9299eb77189fffe6740
https://github.com/ciodar/YOLOv3_PyTorch/tree/50209393b3e6c1fdc1a7f9299eb77189fffe6740
Net
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_s...
liguodongIOT/nlp-app-samples
Net
false
7,086
[ "Apache-2.0" ]
1
e0cc747e88c7b5c701b5099462d2dd6277c23381
https://github.com/liguodongIOT/nlp-app-samples/tree/e0cc747e88c7b5c701b5099462d2dd6277c23381
RMSELoss
import torch import torch.nn as nn class RMSELoss(nn.Module): def __init__(self): super(RMSELoss, self).__init__() def forward(self, inputs, targets): tmp = (inputs - targets) ** 2 loss = torch.mean(tmp) return torch.sqrt(loss) def get_inputs(): return [torch.rand([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 import torch.nn as nn assert...
kamomehz/waveletCodingCNN
RMSELoss
false
3,794
[ "MIT" ]
0
50c7db9d986039ded38999b7e4f4265e2250fb90
https://github.com/kamomehz/waveletCodingCNN/tree/50c7db9d986039ded38999b7e4f4265e2250fb90
ExampleBackbone
# 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...
ChenDirk/mmrazor
ExampleBackbone
false
2,087
[ "Apache-2.0" ]
0
6f262ecd777c15efd4ee2d191cdc567071615421
https://github.com/ChenDirk/mmrazor/tree/6f262ecd777c15efd4ee2d191cdc567071615421
OutlookAttention
import math import torch from torch import nn from torch.nn import functional as F class OutlookAttention(nn.Module): def __init__(self, dim, num_heads=1, kernel_size=3, padding=1, stride=1, qkv_bias=False, attn_drop=0.1): super().__init__() self.dim = dim self.num_heads = num_hea...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
LiChengChen666/DetectDee
OutlookAttention
false
9,823
[ "Apache-2.0" ]
0
1e6aaa0d15b1fc12d1342d8a922004e372b5f437
https://github.com/LiChengChen666/DetectDee/tree/1e6aaa0d15b1fc12d1342d8a922004e372b5f437
FeatClassifier
import torch import torch.nn as nn class FeatClassifier(nn.Module): """ This is the second downstream classifier working on the feature extracted from the up stream feature. """ def __init__(self, input_dim, hidden_dim, activation_function): super().__init__() self.name = 'FeatCla...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
pilambdagammarho/Anomaly-Detection-Benchmarking
FeatClassifier
false
12,886
[ "MIT" ]
0
7199b703f78fcfd66268323e594a4af135c0a7e7
https://github.com/pilambdagammarho/Anomaly-Detection-Benchmarking/tree/7199b703f78fcfd66268323e594a4af135c0a7e7
Decoder
import torch import torch.utils.data import torch.nn as nn import torch.nn.functional as F class Decoder(nn.Module): """ VAE decoder """ def __init__(self, img_channels, latent_size): super(Decoder, self).__init__() self.latent_size = latent_size self.img_channels = img_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 import torch.utils.data impor...
FabianSchuetze/world-models
Decoder
false
13,691
[ "MIT" ]
440
d6abd9ce97409734a766eb67ccf0d1967ba9bf0c
https://github.com/FabianSchuetze/world-models/tree/d6abd9ce97409734a766eb67ccf0d1967ba9bf0c
SimpleOrModule
import torch import torch.jit import torch.onnx import torch.nn class SimpleOrModule(torch.nn.Module): def __init__(self): super(SimpleOrModule, self).__init__() def forward(self, a, b): c = torch.logical_or(a, b) return torch.logical_or(c, c) def get_inputs(): return [torch.ra...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.jit import torch.onnx import torch.nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
opti-mix/glow
SimpleOrModule
false
7,407
[ "Apache-2.0" ]
1
4ba074df5da9822986a23a6679ab592c22660f6d
https://github.com/opti-mix/glow/tree/4ba074df5da9822986a23a6679ab592c22660f6d
FFN
# 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....
SelvamArul/MOTR
FFN
false
1,059
[ "MIT" ]
0
2a0b70288feaca665d460096159100d5077e9312
https://github.com/SelvamArul/MOTR/tree/2a0b70288feaca665d460096159100d5077e9312
CharbonnierCompLoss
import functools import torch import torch.nn as nn 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". Returns: Tensor: Reduced 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 libdevice import functools import torc...
akimotty877/mmediting
CharbonnierCompLoss
false
3,063
[ "Apache-2.0" ]
0
cae872d6f3e867ba144c7c0dbc29a0ee1a29e5a6
https://github.com/akimotty877/mmediting/tree/cae872d6f3e867ba144c7c0dbc29a0ee1a29e5a6
NasAvgPoolBlock
import torch import torch.utils.data import torch.nn as nn class NasAvgPoolBlock(nn.Module): """ NASNet specific 3x3 Average pooling layer with extra padding. Parameters: ---------- extra_padding : bool, default False Whether to use extra padding. """ def __init__(self, extra_pad...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C....
HyperGAN/imgclsmob
NasAvgPoolBlock
false
17,686
[ "MIT" ]
9
88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3
https://github.com/HyperGAN/imgclsmob/tree/88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3
TensorClampOptionMax
import torch class TensorClampOptionMax(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...
PogChamper/torch2trt
TensorClampOptionMax
false
14,222
[ "MIT" ]
3,363
43b12627ec0de4d212efb6d02b07570205085ccc
https://github.com/PogChamper/torch2trt/tree/43b12627ec0de4d212efb6d02b07570205085ccc
GramMatrix
import torch import torch.nn as nn class GramMatrix(nn.Module): def forward(self, input): b, c, h, w = input.size() f = input.view(b, c, h * w) G = torch.bmm(f, f.transpose(1, 2)) return G.div_(c * h * w) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Holmes-Alan/Photo2Sketch
GramMatrix
false
536
[ "MIT" ]
0
43a0ca6bb8a8e645b35a2ab23d11ed5efe117e09
https://github.com/Holmes-Alan/Photo2Sketch/tree/43a0ca6bb8a8e645b35a2ab23d11ed5efe117e09
ClipL1
import torch import torch.nn as nn import torch.utils.model_zoo class ClipL1(nn.Module): def __init__(self, clip_min=0.0, clip_max=10.0): super(ClipL1, self).__init__() self.clip_max = clip_max self.clip_min = clip_min def forward(self, sr, hr): loss = torch.mean(torch.clamp(...
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 ...
HolmesShuan/AIM2020-Real-Super-Resolution
ClipL1
false
8,254
[ "BSD-2-Clause" ]
19
0ea4d7db0f4f7ed488cc162b90bb08fc02082106
https://github.com/HolmesShuan/AIM2020-Real-Super-Resolution/tree/0ea4d7db0f4f7ed488cc162b90bb08fc02082106
SNR_block
import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data class ChannelGate_sub(nn.Module): """A mini-network that generates channel-wise gates conditioned on input tensor.""" def __init__(self, in_channels, num_gates=None, return_gates=False, gate_activation='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 from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Ohyeon5/DN_uncrowding
SNR_block
false
2,728
[ "Apache-2.0" ]
0
cb13ef2db4b15271517e06e4f323f667d01fcdb1
https://github.com/Ohyeon5/DN_uncrowding/tree/cb13ef2db4b15271517e06e4f323f667d01fcdb1
CNN_2
import torch import torch.nn.functional as F import torch.nn as nn class CNN_2(nn.Module): def __init__(self, input_size, n_feature, output_size): super(CNN_2, self).__init__() self.n_feature = n_feature self.conv1 = nn.Conv2d(in_channels=3, out_channels=32, kernel_size=5) self.co...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
berthine/Cat_Dog_project
CNN_2
false
3,230
[ "MIT" ]
0
1ea08c7e8f4b44ded8853ecbb3966590f5aea144
https://github.com/berthine/Cat_Dog_project/tree/1ea08c7e8f4b44ded8853ecbb3966590f5aea144
Conv3d
import torch import torch.nn as nn class Conv3d(nn.Module): """ This class is for a convolutional layer. 3d卷积 """ def __init__(self, nIn, nOut, kSize, stride=1): """ :param nIn: number of input channels :param nOut: number of output channels :param kSize: kernel si...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
IRLSCU/siamban
Conv3d
false
2,421
[ "Apache-2.0" ]
0
abb12d028e93aaee74efc5042a5bb305c7805053
https://github.com/IRLSCU/siamban/tree/abb12d028e93aaee74efc5042a5bb305c7805053
EuclideanMean
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data.dataloader from torch import nn import torch.nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
chen-yuxuan/flair
EuclideanMean
false
12,195
[ "MIT" ]
0
480d2c9afd66ab8d3bf40a676917e84dba3c4cee
https://github.com/chen-yuxuan/flair/tree/480d2c9afd66ab8d3bf40a676917e84dba3c4cee
Net
import torch import torch.nn as nn import torch.nn.functional as F class Net(nn.Module): def __init__(self, board_width, board_height): super(Net, self).__init__() self.board_width = board_width self.board_height = board_height self.conv1 = nn.Conv2d(4, 32, kernel_size=3, 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 from torch._inductor.runtime....
SummitChen/ComputationalAdvertisement
Net
false
5,883
[ "MIT" ]
1
05a9e8bd82ca834219121de4257185d63f592d78
https://github.com/SummitChen/ComputationalAdvertisement/tree/05a9e8bd82ca834219121de4257185d63f592d78
SoftArgmax
import torch import torch as t import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable class SoftArgmax(nn.Module): def __init__(self, temperature=0.001): super(SoftArgmax, self).__init__() self.temperature = temperature def forward(self, input, sampling=Fal...
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 as t impo...
analvikingur/RGAN
SoftArgmax
false
18,313
[ "MIT" ]
8
b1893c2f53d11c9173c7a30f63f6d93d72232493
https://github.com/analvikingur/RGAN/tree/b1893c2f53d11c9173c7a30f63f6d93d72232493
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....
Treedy2020/TransNet
TransformerDecoderLayer
false
18,053
[ "MIT" ]
4
dd0e43e1931153baea4e5fe8cb31dc5ff0cb7b09
https://github.com/Treedy2020/TransNet/tree/dd0e43e1931153baea4e5fe8cb31dc5ff0cb7b09
fChannelAttentionGG
import math import torch import numpy as np import torch.optim import torch.utils.data class fChannelAttentionGG(torch.nn.Module): def __init__(self, N_h_in, N_in, ratio=1, group='SE2'): super(fChannelAttentionGG, self).__init__() self.N_in = N_in self.ratio = ratio self.N_h_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 from torch._inductor.runtime import triton_helpers import math import numpy as np import torch.optim import torch.utils.data assert_size_str...
dwromero/att_gconvs
fChannelAttentionGG
false
15,302
[ "MIT" ]
53
872259cad49763fdcfa3e96e80b6b5c331adf084
https://github.com/dwromero/att_gconvs/tree/872259cad49763fdcfa3e96e80b6b5c331adf084
OutputTransition
# 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...
JXQI/ModelsGenesis
OutputTransition
false
2,394
[ "MIT" ]
0
f961288313a78f03bd3045ac27722f791f365bd8
https://github.com/JXQI/ModelsGenesis/tree/f961288313a78f03bd3045ac27722f791f365bd8
Conv
import torch from torch import nn class Conv(nn.Module): """ Convenience class that does padding and convolution for inputs in the format [batch_size, sequence length, hidden size] """ def __init__(self, input_size, output_size, kernel_size, pad_type): """ Parameters: ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import 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...
colincen/coach
Conv
false
15,064
[ "MIT" ]
72
2b1b543851cc7ba359f48dac6a5c72f1ced9b530
https://github.com/colincen/coach/tree/2b1b543851cc7ba359f48dac6a5c72f1ced9b530
Theta
# 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.autograd import Function import torch.nn as nn from typing import Tup...
XianyuanLiu/Transfer-Learning-Library
Theta
false
10,142
[ "MIT" ]
0
25f83f32437032df88ca6101ecd1f63ec7a0aa2c
https://github.com/XianyuanLiu/Transfer-Learning-Library/tree/25f83f32437032df88ca6101ecd1f63ec7a0aa2c
LogitBinaryCrossEntropy
import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data class LogitBinaryCrossEntropy(nn.Module): def __init__(self): super(LogitBinaryCrossEntropy, self).__init__() def forward(self, pred_score, target_score, weights=None): loss = F.binary_cross_entropy_wi...
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...
xymtxwd/OSDA_with_soft_rejection
LogitBinaryCrossEntropy
false
4,591
[ "MIT" ]
0
a71394ae755c663508b33d3dddb1204ce7cb3fc0
https://github.com/xymtxwd/OSDA_with_soft_rejection/tree/a71394ae755c663508b33d3dddb1204ce7cb3fc0
LinearAttentionLayer
import torch import torch.nn.functional as F from torch import nn class LinearAttentionLayer(nn.Module): def __init__(self, input_dim): super().__init__() self.linear = nn.Linear(input_dim, 1) def forward(self, question, question_mask): qtn = question.view(-1, question.shape[-1]) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
gustavhartz/legal-contract-elements
LinearAttentionLayer
false
6,771
[ "MIT" ]
1
7a1e1f0024f9d336c7166f51b4325acf03db86a2
https://github.com/gustavhartz/legal-contract-elements/tree/7a1e1f0024f9d336c7166f51b4325acf03db86a2
BertImagePooler
# 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 ...
ayushjain1144/vilbert-multi-task
BertImagePooler
false
4,287
[ "MIT" ]
0
cf30feee9617dd92bb030f380f8b59388b7054f6
https://github.com/ayushjain1144/vilbert-multi-task/tree/cf30feee9617dd92bb030f380f8b59388b7054f6
PositionalEncoding
import torch from torch import nn class PositionalEncoding(nn.Module): """Implement the PE function.""" def __init__(self, d_model, dropout, max_len=5000): super(PositionalEncoding, self).__init__() self.dropout = nn.Dropout(p=dropout) pe = nn.Parameter(torch.randn(1, max_len, d_model...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
hedinang/ocr2
PositionalEncoding
false
10,160
[ "MIT" ]
0
09cc4c71190e900c6ad5aba9485a804139281fec
https://github.com/hedinang/ocr2/tree/09cc4c71190e900c6ad5aba9485a804139281fec
OptimizedResidualBlock
import torch import torch.nn as nn class CustomConv2d(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=None, bias=True, residual_init=True): super(CustomConv2d, self).__init__() self.residual_init = residual_init if padding is None: ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
ChiragCD/NR-GAN
OptimizedResidualBlock
false
13,500
[ "MIT" ]
54
fc455c6219b09bc8bf605715504b78b2bb801e48
https://github.com/ChiragCD/NR-GAN/tree/fc455c6219b09bc8bf605715504b78b2bb801e48
LeakyReLU
import torch import numpy as np import torch.nn as nn from numbers import Number def keep_variance_fn(x): return x + 0.001 def normcdf(value, mu=0.0, stddev=1.0): sinv = 1.0 / stddev if isinstance(stddev, Number) else stddev.reciprocal() return 0.5 * (1.0 + torch.erf((value - mu) * sinv / np.sqrt(2.0)))...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import numpy as np import torch.nn as nn from numbers import N...
THAKAORI/SalsaNext
LeakyReLU
false
11,917
[ "MIT" ]
0
855cd7e9ebb83ee62538ba4753a011ada7bbfb6c
https://github.com/THAKAORI/SalsaNext/tree/855cd7e9ebb83ee62538ba4753a011ada7bbfb6c
SineODE
# 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 math assert_size_stride = torch._C._dynamo.guards.assert_size_stri...
Lauu1023/torchdiffeq
SineODE
false
9,351
[ "MIT" ]
0
f4f3184a4c1b657da959c7d15bc8f727f1c25bd8
https://github.com/Lauu1023/torchdiffeq/tree/f4f3184a4c1b657da959c7d15bc8f727f1c25bd8
Perceptron
# 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_...
negotiatorvivian/SAT-Solver
Perceptron
false
7,325
[ "MIT" ]
1
acbf375ce73103e945aee3e2a225126684a19076
https://github.com/negotiatorvivian/SAT-Solver/tree/acbf375ce73103e945aee3e2a225126684a19076
LinearSwish
# 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.cuda import torch.backends.cudnn import torch...
JudeDavis1/intel-extension-for-pytorch
LinearSwish
false
2,584
[ "Apache-2.0" ]
0
364e34cb4917a709f5108c07d4005bf82f3d5067
https://github.com/JudeDavis1/intel-extension-for-pytorch/tree/364e34cb4917a709f5108c07d4005bf82f3d5067
BertLayerNorm
from torch.nn import Module import torch import torch.nn as nn class BertLayerNorm(Module): def __init__(self, hidden_size, eps=1e-12): super(BertLayerNorm, self).__init__() self.shape = torch.Size((hidden_size,)) self.eps = eps self.weight = nn.Parameter(torch.ones(hidden_size)) ...
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.nn import Module import torch.nn as nn assert_size_stride = torch._C...
codecaution/Hetu
BertLayerNorm
false
1,727
[ "Apache-2.0" ]
0
e278732c2fe3554c8d576585f5bcbf79ade31b68
https://github.com/codecaution/Hetu/tree/e278732c2fe3554c8d576585f5bcbf79ade31b68
MyLinear
import torch import torch.nn as nn import torch.nn.functional as F class MyLinear(nn.Module): """Linear layer with equalized learning rate and custom learning rate multiplier.""" def __init__(self, input_size, output_size, gain=2 ** 0.5, use_wscale= False, lrmul=1, bias=True): super().__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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
AleksiKnuutila/ganspace
MyLinear
false
1,927
[ "Apache-2.0" ]
0
23471a07c8b0d693fa7f1f2dfbb8b34ce22d9d38
https://github.com/AleksiKnuutila/ganspace/tree/23471a07c8b0d693fa7f1f2dfbb8b34ce22d9d38
Foo
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn.functional import torch.nn.parallel import torch.utils.data import torch.optim import torch.utils.data.distributed import to...
Liuhongzhi2018/Person_ReID
Foo
false
2,509
[ "MIT" ]
0
51c576ed5b4ed960801669d6d59c0a77405b369d
https://github.com/Liuhongzhi2018/Person_ReID/tree/51c576ed5b4ed960801669d6d59c0a77405b369d
SigmaL1SmoothLoss
import torch import torch.nn as nn from torchvision.models import * class SigmaL1SmoothLoss(nn.Module): def forward(self, pred, targ): reg_diff = torch.abs(targ - pred) reg_loss = torch.where(torch.le(reg_diff, 1 / 9), 4.5 * torch.pow( reg_diff, 2), reg_diff - 1 / 18) return r...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
Cdk29/fastai
SigmaL1SmoothLoss
false
13,802
[ "Apache-2.0" ]
87
974677ad9d63fd4fa642a62583a5ae8b1610947b
https://github.com/Cdk29/fastai/tree/974677ad9d63fd4fa642a62583a5ae8b1610947b
Biaffine
import torch import torch.utils.data.dataloader import torch.nn as nn import torch.nn class Biaffine(nn.Module): def __init__(self, n_in, n_out=1, bias_x=True, bias_y=True, diagonal=False ): super(Biaffine, self).__init__() self.n_in = n_in self.n_out = n_out self.bias_x =...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data.dataloader import torch.nn as nn import torch.nn assert_...
Dadmatech/DadmaTools
Biaffine
false
7,973
[ "Apache-2.0" ]
25
c1b7add5c33544f69c1ba1c5250a5ea07caf9aa2
https://github.com/Dadmatech/DadmaTools/tree/c1b7add5c33544f69c1ba1c5250a5ea07caf9aa2
chroma_subsampling
# 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...
foxtrotmike/DiffJPEG
chroma_subsampling
false
12,396
[ "MIT" ]
0
7dbc44b1e921f20a213a7206a8578d6a1c8131b4
https://github.com/foxtrotmike/DiffJPEG/tree/7dbc44b1e921f20a213a7206a8578d6a1c8131b4
DataEmbedding_wo_pos
import math import torch import torch.nn as nn import torch.fft class PositionalEmbedding(nn.Module): def __init__(self, d_model, max_len=5000): super(PositionalEmbedding, self).__init__() pe = torch.zeros(max_len, d_model).float() pe.require_grad = False position = torch.arange(0...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math import torch.nn as nn import torch.fft assert_size_stride = torch._C...
jianzhnie/TsFormer
DataEmbedding_wo_pos
false
3,759
[ "Apache-2.0" ]
0
47e362f02445ba00d5ab8db206667767e72faca7
https://github.com/jianzhnie/TsFormer/tree/47e362f02445ba00d5ab8db206667767e72faca7
Attention
import torch import torch.nn as nn import torch.optim import torch.utils.data from torch.nn.init import * class Attention(nn.Module): """ Attention Network. """ def __init__(self, encoder_dim, decoder_dim, attention_dim): """ :param encoder_dim: feature size of encoded images ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
EVA4-RS-Group/Phase2
Attention
false
414
[ "Apache-2.0" ]
0
7c551e3894979cc425dd51baeddbfa5a51b7878d
https://github.com/EVA4-RS-Group/Phase2/tree/7c551e3894979cc425dd51baeddbfa5a51b7878d
GeM
import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.parameter import Parameter class GeM(nn.Module): def __init__(self, p=3, eps=1e-06): """ Args: p : int Number of the pooling parameter eps : float lower-bound o...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn from t...
GiaVit97/project_vg
GeM
false
499
[ "MIT" ]
0
410de0861f479a86e9c4611bd4f0e270566bcd49
https://github.com/GiaVit97/project_vg/tree/410de0861f479a86e9c4611bd4f0e270566bcd49
Net1
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed import torch.nn.functional as F class Net1(nn.Module): def __init__(self): super(Net1, self).__init__() self.conv1 = nn.Conv2d(1, 32, 3, 1) self.conv2...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
sermolin/amazon-sagemaker-examples
Net1
false
4,292
[ "Apache-2.0" ]
0
3e6083d1b53cb718893a04c46513a9482a17bd6b
https://github.com/sermolin/amazon-sagemaker-examples/tree/3e6083d1b53cb718893a04c46513a9482a17bd6b
GELU
# 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.nn.parallel import torch.optim import torch....
Crazy-Jack/SpatialExpGeneCluster
GELU
false
315
[ "MIT" ]
0
9e57c308d1c577a936a2358d0641c65b8130034f
https://github.com/Crazy-Jack/SpatialExpGeneCluster/tree/9e57c308d1c577a936a2358d0641c65b8130034f
RobertaClassificationHead
import torch import torch.nn as nn from typing import Optional class RobertaClassificationHead(nn.Module): def __init__(self, num_classes, input_dim, inner_dim: 'Optional[int]'= None, dropout: 'float'=0.1, activation=nn.ReLU): super().__init__() if not inner_dim: inner_dim = i...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ty...
NivekT/text
RobertaClassificationHead
false
11,764
[ "BSD-3-Clause" ]
0
4908d3c88f92296a4c23be2f064ccde13cce50ce
https://github.com/NivekT/text/tree/4908d3c88f92296a4c23be2f064ccde13cce50ce
DenseBlock
import torch import torch.nn as nn class CausalConv1d(nn.Module): def __init__(self, in_channels, out_channels, kernel_size=2, dilation=2): super().__init__() self.padding = dilation self.causal_conv = nn.Conv1d(in_channels, out_channels, kernel_size, padding=self.padding, dil...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
Hao-Kailong/DisFeb
DenseBlock
false
514
[ "MIT" ]
0
2877edd587556e127d6648ee211ed22838c8d015
https://github.com/Hao-Kailong/DisFeb/tree/2877edd587556e127d6648ee211ed22838c8d015
Upsample
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data import torch.utils.data.distributed import torch._utils assert_size_stride = torch._C._dynamo....
DatatangAILAB/SuanFaShiXun04
Upsample
false
17,209
[ "Apache-2.0" ]
5
f478e40dd84240ac71cbb54e6bacf9ff556fbb3e
https://github.com/DatatangAILAB/SuanFaShiXun04/tree/f478e40dd84240ac71cbb54e6bacf9ff556fbb3e
SimplePowModule
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.jit import torch.onnx import torch.nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
opti-mix/glow
SimplePowModule
false
7,417
[ "Apache-2.0" ]
1
4ba074df5da9822986a23a6679ab592c22660f6d
https://github.com/opti-mix/glow/tree/4ba074df5da9822986a23a6679ab592c22660f6d
ReluWithStats
# 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 ...
thudzj/SPAT
ReluWithStats
false
4,422
[ "MIT" ]
0
65632c157f40c05c9aee59080e26457bed5b484c
https://github.com/thudzj/SPAT/tree/65632c157f40c05c9aee59080e26457bed5b484c
decoder3
import torch import torch.nn as nn class decoder3(nn.Module): def __init__(self): super(decoder3, self).__init__() self.reflecPad7 = nn.ReflectionPad2d((1, 1, 1, 1)) self.conv7 = nn.Conv2d(256, 128, 3, 1, 0) self.relu7 = nn.ReLU(inplace=True) self.unpool = nn.UpsamplingNea...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
czczup/URST
decoder3
false
15,105
[ "Apache-2.0" ]
119
000ec9f7728f12ffad989ec1d07b1dd579514133
https://github.com/czczup/URST/tree/000ec9f7728f12ffad989ec1d07b1dd579514133
BoxFilter
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
HyeongminMoon/copy-paste-aug
BoxFilter
false
11,504
[ "MIT" ]
0
38fcd770d70b5d4291de0cbb42073b37d7188537
https://github.com/HyeongminMoon/copy-paste-aug/tree/38fcd770d70b5d4291de0cbb42073b37d7188537
MaxMinGroup
import torch import torch.nn as nn def process_maxmin_groupsize(x, group_size, axis=-1): size = list(x.size()) num_channels = size[axis] if num_channels % group_size: raise ValueError( 'number of features({}) is not a multiple of group_size({})'. format(num_channels, num_ch...
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...
david-klindt/invertible-resnet
MaxMinGroup
false
3,380
[ "MIT" ]
0
ac6756a7ba5d0dbcb6b4cec43f8b86079318fd89
https://github.com/david-klindt/invertible-resnet/tree/ac6756a7ba5d0dbcb6b4cec43f8b86079318fd89
NoiseInjection
import torch from torch import nn class NoiseInjection(nn.Module): def __init__(self): super().__init__() self.weight = nn.Parameter(torch.zeros(1)) def forward(self, image, noise=None): if noise is None: batch, _, height, width = image.shape noise = image.new...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
CurtisASmith/stylegan2-pytorch
NoiseInjection
false
11,322
[ "MIT", "BSD-2-Clause", "Apache-2.0" ]
0
139ded3394718b9b8a727949dd46ad77ec2ec746
https://github.com/CurtisASmith/stylegan2-pytorch/tree/139ded3394718b9b8a727949dd46ad77ec2ec746
ResNetModel
import torch from typing import Dict from abc import abstractmethod from torch import nn import torch.nn.functional as F class DetectionModel(nn.Module): """ Base class describing any single object detection model """ def __init__(self, params: '{}'): self._params = params assert para...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 typing import Dict from ...
aethersis/VisualEyeTracker
ResNetModel
false
18,279
[ "MIT" ]
7
53723bd68972954249b53d6ba0ac1cbe93b8844f
https://github.com/aethersis/VisualEyeTracker/tree/53723bd68972954249b53d6ba0ac1cbe93b8844f
ExtractTensorPatches
import torch from typing import Optional from typing import Tuple import torch.nn as nn import torch.nn.functional as F from typing import Union from torch.nn.modules.utils import _pair def _extract_tensor_patchesnd(input: 'torch.Tensor', window_sizes: 'Tuple[int, ...]', strides: 'Tuple[int, ...]') ->torch.Tensor...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from typing import Optional from typing import Tuple import torch.nn as nn import torch.nn.functional as F from typing import Union from tor...
JoanFM/kornia
ExtractTensorPatches
false
11,550
[ "ECL-2.0", "Apache-2.0" ]
0
808898887cde69074ca3e3df9b24dea9682aad90
https://github.com/JoanFM/kornia/tree/808898887cde69074ca3e3df9b24dea9682aad90
Swish
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from torch.nn.parameter import Parameter import torch.utils.data import torch.cuda from torch.nn import Parameter impo...
Flamexmt/LMA
Swish
false
13,688
[ "MIT" ]
321
f6fdec2d17a2d7a7733dd5a5745312bad392cdf3
https://github.com/Flamexmt/LMA/tree/f6fdec2d17a2d7a7733dd5a5745312bad392cdf3
Attention
import math import torch import torch.nn as nn import torch.nn.functional as F from queue import * from math import * class Attention(nn.Module): def __init__(self, hidden_size): super(Attention, self).__init__() self.attn = nn.Linear(hidden_size * 2, hidden_size) self.v = nn.Parameter(to...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
zhongerqiandan/OpenDialog
Attention
false
16,814
[ "MIT" ]
98
f478b2a912c8c742da5ced510ac40da59217ddb3
https://github.com/zhongerqiandan/OpenDialog/tree/f478b2a912c8c742da5ced510ac40da59217ddb3
BCEDiceLoss
import torch from torch import nn import torch.utils.data import torch.nn.functional as F class BCEDiceLoss(nn.Module): def __init__(self): super().__init__() def forward(self, input, target): bce = F.binary_cross_entropy_with_logits(input, target) smooth = 1e-05 input = torc...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math from torch ...
ha55anali/pytorch-nested-unet
BCEDiceLoss
false
10,189
[ "MIT" ]
0
444dbd0ff7764478de662723b211c23bd65d99f9
https://github.com/ha55anali/pytorch-nested-unet/tree/444dbd0ff7764478de662723b211c23bd65d99f9
ReExp_Layer
import torch import torch.nn as nn class ReExp_Layer(nn.Module): """ Description: A modified exponential layer. Only the negative part of the exponential retains. The positive part is linear: y=x+1. """ def __init__(self): super().__init__() 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
Woodenonez/SimMotionPred_MDN_Pytorch
ReExp_Layer
false
9,637
[ "MIT" ]
0
7c1b3cf4f3cd2a63d28d0ca85b6aa20675b7f212
https://github.com/Woodenonez/SimMotionPred_MDN_Pytorch/tree/7c1b3cf4f3cd2a63d28d0ca85b6aa20675b7f212
LayerShift
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed assert_size_st...
ptillet/Fixup
LayerShift
false
10,628
[ "BSD-3-Clause" ]
0
c36dbe7f2cce71c4308afc43ab6e8551e567be30
https://github.com/ptillet/Fixup/tree/c36dbe7f2cce71c4308afc43ab6e8551e567be30
Qnet
import random import torch import torch.nn as nn import torch.nn.functional as F class Qnet(nn.Module): def __init__(self): super(Qnet, self).__init__() self.fc1 = nn.Linear(4, 256) self.fc2 = nn.Linear(256, 2) def forward(self, x): x = F.relu(self.fc1(x)) x = self.fc...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 random import torch.nn...
rainwangphy/minimalRL
Qnet
false
10,644
[ "MIT" ]
0
646cc771107f1b15098d7f52f0e7c4444862fb90
https://github.com/rainwangphy/minimalRL/tree/646cc771107f1b15098d7f52f0e7c4444862fb90
StableBCELoss
# 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...
EastGit0/JITNet_segmentation
StableBCELoss
false
5,095
[ "MIT" ]
1
7f6598a38b39dafbe6def90385e342b12982143e
https://github.com/EastGit0/JITNet_segmentation/tree/7f6598a38b39dafbe6def90385e342b12982143e