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
OrthogonalHouseholderAlternative
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.a...
mahkons/orthogonal
OrthogonalHouseholderAlternative
false
3,961
[ "MIT" ]
0
19a69134ca9a01ef564eab624b8c1526291770aa
https://github.com/mahkons/orthogonal/tree/19a69134ca9a01ef564eab624b8c1526291770aa
SmallConvNet
import torch from typing import Tuple import torch.nn as nn from numpy import prod class SmallConvNet(nn.Module): """ A network with three conv layers. This is used for testing convolution layers for activation count. """ def __init__(self, input_dim: 'int') ->None: super(SmallConvNet, se...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from typing import Tuple import torch.nn as nn from numpy import prod assert_siz...
johnanthonyjose/fvcore
SmallConvNet
false
15,725
[ "Apache-2.0" ]
1,137
af30fd4028553c1d1e4e5d389f309f52e046e67d
https://github.com/johnanthonyjose/fvcore/tree/af30fd4028553c1d1e4e5d389f309f52e046e67d
C1Bilinear
# 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....
Hoclor/CoSADUV-Contextual-Saliency-for-Detecting-Anomalies-in-UAV-Video
C1Bilinear
false
17,653
[ "MIT" ]
4
674b72af15ba8833317b8daa9d1e614ea63151c1
https://github.com/Hoclor/CoSADUV-Contextual-Saliency-for-Detecting-Anomalies-in-UAV-Video/tree/674b72af15ba8833317b8daa9d1e614ea63151c1
ScaledTanh
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
MhmdSyd/celldetection
ScaledTanh
false
8,566
[ "Apache-2.0" ]
26
93e706953dc32eb694345179d5dcca5cfd9ff41b
https://github.com/MhmdSyd/celldetection/tree/93e706953dc32eb694345179d5dcca5cfd9ff41b
QuickGELU
import torch from torch import nn import torch.distributed.nn class QuickGELU(nn.Module): def forward(self, x: 'torch.Tensor'): return x * torch.sigmoid(1.702 * x) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn import torch.distributed.nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch....
NYU-DICE-Lab/open_clip
QuickGELU
false
864
[ "MIT" ]
0
fd71804b503135fb1c7cc8de3a0d6599741c8ed9
https://github.com/NYU-DICE-Lab/open_clip/tree/fd71804b503135fb1c7cc8de3a0d6599741c8ed9
Linear_softmax
import torch import torch.nn as nn import torch.nn.functional as F class Linear_softmax(nn.Module): def __init__(self, inp, out): super(Linear_softmax, self).__init__() self.f1 = nn.Linear(inp, out) def forward(self, x): x = self.f1(x) return F.softmax(x, dim=1) def get_inp...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Alfo5123/ConcreteDropout
Linear_softmax
false
16,866
[ "MIT" ]
7
c442871553e20a2de078c0fbac7fa52302d50abf
https://github.com/Alfo5123/ConcreteDropout/tree/c442871553e20a2de078c0fbac7fa52302d50abf
Model
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_s...
mlsquare/kitchen
Model
false
4,023
[ "MIT" ]
0
3664fd289f7ea5c20cdd55e96ebe29b77effa062
https://github.com/mlsquare/kitchen/tree/3664fd289f7ea5c20cdd55e96ebe29b77effa062
INN_loss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
ThorstenBuss/jet-inn
INN_loss
false
18,001
[ "Apache-2.0" ]
4
3777aac712fc99aa2c48031db0c09eaebee70f37
https://github.com/ThorstenBuss/jet-inn/tree/3777aac712fc99aa2c48031db0c09eaebee70f37
FilterNorm
import torch import torch.nn as nn from torch.nn.init import calculate_gain import torch.nn.parallel class FilterNorm(nn.Module): def __init__(self, in_channels, kernel_size, filter_type, nonlinearity= 'linear', running_std=False, running_mean=False): assert filter_type in ('spatial', 'channel') ...
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 from torch.nn.init import calculate_gain import torch.nn....
OutBreak-hui/ddfnet
FilterNorm
false
5,712
[ "MIT" ]
1
65f67692352a2c083b5d7e003e320629a86e8460
https://github.com/OutBreak-hui/ddfnet/tree/65f67692352a2c083b5d7e003e320629a86e8460
nSGC
import math import torch import torch.nn.functional as F import torch.utils.dlpack import torch.nn as nn class nSGC(nn.Module): def __init__(self, nfeat, nclass): super(nSGC, self).__init__() self.W1 = nn.Linear(nfeat, nclass * 2) self.W2 = nn.Linear(nclass * 2, nclass) self.init(...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import math import torch.util...
tealminivan/FinalProject
nSGC
false
13,027
[ "MIT" ]
0
ef6e0cda619b7e00f112ffadd56d259a5cc8a85b
https://github.com/tealminivan/FinalProject/tree/ef6e0cda619b7e00f112ffadd56d259a5cc8a85b
Conv
import torch from torch import nn from torch.nn.functional import interpolate from typing import cast class Interpolate(nn.Module): def __init__(self, scale_factor: 'float'=1.0, mode: 'str'='nearest' ) ->None: super().__init__() self.scale_factor = scale_factor self.mode = mode ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
sakshi-06/pystiche
Conv
false
7,595
[ "BSD-3-Clause" ]
1
21a67364b332a34a2308a929f200900c76be5b73
https://github.com/sakshi-06/pystiche/tree/21a67364b332a34a2308a929f200900c76be5b73
TemporalPooling
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 class TemporalPooling(nn.Module): def __init__(self, frames, kernel_size=3, stride=2, mode='avg'): """ Parameters ---------- fra...
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 import torch a...
ZijiaLewisLu/action-recognition-pytorch
TemporalPooling
false
14,726
[ "Apache-2.0" ]
149
6ee04ed249081eb0d8e1b4a3e7a5c11fa65b8d70
https://github.com/ZijiaLewisLu/action-recognition-pytorch/tree/6ee04ed249081eb0d8e1b4a3e7a5c11fa65b8d70
ConvNetsModel
# 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....
LidiaAlecci/ConvNet
ConvNetsModel
false
11,664
[ "MIT" ]
0
23bc0919edfa346440588f79bc86d9c5f5fcc4d2
https://github.com/LidiaAlecci/ConvNet/tree/23bc0919edfa346440588f79bc86d9c5f5fcc4d2
PairwiseRankingLoss
# 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...
YJiangcm/DCPCSE
PairwiseRankingLoss
false
18,122
[ "MIT" ]
5
698255e2e66b402325ff611e098e01d2f322743e
https://github.com/YJiangcm/DCPCSE/tree/698255e2e66b402325ff611e098e01d2f322743e
NormalLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
d4l3k/crowds
NormalLoss
false
12,244
[ "MIT" ]
0
a57eee80d66498474c86cec22dd77be9d627ad97
https://github.com/d4l3k/crowds/tree/a57eee80d66498474c86cec22dd77be9d627ad97
GeGLU
# 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 ...
BlinkDL/RWKV-LM
GeGLU
false
15,628
[ "BSD-2-Clause" ]
102
b48aa1d430a71ced8ae6a665c47f5dbd95f6f6ab
https://github.com/BlinkDL/RWKV-LM/tree/b48aa1d430a71ced8ae6a665c47f5dbd95f6f6ab
MaxPool
import torch import torch.nn as nn import torch.utils.data class MaxPool(nn.Module): def __init__(self, kernel_size, stride=1, padding=1, zero_pad=False): super(MaxPool, self).__init__() self.zero_pad = nn.ZeroPad2d((1, 0, 1, 0)) if zero_pad else None self.pool = nn.MaxPool2d(kernel_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 import triton_helpers import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dynamo.guard...
BigFishMaster/tnt
MaxPool
false
17,153
[ "BSD-3-Clause" ]
3
8b80bb3b194eb87ac18924428ef0924c2fb263c5
https://github.com/BigFishMaster/tnt/tree/8b80bb3b194eb87ac18924428ef0924c2fb263c5
DiceLoss
import torch from torch import nn class DiceLoss(nn.Module): """ Loss function from https://arxiv.org/abs/1707.03237, where iou computation is introduced heatmap manner to measure the diversity bwtween tow heatmaps. """ def __init__(self, eps=1e-06): super(DiceLoss, self).__init__() ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
LDOUBLEV/DBNet.pytorch
DiceLoss
false
9,413
[ "Apache-2.0" ]
0
206f4a1e5cc3686284476f029a26fc69f610e898
https://github.com/LDOUBLEV/DBNet.pytorch/tree/206f4a1e5cc3686284476f029a26fc69f610e898
InnerProductNetwork
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_...
jqsl2012/pytorch-fm
InnerProductNetwork
false
10,367
[ "MIT" ]
0
de6240d0a17750303bbc97dba676b667c3a27829
https://github.com/jqsl2012/pytorch-fm/tree/de6240d0a17750303bbc97dba676b667c3a27829
MaxPoolStride1
# 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.data assert_size_stride = torch._C._dynamo.guard...
AP-EPFL/DA-segmentation-driven-pose
MaxPoolStride1
false
4,763
[ "MIT" ]
1
451b8ee3619b16db152ac37ba2b64f7ebf5e2832
https://github.com/AP-EPFL/DA-segmentation-driven-pose/tree/451b8ee3619b16db152ac37ba2b64f7ebf5e2832
Concat
import torch import torch.nn as nn class Concat(nn.Module): def __init__(self, channels, **kwargs): super(Concat, self).__init__() self.conv = nn.Conv2d(channels * 2, channels, 1, bias=False) self.relu = nn.ReLU(inplace=True) def forward(self, equi_feat, c2e_feat): x = torch....
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
HalleyJiang/UniFuse-Unidirectional-Fusion
Concat
false
8,238
[ "MIT" ]
30
27a4441fe3d3031d1c9f3eb2d72a3624407d19fc
https://github.com/HalleyJiang/UniFuse-Unidirectional-Fusion/tree/27a4441fe3d3031d1c9f3eb2d72a3624407d19fc
AdaptiveFeatureNorm
import torch import torch.nn as nn import torch.nn.parallel import torch.utils.data import torch.utils.data.distributed class AdaptiveFeatureNorm(nn.Module): """ The `Stepwise Adaptive Feature Norm loss (ICCV 2019) <https://arxiv.org/pdf/1811.07456v2.pdf>`_ Instead of using restrictive scalar R to match ...
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 import t...
Liuhong99/CST
AdaptiveFeatureNorm
false
8,496
[ "MIT" ]
20
f6653a4ee7968fa3ba875a182670636f648be783
https://github.com/Liuhong99/CST/tree/f6653a4ee7968fa3ba875a182670636f648be783
DenseSAGEConv
import math import torch import torch.nn.functional as F import torch.utils.data from torch.nn import Parameter def uniform(size, tensor): stdv = 1.0 / math.sqrt(size) if tensor is not None: tensor.data.uniform_(-stdv, stdv) class DenseSAGEConv(torch.nn.Module): def __init__(self, in_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._inductor.runtime....
NunoEdgarGFlowHub/pytorch_geometric
DenseSAGEConv
false
14,135
[ "MIT" ]
62
4a03a7e6484c38805a24a2e7362ef32b7e279036
https://github.com/NunoEdgarGFlowHub/pytorch_geometric/tree/4a03a7e6484c38805a24a2e7362ef32b7e279036
MIoU
# 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...
ChristophReich1996/Cell-DETR
MIoU
false
13,497
[ "MIT" ]
55
4d0c3a2d3ffd19184c8443e5b3a6dccc053c77ea
https://github.com/ChristophReich1996/Cell-DETR/tree/4d0c3a2d3ffd19184c8443e5b3a6dccc053c77ea
PEM
# 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...
NEUdeep/BSN
PEM
false
5,631
[ "MIT" ]
1
e987cc159976ebe54027b562d833a92a5aadf864
https://github.com/NEUdeep/BSN/tree/e987cc159976ebe54027b562d833a92a5aadf864
ConvEncoder
# 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...
planetceres/differentiable_volumetric_rendering
ConvEncoder
false
4,221
[ "MIT" ]
0
f2fe46d139244c7642439ced23656db1e7f5c128
https://github.com/planetceres/differentiable_volumetric_rendering/tree/f2fe46d139244c7642439ced23656db1e7f5c128
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._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
momohatt/chainer-compiler
VAE
false
16,111
[ "MIT" ]
116
26782cd29a5becf8e2badf268b47d98b3a6aea1d
https://github.com/momohatt/chainer-compiler/tree/26782cd29a5becf8e2badf268b47d98b3a6aea1d
ToRGB
from torch.autograd import Function import math import torch from torch import nn import torch.nn.functional as F def fused_leaky_relu(input, bias, negative_slope=0.2, scale=2 ** 0.5): return FusedLeakyReLUFunction.apply(input, bias, negative_slope, scale) def make_kernel(k): k = torch.tensor(k, dtype=torch...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import 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 math from torch import nn import torc...
ArashVahabpour/encoder4editing-contrastive
ToRGB
false
13,322
[ "MIT" ]
1,051
1b91afe1693e01a41118e1ce2451b7d14bec51f4
https://github.com/ArashVahabpour/encoder4editing-contrastive/tree/1b91afe1693e01a41118e1ce2451b7d14bec51f4
BertPooler
from _paritybench_helpers import _mock_config import torch import torch.nn as nn class BertPooler(nn.Module): def __init__(self, config, recurs=None): super(BertPooler, self).__init__() self.dense = nn.Linear(config.hidden_size, config.hidden_size) self.activation = nn.Tanh() 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.triton_helpers import libdevice import torch.nn as ...
aeloyq/EasyTransfer
BertPooler
false
14,749
[ "Apache-2.0" ]
806
f02b1f40109c4031632f3c51bce1cf3d1e906e34
https://github.com/aeloyq/EasyTransfer/tree/f02b1f40109c4031632f3c51bce1cf3d1e906e34
ItemInferenceNetwork
import torch import torch.utils.data import torch.nn as nn class ItemInferenceNetwork(nn.Module): def __init__(self, num_item, item_feat_dim): super().__init__() self.mu_lookup = nn.Embedding(num_item, item_feat_dim) self.logvar_lookup = nn.Embedding(num_item, item_feat_dim) def forw...
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....
gpoesia/variational-item-response-theory-public
ItemInferenceNetwork
false
12,467
[ "MIT" ]
0
6a0db81068695422dddec8832ce353879c5acb82
https://github.com/gpoesia/variational-item-response-theory-public/tree/6a0db81068695422dddec8832ce353879c5acb82
SPoC
# 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...
RetrainIt/Perfect-Half-Million-Beauty-Product-Image-Recognition-Challenge
SPoC
false
8,684
[ "Apache-2.0" ]
15
080aa5ae2f2755c6dc10b7cdc910ec0f76bc82c3
https://github.com/RetrainIt/Perfect-Half-Million-Beauty-Product-Image-Recognition-Challenge/tree/080aa5ae2f2755c6dc10b7cdc910ec0f76bc82c3
A2CCritic
# 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_...
ikamensh/machin
A2CCritic
false
6,856
[ "MIT" ]
1
af7b423c47bc1412530cf6c96c11bd3af9b3e239
https://github.com/ikamensh/machin/tree/af7b423c47bc1412530cf6c96c11bd3af9b3e239
SimpleAndModule
import torch import torch.jit import torch.onnx import torch.nn class SimpleAndModule(torch.nn.Module): def __init__(self): super(SimpleAndModule, self).__init__() def forward(self, a, b): c = torch.logical_and(a, b) return torch.logical_and(c, c) def get_inputs(): return [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 import torch.jit import torch.onnx import torch.nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
andreas-hommel/glow
SimpleAndModule
false
3,322
[ "Apache-2.0" ]
0
2bbbf8188a2a941e85677c83f2146bbd076a262e
https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e
UnpackLayerConv2d
import torch import torch.nn as nn class Conv2D(nn.Module): """ 2D convolution with GroupNorm and ELU Parameters ---------- in_channels : int Number of input channels out_channels : int Number of output channels kernel_size : int Kernel size stride : int ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
aliasghar53/packnet-sfm
UnpackLayerConv2d
false
9,779
[ "MIT" ]
0
d07dcbf026194b618a2bd9fc05b599563611f9a3
https://github.com/aliasghar53/packnet-sfm/tree/d07dcbf026194b618a2bd9fc05b599563611f9a3
Critic
import torch import torch.nn as nn import torch.nn.functional as F class Critic(nn.Module): def __init__(self, state_size, action_size, action_parameter_size, hidden_layers=None, action_input_layer=0, init_type='normal', activation='leaky_relu', init_std=0.01): super(Critic, self).__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...
bcahlit/MP-DQN
Critic
false
1,523
[ "MIT" ]
0
d80d34680e20192134f39e5b7c43abbc6bff3ba1
https://github.com/bcahlit/MP-DQN/tree/d80d34680e20192134f39e5b7c43abbc6bff3ba1
FeedForwardNN
import torch import numpy as np import torch.nn as nn import torch.nn.functional as F class FeedForwardNN(nn.Module): """ A standard in_dim-64-64-out_dim Feed Forward Neural Network. """ def __init__(self, in_dim, out_dim): """ Initialize the network and set up the layers. Parameters: 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 assert_...
chenjun-110/WZCQ
FeedForwardNN
false
1,671
[ "Apache-2.0" ]
0
e2de7743ad671e8632cfa084638555d7f1deb42f
https://github.com/chenjun-110/WZCQ/tree/e2de7743ad671e8632cfa084638555d7f1deb42f
GlobalAvgPool2d
import torch from torch import nn class GlobalAvgPool2d(nn.Module): """Performs global average pooling over the entire height and width of a batched 2D tensor # Arguments input: Input tensor """ def forward(self, input): return nn.functional.avg_pool2d(input, kernel_size=input.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 import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
AndreasLTeigen/few_shot_open_world
GlobalAvgPool2d
false
1,937
[ "MIT" ]
0
3514824c4233fdff9af9c0b636435b2ff0fa6e09
https://github.com/AndreasLTeigen/few_shot_open_world/tree/3514824c4233fdff9af9c0b636435b2ff0fa6e09
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 import torch.nn as nn assert_...
crislmfroes/Parallel-Manipulation-DRL
Q
false
1,742
[ "MIT" ]
0
b63bd17b933feb5d2844f1db596cd4126380244b
https://github.com/crislmfroes/Parallel-Manipulation-DRL/tree/b63bd17b933feb5d2844f1db596cd4126380244b
baseline_upscale
import torch import torch.nn as nn import torch.nn.init as init def initialize_weights(net_l, scale=1): if not isinstance(net_l, list): net_l = [net_l] for net in net_l: for m in net.modules(): if isinstance(m, torch.nn.Conv2d): init.kaiming_normal_(m.weight, a=0, 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 import torch.nn as nn import torch.nn.init as init assert_size_stride = torch._C...
wsdea/EfficientSR
baseline_upscale
false
4,550
[ "MIT" ]
0
077dea18c90e0d5bed722c609a776033c09f80e6
https://github.com/wsdea/EfficientSR/tree/077dea18c90e0d5bed722c609a776033c09f80e6
DropBlockT_1d
# 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...
Levigty/AimCLR
DropBlockT_1d
false
8,440
[ "MIT" ]
25
6cd73767f17748792508647355fa324fa63e235d
https://github.com/Levigty/AimCLR/tree/6cd73767f17748792508647355fa324fa63e235d
Conv2dBlock
import torch import torch.nn.functional as F from torch import nn 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 self.momentum = mome...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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.functional as...
hendraet/research-GANwriting
Conv2dBlock
false
12,496
[ "MIT" ]
0
e62a16529db3037169d9b33ecba5735c99e73bc3
https://github.com/hendraet/research-GANwriting/tree/e62a16529db3037169d9b33ecba5735c99e73bc3
ActorNetwork
# 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_...
AmmarFahmy/mushroom-rl
ActorNetwork
false
4,860
[ "MIT" ]
1
2625ee7f64d5613b3b9fba00f0b7a39fece88ca5
https://github.com/AmmarFahmy/mushroom-rl/tree/2625ee7f64d5613b3b9fba00f0b7a39fece88ca5
AdaptiveAvgMaxPool2d
import torch import torch.nn as nn def pooling_factor(pool_type='avg'): return 2 if pool_type == 'avgmaxc' else 1 class AdaptiveAvgMaxPool2d(torch.nn.Module): """Selectable global pooling layer with dynamic input kernel size """ def __init__(self, output_size=1, pool_type='avg'): super(Adap...
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...
BCV-Uniandes/DMS
AdaptiveAvgMaxPool2d
false
13,347
[ "MIT" ]
66
9fa3a3a2ef5980dd17e21b73234a4cd0b3d00e16
https://github.com/BCV-Uniandes/DMS/tree/9fa3a3a2ef5980dd17e21b73234a4cd0b3d00e16
FPNHead
# 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_...
emirkonuk/defocus
FPNHead
false
3,489
[ "Apache-2.0" ]
0
da2977d2698eb20e9ab2a3bcd1fa4d05e1dd9b50
https://github.com/emirkonuk/defocus/tree/da2977d2698eb20e9ab2a3bcd1fa4d05e1dd9b50
GraphConv
import torch from torch import nn import torch.nn import torch.autograd def sparse_bmm(sparse_matrix, dense_matrix_batch): """ Perform torch.bmm on an unbatched sparse matrix and a batched dense matrix. Args: sparse_matrix (torch.sparse.FloatTensor): Shape = (m, n) dense_matrix_batch (tor...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn import torch.nn import torch.autograd assert_size_stride = ...
T0mt0mp/kaolin
GraphConv
false
1,106
[ "ECL-2.0", "Apache-2.0" ]
0
57d1e1478eec8df49dc7cc492f25637cec40399f
https://github.com/T0mt0mp/kaolin/tree/57d1e1478eec8df49dc7cc492f25637cec40399f
NextMinMinusLambdaBlock
# 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....
pgruening/ConvNeXt
NextMinMinusLambdaBlock
false
12,928
[ "MIT" ]
0
e9a1beaf312f3a724f0c21d098efbe7db872b049
https://github.com/pgruening/ConvNeXt/tree/e9a1beaf312f3a724f0c21d098efbe7db872b049
Block
import torch import numpy as np from torch import nn import torch.nn.functional as F def drop_path(x, drop_prob: 'float'=0.0, training: 'bool'=False): if drop_prob == 0.0 or not training: return x keep_prob = 1 - drop_prob shape = (x.shape[0],) + (1,) * (x.ndim - 1) random_tensor = keep_prob +...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
bubbliiiing/classification-pytorch
Block
false
14,998
[ "MIT" ]
88
ee62c05bd3094c3fab48bada5a57cb2ed8b61c11
https://github.com/bubbliiiing/classification-pytorch/tree/ee62c05bd3094c3fab48bada5a57cb2ed8b61c11
RobertaClassificationHead
from _paritybench_helpers import _mock_config import torch from torch import nn class RobertaClassificationHead(nn.Module): """Head for sentence-level classification tasks.""" def __init__(self, config): super().__init__() self.dense = nn.Linear(config.hidden_size, 128) self.dropout =...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
HebatallaTarek/Empathy-Mental-Health
RobertaClassificationHead
false
15,677
[ "BSD-3-Clause" ]
66
16e2a5f93aabd22803bb39805f8e76c8bea0ccf2
https://github.com/HebatallaTarek/Empathy-Mental-Health/tree/16e2a5f93aabd22803bb39805f8e76c8bea0ccf2
InnerProductLayer
import torch import torch.nn as nn class InnerProductLayer(nn.Module): """InnerProduct Layer used in PNN that compute the element-wise product or inner product between feature vectors. """ def __init__(self, num_feature_field, device): """ Args: num_feature_field(int) :nu...
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...
dreaming-qin/RecBole
InnerProductLayer
false
12,312
[ "MIT" ]
0
d6de39521484ded60c387ca604abaf86310acdbe
https://github.com/dreaming-qin/RecBole/tree/d6de39521484ded60c387ca604abaf86310acdbe
UNet
import torch import torch.nn as nn import torch.nn.functional as F class UNet(nn.Module): def __init__(self): super().__init__() self.lrelu = nn.LeakyReLU(0.2) self.maxpool = nn.MaxPool2d(2) self.conv1_0 = nn.Conv2d(3, 32, 3, padding=1) self.conv1_1 = nn.Conv2d(32, 32, 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 import torch.nn as nn assert_...
frankgu968/learning-to-see-in-the-dark-pytorch
UNet
false
3,564
[ "MIT" ]
0
6a59fc64d1f152a2410b9128a6a51687a9b179d1
https://github.com/frankgu968/learning-to-see-in-the-dark-pytorch/tree/6a59fc64d1f152a2410b9128a6a51687a9b179d1
GumbelMNACLayer
# 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 import triton import triton.language 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 collections import torch.utils.data asser...
wlm2019/Neural-Arithmetic-Units
GumbelMNACLayer
false
16,719
[ "MIT" ]
147
f9de9d004bb2dc2ee28577cd1760d0a00c185836
https://github.com/wlm2019/Neural-Arithmetic-Units/tree/f9de9d004bb2dc2ee28577cd1760d0a00c185836
VertexConv
# 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....
weiyx15/DHGNN
VertexConv
false
16,710
[ "MIT" ]
124
870a1763c34af6ee9a7a3207fed4a5e6bdb95d23
https://github.com/weiyx15/DHGNN/tree/870a1763c34af6ee9a7a3207fed4a5e6bdb95d23
MLP
import torch import torch.nn as nn import torch.nn.functional as F class MLP(nn.Module): def __init__(self, input_size, output_size): super(MLP, self).__init__() self.fc1 = nn.Linear(input_size, 100) self.policy = nn.Linear(100, output_size) self.value = nn.Linear(100, 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 import torch.nn as nn assert_...
SaneBow/AttentionAgentCarRacing
MLP
false
5,791
[ "Apache-2.0" ]
1
944dc18b99b2c51a25c206f722a0bbc43cb7bbb0
https://github.com/SaneBow/AttentionAgentCarRacing/tree/944dc18b99b2c51a25c206f722a0bbc43cb7bbb0
TorchPow
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_c...
NVIDIA-AI-IOT-private/torch2trt
TorchPow
false
10,548
[ "MIT" ]
0
953d60039e0c81e90eea467c3df2e6e3f7040242
https://github.com/NVIDIA-AI-IOT-private/torch2trt/tree/953d60039e0c81e90eea467c3df2e6e3f7040242
DecoderLayer
import math import torch import torch.nn as nn import torch.nn.functional as F def attention(q, k, v, d_k, mask=None, dropout=None): """ :param q: queries, B x N_HEADS x seq_len x d_k :param k: keys, same dim as q :param v: values, same dim as q :param d_k: d_model/n_heads = 128/8 = 16 :param ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
davide-belli/generative-graph-transformer
DecoderLayer
false
15,166
[ "MIT" ]
51
949aacf57246e8c28df7dfa38e5c59bf8b2b0ee8
https://github.com/davide-belli/generative-graph-transformer/tree/949aacf57246e8c28df7dfa38e5c59bf8b2b0ee8
FocalDiceLoss
import torch import torch.nn as nn class DiceLoss(nn.Module): """DiceLoss. .. seealso:: Milletari, Fausto, Nassir Navab, and Seyed-Ahmad Ahmadi. "V-net: Fully convolutional neural networks for volumetric medical image segmentation." 2016 fourth international conference on 3D vision (3DV). IEE...
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 ...
ivadomed-profile-analysis-project/ivadomed
FocalDiceLoss
false
15,656
[ "MIT" ]
87
3b53e2cb2b210511943da439401e2471fd387876
https://github.com/ivadomed-profile-analysis-project/ivadomed/tree/3b53e2cb2b210511943da439401e2471fd387876
Simple224Upsample
import torch import torch.nn as nn class Simple224Upsample(nn.Module): def __init__(self, arch=''): super(Simple224Upsample, self).__init__() self.upsample = nn.Upsample(mode='nearest', scale_factor=7) self.arch = arch def forward(self, x): return self.upsample(x) def get_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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
MadryLab/smoothed-vit
Simple224Upsample
false
8,513
[ "MIT" ]
16
a4327542e519e010764821716b64b944d458d1c1
https://github.com/MadryLab/smoothed-vit/tree/a4327542e519e010764821716b64b944d458d1c1
BodyPoseModel
import torch from collections import OrderedDict def _make_layers(block, no_relu_layers): layers = [] for layer_name, v in block.items(): if 'pool' in layer_name: layer = torch.nn.MaxPool2d(kernel_size=v[0], stride=v[1], padding=v[2]) layers.append((layer_name, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 collections import Order...
pento-group/terran
BodyPoseModel
false
16,460
[ "BSD-3-Clause" ]
62
983f18521b149749c944e3b29c86361cb1ecf3a5
https://github.com/pento-group/terran/tree/983f18521b149749c944e3b29c86361cb1ecf3a5
encoder
import torch import torch.nn as nn import torch.nn.functional as F class encoder(nn.Module): def __init__(self, ef_dim): super(encoder, self).__init__() self.ef_dim = ef_dim self.conv_1 = nn.Conv3d(1, self.ef_dim, 4, stride=2, padding=1, bias=True) self.conv_2 = nn.Con...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
luixiao1223/BSP-NET-pytorch
encoder
false
3,956
[ "MIT" ]
0
f871c8ce6a9d52ac922e110702c47cd1c89d0a73
https://github.com/luixiao1223/BSP-NET-pytorch/tree/f871c8ce6a9d52ac922e110702c47cd1c89d0a73
QAvgPooling2d
from torch.autograd import Function import torch import torch.nn as nn import torch.nn.functional as F def calcScaleZeroPoint(min_val, max_val, num_bits=8): qmin = 0 qmax = 2 ** num_bits - 1 scale = (max_val - min_val) / (qmax - qmin) zero_point = qmax - max_val / scale if zero_point < qmin: ...
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.autograd import Function import torch.nn as nn import torch.nn.functional as F assert_size_stride = torch._C._dynamo.guards.asser...
XHX00008888/pytorch-quantization-xhx
QAvgPooling2d
false
9,619
[ "Apache-2.0" ]
0
8031511f9b9364be006b37b0b3df6c62f765c40a
https://github.com/XHX00008888/pytorch-quantization-xhx/tree/8031511f9b9364be006b37b0b3df6c62f765c40a
GatedConv1d
# 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.parallel import torch.optim import torch a...
B0BBB/seq2seq.pytorch
GatedConv1d
false
108
[ "MIT" ]
0
54bb0e9f3e5c7db7f257841ed652e8ff447b8ee4
https://github.com/B0BBB/seq2seq.pytorch/tree/54bb0e9f3e5c7db7f257841ed652e8ff447b8ee4
AdjustedElu
import torch from torch import nn from torch.nn import functional as F class AdjustedElu(nn.Module): """ Elu activation function that's adjusted to: 1) ensure that all outputs are positive and 2) f(x) = x for x >= 1 """ def forward(self, x): return F.elu(x - 1.0) + 1.0 def get_input...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
dattientran/attorch
AdjustedElu
false
12,386
[ "MIT" ]
0
469b225846c6d8a7d833ebac19d040c7a407a0ff
https://github.com/dattientran/attorch/tree/469b225846c6d8a7d833ebac19d040c7a407a0ff
SigmoidFocalLoss
import torch import torch.utils.data.distributed import torch import torch.nn as nn from numpy import int64 as int64 import torch.utils class SigmoidFocalLoss(nn.Module): def __init__(self, ignore_label, gamma=2.0, alpha=0.25, reduction='mean'): super(SigmoidFocalLoss, self).__init__() self.ignor...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.utils.dat...
HRTNet/HRTNet
SigmoidFocalLoss
false
502
[ "MIT" ]
0
6a51c9c34568988ea6125a1638794c63d8fadbea
https://github.com/HRTNet/HRTNet/tree/6a51c9c34568988ea6125a1638794c63d8fadbea
EncoderBlock
import torch import torch.nn as nn import torch.nn.functional as F class MlpBlock(nn.Module): """ Transformer Feed-Forward Block """ def __init__(self, in_dim, mlp_dim, out_dim, dropout_rate=0.1): super(MlpBlock, self).__init__() self.fc1 = nn.Linear(in_dim, mlp_dim) self.fc2 = nn.Lin...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
longxianlei/UtilsTools
EncoderBlock
false
10,507
[ "MIT" ]
0
f45c648eb679ed59bb512b61a1af52938e326ac3
https://github.com/longxianlei/UtilsTools/tree/f45c648eb679ed59bb512b61a1af52938e326ac3
RobertaRNNHead
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import n...
abrinkmann/productCategorization
RobertaRNNHead
false
18,214
[ "MIT" ]
5
75732e4b1c9da941a793db80b5fe2245bae45e87
https://github.com/abrinkmann/productCategorization/tree/75732e4b1c9da941a793db80b5fe2245bae45e87
MeanVarFC
import torch import torch.nn as nn class MeanVarFC(nn.Module): def __init__(self, input_shape): super(MeanVarFC, self).__init__() shape = list(input_shape) shape[0] = 1 shape[1] *= 2 self.param = nn.Parameter(0.01 * torch.randn(shape)) def forward(self, x): 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
david-klindt/invertible-resnet
MeanVarFC
false
3,388
[ "MIT" ]
0
ac6756a7ba5d0dbcb6b4cec43f8b86079318fd89
https://github.com/david-klindt/invertible-resnet/tree/ac6756a7ba5d0dbcb6b4cec43f8b86079318fd89
RGBDiff
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn from torchvision import models as models import torch.onnx import torch.nn assert_size_stride = torch._C._dynamo.guards...
dqawami/openvino_training_extensions
RGBDiff
false
15,230
[ "Apache-2.0" ]
256
dddda1dfd651eaae2d59cecda84275b1b03bd0ad
https://github.com/dqawami/openvino_training_extensions/tree/dddda1dfd651eaae2d59cecda84275b1b03bd0ad
ConvReLU2
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math import torch.nn.functional as F from torch.nn import Conv2d from tor...
shlomi-amitai/monorec
ConvReLU2
false
10,910
[ "MIT" ]
0
74571c6cd8d06ae4fb15cbee5a41147c54c78556
https://github.com/shlomi-amitai/monorec/tree/74571c6cd8d06ae4fb15cbee5a41147c54c78556
FocalLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math from torch ...
TylerYep/ml-toolkit
FocalLoss
false
18,030
[ "MIT" ]
7
095bdce961133acc720f90b6d1bbb0a7becbfc9f
https://github.com/TylerYep/ml-toolkit/tree/095bdce961133acc720f90b6d1bbb0a7becbfc9f
LinearAttention2d
# 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....
itsfrank98/CT-COVID
LinearAttention2d
false
6,911
[ "MIT" ]
1
3f054000ca0518be2486cf00cfab695b09e39a26
https://github.com/itsfrank98/CT-COVID/tree/3f054000ca0518be2486cf00cfab695b09e39a26
NullDiscriminator
import torch import torch.nn as nn import torch.utils.data class NullDiscriminator(nn.Module): def __init__(self): super(NullDiscriminator, self).__init__() def forward(self, inputs, y=None): d = inputs.sum(1, keepdim=True) return d def get_inputs(): return [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 import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C....
HappyBelief/ContraD
NullDiscriminator
false
13,745
[ "MIT" ]
168
abb72562ddac8d8ab37fe9af6ac4c44c61e8ea0f
https://github.com/HappyBelief/ContraD/tree/abb72562ddac8d8ab37fe9af6ac4c44c61e8ea0f
SCse
import torch import torch.nn as nn class SpatialAttention2d(nn.Module): def __init__(self, channel): super(SpatialAttention2d, self).__init__() self.squeeze = nn.Conv2d(channel, 1, kernel_size=1, bias=False) self.sigmoid = nn.Sigmoid() def forward(self, x): z = self.squeeze(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 import torch.nn as nn assert_...
advian123/kaggle-birdsong-recognition
SCse
false
9,937
[ "MIT" ]
0
a4ca8ab81e166b919452fb5d6ca4c2912c65e904
https://github.com/advian123/kaggle-birdsong-recognition/tree/a4ca8ab81e166b919452fb5d6ca4c2912c65e904
ShortWave
# 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 assert_size_stride = torch...
jpeg729/pytorch-bits
ShortWave
false
15,736
[ "MIT" ]
73
5d107094042c27472dfb7dee77506b603f5d3e45
https://github.com/jpeg729/pytorch-bits/tree/5d107094042c27472dfb7dee77506b603f5d3e45
MetaCurvatureTransform
import torch import numpy as np class MetaCurvatureTransform(torch.nn.Module): """ [[Source]](https://github.com/learnables/learn2learn/blob/master/learn2learn/optim/transforms/module_transform.py) **Description** Implements the Meta-Curvature transform of Park and Oliva, 2019. Unlike `ModuleTr...
import torch from torch._inductor.select_algorithm import extern_kernels import 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stri...
OliverWang-Au/learn2learn
MetaCurvatureTransform
false
5,694
[ "MIT" ]
1
df3c3291b4681440a80a69a7815090a4bd3cd661
https://github.com/OliverWang-Au/learn2learn/tree/df3c3291b4681440a80a69a7815090a4bd3cd661
rSoftMax
import torch import torch.nn as nn import torch.nn.functional as F from torch.functional import F class rSoftMax(nn.Module): def __init__(self, radix, cardinality): super().__init__() self.radix = radix self.cardinality = cardinality def forward(self, x): batch = x.size(0) ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
DerryHub/the-TaobaoLive-Commodity-Identify-Competition
rSoftMax
false
17,292
[ "MIT" ]
4
7e5e5c4fbddd9949fe01810d58bd7994889c007c
https://github.com/DerryHub/the-TaobaoLive-Commodity-Identify-Competition/tree/7e5e5c4fbddd9949fe01810d58bd7994889c007c
OffsetNet
import torch import torch.nn as nn class OffsetNet(nn.Module): """OffsetNet in Temporal interlace module. The OffsetNet consists of one convolution layer and two fc layers with a relu activation following with a sigmoid function. Following the convolution layer, two fc layers and relu are applied 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 import torch.nn as nn assert_...
giahaowjx/mmaction2
OffsetNet
false
10,333
[ "Apache-2.0" ]
0
4f95e9b91354acdcae768ce94e01d3821bba0154
https://github.com/giahaowjx/mmaction2/tree/4f95e9b91354acdcae768ce94e01d3821bba0154
ScaledDotProductAttention
import torch import torch.optim.lr_scheduler import torch.nn as nn class ScaledDotProductAttention(nn.Module): def __init__(self, d_model, attention_dropout=0.1): super(ScaledDotProductAttention, self).__init__() self.temper = d_model ** 0.5 self.dropout = nn.Dropout(attention_dropout) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
mcoavoux/self-attentive-parser
ScaledDotProductAttention
false
7,185
[ "MIT" ]
1
fa5814ecfdbf4fde329ea725e1d2ddaa55f247d6
https://github.com/mcoavoux/self-attentive-parser/tree/fa5814ecfdbf4fde329ea725e1d2ddaa55f247d6
IrisClassifier
# 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 ...
PeterSulcs/mlflow
IrisClassifier
false
14,158
[ "Apache-2.0" ]
10,351
14c48e7bb1ca6cd6a3c1b249a486cd98bd5e7051
https://github.com/PeterSulcs/mlflow/tree/14c48e7bb1ca6cd6a3c1b249a486cd98bd5e7051
ResBlock
import torch import torch.nn as nn from torch.nn import functional as F class ResBlock(nn.Module): """Residual block with bilinear upsampling/downsampling. Args: in_channels (int): Channel number of the input. out_channels (int): Channel number of the output. mode (str): Upsampling/do...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
rawandahmad698/GFPGAN
ResBlock
false
7,553
[ "BSD-3-Clause" ]
1
4700bf1a94ec9c36746f660db19f4f03e0eed9b0
https://github.com/rawandahmad698/GFPGAN/tree/4700bf1a94ec9c36746f660db19f4f03e0eed9b0
Policy
# 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, math as tl_math im...
Akella17/Deep-Bayesian-Quadrature-Policy-Optimization
Policy
false
7,644
[ "MIT" ]
16
e98fd68046486c002c33cf019db2ce66da18615b
https://github.com/Akella17/Deep-Bayesian-Quadrature-Policy-Optimization/tree/e98fd68046486c002c33cf019db2ce66da18615b
Model
from torch.nn import Module import torch from torch.nn import Linear import torch.nn as nn import torch.nn.functional as F class Model(Module): def __init__(self, input_shape, nb_classes, *args, **kwargs): super(Model, self).__init__() self.fc1 = Linear(input_shape[0], 25) self.dropout1 =...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 f...
AishaAlaagib/machine-unlearning
Model
false
1,939
[ "MIT" ]
0
28dd55792bacb1ffccda788b4f4dcce09e113b37
https://github.com/AishaAlaagib/machine-unlearning/tree/28dd55792bacb1ffccda788b4f4dcce09e113b37
AttentionLayer
import torch import numpy as np import torch.nn as nn def init_xavier_normal(tensor): param = nn.Parameter(tensor) nn.init.xavier_normal_(param) return param class AttentionLayer(nn.Module): def __init__(self, input_dim, hidden_dim=64, n_heads=3, dropout=0.5): super(AttentionLayer, 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....
vietbt/ViTextnormASR
AttentionLayer
false
10,955
[ "Apache-2.0" ]
0
57444aa7247c67b2628d1802e9ed53dae4857ee4
https://github.com/vietbt/ViTextnormASR/tree/57444aa7247c67b2628d1802e9ed53dae4857ee4
DocUnetLoss_DL_batch
# 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 ...
hologerry/DewarpNet
DocUnetLoss_DL_batch
false
3,625
[ "MIT" ]
0
b0a11b9fbb98bd124e65d3165ce177d9ebf2e836
https://github.com/hologerry/DewarpNet/tree/b0a11b9fbb98bd124e65d3165ce177d9ebf2e836
SelfMatch2
import torch import torch.nn as nn import torch.nn.functional as F def masked_softmax(logits, mask, dim=-1, log_softmax=False): """Take the softmax of `logits` over given dimension, and set entries to 0 wherever `mask` is 0. Args: logits (torch.Tensor): Inputs to the softmax function. mas...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
nikcaryo/cs224n-squad
SelfMatch2
false
4,098
[ "MIT" ]
0
4bebca38f3cbaab8c80cd306863d6dca1d9cdf76
https://github.com/nikcaryo/cs224n-squad/tree/4bebca38f3cbaab8c80cd306863d6dca1d9cdf76
Actor
# 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....
HuXiao-THU/Crane-Group-Control
Actor
false
558
[ "MIT" ]
0
ea71bc9b1e3957fd755312ceb52bda1be8244f5a
https://github.com/HuXiao-THU/Crane-Group-Control/tree/ea71bc9b1e3957fd755312ceb52bda1be8244f5a
FinalLayer
# 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 ...
ishine/RPN_KWS
FinalLayer
false
15,640
[ "MIT" ]
53
b54d4010a701a6ec0a9ddf3ab6177a4be6dd6af5
https://github.com/ishine/RPN_KWS/tree/b54d4010a701a6ec0a9ddf3ab6177a4be6dd6af5
fpn_module
# 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.functional as...
LOUEY233/CPS3320_python
fpn_module
false
1,113
[ "MIT" ]
0
3cc1733d91c3a8f680eeb984348e2a52ae3285ec
https://github.com/LOUEY233/CPS3320_python/tree/3cc1733d91c3a8f680eeb984348e2a52ae3285ec
DeResNetBlockGroupNorm
import torch import torch.nn as nn def deconv3x3(in_planes, out_planes, stride=1, output_padding=0): """3x3 deconvolution with padding""" return nn.ConvTranspose2d(in_planes, out_planes, kernel_size=3, stride= stride, padding=1, output_padding=output_padding, bias=False) class DeResNetBlockGroupNorm...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
wp03052/wolf
DeResNetBlockGroupNorm
false
13,194
[ "Apache-2.0" ]
0
49a582cafb829a2642db360c7d94c21439247ec7
https://github.com/wp03052/wolf/tree/49a582cafb829a2642db360c7d94c21439247ec7
IIDIsotropicGaussianUVLoss
import math import torch import torch.utils.data import torch.nn.functional as F from torch import nn class IIDIsotropicGaussianUVLoss(nn.Module): """ Loss for the case of iid residuals with isotropic covariance: $Sigma_i = sigma_i^2 I$ The loss (negative log likelihood) is then: $1/2 sum_{i=1}^n ...
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...
Magixxxxxx/detectron2
IIDIsotropicGaussianUVLoss
false
2,617
[ "Apache-2.0" ]
0
c1ee8cf73777c96cc8a89463d0dca6e0ffe148f4
https://github.com/Magixxxxxx/detectron2/tree/c1ee8cf73777c96cc8a89463d0dca6e0ffe148f4
PrimaryCaps
# 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 ...
RacleRay/-Have_Fun_Doing
PrimaryCaps
false
5,740
[ "Apache-2.0" ]
1
8ebb7fcabc6148571d38f2f51eac47952ce54424
https://github.com/RacleRay/-Have_Fun_Doing/tree/8ebb7fcabc6148571d38f2f51eac47952ce54424
MultiHeadedAttention
import torch from torch import nn from torch.nn import functional as F def same_tensor(tensor, *args): """ Do the input tensors all point to the same underlying data """ for other in args: if not torch.is_tensor(other): return False if tensor.device != other.device: ret...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
dojoteef/synst
MultiHeadedAttention
false
15,199
[ "BSD-3-Clause" ]
81
a1842682cf757e8a501cd9cee16f20e1a14158f1
https://github.com/dojoteef/synst/tree/a1842682cf757e8a501cd9cee16f20e1a14158f1
MaskNet
# 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 it...
DongChengdongHangZhou/caffe-to-pytorch
MaskNet
false
2,280
[ "Apache-2.0" ]
0
5e3104f3aa77d35bad5d2de235b067460c136fd5
https://github.com/DongChengdongHangZhou/caffe-to-pytorch/tree/5e3104f3aa77d35bad5d2de235b067460c136fd5
TestSub
import torch import torch.nn as nn class TestSub(nn.Module): """Module for Element-wise subtaction conversion testing """ def __init__(self, inp=10, out=16, kernel_size=3, bias=True): super(TestSub, self).__init__() self.conv2d_1 = nn.Conv2d(inp, out, stride=inp % 3 + 1, kernel_size ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
AliaksandrSiarohin/pytorch2keras
TestSub
false
8,900
[ "MIT" ]
0
9c8ee213cff43ade152b1de78fa76fd05ec8b40a
https://github.com/AliaksandrSiarohin/pytorch2keras/tree/9c8ee213cff43ade152b1de78fa76fd05ec8b40a
TensorClampOptionMin
import torch class TensorClampOptionMin(torch.nn.Module): def forward(self, x): return x.clamp(min=-0.1) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
Akababa/torch2trt
TensorClampOptionMin
false
18,431
[ "MIT" ]
2
03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7
https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7
SequentialCNNNet
# 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_...
fangkaimin/pytorch_classification_new
SequentialCNNNet
false
10,122
[ "MIT" ]
0
21032e7ab91f0f3106ba07aa97657a023b1cc717
https://github.com/fangkaimin/pytorch_classification_new/tree/21032e7ab91f0f3106ba07aa97657a023b1cc717
LSTM
# 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 ...
zhiyongc/Graph_Convolutional_LSTM
LSTM
false
16,821
[ "MIT" ]
281
a703b63e626b1e2563fe3f45d9714e468b1d4a0e
https://github.com/zhiyongc/Graph_Convolutional_LSTM/tree/a703b63e626b1e2563fe3f45d9714e468b1d4a0e
MSELoss
# 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.nn.parallel import torch.optim import torch.utils.data...
Karenou/mmfashion
MSELoss
false
9,471
[ "Apache-2.0" ]
0
dfc334232d1700cde18d144f983dd5b0a7f9852a
https://github.com/Karenou/mmfashion/tree/dfc334232d1700cde18d144f983dd5b0a7f9852a
DenseNet_conv
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
Shiaoming/DensefromRGBS
DenseNet_conv
false
17,926
[ "MIT" ]
7
d69f5f60c5512da876b002a2007ec42d4a3fbb8e
https://github.com/Shiaoming/DensefromRGBS/tree/d69f5f60c5512da876b002a2007ec42d4a3fbb8e
GaussianKernel
import math import torch import torch.nn as nn import torch.utils.data class GaussianKernel(nn.Module): def __init__(self, delta_var, pmaps_threshold): super().__init__() self.delta_var = delta_var self.two_sigma = delta_var * delta_var / -math.log(pmaps_threshold) 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 math as tl_math import math import torch.nn as nn import torch.utils.data assert_size_str...
JonasHell/torch-em
GaussianKernel
false
8,376
[ "MIT" ]
13
2e008e0cd2f0ea6681581374fce4f9f47b986d55
https://github.com/JonasHell/torch-em/tree/2e008e0cd2f0ea6681581374fce4f9f47b986d55
EmbeddingLayer
import torch import torch.nn.functional class EmbeddingLayer(torch.nn.Module): """Attention layer.""" def __init__(self, feature_number: 'int'): """Initialize the relational embedding layer. :param feature_number: Number of features. """ super().__init__() self.weight...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
YuWVandy/chemicalx
EmbeddingLayer
false
1,281
[ "Apache-2.0" ]
0
c02f979a502409c26700e6d5a1b2e6c0aa77e64c
https://github.com/YuWVandy/chemicalx/tree/c02f979a502409c26700e6d5a1b2e6c0aa77e64c