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
FcCat
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
huangzsdy/pytorch_basic_learning
FcCat
false
3,633
[ "Apache-2.0" ]
0
7880bc3fcee1d38623d93fa2a36482ccde0e335a
https://github.com/huangzsdy/pytorch_basic_learning/tree/7880bc3fcee1d38623d93fa2a36482ccde0e335a
GatedTanhUnit
import torch import torch.nn as nn def gated_tanh(x, dim): """Gated Tanh activation.""" x_tanh, x_sigmoid = torch.chunk(x, 2, dim=dim) return torch.tanh(x_tanh) * torch.sigmoid(x_sigmoid) class GatedTanhUnit(nn.Module): """Gated Tanh activation.""" def __init__(self, dim=-1): super(Gate...
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_...
Nintorac/survae_experiments
GatedTanhUnit
false
899
[ "MIT" ]
0
d68cc25e2604aab08b53617c1f3ffe4716f166c4
https://github.com/Nintorac/survae_experiments/tree/d68cc25e2604aab08b53617c1f3ffe4716f166c4
ClassificationAccuracy
import torch import torch.nn as nn class ClassificationAccuracy(nn.Module): """ This class implements the classification accuracy computation. No gradients supported. """ def __init__(self, threshold: 'float'=0.5) ->None: """ Constructor method :param threshold: (float) Thresh...
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
ClassificationAccuracy
false
13,491
[ "MIT" ]
55
4d0c3a2d3ffd19184c8443e5b3a6dccc053c77ea
https://github.com/ChristophReich1996/Cell-DETR/tree/4d0c3a2d3ffd19184c8443e5b3a6dccc053c77ea
MPJPE
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import torch.nn.functional assert_size_stride = torch._C....
miracleyoo/lifting_events_to_3d_hpe
MPJPE
false
10,599
[ "Apache-2.0" ]
0
dfe734ee055900d6ab90c064bf82db7672830ac7
https://github.com/miracleyoo/lifting_events_to_3d_hpe/tree/dfe734ee055900d6ab90c064bf82db7672830ac7
StyleResidual
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn import torch.utils.data import torch.optim assert_size_stri...
niklub/NeMo
StyleResidual
false
7,342
[ "Apache-2.0" ]
1
4bcb2321cd16835f63afe3dfe993e6d56bcf2c0c
https://github.com/niklub/NeMo/tree/4bcb2321cd16835f63afe3dfe993e6d56bcf2c0c
DenseSAGEConv
# 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....
dendisuhubdy/pytorch_geometric
DenseSAGEConv
false
1,831
[ "MIT" ]
0
a0592f61aef617c0c8ff61b3d822d04901054c22
https://github.com/dendisuhubdy/pytorch_geometric/tree/a0592f61aef617c0c8ff61b3d822d04901054c22
MaskL1Loss
# 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 a...
DYF-AI/openvino-x
MaskL1Loss
false
5,034
[ "Apache-2.0" ]
1
0f18ebb240ea3394f7e461aca34fac158e686d95
https://github.com/DYF-AI/openvino-x/tree/0f18ebb240ea3394f7e461aca34fac158e686d95
GatedConv2d
import torch import torch.nn as nn class GatedConv2d(torch.nn.Module): """ Gated Convlution layer with activation (default activation:LeakyReLU) Params: same as conv2d Input: The feature from last layer "I" Output:\\phi(f(I))*\\sigmoid(g(I)) """ def __init__(self, in_channels, out_channel...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
ShiraLightricks/3d-photo-inpainting
GatedConv2d
false
1,053
[ "MIT" ]
0
c42ac41576690b765e50f5281ddbfb58439ff36d
https://github.com/ShiraLightricks/3d-photo-inpainting/tree/c42ac41576690b765e50f5281ddbfb58439ff36d
UnaryBlock
import torch import torch.utils.data import torch.nn as nn from torch.nn.parameter import Parameter class BatchNormBlock(nn.Module): def __init__(self, in_dim, use_bn, bn_momentum): """ Initialize a batch normalization block. If network does not use batch normalization, replace with biases. ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.utils....
ShengyuH/PredateOverlap
UnaryBlock
false
14,412
[ "MIT" ]
153
770c3063399f08b3836935212ab4c84d355b4704
https://github.com/ShengyuH/PredateOverlap/tree/770c3063399f08b3836935212ab4c84d355b4704
PairwiseBCELoss
# 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 abc im...
MaxDall/flair
PairwiseBCELoss
false
9,312
[ "MIT" ]
0
fe33be4a63134595c21891edbe00ef9bd6014641
https://github.com/MaxDall/flair/tree/fe33be4a63134595c21891edbe00ef9bd6014641
PixelWise
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.utils.data import torch.utils.data.distributed import torch.nn.ini...
davidwagnerkc/TensorMONK
PixelWise
false
1,803
[ "MIT" ]
0
3607836d3d6bfd0994e044536b2a51bc84b35f31
https://github.com/davidwagnerkc/TensorMONK/tree/3607836d3d6bfd0994e044536b2a51bc84b35f31
LinearBlock
import torch from functools import partial import torch.nn as nn def dispatcher(dispatch_fn): def decorated(key, *args): if callable(key): return key if key is None: key = 'none' return dispatch_fn(key, *args) return decorated @dispatcher def activ_dispatch(a...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from functools import partial...
derwind/dmfont
LinearBlock
false
15,173
[ "MIT" ]
95
17a91a9cc1917d2485eaa8e92b68245578920c76
https://github.com/derwind/dmfont/tree/17a91a9cc1917d2485eaa8e92b68245578920c76
LinearBlock
import torch class LinearBlock(torch.nn.Module): def __init__(self, in_features: 'int', out_features: 'int') ->None: super().__init__() self.layer_1 = torch.nn.Linear(in_features, out_features) self.layer_2 = torch.nn.Linear(out_features, out_features) self.activation = torch.nn.L...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cu...
OleguerCanal/transplanter
LinearBlock
false
5,682
[ "MIT" ]
1
854fa727747a484dedde9092eeee6884d7d1b44b
https://github.com/OleguerCanal/transplanter/tree/854fa727747a484dedde9092eeee6884d7d1b44b
ScaleDotProductAttention
import math import torch from torch import nn class ScaleDotProductAttention(nn.Module): """ compute scale dot product attention Query : given sentence that we focused on (decoder) Key : every sentence to check relationship with Qeury(encoder) Value : every sentence same with Key (encoder) ""...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
bsgiovanini/transformer
ScaleDotProductAttention
false
1,584
[ "Apache-2.0" ]
0
e128fa862f1b3d17d7b92df169a2bbee3f08366f
https://github.com/bsgiovanini/transformer/tree/e128fa862f1b3d17d7b92df169a2bbee3f08366f
MaskLoss
# 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...
lisadunlap/explainable-nbdt
MaskLoss
false
7,110
[ "MIT" ]
1
e045bfd0b55b21fd87c9a233b73a0ca77672efff
https://github.com/lisadunlap/explainable-nbdt/tree/e045bfd0b55b21fd87c9a233b73a0ca77672efff
SelfAttn
# 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....
etaoxing/crl_alfred
SelfAttn
false
15,314
[ "MIT" ]
148
cad500cf84f71e47f1191e7810dde0c74d295f08
https://github.com/etaoxing/crl_alfred/tree/cad500cf84f71e47f1191e7810dde0c74d295f08
BCEFocalLoss
import torch import torch._utils class BCEFocalLoss(torch.nn.Module): """ 二分类的Focalloss alpha 固定 """ def __init__(self, gamma=2, alpha=0.25, reduction='elementwise_mean'): super().__init__() self.gamma = gamma self.alpha = alpha self.reduction = reduction 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 from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch._utils as...
ilcessadecalcular/segmentation
BCEFocalLoss
false
10,583
[ "MIT" ]
0
24ba499a399efdba212ec5e2235b72ed8270cc24
https://github.com/ilcessadecalcular/segmentation/tree/24ba499a399efdba212ec5e2235b72ed8270cc24
DiscriminatorLoss
import torch import torch.nn as nn class AdvLoss(nn.Module): """BCE for True and False reals""" def __init__(self, alpha=1): super().__init__() self.loss_fn = nn.BCEWithLogitsLoss() self.alpha = alpha def forward(self, pred, target): return self.alpha * self.loss_fn(pred,...
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...
akanametov/SuperResolution
DiscriminatorLoss
false
6,140
[ "MIT" ]
1
45313d1309ddb5cdef821aaf5ac7b5ad574b5287
https://github.com/akanametov/SuperResolution/tree/45313d1309ddb5cdef821aaf5ac7b5ad574b5287
OneTupleModule
# 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
OneTupleModule
false
12,549
[ "Apache-2.0" ]
0
4c919d60b3c33296c4109aec8020a1733c98f5b5
https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5
Aggregation
import torch from torch import nn from torch.nn import * class Aggregation(nn.Module): """ Aggregation layer for the Dueling architecture. https://arxiv.org/abs/1511.06581 This layer computes a Q function by combining an estimate of V with an estimate of the advantage. The advantage is normal...
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 torch.nn import * assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._d...
ezelikman/autonomous-learning-library
Aggregation
false
6,676
[ "MIT" ]
1
b32d059ca8b191afe0b310102d0754796f391aff
https://github.com/ezelikman/autonomous-learning-library/tree/b32d059ca8b191afe0b310102d0754796f391aff
Standardize
from torch.nn import Module import torch from torch.nn import init from torch.nn.parameter import Parameter class Standardize(Module): """ Applies (element-wise) standardization with trainable translation parameter μ and scale parameter σ, i.e. computes (x - μ) / σ where '/' is applied element-wise. ...
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 from torch.nn import init from torch.nn.parameter import Parameter assert_size_stride = torch._C._dynamo.guards....
SDJustus/Deep-SAD-PyTorch
Standardize
false
1,009
[ "MIT" ]
0
4d98e6474a7256329134c075894f885a56f59281
https://github.com/SDJustus/Deep-SAD-PyTorch/tree/4d98e6474a7256329134c075894f885a56f59281
ExtClassifier
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.cuda import torch.distributed assert_size_str...
eric-zhizu/OpenNMT-kpg-release
ExtClassifier
false
12,351
[ "MIT" ]
0
9f15dea6f663425eef2157845c4c8042ad845c11
https://github.com/eric-zhizu/OpenNMT-kpg-release/tree/9f15dea6f663425eef2157845c4c8042ad845c11
LogSoftmaxOutput
import torch import torch.nn as nn class Linear(nn.Linear): """ Apply linear projection to the last dimention of a tensor. """ def forward(self, x): size = x.size() return super().forward(x.contiguous().view(-1, size[-1])).view(* size[:-1], -1) class LogSoftmaxOutput(nn....
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
aishwaryaprabhat/BRIDGE-Tabular-Semantic-Parsing
LogSoftmaxOutput
false
9,663
[ "BSD-3-Clause" ]
0
640858024df444006dfae106a28fdb58f36f687e
https://github.com/aishwaryaprabhat/BRIDGE-Tabular-Semantic-Parsing/tree/640858024df444006dfae106a28fdb58f36f687e
PartitionedLinear
import torch import torch.nn as nn class PartitionedLinear(nn.Module): def __init__(self, in_features, out_features, bias=True): super().__init__() self.linear_c = nn.Linear(in_features // 2, out_features // 2, bias) self.linear_p = nn.Linear(in_features // 2, out_features // 2, 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
skulick/self-attentive-parser
PartitionedLinear
false
4,357
[ "MIT" ]
0
04a91e80cc05bcfe8f48145517f58e85f0c8ade6
https://github.com/skulick/self-attentive-parser/tree/04a91e80cc05bcfe8f48145517f58e85f0c8ade6
DiceLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
chakerouari/UNET_segmetation
DiceLoss
false
6,413
[ "MIT" ]
1
a7d9e9ccd31595d482f620cbf9a625a486f5f0df
https://github.com/chakerouari/UNET_segmetation/tree/a7d9e9ccd31595d482f620cbf9a625a486f5f0df
MLP_PART
import torch import torch.nn as nn import torch.nn.functional as F class MLP_PART(nn.Module): def __init__(self, filter_channels, merge_layer=0, res_layers=[], norm= 'group', num_parts=2, last_op=None): super(MLP_PART, self).__init__() self.num_parts = num_parts self.fc_parts_0 = ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
KORguy/PIFu_Part
MLP_PART
false
9,313
[ "MIT" ]
0
bd199d439a94f8bc8b4036898b0f1ec01e56ab9e
https://github.com/KORguy/PIFu_Part/tree/bd199d439a94f8bc8b4036898b0f1ec01e56ab9e
Attention
# 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....
DeepInEvil/kgirnet
Attention
false
395
[ "MIT" ]
0
81210907daba7671d3f3fd5814656d1557b7a2b1
https://github.com/DeepInEvil/kgirnet/tree/81210907daba7671d3f3fd5814656d1557b7a2b1
DownSample
# 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 import triton_helpers from torch import nn import t...
techthiyanes/annotated_deep_learning_paper_implementations
DownSample
false
16,566
[ "MIT" ]
3,714
8af24da2dd39a9a87482a4d18c2dc829bbd3fd47
https://github.com/techthiyanes/annotated_deep_learning_paper_implementations/tree/8af24da2dd39a9a87482a4d18c2dc829bbd3fd47
UnBlock
import torch import torch.nn as nn import torch.utils.cpp_extension def unblock(tensor): """blocked tensor back to normal""" B, M, N, C = tensor.size() H = W = int(M ** 0.5) patch_size = int(N ** 0.5) tensor = tensor.reshape(B, H, W, patch_size, patch_size, C) tensor = tensor.permute(0, 5, 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.utils.cpp_extension assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = ...
STomoya/animeface
UnBlock
false
14,365
[ "MIT" ]
61
37b3cd26097d7874559d4c152e41e5712b7a1a42
https://github.com/STomoya/animeface/tree/37b3cd26097d7874559d4c152e41e5712b7a1a42
MultiHeadAttention
import math import torch import torch.utils.checkpoint from torch import nn import torch.nn.functional as F class ScaledDotProductAttention(nn.Module): def forward(self, query, key, value, mask=None): dk = query.size()[-1] scores = query.matmul(key.transpose(-2, -1)) / math.sqrt(dk) if ma...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
abedi1/ECLARe
MultiHeadAttention
false
1,363
[ "Apache-2.0" ]
0
a446b8086404b058923a9b3ce47e75cc40436a58
https://github.com/abedi1/ECLARe/tree/a446b8086404b058923a9b3ce47e75cc40436a58
DiceLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
hikopensource/DAVAR-Lab-OCR
DiceLoss
false
15,518
[ "Apache-2.0" ]
387
c65285f6668864cca7a12770ae4c8d083ea1cf1b
https://github.com/hikopensource/DAVAR-Lab-OCR/tree/c65285f6668864cca7a12770ae4c8d083ea1cf1b
ResMLPLayer
# 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...
jaketae/res-mlp
ResMLPLayer
false
12,597
[ "MIT" ]
0
6c957e4fe67a2f13d9b4fd3fa36b7eddcf5323fd
https://github.com/jaketae/res-mlp/tree/6c957e4fe67a2f13d9b4fd3fa36b7eddcf5323fd
Memory
import torch import torch.nn as nn import torch.nn.parallel class Memory(nn.Module): def __init__(self): super(Memory, self).__init__() self.sm = nn.Softmax() self.mask = None def applyMask(self, mask): self.mask = mask def forward(self, input, context_key, content_value...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
ts170/T2I_CL
Memory
false
10,912
[ "MIT" ]
0
8754bea1101aabcbf8108b95e722f7aaeb385869
https://github.com/ts170/T2I_CL/tree/8754bea1101aabcbf8108b95e722f7aaeb385869
DQN
import torch import torch.nn as nn import torch.nn.functional as F class DQN(nn.Module): """ Deep neural network with represents an agent. """ def __init__(self, input_size, num_actions): super(DQN, self).__init__() self.linear1 = nn.Linear(input_size, 50) self.head = nn.Linea...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Dookas/Robust-Multitask-RL
DQN
false
13,599
[ "MIT" ]
106
7970e20cbdf91703c88edcb84568d7354e2525bc
https://github.com/Dookas/Robust-Multitask-RL/tree/7970e20cbdf91703c88edcb84568d7354e2525bc
F1
# 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...
ChristophReich1996/Cell-DETR
F1
false
13,501
[ "MIT" ]
55
4d0c3a2d3ffd19184c8443e5b3a6dccc053c77ea
https://github.com/ChristophReich1996/Cell-DETR/tree/4d0c3a2d3ffd19184c8443e5b3a6dccc053c77ea
GramMatrix
import torch import torch.nn as nn class GramMatrix(nn.Module): def forward(self, input): a, b, c, d = input.size() features = input.view(a, b, c * d) G = torch.bmm(features, features.transpose(1, 2)) return G.div(b * c * d) def get_inputs(): return [torch.rand([4, 4, 4, 4])...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
Jay2020-01/TextureGAN--Flask
GramMatrix
false
17,471
[ "MIT" ]
5
cddea505b0d66b58d58fb24435f8bae42fd5a852
https://github.com/Jay2020-01/TextureGAN--Flask/tree/cddea505b0d66b58d58fb24435f8bae42fd5a852
LayerNormChan
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
ryok/nuwa-pytorch
LayerNormChan
false
10,748
[ "MIT" ]
0
6bde90ee6d87bdce8c9aa52c6bbb2ad15a1f5f54
https://github.com/ryok/nuwa-pytorch/tree/6bde90ee6d87bdce8c9aa52c6bbb2ad15a1f5f54
AUXModule
import torch import torch.nn as nn import torch.nn.functional as F class AUXModule(nn.Module): def __init__(self, in_features, out_features): super().__init__() self.linear = nn.Linear(in_features, out_features) def forward(self, x): x = F.adaptive_max_pool2d(x, output_size=(1, 1)) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
HamzaFarhan/segmentation_models.pytorch
AUXModule
false
11,473
[ "MIT" ]
0
b7803df1d17027f329e267ba4c55144adfdd4da9
https://github.com/HamzaFarhan/segmentation_models.pytorch/tree/b7803df1d17027f329e267ba4c55144adfdd4da9
pHAbsModel
# 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 numpy as np from torch import nn assert_size_stride = torch._C._dy...
rokapre/Nonlinear_Regression
pHAbsModel
false
12,944
[ "MIT" ]
0
d705f6a010fc0bf000531c967ffcf8ed79a5f92e
https://github.com/rokapre/Nonlinear_Regression/tree/d705f6a010fc0bf000531c967ffcf8ed79a5f92e
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....
Kilichbek/artemis-m2-transformer
MultiHeadAttention
false
17,560
[ "MIT" ]
8
99f7e797965710bf2565283d6b5028a6fe32664c
https://github.com/Kilichbek/artemis-m2-transformer/tree/99f7e797965710bf2565283d6b5028a6fe32664c
Net1
# 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...
DPBayes/DP-cross-silo-federated-learning
Net1
false
17,207
[ "Apache-2.0" ]
8
6707db703de5fae48c06116ae8ceee0685c9615d
https://github.com/DPBayes/DP-cross-silo-federated-learning/tree/6707db703de5fae48c06116ae8ceee0685c9615d
Cos
import torch import torch.onnx import torch.nn as nn class Cos(nn.Module): def forward(self, x): return torch.cos(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._inductor.runtime.triton_helpers import math as tl_math import torch.onnx import torch.nn as nn assert_size_stride = torch._C._dy...
mil-tokyo/webdnn
Cos
false
16,059
[ "MIT" ]
1,967
38a60fd3e1a4e72bc01108189a3aa51e0752aecd
https://github.com/mil-tokyo/webdnn/tree/38a60fd3e1a4e72bc01108189a3aa51e0752aecd
MultiHeadAttn
import torch import torch.nn as nn import torch.nn.functional as F class MultiHeadAttn(nn.Module): def __init__(self, n_head, d_model, d_head, dropout, dropatt=0, pre_lnorm=False): super(MultiHeadAttn, self).__init__() self.n_head = n_head self.d_model = d_model self.d_hea...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
JingzhaoZhang/transformerxl-noise
MultiHeadAttn
false
9,201
[ "Apache-2.0" ]
0
83b91c505217da2a32b6ca592e01b4a1e941937b
https://github.com/JingzhaoZhang/transformerxl-noise/tree/83b91c505217da2a32b6ca592e01b4a1e941937b
ScaledLeakyReLU
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
Dolorousrtur/style-people
ScaledLeakyReLU
false
8,015
[ "MIT" ]
15
c48b12b245cc50f8230c0654dffe40016f2a69f1
https://github.com/Dolorousrtur/style-people/tree/c48b12b245cc50f8230c0654dffe40016f2a69f1
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...
tpbarron/pytorch-ppo
Policy
false
16,616
[ "MIT" ]
47
f73226865e34443f93dbec58939329c9278828e8
https://github.com/tpbarron/pytorch-ppo/tree/f73226865e34443f93dbec58939329c9278828e8
LandmarkHead
import torch import torch.nn as nn from itertools import product as product class LandmarkHead(nn.Module): def __init__(self, inchannels=512, num_anchors=3): super(LandmarkHead, self).__init__() self.conv1x1 = nn.Conv2d(inchannels, num_anchors * 10, kernel_size= (1, 1), stride=1, padd...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from itertools import product as product assert_size_strid...
FacePerceiver/facer
LandmarkHead
false
8,126
[ "MIT" ]
12
cbb01dc457f3713050e89af7b2c9c0d98663842c
https://github.com/FacePerceiver/facer/tree/cbb01dc457f3713050e89af7b2c9c0d98663842c
InnerProductLoss
import torch import torch.nn as nn import torch.nn.functional as F class InnerProductLoss(nn.Module): """This is the inner-product loss used in CFKG for optimization. """ def __init__(self): super(InnerProductLoss, self).__init__() def forward(self, anchor, positive, negative): pos_s...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.gu...
BELIEVEfxy/LightSANs
InnerProductLoss
false
7,760
[ "MIT" ]
17
94ce7e59d144dbc787153b8c486cad334790ec6e
https://github.com/BELIEVEfxy/LightSANs/tree/94ce7e59d144dbc787153b8c486cad334790ec6e
KeypointsMSESmoothLoss
import torch import torch.utils.data import torch import torch.nn as nn class KeypointsMSESmoothLoss(nn.Module): def __init__(self, threshold=400): super().__init__() self.threshold = threshold def forward(self, output, target, target_weight): batch_size = output.size(0) num_...
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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cud...
yihui-he2020/epipolar-transformers
KeypointsMSESmoothLoss
false
16,762
[ "MIT" ]
360
6824f4345b2998500fbacd0f4e30f67f8e3da7b8
https://github.com/yihui-he2020/epipolar-transformers/tree/6824f4345b2998500fbacd0f4e30f67f8e3da7b8
WShift
import torch import torch.nn as nn import torch.nn.parallel class WShift(nn.Module): def __init__(self, style_dim): super().__init__() self.w_shift = nn.Parameter(torch.zeros(1, style_dim)) def forward(self, input): out = input + self.w_shift return out def get_inputs(): ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.parallel assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C...
AyushExel/GANSketching
WShift
false
13,362
[ "MIT" ]
598
c72524ac4425de898087af7a4c554b777a4e2218
https://github.com/AyushExel/GANSketching/tree/c72524ac4425de898087af7a4c554b777a4e2218
NodeNetwork
import torch import torch.nn.functional as F from torch.nn.parameter import Parameter def global_sum_pool(X, batch_mat): if batch_mat is None or batch_mat.dim() == 1: return torch.sum(X, dim=0).unsqueeze(0) else: return torch.mm(batch_mat, X) class BasicGraphConvolutionLayer(torch.nn.Module)...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
mbrukman/machine-learning-book
NodeNetwork
false
7,192
[ "MIT" ]
1
f29a0f8aafa63a77081f3bcec68866e33dd41776
https://github.com/mbrukman/machine-learning-book/tree/f29a0f8aafa63a77081f3bcec68866e33dd41776
GuidedBackpropReLUasModule
from torch.autograd import Function import torch import torch.cuda class GuidedBackpropReLU(Function): @staticmethod def forward(self, input_img): positive_mask = (input_img > 0).type_as(input_img) output = torch.addcmul(torch.zeros(input_img.size()).type_as( input_img), input_img...
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.cuda assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = t...
TigerKinger/pytorch-grad-cam
GuidedBackpropReLUasModule
false
11,936
[ "MIT" ]
0
adb3c56e274fde782bf84d2a77454046bd4c5be4
https://github.com/TigerKinger/pytorch-grad-cam/tree/adb3c56e274fde782bf84d2a77454046bd4c5be4
DiceLoss
import torch import torch.nn as nn class DiceLoss(nn.Module): def __init__(self): super(DiceLoss, self).__init__() def forward(self, input, target): smooth = 1e-05 input = input.float() target = target.float() iflat = input.view(-1) tflat = target.view(-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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
DIAL-RPI/PIPO-FAN
DiceLoss
false
13,540
[ "MIT" ]
53
126c17fbdc4c62806a9d249be355542f3990f305
https://github.com/DIAL-RPI/PIPO-FAN/tree/126c17fbdc4c62806a9d249be355542f3990f305
MaxPoolBlock
# 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...
DevilMayNotCry/My_curl
MaxPoolBlock
false
9,122
[ "BSD-3-Clause" ]
0
a8f65a3e58cbdeefb4679aa2f0c3d9d800b67381
https://github.com/DevilMayNotCry/My_curl/tree/a8f65a3e58cbdeefb4679aa2f0c3d9d800b67381
BahdanauAttention
# 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....
joao-d-oliveira/CV-Image_Captioning
BahdanauAttention
false
12,621
[ "MIT" ]
0
76186c326e4fc44a60da401f4ec71176cba42e87
https://github.com/joao-d-oliveira/CV-Image_Captioning/tree/76186c326e4fc44a60da401f4ec71176cba42e87
PixelWiseModel
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._emp...
ciubecca/3dunet-cavity
PixelWiseModel
false
1,704
[ "MIT" ]
0
cfcc827773b18a95d221ab86c1afc5e2f7c30ecb
https://github.com/ciubecca/3dunet-cavity/tree/cfcc827773b18a95d221ab86c1afc5e2f7c30ecb
LinearScale
import torch import torch.nn as nn class LinearScale(nn.Module): def __init__(self, scale, bias): super(LinearScale, self).__init__() self.scale_v = scale self.bias_v = bias pass def forward(self, x): out = x * self.scale_v + self.bias_v return out def __...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
justinjohn0306/CIPS-3D
LinearScale
false
6,994
[ "MIT" ]
1
69a910a7841846419a6b5e03182c8cf061a82584
https://github.com/justinjohn0306/CIPS-3D/tree/69a910a7841846419a6b5e03182c8cf061a82584
BackProjection
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C....
AIpakchoi/visualDet3D
BackProjection
false
4,772
[ "Apache-2.0" ]
1
920f6f8ea44eac4c1896b7d157c015e039ac39f9
https://github.com/AIpakchoi/visualDet3D/tree/920f6f8ea44eac4c1896b7d157c015e039ac39f9
ConvLayer
import torch class ConvLayer(torch.nn.Module): def __init__(self, in_channels, out_channels, kernel_size, stride): super(ConvLayer, self).__init__() reflection_padding = kernel_size // 2 self.reflection_pad = torch.nn.ReflectionPad2d(reflection_padding) self.conv2d = torch.nn.Conv...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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_s...
Bartolo1024/ignite
ConvLayer
false
4,887
[ "BSD-3-Clause" ]
1
b087fef0bc5f97cda415c1c56f1cd589383c54be
https://github.com/Bartolo1024/ignite/tree/b087fef0bc5f97cda415c1c56f1cd589383c54be
EqualConvTranspose2d
import torch import torch.nn as nn from math import sqrt import torch.utils.data def equal_lr(module, name='weight'): EqualLR.apply(module, name) return module class EqualLR: def __init__(self, name): self.name = name def compute_weight(self, module): weight = getattr(module, self....
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from math import sqrt import torch.utils.data assert_size_...
GuiCamargoX/gans_pytorch
EqualConvTranspose2d
false
9,139
[ "MIT" ]
0
3103184e54ea0d2922fc664a994a912bf61db426
https://github.com/GuiCamargoX/gans_pytorch/tree/3103184e54ea0d2922fc664a994a912bf61db426
output
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
binzh93/EAST
output
false
3,229
[ "MIT" ]
0
b5f66ab1a5dd37b6a5134336d494000e1add6da1
https://github.com/binzh93/EAST/tree/b5f66ab1a5dd37b6a5134336d494000e1add6da1
MultiHeadAttn
# 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....
PiotrDabkowski/NeMo
MultiHeadAttn
false
11,798
[ "Apache-2.0" ]
0
7c251e9035b24136cf130f3caf760087e5ccf07c
https://github.com/PiotrDabkowski/NeMo/tree/7c251e9035b24136cf130f3caf760087e5ccf07c
S2S2Mean
# 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....
pimdh/lie-vae
S2S2Mean
false
16,272
[ "MIT" ]
83
0e0cc4d533c064fcfc405e8a75449f8b2f6cf8cf
https://github.com/pimdh/lie-vae/tree/0e0cc4d533c064fcfc405e8a75449f8b2f6cf8cf
Denoise_NormalizeLayer
# 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...
Equationliu/GA-Attack
Denoise_NormalizeLayer
false
17,264
[ "MIT" ]
8
b0280674a211f6451774ec6b1d4cee2fc19a4de6
https://github.com/Equationliu/GA-Attack/tree/b0280674a211f6451774ec6b1d4cee2fc19a4de6
MSE_Loss
import torch import torch.nn as nn class MSE_Loss(nn.Module): def __init__(self, sum_dim=None, sqrt=False, dimension_warn=0): super().__init__() self.sum_dim = sum_dim self.sqrt = sqrt self.dimension_warn = dimension_warn def forward(self, x, y): assert x.shape == y.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...
WorksApplications/omni_torch
MSE_Loss
false
1,223
[ "Apache-2.0" ]
0
10b689d794c8f485e38c765303ef018da17bc641
https://github.com/WorksApplications/omni_torch/tree/10b689d794c8f485e38c765303ef018da17bc641
FactorizedReduce
import torch import torch.nn as nn import torch.utils class FactorizedReduce(nn.Module): def __init__(self, C_in, C_out, affine=True): super(FactorizedReduce, self).__init__() assert C_out % 2 == 0 self.relu = nn.ReLU(inplace=False) self.conv_1 = nn.Conv3d(C_in, C_out // 2, 1, str...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
Alison-brie/AutoReg
FactorizedReduce
false
16,883
[ "MIT" ]
10
a23d45a6f7c6e47f61430e1565dda316452a4418
https://github.com/Alison-brie/AutoReg/tree/a23d45a6f7c6e47f61430e1565dda316452a4418
MultiHeadAttentionWithPooling
# 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....
BELIEVEfxy/LightSANs
MultiHeadAttentionWithPooling
false
7,846
[ "MIT" ]
17
94ce7e59d144dbc787153b8c486cad334790ec6e
https://github.com/BELIEVEfxy/LightSANs/tree/94ce7e59d144dbc787153b8c486cad334790ec6e
AsymmetricLossOptimized
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed class AsymmetricLossOptimized(nn.Module): """ Notice - optimized version, minimizes memory allocation and gpu uploading, favors inplace operations""" def __init__(sel...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
ckvic3/query2labels
AsymmetricLossOptimized
false
1,728
[ "MIT" ]
0
e9c30e1b445be773be397a093fa66aef71d54556
https://github.com/ckvic3/query2labels/tree/e9c30e1b445be773be397a093fa66aef71d54556
TdnnAffine
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride ...
fancyliumeng/asv-subtools
TdnnAffine
false
6,683
[ "Apache-2.0" ]
1
56a13484472e7ae6eb00d762c00d57e581e78eb4
https://github.com/fancyliumeng/asv-subtools/tree/56a13484472e7ae6eb00d762c00d57e581e78eb4
Generator
import torch import torch.nn as nn class Generator(nn.Module): """Define standard linear + softmax generation step.""" def __init__(self, size, vocab): super(Generator, self).__init__() self.size = size self.proj = nn.Linear(self.size, vocab) def forward(self, x): sliced_...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
QuLog1/QuLog
Generator
false
970
[ "Apache-2.0" ]
0
121f3a8c6f5ee60cde771c36b9eef823a1b2597a
https://github.com/QuLog1/QuLog/tree/121f3a8c6f5ee60cde771c36b9eef823a1b2597a
SimpleBlock
# 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 import torch.nn a...
Aamer98/FeatureNorm
SimpleBlock
false
12
[ "MIT" ]
0
fbf3d3b4cef81b3351347d272eb51b6cdd9f0cc5
https://github.com/Aamer98/FeatureNorm/tree/fbf3d3b4cef81b3351347d272eb51b6cdd9f0cc5
ResidualBlock
import torch import numpy as np import torch.nn as nn class ConvLayer(torch.nn.Module): def __init__(self, in_channels, out_channels, kernel_size, stride): super(ConvLayer, self).__init__() reflection_padding = int(np.floor(kernel_size / 2)) self.reflection_pad = nn.ReflectionPad2d(reflec...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
ImageProcessingCentraleLille2021/fast-neural-style
ResidualBlock
false
13,846
[ "MIT" ]
350
e77456c35c2a49f90227119d158828a0964c7e13
https://github.com/ImageProcessingCentraleLille2021/fast-neural-style/tree/e77456c35c2a49f90227119d158828a0964c7e13
rSoftMax
import torch import torch.nn.functional as F import torch.nn as nn import torch._utils from itertools import product as product import torch.utils.data.distributed class rSoftMax(nn.Module): def __init__(self, radix, cardinality): super().__init__() self.radix = radix self.cardinality = c...
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 ...
Capetian/FaceX-Zoo
rSoftMax
false
4,979
[ "Apache-2.0" ]
1
029786c40d8aba15d891d33973de25fcd7e5399a
https://github.com/Capetian/FaceX-Zoo/tree/029786c40d8aba15d891d33973de25fcd7e5399a
LocalConv2d
import torch import torch.nn as nn import torch.nn.functional as F class LocalConv2d(nn.Module): def __init__(self, num_rows, num_feats_in, num_feats_out, kernel=1, padding=0): super(LocalConv2d, self).__init__() self.num_rows = num_rows self.out_channels = num_feats_out s...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
JSharpClone/M3D-RPN-
LocalConv2d
false
11,522
[ "Apache-2.0" ]
0
5192b095e921b5c054a66fd0ce948e67aee957be
https://github.com/JSharpClone/M3D-RPN-/tree/5192b095e921b5c054a66fd0ce948e67aee957be
GradientLoss
# 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 import nn assert_size_stride = torch._C._dynamo.guards.assert_...
GuYuanjie/Deep-Retinex-fusion
GradientLoss
false
17,340
[ "MIT" ]
5
ffa2a1689fd512c8820fd87cbf665c09bcb142b4
https://github.com/GuYuanjie/Deep-Retinex-fusion/tree/ffa2a1689fd512c8820fd87cbf665c09bcb142b4
FeatureResizer
import torch import torch.utils.data import torch from torch import nn class FeatureResizer(nn.Module): """ This class takes as input a set of embeddings of dimension C1 and outputs a set of embedding of dimension C2, after a linear transformation, dropout and normalization (LN). """ def __init__...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.utils....
Sudhir11292rt/DefVisTR
FeatureResizer
false
1,089
[ "Apache-2.0" ]
0
d52b2d88c10c6239de1c1ff851a743c58b708b75
https://github.com/Sudhir11292rt/DefVisTR/tree/d52b2d88c10c6239de1c1ff851a743c58b708b75
Attention
import torch import torch.optim import torch.utils.data from torch import nn class Attention(nn.Module): """ Attention Network. """ def __init__(self, encoder_dim, decoder_dim, attention_dim): """ :param encoder_dim: feature size of encoded images :param decoder_dim: size of d...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Afosado/180b_capstone_xai
Attention
false
18,447
[ "MIT" ]
2
808768e8fc73d260845921e8174b69286c066eca
https://github.com/Afosado/180b_capstone_xai/tree/808768e8fc73d260845921e8174b69286c066eca
DepthNormalizer
import torch import torch.nn as nn class DepthNormalizer(nn.Module): def __init__(self, input_size: 'int'=512, z_size: 'int'=200): """ Class about DepthNormalizer which use to generate depth-information Parameters: input_size: the size of image, initially, 512 x 512 ...
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...
lingtengqiu/Open-PIFuhd
DepthNormalizer
false
15,912
[ "MIT" ]
191
3a66b647bcf5591e818af62735e64a93c4aaef85
https://github.com/lingtengqiu/Open-PIFuhd/tree/3a66b647bcf5591e818af62735e64a93c4aaef85
EncoderImagePrecomp
# 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....
jefflai108/VGNSL
EncoderImagePrecomp
false
6,931
[ "MIT" ]
1
0edc3db3691abbad2a505b2165bd99e7a62d784f
https://github.com/jefflai108/VGNSL/tree/0edc3db3691abbad2a505b2165bd99e7a62d784f
Value
import torch import torch.nn as nn class Value(nn.Module): def __init__(self, num_inputs): super(Value, self).__init__() self.affine1 = nn.Linear(num_inputs, 64) self.affine2 = nn.Linear(64, 64) self.value_head = nn.Linear(64, 1) self.value_head.weight.data.mul_(0.1) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
SaminYeasar/pytorch-trpo
Value
false
4,127
[ "MIT" ]
0
653a3357cf0461c175fb741604c0cd4ad1f4b841
https://github.com/SaminYeasar/pytorch-trpo/tree/653a3357cf0461c175fb741604c0cd4ad1f4b841
MarginLoss
# 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 Module ...
techthiyanes/annotated_deep_learning_paper_implementations
MarginLoss
false
16,551
[ "MIT" ]
3,714
8af24da2dd39a9a87482a4d18c2dc829bbd3fd47
https://github.com/techthiyanes/annotated_deep_learning_paper_implementations/tree/8af24da2dd39a9a87482a4d18c2dc829bbd3fd47
DirectMultiheadAttention
# 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....
wukevin/RoseTTAFold
DirectMultiheadAttention
false
4,560
[ "MIT" ]
0
e3c15dbf4bc1e4f8726e26c63aca1625188da803
https://github.com/wukevin/RoseTTAFold/tree/e3c15dbf4bc1e4f8726e26c63aca1625188da803
BahdanauAttention
# 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...
puppyapple/tacotron_pytorch
BahdanauAttention
false
16,292
[ "MIT" ]
278
800bf8b0538c91f1104e99d8e7c1b645bb6154d3
https://github.com/puppyapple/tacotron_pytorch/tree/800bf8b0538c91f1104e99d8e7c1b645bb6154d3
MultiLayeredConv1d
# 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...
akreal/end-to-end-slu-espnet
MultiLayeredConv1d
false
3,073
[ "Apache-2.0" ]
0
0b16dc8b10b31a4567b3312678a753a94bb200da
https://github.com/akreal/end-to-end-slu-espnet/tree/0b16dc8b10b31a4567b3312678a753a94bb200da
Conv2dBlock
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import numpy as np import tor...
agermanidis/HiDT
Conv2dBlock
false
18,230
[ "BSD-3-Clause" ]
4
69192bb26785fc4e05038c45d05f2f880dd362d0
https://github.com/agermanidis/HiDT/tree/69192bb26785fc4e05038c45d05f2f880dd362d0
FeatExemplarAvgBlock
# 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 import torch.nn as nn import torch.optim import torch.nn.parallel assert_size_st...
Basasuya/FewShotWithoutForgetting
FeatExemplarAvgBlock
false
2,012
[ "MIT" ]
0
eecc70e416ed82999124ddfca1b145f6dbcd74a6
https://github.com/Basasuya/FewShotWithoutForgetting/tree/eecc70e416ed82999124ddfca1b145f6dbcd74a6
SeqExpandConv
import torch import torch.nn as nn from math import sqrt as sqrt class SeqExpandConv(nn.Module): def __init__(self, in_channels, out_channels, seq_length): super(SeqExpandConv, self).__init__() self.conv = nn.Conv3d(in_channels, out_channels, kernel_size=(3, 1, 1), padding=(1, 0, 0), ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from math import sqrt as sqrt assert_size_stride = torch._...
NTech-Lab/deepfake-detection-challenge
SeqExpandConv
false
14,081
[ "Apache-2.0" ]
98
52095ce4a49f298faf075a5eb28391722b9e4103
https://github.com/NTech-Lab/deepfake-detection-challenge/tree/52095ce4a49f298faf075a5eb28391722b9e4103
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 from torch import n...
IBM/graph4nlp
GRUStep
false
8,339
[ "Apache-2.0" ]
18
a9bf20b23fa1ec368d9bd40cc8c557f86a9f8297
https://github.com/IBM/graph4nlp/tree/a9bf20b23fa1ec368d9bd40cc8c557f86a9f8297
ResolutionScalingLayer
import torch import torch.nn as nn import torch.nn.functional as F import torch.fft class ResolutionScalingLayer(nn.Module): """Implements the resolution scaling layer. Basically, this layer can be used to upsample feature maps from spatial domain with nearest neighbor interpolation. """ 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 import torch.nn as nn import torch.fft assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo...
NejcHirci/material-addon
ResolutionScalingLayer
false
17,768
[ "MIT" ]
4
c08e2081413c3319b712c2f7193ac8013f601382
https://github.com/NejcHirci/material-addon/tree/c08e2081413c3319b712c2f7193ac8013f601382
GELU
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
kwonyos/decision-transformer
GELU
false
12,691
[ "MIT" ]
0
c3ad7df28a897a016dd24c5337cb871d1f33f456
https://github.com/kwonyos/decision-transformer/tree/c3ad7df28a897a016dd24c5337cb871d1f33f456
PolicyNetwork
# 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...
DeepHaeJoong/reinforcement-learning
PolicyNetwork
false
9,026
[ "MIT" ]
0
63e3053e3209809e67e97d51adaf5f85ce3799ba
https://github.com/DeepHaeJoong/reinforcement-learning/tree/63e3053e3209809e67e97d51adaf5f85ce3799ba
ReinforcedReceiver
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel import torch.utils.data from torch.distributions import Bernoulli import torch.distributions class ReinforcedReceiver(nn.Module): def __init__(self, n_bits, n_hidden): super(ReinforcedReceiver, 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 import torch.nn.parallel import torch.utils.data import to...
vengalraoguttha/EGG
ReinforcedReceiver
false
16,665
[ "MIT" ]
254
e4f8412f197543ec7f1f00cf89b5a364b038dc57
https://github.com/vengalraoguttha/EGG/tree/e4f8412f197543ec7f1f00cf89b5a364b038dc57
Normalize
import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data.distributed class Normalize(nn.Module): def __init__(self, p=2): super(Normalize, self).__init__() self.p = p def forward(self, x): return F.normalize(x, p=self.p, dim=1) def get_inputs(): ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import...
JindongGu/SimDis
Normalize
false
8,352
[ "MIT" ]
12
0871a217a756acc268f35f802e35b01b12817f0d
https://github.com/JindongGu/SimDis/tree/0871a217a756acc268f35f802e35b01b12817f0d
CAModule
# 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...
alinstein/X_RAY
CAModule
false
18,262
[ "MIT" ]
4
35a39761d3b11ce9e47509025054f25e5f26aab9
https://github.com/alinstein/X_RAY/tree/35a39761d3b11ce9e47509025054f25e5f26aab9
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 ...
Fatmangh/VIDEO-ACTION-CLASSIFICATION-USING-PRETAINED-SELF-SUPERVISED-DEPTH-AWARE-DENSE-PREDICTIVE-CODING-
UnpackLayerConv2d
false
2,252
[ "MIT" ]
0
13fac05601efed16ae8b29989aad487e04cd90a7
https://github.com/Fatmangh/VIDEO-ACTION-CLASSIFICATION-USING-PRETAINED-SELF-SUPERVISED-DEPTH-AWARE-DENSE-PREDICTIVE-CODING-/tree/13fac05601efed16ae8b29989aad487e04cd90a7
PositionwiseFeedForward
import torch from torch import nn from torchvision import models as models import torch.onnx import torch.nn class Identity(nn.Module): def forward(self, input_): return input_ class LayerNormalization(nn.Module): """ Layer normalization module """ def __init__(self, d_hid, eps=0.001): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
dqawami/openvino_training_extensions
PositionwiseFeedForward
false
15,234
[ "Apache-2.0" ]
256
dddda1dfd651eaae2d59cecda84275b1b03bd0ad
https://github.com/dqawami/openvino_training_extensions/tree/dddda1dfd651eaae2d59cecda84275b1b03bd0ad
ScaledDotProductAttention
import torch import numpy as np import torch.utils.data import torch.nn as nn 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...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Doomski99/MarcCoru2019CropType
ScaledDotProductAttention
false
11,377
[ "MIT" ]
0
17db294ef51bdd39fd884e0052141d8092b98b86
https://github.com/Doomski99/MarcCoru2019CropType/tree/17db294ef51bdd39fd884e0052141d8092b98b86
D_UpBlock
# 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 torchvision.transforms import * assert_size_stride = torch._C._dynamo.guard...
DengZeshuai/DBPN-Pytorch
D_UpBlock
false
2,634
[ "MIT" ]
0
a90d241a1c4b07830c6d812ad8389d13e8cf05d1
https://github.com/DengZeshuai/DBPN-Pytorch/tree/a90d241a1c4b07830c6d812ad8389d13e8cf05d1
KLLoss
import torch import torch.utils.data from torchvision.transforms import functional as F import torch.nn as nn import torch.nn.functional as F from sklearn import * class KLLoss(nn.Module): """ This criterion is a implemenation of Focal Loss, which is proposed in Focal Loss for Dense Object Detecti...
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...
CityU-AIM-Group/SIGMA
KLLoss
false
17,670
[ "MIT" ]
5
19f89777db8d42f750a9b87756d3326c7efd18f5
https://github.com/CityU-AIM-Group/SIGMA/tree/19f89777db8d42f750a9b87756d3326c7efd18f5
FRN_self
import torch import torch.nn as nn class FRN_self(nn.Module): def __init__(self, num_features, eps=1e-05, is_eps_learnable=True): super(FRN_self, self).__init__() self.num_features = num_features self.init_eps = eps self.is_eps_learnable = is_eps_learnable self.gamma = nn....
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.gu...
EkdeepSLubana/BeyondBatchNorm
FRN_self
false
17,244
[ "MIT" ]
10
2ab1626a1ebfdfe55f0a4bc6ac24c8bbdd4e0196
https://github.com/EkdeepSLubana/BeyondBatchNorm/tree/2ab1626a1ebfdfe55f0a4bc6ac24c8bbdd4e0196
BasicBlock
# 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....
HenryOsborne/LearningToPaint
BasicBlock
false
9,149
[ "MIT" ]
0
d8fdf41c8d193b91c78f73b7a092897e846e19eb
https://github.com/HenryOsborne/LearningToPaint/tree/d8fdf41c8d193b91c78f73b7a092897e846e19eb