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
InverseSigmoidTransformer
import torch import torch.nn as nn import torch.utils.data import torch.nn.functional as F from torch.distributions.utils import probs_to_logits class Bijection(nn.Module): """ An invertible transformation. """ def __init__(self): super().__init__() def forward(self, inputs, context): ...
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...
probabll/dgm.pt
InverseSigmoidTransformer
false
7,491
[ "MIT" ]
1
95b5b1eb798b87c3d621e7416cc1c423c076c865
https://github.com/probabll/dgm.pt/tree/95b5b1eb798b87c3d621e7416cc1c423c076c865
ScaleNorm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice from torch import nn from to...
HerbertMcSnout/transformers_with_trees
ScaleNorm
false
8,232
[ "MIT" ]
18
1afa6d4ad45207c9b2762600a9c227d721fbc825
https://github.com/HerbertMcSnout/transformers_with_trees/tree/1afa6d4ad45207c9b2762600a9c227d721fbc825
SimpleAndModule
# 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...
briancoutinho/glow
SimpleAndModule
false
12,546
[ "Apache-2.0" ]
0
4c919d60b3c33296c4109aec8020a1733c98f5b5
https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5
FFN
import torch import torch.nn as nn import torch as t class Conv(nn.Module): """ Convolution Module """ def __init__(self, in_channels, out_channels, kernel_size=1, stride=1, padding=0, dilation=1, bias=True, w_init='linear'): """ :param in_channels: dimension of input ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Munna-Manoj/Team7_TTS
FFN
false
11,730
[ "MIT" ]
0
5e2d473a2afe429023876bcc51c2ac966a4938b8
https://github.com/Munna-Manoj/Team7_TTS/tree/5e2d473a2afe429023876bcc51c2ac966a4938b8
LayerHardtanh
import random import torch import torch.nn as nn class LayerHardtanh(nn.Module): """ Test for nn.layers based types """ def __init__(self): super(LayerHardtanh, self).__init__() self.min_val = random.random() self.max_val = self.min_val + random.random() self.htanh = 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 import random import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_s...
dawnclaude/onnx2keras
LayerHardtanh
false
15,151
[ "MIT" ]
115
3d2a47c0a228b91fd434232274e216e491da36e3
https://github.com/dawnclaude/onnx2keras/tree/3d2a47c0a228b91fd434232274e216e491da36e3
Recall
import torch import torch.nn as nn class Recall(nn.Module): """ This class implements the recall score. No gradients supported. """ def __init__(self, threshold: 'float'=0.5) ->None: """ Constructor method :param threshold: (float) Threshold to be applied """ s...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
ChristophReich1996/Cell-DETR
Recall
false
13,495
[ "MIT" ]
55
4d0c3a2d3ffd19184c8443e5b3a6dccc053c77ea
https://github.com/ChristophReich1996/Cell-DETR/tree/4d0c3a2d3ffd19184c8443e5b3a6dccc053c77ea
MMFB
from _paritybench_helpers import _mock_config import torch import torch.nn as nn class ConvBlock(nn.Module): def __init__(self, in_channels, out_channels, groups=3): super(ConvBlock, self).__init__() self.in_channels = in_channels self.out_channels = out_channels self.groups = gro...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
wwjfsfs/wwjyyds
MMFB
false
13,231
[ "MIT" ]
0
80cd6267fde7cd98838078a0d5178a557ceb7414
https://github.com/wwjfsfs/wwjyyds/tree/80cd6267fde7cd98838078a0d5178a557ceb7414
BertPreTrainingHeads
import torch import torch.nn as nn class BertPredictionHeadTransform(nn.Module): def __init__(self, hidden_size, hidden_act=nn.GELU()): super().__init__() self.dense = nn.Linear(hidden_size, hidden_size) self.transform_act_fn = hidden_act self.LayerNorm = nn.LayerNorm(hidden_size)...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
PKU-DAIR/2021_CCF_BDCI_LargeBERT_Rank1st
BertPreTrainingHeads
false
17,789
[ "Apache-2.0" ]
4
6382433cda69c655f03c3cc284dc076407f18dc9
https://github.com/PKU-DAIR/2021_CCF_BDCI_LargeBERT_Rank1st/tree/6382433cda69c655f03c3cc284dc076407f18dc9
Qnet
# 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 random import torch.nn...
linklab/link_rl_book_codes
Qnet
false
10,417
[ "MIT" ]
0
b272b46d5ecd2802f34648440ff53641c68cbbf0
https://github.com/linklab/link_rl_book_codes/tree/b272b46d5ecd2802f34648440ff53641c68cbbf0
SmoothCrossEntropyLoss
# 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 from torch.nn.modules....
bluetyson/archai
SmoothCrossEntropyLoss
false
3,235
[ "MIT" ]
0
b370a7397cb8703a052d82297ae748a35c6a49c7
https://github.com/bluetyson/archai/tree/b370a7397cb8703a052d82297ae748a35c6a49c7
GCNdecoder
from torch.nn import Module import math import torch import torch.nn as nn from torch.nn.parameter import Parameter from torch.nn.modules.module import Module from torch.nn import functional as F class GCN(Module): """ Graph Convolutional Network """ def __init__(self, in_features, out_features, bias...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch.nn import Module i...
Roxbili/topoGAN
GCNdecoder
false
5,772
[ "MIT" ]
1
25cc397bf8925e485d3a39837b8bce552118f5dc
https://github.com/Roxbili/topoGAN/tree/25cc397bf8925e485d3a39837b8bce552118f5dc
ContrastiveLoss
import torch import torch.optim from typing import Any from typing import NoReturn import torch import torch.nn as nn class ContrastiveLoss(nn.Module): """ 对比损失函数""" def __init__(self) ->NoReturn: super(ContrastiveLoss, self).__init__() def forward(self, ew: 'Any', label: 'Any', m: 'float'): ...
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.optim from typing import NoReturn import torch import torch.nn as nn assert_...
DengBoCong/text-sim
ContrastiveLoss
false
7,945
[ "MIT" ]
21
2c6c323649aa259a7b3d5c6d3714bd1860114826
https://github.com/DengBoCong/text-sim/tree/2c6c323649aa259a7b3d5c6d3714bd1860114826
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...
synthara/M-SFV-SyntharaFVcore
SmallConvNet
false
10,900
[ "Apache-2.0" ]
0
b4d2167a110aaecf3df442f58793ca2cb7b028ba
https://github.com/synthara/M-SFV-SyntharaFVcore/tree/b4d2167a110aaecf3df442f58793ca2cb7b028ba
BiasAdd
from _paritybench_helpers import _mock_config import torch import numpy as np import torch.nn as nn import torch.nn.functional as F class BiasAdd(nn.Module): def __init__(self, channels, opts, act='linear', alpha=None, gain=None, lrmul=1): """ BiasAdd """ super(BiasAdd...
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...
tomguluson92/StyleGAN2_PyTorch
BiasAdd
false
16,585
[ "MIT" ]
89
4ab7354c85cb986d2b77f5238c4a18c5efd1db1b
https://github.com/tomguluson92/StyleGAN2_PyTorch/tree/4ab7354c85cb986d2b77f5238c4a18c5efd1db1b
FusedDownsample
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn from math import sqrt assert_size_stride = torch._C._dynamo...
nazarblch/style-based-gan-pytorch
FusedDownsample
false
4,055
[ "MIT" ]
0
5ed7fa114904501d77b414921cd9f439773ba24c
https://github.com/nazarblch/style-based-gan-pytorch/tree/5ed7fa114904501d77b414921cd9f439773ba24c
PreNet
import torch from torch import nn import torch.nn.functional as F class PreNet(nn.Module): def __init__(self, in_dims, fc1_dims=256, fc2_dims=128, dropout=0.5): super().__init__() self.fc1 = nn.Linear(in_dims, fc1_dims) self.fc2 = nn.Linear(fc1_dims, fc2_dims) self.p = 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 import nn assert_s...
lsh950919/sv2tts
PreNet
false
12,733
[ "MIT" ]
0
a6ff637ac478b8b3ce4dcc5a776442cab9cbdd67
https://github.com/lsh950919/sv2tts/tree/a6ff637ac478b8b3ce4dcc5a776442cab9cbdd67
Conv2d
import torch import torch.nn.functional as F from torch.nn.modules.conv import _ConvNd from torch.nn.modules.utils import _pair def keep_variance_fn(x): return x + 0.001 class Conv2d(_ConvNd): def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch.nn.modules.conv import _ConvNd from torch.nn.modules.utils import _pa...
THAKAORI/SalsaNext
Conv2d
false
11,902
[ "MIT" ]
0
855cd7e9ebb83ee62538ba4753a011ada7bbfb6c
https://github.com/THAKAORI/SalsaNext/tree/855cd7e9ebb83ee62538ba4753a011ada7bbfb6c
RevPaddingLayer
import torch import torch.nn as nn class RevPaddingLayer(nn.Module): def __init__(self, stride): super().__init__() self.pool = nn.AvgPool2d(kernel_size=3, stride=stride, padding=1) def forward(self, x): x = self.pool(x) zeros = torch.zeros_like(x) zeros_left, zeros_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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
RKorzeniowski/BigBiGAN-PyTorch
RevPaddingLayer
false
17,832
[ "MIT" ]
5
caaaf69b094ae45e9fa3608577fde32dafa1f16e
https://github.com/RKorzeniowski/BigBiGAN-PyTorch/tree/caaaf69b094ae45e9fa3608577fde32dafa1f16e
GaussMembFunc
import torch def _mk_param(val): """Make a torch parameter from a scalar value""" if isinstance(val, torch.Tensor): val = val.item() return torch.nn.Parameter(torch.tensor(val, dtype=torch.float)) class GaussMembFunc(torch.nn.Module): """ Gaussian membership functions, defined by two...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_str...
samxu0823/anfis-pytorch
GaussMembFunc
false
4,261
[ "MIT" ]
0
b4ec3f0e8259963800e9e0a2904a580d1e56cc1c
https://github.com/samxu0823/anfis-pytorch/tree/b4ec3f0e8259963800e9e0a2904a580d1e56cc1c
TemporalEmbedding
# 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 math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guar...
Fanxingye/Informer2020
TemporalEmbedding
false
425
[ "Apache-2.0" ]
0
94fd05f82ff0882681a9716ae3e980a574fdcbed
https://github.com/Fanxingye/Informer2020/tree/94fd05f82ff0882681a9716ae3e980a574fdcbed
SmoothL1Loss
# AOT ID: ['1_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 ...
LiWentomng/boxlevelset
SmoothL1Loss
false
8,470
[ "Apache-2.0" ]
25
8cc40bf6ae4a343c482c676c72259cc12c29d31c
https://github.com/LiWentomng/boxlevelset/tree/8cc40bf6ae4a343c482c676c72259cc12c29d31c
EntropyLoss
import math import torch import torch.nn as nn class EntropyLoss(nn.Module): def __init__(self): super().__init__() def forward(self, x, eps=1e-08): logN = math.log(float(x.shape[0])) x = x * (x + eps).log() / logN neg_entropy = x.sum(1) return -neg_entropy.mean() d...
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...
pudumagico/deepproblog
EntropyLoss
false
16,283
[ "Apache-2.0" ]
54
6d38e783990551f4030780a1d69c7138fada2020
https://github.com/pudumagico/deepproblog/tree/6d38e783990551f4030780a1d69c7138fada2020
NormConv2d
# 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...
CompVis/interactive-image2video-synthesis
NormConv2d
false
7,934
[ "MIT" ]
20
05ea449d3a2704b6d79a5f08683035220d615576
https://github.com/CompVis/interactive-image2video-synthesis/tree/05ea449d3a2704b6d79a5f08683035220d615576
MultiHeadAttention
import torch import torch.nn as nn from torch import matmul class ScaledDotProductAttention(nn.Module): """ Scaled Dot-Product Attention """ def __init__(self, temperature, attn_dropout=0.1): super().__init__() self.temperature = temperature self.dropout = nn.Dropout(attn_dropout, 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....
superMC5657/BiLSTMTransformer
MultiHeadAttention
false
13,008
[ "MIT" ]
0
43aa7bb4d8831a898c79ea89fcb1d3f5e09d564a
https://github.com/superMC5657/BiLSTMTransformer/tree/43aa7bb4d8831a898c79ea89fcb1d3f5e09d564a
PrecomputedNorm
import torch import torch.nn as nn class PrecomputedNorm(nn.Module): """Normalization using Pre-computed Mean/Std. Args: stats: Precomputed (mean, std). axis: Axis setting used to calculate mean/variance. """ def __init__(self, stats, axis=[1, 2]): super().__init__() s...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
czlwang/s3prl
PrecomputedNorm
false
12,268
[ "Apache-2.0" ]
0
81d4bb8d051cee20fa87c083b8478999e1766172
https://github.com/czlwang/s3prl/tree/81d4bb8d051cee20fa87c083b8478999e1766172
ResBlock
import torch from torch.nn import functional as F from torch import nn from torch.nn.utils import spectral_norm class AdaptiveInstanceNorm2d(nn.Module): def __init__(self, num_features, eps=1e-05, momentum=0.1): super().__init__() self.num_features = num_features self.eps = eps 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 torch._inductor.runtime.triton_helpers import libdevice from torch.nn impor...
CompVis/interactive-image2video-synthesis
ResBlock
false
7,944
[ "MIT" ]
20
05ea449d3a2704b6d79a5f08683035220d615576
https://github.com/CompVis/interactive-image2video-synthesis/tree/05ea449d3a2704b6d79a5f08683035220d615576
DiaynDiscrimNet
import torch import torch.nn as nn from torch.nn.init import kaiming_uniform_ import torch.utils.data def weight_init(m): if m.__class__.__name__ == 'Linear': m.weight.data.copy_(kaiming_uniform_(m.weight.data)) m.bias.data.fill_(0) class DiaynDiscrimNet(nn.Module): def __init__(self, f_spa...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
AswinRetnakumar/Machina
DiaynDiscrimNet
false
13,316
[ "MIT" ]
302
6519935ca4553192ac99fc1c7c1e7cab9dd72693
https://github.com/AswinRetnakumar/Machina/tree/6519935ca4553192ac99fc1c7c1e7cab9dd72693
BertSelfAttention
from _paritybench_helpers import _mock_config import math import torch import torch.nn as nn class BertSelfAttention(nn.Module): def __init__(self, config): super(BertSelfAttention, self).__init__() if config.hidden_size % config.num_attention_heads != 0: raise ValueError( ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
aeloyq/EasyTransfer
BertSelfAttention
false
14,755
[ "Apache-2.0" ]
806
f02b1f40109c4031632f3c51bce1cf3d1e906e34
https://github.com/aeloyq/EasyTransfer/tree/f02b1f40109c4031632f3c51bce1cf3d1e906e34
GraphAttention
# 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....
Supermaxman/covid19-data
GraphAttention
false
9,602
[ "Apache-2.0" ]
0
13e8e0c30a063c60e2160896458cd290a85ea0e2
https://github.com/Supermaxman/covid19-data/tree/13e8e0c30a063c60e2160896458cd290a85ea0e2
TinyConvNet2d
# 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 assert_size_stride = torch._C...
FynnBe/tiktorch
TinyConvNet2d
false
11,432
[ "MIT" ]
0
60c6fa9700e7ff73e44338e8755c56c6e8846f2f
https://github.com/FynnBe/tiktorch/tree/60c6fa9700e7ff73e44338e8755c56c6e8846f2f
ShakeResNeXt
# 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 math from torch import...
Josie-Li/ZazuML-easy_AutoML
ShakeResNeXt
false
2,436
[ "MIT" ]
0
e4daabaab9df518c35abdba35a67607d002bee33
https://github.com/Josie-Li/ZazuML-easy_AutoML/tree/e4daabaab9df518c35abdba35a67607d002bee33
CoAttention
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....
mayankiitg/cs224n
CoAttention
false
4,006
[ "MIT" ]
0
c67b7904101c8f19a5a231e4fe521e764470d41b
https://github.com/mayankiitg/cs224n/tree/c67b7904101c8f19a5a231e4fe521e764470d41b
AdMSoftmaxLoss
# 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....
B06901052/s3prl
AdMSoftmaxLoss
false
102
[ "MIT" ]
0
5f63d2df043d2d7c81580cd042fa2cea34746f48
https://github.com/B06901052/s3prl/tree/5f63d2df043d2d7c81580cd042fa2cea34746f48
PositionGenerator
import torch import torch.nn as nn class LayerNorm(nn.Module): """Construct a layernorm module (See citation for details).""" def __init__(self, features, eps=1e-06): super(LayerNorm, self).__init__() self.a_2 = nn.Parameter(torch.ones(features)) self.b_2 = nn.Parameter(torch.zeros(fe...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
eweiner/MAT_Extension
PositionGenerator
false
12,367
[ "MIT" ]
0
505884a67f97bf54e1198077d15a48531fcac7a5
https://github.com/eweiner/MAT_Extension/tree/505884a67f97bf54e1198077d15a48531fcac7a5
GroupedMultiHeadAttention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch....
gheyret/EfficientConformer
GroupedMultiHeadAttention
false
15,427
[ "Apache-2.0" ]
101
b28a0aaa3b182f72abaccbeb12df0402adf96097
https://github.com/gheyret/EfficientConformer/tree/b28a0aaa3b182f72abaccbeb12df0402adf96097
ResnetBlockFC
import torch import torch.nn as nn import torch.autograd.profiler as profiler class ResnetBlockFC(nn.Module): """ Fully connected ResNet Block class. Taken from DVR code. :param size_in (int): input dimension :param size_out (int): output dimension :param size_h (int): hidden dimension """...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
HexagonPrime/pixel-nerf
ResnetBlockFC
false
2,418
[ "BSD-2-Clause" ]
0
298aa7a3451c01e6f19f73f0c756672d3de54bf9
https://github.com/HexagonPrime/pixel-nerf/tree/298aa7a3451c01e6f19f73f0c756672d3de54bf9
SelfAttentionPooling
# 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....
chiluen/s3prl
SelfAttentionPooling
false
1,698
[ "Apache-2.0" ]
0
c81838f6414d3c4767de355144449e40f86c7066
https://github.com/chiluen/s3prl/tree/c81838f6414d3c4767de355144449e40f86c7066
ResidualBlock
import torch import torch.nn as nn class ResidualBlock(nn.Module): def __init__(self, in_channels, out_channels, activation='relu'): super().__init__() self.in_channels, self.out_channels, self.activation = (in_channels, out_channels, activation) self.blocks = nn.Identity() ...
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...
PaParaZz1/DI-engine
ResidualBlock
false
11,852
[ "Apache-2.0" ]
0
b38144117c1ebc6eb860d8637ec8866dfbcdf2de
https://github.com/PaParaZz1/DI-engine/tree/b38144117c1ebc6eb860d8637ec8866dfbcdf2de
GRUStep
# 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 ...
siyangZhao/BAMnet
GRUStep
false
16,454
[ "Apache-2.0" ]
170
4c6222610c120a4a114daf40938219ea0ca57dc6
https://github.com/siyangZhao/BAMnet/tree/4c6222610c120a4a114daf40938219ea0ca57dc6
MatrixReduceMin
import torch import torch.nn as nn import torch.autograd class MatrixReduceMin(nn.Module): def __init__(self): super(MatrixReduceMin, self).__init__() def forward(self, x): z = torch.min(x) return z def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.autograd assert_size_stride = torch._C._dynamo.guards....
RyusukeYamano/nngen
MatrixReduceMin
false
14,344
[ "Apache-2.0" ]
207
9ed1f7fb83908794aa94d70287d89545d45fe875
https://github.com/RyusukeYamano/nngen/tree/9ed1f7fb83908794aa94d70287d89545d45fe875
SurfaceLoss
import torch import torch.nn as nn class SurfaceLoss(nn.Module): def __init__(self, epsilon=1e-05, softmax=True): super(SurfaceLoss, self).__init__() self.weight_map = [] def forward(self, x, distmap): x = torch.softmax(x, dim=1) self.weight_map = distmap score = x.fl...
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 ...
kbarkevich/RITnet
SurfaceLoss
false
7,015
[ "MIT" ]
1
5df66c656734aecd2987cf27d9359416b136af2e
https://github.com/kbarkevich/RITnet/tree/5df66c656734aecd2987cf27d9359416b136af2e
SimpleCeilModule
import torch import torch.jit import torch.onnx import torch.nn class SimpleCeilModule(torch.nn.Module): def forward(self, a, b): c = a + b return torch.ceil(c) def get_inputs(): return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.jit import torch.onnx import torch.nn assert_size_stride = torch._...
briancoutinho/glow
SimpleCeilModule
false
12,568
[ "Apache-2.0" ]
0
4c919d60b3c33296c4109aec8020a1733c98f5b5
https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5
DepthConv2d
# 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 numpy as np ...
rbodo/pytorch-OpCounter
DepthConv2d
false
7,549
[ "MIT" ]
1
1857cbb5f9e53343fb349af84efdfde2554a2691
https://github.com/rbodo/pytorch-OpCounter/tree/1857cbb5f9e53343fb349af84efdfde2554a2691
BoundPow
from _paritybench_helpers import _mock_config import math import torch import numpy as np import torch.nn as nn import torch.nn.functional as F from numbers import Number from torch.nn import MSELoss def isnan(x): if isinstance(x, Patches): return False return torch.isnan(x).any() class Perturbation...
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 math import numpy as np import torch.nn as nn import torch.nn.functional...
Mahoumaru/auto_LiRPA
BoundPow
false
13,222
[ "BSD-3-Clause" ]
0
b03a6c36eb1b921726778359d6d2b94e0cd7e480
https://github.com/Mahoumaru/auto_LiRPA/tree/b03a6c36eb1b921726778359d6d2b94e0cd7e480
_ImpalaBlock
# 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...
nrfulton/vsrl-framework
_ImpalaBlock
false
7,369
[ "MIT" ]
1
c778824b3285e3e994a4c5846c7b1c2ac03c669b
https://github.com/nrfulton/vsrl-framework/tree/c778824b3285e3e994a4c5846c7b1c2ac03c669b
ClsHead
# 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....
BHD233/PaddleOCR2Pytorch
ClsHead
false
13,358
[ "Apache-2.0" ]
364
f114069b3e2669c6adf0adf9596756205f184c9c
https://github.com/BHD233/PaddleOCR2Pytorch/tree/f114069b3e2669c6adf0adf9596756205f184c9c
CrossEntropyLossWithSoftLabel
import torch from torch.nn import * from torch.optim import * from torch.optim.lr_scheduler import * class CrossEntropyLossWithSoftLabel(torch.nn.Module): def __init__(self, reduction='mean'): super().__init__() self.reduction = reduction self.logsoftmax = torch.nn.LogSoftmax(dim=1) ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch.nn import *...
UNIST-LIM-Lab/NeuBoots
CrossEntropyLossWithSoftLabel
false
2,913
[ "MIT" ]
0
196adf9e1ece2abc145f69966504bac2676e5b5e
https://github.com/UNIST-LIM-Lab/NeuBoots/tree/196adf9e1ece2abc145f69966504bac2676e5b5e
PositionWiseFeedForward
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import math import ...
akakakakakaa/pytorchic-bert
PositionWiseFeedForward
false
4,725
[ "Apache-2.0" ]
0
055d72adce9a41c322d23145840f31a94d9ffec4
https://github.com/akakakakakaa/pytorchic-bert/tree/055d72adce9a41c322d23145840f31a94d9ffec4
BertOutput
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import n...
zdxdsw/WebQA_VLP
BertOutput
false
11,053
[ "Apache-2.0" ]
0
443bcd7e9b36db47e2ab4502abaaa3724800f394
https://github.com/zdxdsw/WebQA_VLP/tree/443bcd7e9b36db47e2ab4502abaaa3724800f394
LearnedPositionalEmbedding
import torch import torch.nn as nn import torch.nn.functional as F class LearnedPositionalEmbedding(nn.Embedding): """ This module learns positional embeddings up to a fixed maximum size. Padding ids are ignored by either offsetting based on padding_idx or by setting padding_idx to None and ensuring t...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
William-Zhanng/Protein_affinity
LearnedPositionalEmbedding
false
5,977
[ "MIT" ]
1
8abd12073b182274bf464ff23fd3be406c4e39ac
https://github.com/William-Zhanng/Protein_affinity/tree/8abd12073b182274bf464ff23fd3be406c4e39ac
UpConv2D
import torch import torch.nn as nn class UpConv2D(nn.Module): def __init__(self, in_channels=3, out_channels=3, kernel_size=5, ratio=2): super(UpConv2D, self).__init__() self.conv = nn.Conv2d(in_channels, out_channels * ratio ** 2, kernel_size, padding=kernel_size // 2) self.u...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
emirkonuk/defocus
UpConv2D
false
3,468
[ "Apache-2.0" ]
0
da2977d2698eb20e9ab2a3bcd1fa4d05e1dd9b50
https://github.com/emirkonuk/defocus/tree/da2977d2698eb20e9ab2a3bcd1fa4d05e1dd9b50
DQN_hot3
import torch import torch.nn.functional as F import torch.nn as nn import torch.utils.data class DQN_hot3(nn.Module): """ A MLP for DQN learning. Note: Uses a one hot board representation """ def __init__(self, m, n, num_actions): super(DQN_hot3, self).__init__() self.fc1 = ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
CoAxLab/azad
DQN_hot3
false
17,176
[ "MIT" ]
6
d1498069dd8856e93ae077b34dd7c9f1c7ce80e6
https://github.com/CoAxLab/azad/tree/d1498069dd8856e93ae077b34dd7c9f1c7ce80e6
ZeroModule
# 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 import torch.random assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dyna...
TaoHuang13/imitation
ZeroModule
false
9,508
[ "MIT" ]
0
f979be0fa05106754f6d1e5a98495d0fedbea598
https://github.com/TaoHuang13/imitation/tree/f979be0fa05106754f6d1e5a98495d0fedbea598
CrossEntropyLoss
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel import torch.optim import torch.utils.data def _is_long(x): return isinstance(x, torch.LongTensor) or isinstance(x, torch.LongTensor) def onehot(indexes, N=None, ignore_index=None): """ Creates a one-representati...
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 ...
Randl/Ranger_Mish_reimplementation
CrossEntropyLoss
false
17,838
[ "MIT" ]
7
36f580ce8a02fae1929e101c9bd6987ccd2a5843
https://github.com/Randl/Ranger_Mish_reimplementation/tree/36f580ce8a02fae1929e101c9bd6987ccd2a5843
DiceLoss
import torch import torch.nn as nn class DiceLoss(nn.Module): def __init__(self, smooth=0, eps=1e-07): super(DiceLoss, self).__init__() self.smooth = smooth self.eps = eps def forward(self, output, target): return 1 - (2 * torch.sum(output * target) + self.smooth) / (torch. ...
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...
kant/open-solution-ship-detection
DiceLoss
false
12,655
[ "MIT" ]
0
94fa14fc461d6088d884930cbd8e2a2b99a338b5
https://github.com/kant/open-solution-ship-detection/tree/94fa14fc461d6088d884930cbd8e2a2b99a338b5
MinimaxDiscriminatorLoss
import torch import torch.nn as nn import torch.nn.functional as F def minimax_discriminator_loss(dx, dgz, label_smoothing=0.0, reduction='mean'): target_ones = torch.ones_like(dgz) * (1.0 - label_smoothing) target_zeros = torch.zeros_like(dx) loss = F.binary_cross_entropy_with_logits(dx, target_ones, red...
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...
shi-weili/torchgan
MinimaxDiscriminatorLoss
false
12,972
[ "MIT" ]
0
28ffd4026b8c0db2217b667d30a222d6758bfc41
https://github.com/shi-weili/torchgan/tree/28ffd4026b8c0db2217b667d30a222d6758bfc41
VNet
import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.init import kaiming_uniform_ import torch.utils.data def weight_init(m): if m.__class__.__name__ == 'Linear': m.weight.data.copy_(kaiming_uniform_(m.weight.data)) m.bias.data.fill_(0) class VNet(nn.Module): 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 from to...
KtechB/machina
VNet
false
2,475
[ "MIT" ]
0
24eca9cc9b89a0e0b9e026282f17c7b9fe2869ab
https://github.com/KtechB/machina/tree/24eca9cc9b89a0e0b9e026282f17c7b9fe2869ab
AE
import torch import torch.nn.functional as F import torch.nn as nn import torch.nn.modules.loss class AE(nn.Module): """ Autoencoder for dimensional reduction""" def __init__(self, dim): super(AE, self).__init__() self.dim = dim self.fc1 = nn.Linear(dim, 512) 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 import torch.nn.functional as...
peterfeifanchen/scGNN
AE
false
16,230
[ "MIT" ]
60
4ef9013ad0f44f9f51708e9bb60e5138f5706593
https://github.com/peterfeifanchen/scGNN/tree/4ef9013ad0f44f9f51708e9bb60e5138f5706593
GlobalAttentionGeneral
import torch import torch.nn as nn import torch.nn.parallel import torch.onnx def conv1x1(in_planes, out_planes, bias=False): """1x1 convolution with padding""" return nn.Conv2d(in_planes, out_planes, kernel_size=1, stride=1, padding=0, bias=bias) class GlobalAttentionGeneral(nn.Module): 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._inductor.runtime....
MaxyLee/Style-AttnGAN
GlobalAttentionGeneral
false
8,528
[ "MIT" ]
36
d33d0df061c94b75ad4af5c750b8d6f37ee1a35a
https://github.com/MaxyLee/Style-AttnGAN/tree/d33d0df061c94b75ad4af5c750b8d6f37ee1a35a
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 ...
dumpmemory/Pytorch-NLU
FocalLoss
false
15,242
[ "Apache-2.0" ]
115
864fb9acc7751fc51abd3d05d24b5a9a7eab7110
https://github.com/dumpmemory/Pytorch-NLU/tree/864fb9acc7751fc51abd3d05d24b5a9a7eab7110
my_Hingeloss
import torch import torch.nn as nn class my_Hingeloss(nn.Module): def __init__(self): super(my_Hingeloss, self).__init__() def forward(self, output, target): pos = torch.sum(output * target, 2) neg = torch.max((1 - target) * output, 2) loss = neg[0] - pos + 1 loss[los...
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...
carsault/chord_sequence_prediction
my_Hingeloss
false
1,635
[ "MIT" ]
0
6eb539a963ca6350bcf0c88b8d8756775ad7c488
https://github.com/carsault/chord_sequence_prediction/tree/6eb539a963ca6350bcf0c88b8d8756775ad7c488
InstanceNorm2dPlus
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
DeepTitan/PNDM
InstanceNorm2dPlus
false
13,584
[ "Apache-2.0" ]
61
4037a4f40011c9a0d47b92303e64d47fcc7ed56a
https://github.com/DeepTitan/PNDM/tree/4037a4f40011c9a0d47b92303e64d47fcc7ed56a
Normalize
import torch import torch.nn as nn class Normalize(nn.Module): def __init__(self, dim): super().__init__() self.dim = dim def forward(self, x): norm = torch.norm(x, p=2, dim=self.dim, keepdim=True) return x / norm def get_inputs(): return [torch.rand([4, 4, 4, 4, 4])] ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
phuochieu212/PointGLR
Normalize
false
16,249
[ "MIT" ]
104
37017b1af31486aa9d516a3762725a650dca9ad1
https://github.com/phuochieu212/PointGLR/tree/37017b1af31486aa9d516a3762725a650dca9ad1
TemperatureHolder
import torch from torch import nn class TemperatureHolder(nn.Module): """Module that holds a temperature as a learnable value. Args: initial_log_temperature (float): Initial value of log(temperature). """ def __init__(self, initial_log_temperature=0): super().__init__() 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 from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_...
g-votte/pfrl
TemperatureHolder
false
15,393
[ "MIT" ]
824
4c30c1d73f0941a2b649b62937eec346bb55a95e
https://github.com/g-votte/pfrl/tree/4c30c1d73f0941a2b649b62937eec346bb55a95e
ActionApproximation
import torch class ActionApproximation(torch.nn.Module): def __init__(self, state_observations_count, action_count, hidden_count=512 ): super(ActionApproximation, self).__init__() self.ReLU = torch.nn.ReLU() self.dense0 = torch.nn.Linear(state_observations_count, hidden_count) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
Unn20/achtung_die_kurve
ActionApproximation
false
2,920
[ "MIT" ]
0
e2dbb1752c070cfc398e415d5a427384c0230f3c
https://github.com/Unn20/achtung_die_kurve/tree/e2dbb1752c070cfc398e415d5a427384c0230f3c
BboxHead
# 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._utils from itertools import product as produ...
Capetian/FaceX-Zoo
BboxHead
false
5,025
[ "Apache-2.0" ]
1
029786c40d8aba15d891d33973de25fcd7e5399a
https://github.com/Capetian/FaceX-Zoo/tree/029786c40d8aba15d891d33973de25fcd7e5399a
ConvolutionModule
# 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 T...
thangdepzai/icefall
ConvolutionModule
false
13,037
[ "Apache-2.0" ]
0
8c7995d493c4309c3d09bdabfa1ab12b4eec2657
https://github.com/thangdepzai/icefall/tree/8c7995d493c4309c3d09bdabfa1ab12b4eec2657
ToTensor
from torch.nn import Module import torch class ToTensor(Module): def __init__(self): super(ToTensor, self).__init__() def forward(self, x): x = x / 255 return 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.nn import Module assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._em...
alinavalinav/finn
ToTensor
false
6,198
[ "BSD-3-Clause" ]
1
e443a5859066a410a63c08dcfec4a90527ca24be
https://github.com/alinavalinav/finn/tree/e443a5859066a410a63c08dcfec4a90527ca24be
LinearCombine
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn import torch.nn.parallel import torch.optim import ...
HarshCasper/nni
LinearCombine
false
5,284
[ "MIT" ]
1
291bbbba9f296382015a77b2c88eb5db5b44bf94
https://github.com/HarshCasper/nni/tree/291bbbba9f296382015a77b2c88eb5db5b44bf94
CategoricalSampler
import torch import torch.nn as nn class Sampler(nn.Module): """ args; logits: (batch, n_nodes) return; next_node: (batch, 1) TopKSampler <=> greedy; sample one with biggest probability CategoricalSampler <=> sampling; randomly sample one from possible distribution based on probability """ def __init_...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
daunfamily/VRP_MHA
CategoricalSampler
false
12,299
[ "MIT" ]
0
9c23d181d11dbbacac01299c6e8931b8e266b9b4
https://github.com/daunfamily/VRP_MHA/tree/9c23d181d11dbbacac01299c6e8931b8e266b9b4
AbsModel
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math from torch.nn import Module from torch import Tensor from torch.nn import...
nuwangunasekara/avalanche
AbsModel
false
4,094
[ "MIT" ]
0
1f4d5b3e559552394cce573a85b1c9af26a544fb
https://github.com/nuwangunasekara/avalanche/tree/1f4d5b3e559552394cce573a85b1c9af26a544fb
MSE_disc
import torch import torch.nn as nn class MSE_disc(nn.Module): def __init__(self, weight_list=None): super(MSE_disc, self).__init__() self.weight_list = weight_list def forward(self, x, labels): loss = (x - labels) ** 2 if self.weight_list is not None: loss = loss ...
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...
Sampson-Lee/SIB-Net
MSE_disc
false
2,809
[ "MIT" ]
0
650399082e9237327fa38168ccfc7d48153a1db5
https://github.com/Sampson-Lee/SIB-Net/tree/650399082e9237327fa38168ccfc7d48153a1db5
PseudoCoord
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dy...
KaihuaTang/VQA2.0-Recent-Approachs-2018.pytorch
PseudoCoord
false
13,933
[ "MIT" ]
298
52e1ba5a7f3b88c617115ccc755e2e7868e8de2b
https://github.com/KaihuaTang/VQA2.0-Recent-Approachs-2018.pytorch/tree/52e1ba5a7f3b88c617115ccc755e2e7868e8de2b
DotProductSimilarity
import math import torch import torch.nn as nn class SimilarityFunction(nn.Module): """ A ``SimilarityFunction`` takes a pair of tensors with the same shape, and computes a similarity function on the vectors in the last dimension. For example, the tensors might both have shape `(batch_size, sentence_...
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...
michiyasunaga/GreaseLM
DotProductSimilarity
false
16,041
[ "MIT" ]
76
596aa5047841e3e97730f621a2e4576772733df2
https://github.com/michiyasunaga/GreaseLM/tree/596aa5047841e3e97730f621a2e4576772733df2
MutualBiAffineAttention
# 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...
Maxi-0902/DRAN
MutualBiAffineAttention
false
833
[ "MIT" ]
0
c3dbfcbc018446544150dc4e151442d6a9fcd4d9
https://github.com/Maxi-0902/DRAN/tree/c3dbfcbc018446544150dc4e151442d6a9fcd4d9
ODEfunc
# 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....
Lauu1023/torchdiffeq
ODEfunc
false
9,356
[ "MIT" ]
0
f4f3184a4c1b657da959c7d15bc8f727f1c25bd8
https://github.com/Lauu1023/torchdiffeq/tree/f4f3184a4c1b657da959c7d15bc8f727f1c25bd8
DGN
import torch import torch.nn as nn import torch.nn.functional as F class AttModel(nn.Module): def __init__(self, din, hidden_dim, dout): super(AttModel, self).__init__() self.fcv = nn.Linear(din, hidden_dim) self.fck = nn.Linear(din, hidden_dim) self.fcq = nn.Linear(din, hidden_di...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
HuangHaoyu1997/pytorch_DGN
DGN
false
13,801
[ "MIT" ]
48
f1b1a157a9b1678f9238f64458f44412b796d00e
https://github.com/HuangHaoyu1997/pytorch_DGN/tree/f1b1a157a9b1678f9238f64458f44412b796d00e
SoftBinaryCrossEntropyLoss
# 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...
crobbins327/semanticGAN_WSI
SoftBinaryCrossEntropyLoss
false
1,748
[ "BSD-2-Clause", "MIT" ]
0
4046ddc822f463e03952402247f79d540bf7be95
https://github.com/crobbins327/semanticGAN_WSI/tree/4046ddc822f463e03952402247f79d540bf7be95
SoftEntropy
# 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 from torch import nn f...
Dingyuan-Zheng/ctf-UDA
SoftEntropy
false
377
[ "MIT" ]
0
3e3c67f68d7eb0b52a16a259e5a77e153062c4fd
https://github.com/Dingyuan-Zheng/ctf-UDA/tree/3e3c67f68d7eb0b52a16a259e5a77e153062c4fd
FirstLSTMAmp
import torch import torch.utils.data import torch.nn as nn class FirstLSTMAmp(nn.Module): """ First LSTM amplifier branch. Parameters: ---------- in_features : int Number of input channels. out_features : int Number of output channels. """ def __init__(self, in_featur...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
HyperGAN/imgclsmob
FirstLSTMAmp
false
17,679
[ "MIT" ]
9
88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3
https://github.com/HyperGAN/imgclsmob/tree/88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3
ResidualBlock_noBN
# 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.utils.data impor...
AbnerVictor/HCFlow
ResidualBlock_noBN
false
9,106
[ "Apache-2.0" ]
0
e55938ac9f58c117898e3d161ddc73b14d15289b
https://github.com/AbnerVictor/HCFlow/tree/e55938ac9f58c117898e3d161ddc73b14d15289b
MSELoss2d
# 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 ...
mimiliaogo/DACS
MSELoss2d
false
16,092
[ "MIT" ]
59
9f13e32566c293de560df4848b23631d9e11cf32
https://github.com/mimiliaogo/DACS/tree/9f13e32566c293de560df4848b23631d9e11cf32
DiceLoss
import torch import torch.nn as nn import torch.hub def dice_loss(input, target): smooth = 1.0 input = torch.sigmoid(input) if input.dim() == 4: B, C, _H, _W = input.size() iflat = input.view(B * C, -1) tflat = target.view(B * C, -1) else: assert input.dim() == 3 ...
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.hub assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo...
thangnx183/kaggle-understanding-clouds
DiceLoss
false
16,575
[ "BSD-2-Clause" ]
207
15ad2a9029958262437b899cb00525579da23911
https://github.com/thangnx183/kaggle-understanding-clouds/tree/15ad2a9029958262437b899cb00525579da23911
MeanVoxelFeatureExtractor
import torch import torch.nn as nn class VoxelFeatureExtractor(nn.Module): def __init__(self, **kwargs): super().__init__() def get_output_feature_dim(self): raise NotImplementedError def forward(self, **kwargs): raise NotImplementedError class MeanVoxelFeatureExtractor(VoxelF...
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...
GuilinZ/PCDet
MeanVoxelFeatureExtractor
false
2,312
[ "Apache-2.0" ]
0
f39769160854871bec9954630b9a4369b603391d
https://github.com/GuilinZ/PCDet/tree/f39769160854871bec9954630b9a4369b603391d
LogLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice from torch.nn import MSELoss...
aykuttasil/mindsdb
LogLoss
false
6,297
[ "MIT" ]
1
2c36b6f75f13d7104fe4d3dbb7ca307fa84f45ad
https://github.com/aykuttasil/mindsdb/tree/2c36b6f75f13d7104fe4d3dbb7ca307fa84f45ad
KLDivLoss
# 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 from torch.nn import M...
techthiyanes/annotated_deep_learning_paper_implementations
KLDivLoss
false
16,555
[ "MIT" ]
3,714
8af24da2dd39a9a87482a4d18c2dc829bbd3fd47
https://github.com/techthiyanes/annotated_deep_learning_paper_implementations/tree/8af24da2dd39a9a87482a4d18c2dc829bbd3fd47
RUM
import torch import torch.nn.functional as F import torch.nn as nn def rotation_components(x, y, eps=1e-12): size_batch = x.size()[0] hidden_size = x.size()[1] u = F.normalize(x, p=2, dim=1, eps=eps) costh = torch.sum(u * F.normalize(y, p=2, dim=1, eps=eps), dim=1).view( size_batch, 1) sin...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
omri123/rotational-unit-of-memory
RUM
false
16,262
[ "MIT" ]
82
e796c841e1e837df09497ba77c3bc285db47d02d
https://github.com/omri123/rotational-unit-of-memory/tree/e796c841e1e837df09497ba77c3bc285db47d02d
BertOutAttention
# 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....
YanyuanQiao/HOP-VLN
BertOutAttention
false
18,144
[ "MIT" ]
8
4b26b2569afb3e7eb7d8c2ed814cd424e41cbade
https://github.com/YanyuanQiao/HOP-VLN/tree/4b26b2569afb3e7eb7d8c2ed814cd424e41cbade
MultiHeadAttention
# 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....
BlackNoodle/TUCORE-GCN
MultiHeadAttention
false
7,808
[ "MIT" ]
27
16fb37d81c5b1182a31fcf7da08a9c0013b20cd6
https://github.com/BlackNoodle/TUCORE-GCN/tree/16fb37d81c5b1182a31fcf7da08a9c0013b20cd6
ConvAE
import math import torch import torch.nn as nn import torch.nn.functional as F class Conv2dSamePad(nn.Module): """ Implement Tensorflow's 'SAME' padding mode in Conv2d. When an odd number, say `m`, of pixels are need to pad, Tensorflow will pad one more column at right or one more row at bottom. But P...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import math import torch.nn a...
ShulingTang/DSC-Net
ConvAE
false
9,505
[ "MIT" ]
0
2da1e0c654b045057c654cbcbb8a8c23fb832c9d
https://github.com/ShulingTang/DSC-Net/tree/2da1e0c654b045057c654cbcbb8a8c23fb832c9d
Swish
import torch import torch.nn as nn class Swish(nn.Module): def __init__(self, inplace=True): super(Swish, self).__init__() self.inplace = inplace def forward(self, x): return x.mul_(x.sigmoid()) if self.inplace else x.mul(x.sigmoid()) 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride @triton.jit def triton_poi_fused_mul_sigmoid_0(in_pt...
ShowLo/Networks
Swish
false
1,056
[ "MIT" ]
0
48f8545783966c383b6c3b600fbe37a15ea8ae3c
https://github.com/ShowLo/Networks/tree/48f8545783966c383b6c3b600fbe37a15ea8ae3c
Auto_Encoder_Model
import torch import torch.nn as nn import torch.nn.functional as F class Auto_Encoder_Model(nn.Module): def __init__(self): super(Auto_Encoder_Model, self).__init__() self.conv1 = nn.Conv2d(1, 64, padding=1, kernel_size=3) self.max_pool1 = nn.MaxPool2d(2) self.conv2 = nn.Conv2d(64...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
NNDEV1/QandMedicAid
Auto_Encoder_Model
false
5,649
[ "MIT" ]
1
f229f7dcf192fd79715eba07a2e5121a13c7a571
https://github.com/NNDEV1/QandMedicAid/tree/f229f7dcf192fd79715eba07a2e5121a13c7a571
SimpleFmodModule
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.jit import torch.onnx import torch.nn assert_size_stride = torch._...
mciprian13/glow
SimpleFmodModule
false
3,998
[ "Apache-2.0" ]
0
90f88205d9bf8baff8df5bbda51c9d138e3e668b
https://github.com/mciprian13/glow/tree/90f88205d9bf8baff8df5bbda51c9d138e3e668b
DecoderLayer
import math import torch import torch.nn as nn import torch.nn.functional as F class MultiHeadAttention(nn.Module): def __init__(self, heads, d_model, dropout=0.1): super().__init__() self.d_model = d_model self.d_k = d_model // heads self.h = heads self.q_linear = nn.Line...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
b19e93n/PLC-Pyramid
DecoderLayer
false
3,175
[ "MIT" ]
0
6d5b57be6995a94ef7402144cee965862713b031
https://github.com/b19e93n/PLC-Pyramid/tree/6d5b57be6995a94ef7402144cee965862713b031
Conv3d_wd
# 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....
junyuchen245/TransMorph_Transformer_for_Medical_Image_Registration
Conv3d_wd
false
15,768
[ "MIT" ]
82
dfa24a47a564a000aa9b4eea95a6e83a24568359
https://github.com/junyuchen245/TransMorph_Transformer_for_Medical_Image_Registration/tree/dfa24a47a564a000aa9b4eea95a6e83a24568359
TestPointLSTM
# 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....
evanfebrianto/pointlstm_gesture_recognition_pytorch
TestPointLSTM
false
15,329
[ "Apache-2.0" ]
69
797ccdc7da5a859e28f2a8cc7ef7118358b82cb4
https://github.com/evanfebrianto/pointlstm_gesture_recognition_pytorch/tree/797ccdc7da5a859e28f2a8cc7ef7118358b82cb4
CNN_DropOut
import torch from torch import nn import torch.utils class CNN_DropOut(torch.nn.Module): """ Recommended model by "Adaptive Federated Optimization" (https://arxiv.org/pdf/2003.00295.pdf) Used for EMNIST experiments. When `only_digits=True`, the summary of returned model is ``` Model: _____...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 import t...
MichaelLee-ceo/FedSAUC
CNN_DropOut
false
5,597
[ "Apache-2.0" ]
1
8c00008772213562ff6a07bf9fa92c3831713118
https://github.com/MichaelLee-ceo/FedSAUC/tree/8c00008772213562ff6a07bf9fa92c3831713118
SEModule
# 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 import t...
Randl/TResNet
SEModule
false
5,755
[ "Apache-2.0" ]
1
18514caf61d77c7e000a71dde9d1f86ba792b38d
https://github.com/Randl/TResNet/tree/18514caf61d77c7e000a71dde9d1f86ba792b38d
UpsampleConv2d
from torch.nn import Module import math import torch from torchvision.datasets import * import torch.nn.functional as F from torch.nn import Parameter from torch.nn.modules.utils import _pair from torchvision.transforms import * class UpsampleConv2d(Module): """ To avoid the checkerboard artifacts of standard...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch.nn import Module import math from torchvision.datasets import * from ...
ruijieren98/DANet
UpsampleConv2d
false
16,358
[ "MIT" ]
2,190
e38d61e371179833c08888fd5a1ee444cf5bd875
https://github.com/ruijieren98/DANet/tree/e38d61e371179833c08888fd5a1ee444cf5bd875
Encoder
# 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....
rorymaizels/AC299r
Encoder
false
7,581
[ "MIT" ]
1
eb4b76ad52a10b9af0579ec3f725ec8fc90b00f1
https://github.com/rorymaizels/AC299r/tree/eb4b76ad52a10b9af0579ec3f725ec8fc90b00f1