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
mfm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
JunhongH/CP-GAN
mfm
false
17,525
[ "Apache-2.0" ]
9
5ac129da8cf6d010dc0da03bb4637d20c822d50b
https://github.com/JunhongH/CP-GAN/tree/5ac129da8cf6d010dc0da03bb4637d20c822d50b
DetNet2
# 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...
liangzhao123/topic_ws
DetNet2
false
3,913
[ "Apache-2.0" ]
0
ef7aba11b975eab5f657101ed696b49ec94b5f86
https://github.com/liangzhao123/topic_ws/tree/ef7aba11b975eab5f657101ed696b49ec94b5f86
SeparableConv
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
lixinsu/RCZoo
SeparableConv
false
15,938
[ "MIT" ]
166
37fcb7962fbd4c751c561d4a0c84173881ea8339
https://github.com/lixinsu/RCZoo/tree/37fcb7962fbd4c751c561d4a0c84173881ea8339
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....
NouamaneTazi/conv-emotion
Attention
false
14,123
[ "MIT" ]
488
0c9dcb9cc5234a7ca8cf6af81aabe28ef3814d0e
https://github.com/NouamaneTazi/conv-emotion/tree/0c9dcb9cc5234a7ca8cf6af81aabe28ef3814d0e
DiceBCELoss
import torch import torch.nn as nn import torch.nn.functional as F class DiceLoss(nn.Module): def __init__(self, smooth: 'float'=1.0, apply_sigmoid: 'bool'=False): super().__init__() self.smooth = smooth self.apply_sigmoid = apply_sigmoid def forward(self, y_pred: 'torch.Tensor', y_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 from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
tfmoraes/deep_heart_torch
DiceBCELoss
false
10,853
[ "MIT" ]
0
4168ce01d600e69baf82c752a3e57af86861b6ea
https://github.com/tfmoraes/deep_heart_torch/tree/4168ce01d600e69baf82c752a3e57af86861b6ea
custom_embedding
# 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 ...
EpiSci/SoCRATES
custom_embedding
false
17,245
[ "MIT" ]
6
901a896c5a765e3cb56f290188cde71c8707192d
https://github.com/EpiSci/SoCRATES/tree/901a896c5a765e3cb56f290188cde71c8707192d
LayerNorm
from _paritybench_helpers import _mock_config import torch import torch.nn as nn class LayerNorm(nn.Module): """ layer normalization """ def __init__(self, cfg, eps=1e-12): super().__init__() self.gamma = nn.Parameter(torch.ones(cfg.hidden_dim)) self.beta = nn.Parameter(torch.zeros(cf...
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_...
Kyumin-Park/Protein-Chemical-Releativity-BERT
LayerNorm
false
1,897
[ "MIT" ]
0
6a339f4e640d99199f38a00769f5872c2a53ac55
https://github.com/Kyumin-Park/Protein-Chemical-Releativity-BERT/tree/6a339f4e640d99199f38a00769f5872c2a53ac55
Attention
import math import torch from torch import nn import torch.nn.functional as F class Attention(nn.Module): """ score_i = f(Q, K_i), i = 1, 2, ..., t dot: f(Q, K_i) = Q.transpose · K_i scaled_dot: f(Q, K_i) = Q.transpose · K_i / √(key_dim) general: f(Q, K_i) = Q.transpose · W ·...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
WangDaYeeeeee/BERT-With-KnowledgeBase
Attention
false
2,959
[ "Apache-2.0" ]
0
5f205295ce9b69ab0f813ef34409fdf2de3a14ca
https://github.com/WangDaYeeeeee/BERT-With-KnowledgeBase/tree/5f205295ce9b69ab0f813ef34409fdf2de3a14ca
DiceLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
ljrprocc/Motif-Removal
DiceLoss
false
3,941
[ "MIT" ]
0
8979ca91398212248a2be61345c99bdec53ae37e
https://github.com/ljrprocc/Motif-Removal/tree/8979ca91398212248a2be61345c99bdec53ae37e
GatedConv2d
# 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...
piggy2303/DeepFillv2_Pytorch
GatedConv2d
false
7,473
[ "MIT" ]
1
dd35299f11704f878ed7a33e14ccd51a9d64baaf
https://github.com/piggy2303/DeepFillv2_Pytorch/tree/dd35299f11704f878ed7a33e14ccd51a9d64baaf
Conv
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Ravikiran2402/_MOEL
Conv
false
11,805
[ "MIT" ]
0
57e311712c67e1e554a3a9187709f8e2728d19be
https://github.com/Ravikiran2402/_MOEL/tree/57e311712c67e1e554a3a9187709f8e2728d19be
Lookahead
import torch import torch.utils.data.distributed import torch.nn as nn import torch.nn.functional as F class Lookahead(nn.Module): def __init__(self, n_features, context): super(Lookahead, self).__init__() assert context > 0 self.context = context self.n_features = n_features ...
import torch from torch._inductor.select_algorithm import extern_kernels import 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.distributed import torch.nn as nn assert_size_stride = t...
chaiyujin/deepspeech.pytorch
Lookahead
false
9,896
[ "MIT" ]
0
b4edbafb955f35316869ce3fda2dc9cd47968038
https://github.com/chaiyujin/deepspeech.pytorch/tree/b4edbafb955f35316869ce3fda2dc9cd47968038
GrayLoss
import torch import torch.nn as nn class GrayLoss(nn.Module): def __init__(self): super(GrayLoss, self).__init__() self.l1 = nn.L1Loss() def forward(self, x): y = torch.ones_like(x) / 2.0 return 1 / self.l1(x, y) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
GuYuanjie/DeepFusionPrior
GrayLoss
false
5,219
[ "MIT" ]
1
a7126e073ed8c49b6a9a662492b64aaeee56cc01
https://github.com/GuYuanjie/DeepFusionPrior/tree/a7126e073ed8c49b6a9a662492b64aaeee56cc01
ScaledDotAttention
import torch import torch.nn as nn from torch.nn import LayerNorm def scaled_dot_attention(q, k, v, mask=None, noise=0, dropout=lambda x: x): """ :param q: queries, (batch, time1, channels1) :param k: keys, (batch, time2, channels1) :param v: values, (batch, time2, channels2) :param mask: boolean ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
iclementine/speedyspeech
ScaledDotAttention
false
10,418
[ "BSD-3-Clause" ]
0
db527587a3699b71082d61c9e9fad7ed795d1980
https://github.com/iclementine/speedyspeech/tree/db527587a3699b71082d61c9e9fad7ed795d1980
MultiHeadedAttention
import math import torch from typing import Tuple from torch import nn class MultiHeadedAttention(nn.Module): """Multi-Head Attention layer. Args: n_head (int): The number of heads. n_feat (int): The number of features. dropout_rate (float): Dropout rate. """ def __init__(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 import triton_helpers from torch._inductor.runtime....
eschmidbauer/wenet
MultiHeadedAttention
false
12,365
[ "Apache-2.0" ]
0
f0bbf6af16fa92d26a7f68ac21e0354a7500a025
https://github.com/eschmidbauer/wenet/tree/f0bbf6af16fa92d26a7f68ac21e0354a7500a025
LT
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
ahangchen/torch2trt
LT
false
6,090
[ "MIT" ]
1
53c663f0e0570ef7ffd6771354ae3478f63bd328
https://github.com/ahangchen/torch2trt/tree/53c663f0e0570ef7ffd6771354ae3478f63bd328
RelPositionMultiHeadedAttention
# 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....
Masao-Someki/Conformer
RelPositionMultiHeadedAttention
false
8,543
[ "MIT" ]
18
866da9ae05a6d07304775c592caac8d516f67c92
https://github.com/Masao-Someki/Conformer/tree/866da9ae05a6d07304775c592caac8d516f67c92
wide_basic
import torch import torch.nn as nn def get_norm(n_filters, norm): if norm is None: return Identity() elif norm == 'batch': return nn.BatchNorm2d(n_filters, momentum=0.9) elif norm == 'instance': return nn.InstanceNorm2d(n_filters, affine=True) elif norm == 'layer': retu...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
jliu/HDGE
wide_basic
false
15,716
[ "Apache-2.0" ]
69
1615d04d55ec038590fc7f18810344a8257edaa0
https://github.com/jliu/HDGE/tree/1615d04d55ec038590fc7f18810344a8257edaa0
SqueezeEmbedding
# 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...
XuMayi/PyABSA
SqueezeEmbedding
false
1,260
[ "MIT" ]
0
3d71c0cdaea7ea1eff600d9091c3c63f61c111e5
https://github.com/XuMayi/PyABSA/tree/3d71c0cdaea7ea1eff600d9091c3c63f61c111e5
Critic
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
JohnJim0816/rl-tutorials
Critic
false
8,367
[ "MIT" ]
16
e99daea815da85f9f25dff2d01b030249a203d22
https://github.com/JohnJim0816/rl-tutorials/tree/e99daea815da85f9f25dff2d01b030249a203d22
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....
byamao1/MMSA
MultiheadAttention
false
14,992
[ "MIT" ]
198
1a894d042144c9ac75b3465d38871ce8c2987251
https://github.com/byamao1/MMSA/tree/1a894d042144c9ac75b3465d38871ce8c2987251
ConcatConv2d
# 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...
gaozhihan/torchdiffeq
ConcatConv2d
false
6,718
[ "MIT" ]
1
414781617d595ba01cc3f23382e25ab890f4ca66
https://github.com/gaozhihan/torchdiffeq/tree/414781617d595ba01cc3f23382e25ab890f4ca66
PatchEmbeddings
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch.nn import Module from torch import nn import torch.utils.data import ...
ppvalluri09/annotated_deep_learning_paper_implementations
PatchEmbeddings
false
11,068
[ "MIT" ]
0
387b6dfd1ef1f6d295e9394c24b5798071d9a3e4
https://github.com/ppvalluri09/annotated_deep_learning_paper_implementations/tree/387b6dfd1ef1f6d295e9394c24b5798071d9a3e4
Transformer
import torch import torch.nn as nn import torch.nn.parallel class Mlp(nn.Module): """Implementation of MLP""" def __init__(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.0): super().__init__() out_features = out_features or in_features hi...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
QLSong/cv-classify
Transformer
false
2,766
[ "Apache-2.0" ]
0
02f53d03868f299a08b5c97a266b50a7fdcd3f2b
https://github.com/QLSong/cv-classify/tree/02f53d03868f299a08b5c97a266b50a7fdcd3f2b
ExtractTensorPatches
# 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.nn.functional as F from typing import Tuple from typing import Union from typing import Optional from tor...
NickleDave/kornia
ExtractTensorPatches
false
2,681
[ "ECL-2.0", "Apache-2.0" ]
0
5392651d0bc268da577fa0a49aa50f957289c7dd
https://github.com/NickleDave/kornia/tree/5392651d0bc268da577fa0a49aa50f957289c7dd
ScalarMix
# 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.utils.data.dataloader import torch.nn as nn import torch.nn ...
Dadmatech/DadmaTools
ScalarMix
false
7,971
[ "Apache-2.0" ]
25
c1b7add5c33544f69c1ba1c5250a5ea07caf9aa2
https://github.com/Dadmatech/DadmaTools/tree/c1b7add5c33544f69c1ba1c5250a5ea07caf9aa2
PositionGenerator
# 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 ...
Jh-SYSU/MolRep
PositionGenerator
false
13,878
[ "MIT" ]
57
b2c802d18d41d7db26c19c6dd644098f945e48a1
https://github.com/Jh-SYSU/MolRep/tree/b2c802d18d41d7db26c19c6dd644098f945e48a1
ShakeResNet
# 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.nn imp...
ang421/dda
ShakeResNet
false
9,912
[ "MIT" ]
0
391ad696ec8479ce41a0d7d6bfbfae06edaddf67
https://github.com/ang421/dda/tree/391ad696ec8479ce41a0d7d6bfbfae06edaddf67
SimpleClampModel
import torch import torch.jit import torch.onnx import torch.nn class SimpleClampModel(torch.nn.Module): def __init__(self, min, max): super(SimpleClampModel, self).__init__() self.min = min self.max = max def forward(self, input): return torch.clamp(input, self.min, self.max...
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.jit import torch.onnx import torch.nn assert_size_stride = torch._C._dynamo....
briancoutinho/glow
SimpleClampModel
false
12,556
[ "Apache-2.0" ]
0
4c919d60b3c33296c4109aec8020a1733c98f5b5
https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5
MILLR
import torch import numpy as np from torch import nn import torch as tc from sklearn.metrics import * from torch.utils.data import DataLoader from torch.utils.data import WeightedRandomSampler class myDataset(torch.utils.data.Dataset): def __init__(self, x, y): self.x = x self.y = y def __le...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 from torch...
mhbl3/PrecursorAnalysis
MILLR
false
7,370
[ "MIT" ]
1
aaa2fe0219ad579b9126fef9cc8594a59ae66815
https://github.com/mhbl3/PrecursorAnalysis/tree/aaa2fe0219ad579b9126fef9cc8594a59ae66815
TwoLayerFCBodyWithAction
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
Fieps1/p3-tennis
TwoLayerFCBodyWithAction
false
585
[ "MIT" ]
0
29f3dab5810d7cd7f84120416a615956d266c256
https://github.com/Fieps1/p3-tennis/tree/29f3dab5810d7cd7f84120416a615956d266c256
GlobalAvgPool
# 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...
XudongLinthu/video_feature_extractor
GlobalAvgPool
false
14,602
[ "Apache-2.0" ]
250
54bdbeef2e9f4db8d7697b26edef124979625f58
https://github.com/XudongLinthu/video_feature_extractor/tree/54bdbeef2e9f4db8d7697b26edef124979625f58
CDAE
import torch from torch import nn from torch.autograd import Variable def add_gaussian_noise(x, std): return x + Variable(x.data.new(x.size()).normal_(0, std)) class CDAE(nn.Module): """ Convolutional denoising autoencoder layer for stacked autoencoders. Args: in_channels: the number of cha...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn from tor...
mmcenta/eye-disease-recognition
CDAE
false
4,025
[ "MIT" ]
0
52e1dedbce27514b605b9f8ad976d6042b7e2f14
https://github.com/mmcenta/eye-disease-recognition/tree/52e1dedbce27514b605b9f8ad976d6042b7e2f14
TransposeConv2dLayer
import torch import torch.nn as nn from torch.nn import functional as F from torch.nn import Parameter def l2normalize(v, eps=1e-12): return v / (v.norm() + eps) class LayerNorm(nn.Module): def __init__(self, num_features, eps=1e-08, affine=True): super(LayerNorm, self).__init__() self.num_...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from torch.nn import Parameter assert_size_stride = torch....
kangzhiq/DeepFillv2_Pytorch
TransposeConv2dLayer
false
10,433
[ "MIT" ]
0
9c7ed61b25bb995713f89108b712490737abe1b1
https://github.com/kangzhiq/DeepFillv2_Pytorch/tree/9c7ed61b25bb995713f89108b712490737abe1b1
L1
import torch import numpy as np import torch.nn as nn class L1(nn.Module): def __init__(self): nn.Module.__init__(self) def forward(self, s, t): if isinstance(s, np.ndarray): s = torch.from_numpy(s).float() if isinstance(t, np.ndarray): t = torch.from_numpy(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 from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
mrernst/rl_robotics_research
L1
false
10,613
[ "MIT" ]
0
0bc446cfb69591cb4ee3ce8d39815c463090a5f6
https://github.com/mrernst/rl_robotics_research/tree/0bc446cfb69591cb4ee3ce8d39815c463090a5f6
DiceLoss
import torch import torch.nn as nn class DiceLoss(nn.Module): def __init__(self, loss_weight=1.0): super(DiceLoss, self).__init__() self.loss_weight = loss_weight def forward(self, input, target, mask, reduce=True): batch_size = input.size(0) input = torch.sigmoid(input) ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
bhuyle/PAN_ocr
DiceLoss
false
9,855
[ "Apache-2.0" ]
0
bcd03892d4eb08a779a0a7ae63d526d8ea38cb01
https://github.com/bhuyle/PAN_ocr/tree/bcd03892d4eb08a779a0a7ae63d526d8ea38cb01
GridReduction1
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
Hiroaki-Ozaki/modelib-classification
GridReduction1
false
17,395
[ "WTFPL" ]
10
11077704cc0bc9a42fc4b94da60b57d31ff0f65c
https://github.com/Hiroaki-Ozaki/modelib-classification/tree/11077704cc0bc9a42fc4b94da60b57d31ff0f65c
CMul
# 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 import torch.nn as nn import torch.nn.parallel assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided...
nhonth/DeLF-pytorch
CMul
false
16,162
[ "MIT" ]
315
5577a447a0330b9e976cff56a10fc91669216b8c
https://github.com/nhonth/DeLF-pytorch/tree/5577a447a0330b9e976cff56a10fc91669216b8c
SymKlCriterion
import torch import torch.nn.functional as F from torch.nn.modules.loss import _Loss from torch.optim.lr_scheduler import * class Criterion(_Loss): def __init__(self, alpha=1.0, name='criterion'): super().__init__() """Alpha is used to weight each loss term """ self.alpha = alpha ...
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....
mahartmann/mt-dnn
SymKlCriterion
false
10,479
[ "MIT" ]
0
c9aa3379dc255fd8fc40f24b6cd508f6a645b32f
https://github.com/mahartmann/mt-dnn/tree/c9aa3379dc255fd8fc40f24b6cd508f6a645b32f
Upsampler
import math import torch import torch.utils.data from torchvision.transforms import * class ConvBlock(torch.nn.Module): def __init__(self, input_size, output_size, kernel_size=3, stride=1, padding=1, bias=True, activation='prelu', norm=None): super(ConvBlock, self).__init__() self.conv = ...
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.utils.data from torchvision.transforms import * assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
HamsterBiz/iSeeBetter
Upsampler
false
11,656
[ "MIT" ]
0
a71cee61583bdedab1f3b368e2cb7dc5ad969aed
https://github.com/HamsterBiz/iSeeBetter/tree/a71cee61583bdedab1f3b368e2cb7dc5ad969aed
Flatten
import torch from torch import nn class Flatten(nn.Module): def __init__(self): super(Flatten, self).__init__() def forward(self, x): """ Arguments: x: a float tensor with shape [batch_size, c, h, w]. Returns: a float tensor with shape [batch_size, c*h...
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...
DebugVBZ/pixel2style2pixel
Flatten
false
8,943
[ "MIT" ]
0
e884c0cf471ad9ee09b8743d7ffd532283a638e5
https://github.com/DebugVBZ/pixel2style2pixel/tree/e884c0cf471ad9ee09b8743d7ffd532283a638e5
_GateAddNorm
# 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 ...
Gian-Wiher/darts
_GateAddNorm
false
5,215
[ "Apache-2.0" ]
1
0d267e08643e2e3f88163a5d955b8be75840c2f6
https://github.com/Gian-Wiher/darts/tree/0d267e08643e2e3f88163a5d955b8be75840c2f6
complex_relu_layer
# 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...
XitongZhang1994/SimpleMagNet
complex_relu_layer
false
5,995
[ "MIT" ]
1
d3df7a2f528474214b7d396ea9831db3aa280090
https://github.com/XitongZhang1994/SimpleMagNet/tree/d3df7a2f528474214b7d396ea9831db3aa280090
ConvertPointsToHomogeneous
import torch import torch.nn as nn def convert_points_to_homogeneous(points): """Function that converts points from Euclidean to homogeneous space. See :class:`~torchgeometry.ConvertPointsToHomogeneous` for details. Examples:: >>> input = torch.rand(2, 4, 3) # BxNx3 >>> output = tgm.co...
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...
aravinho/frankmocap
ConvertPointsToHomogeneous
false
3,121
[ "BSD-3-Clause" ]
0
6a150a9cb96e9b32a60d8047eaa84d0c37e471f5
https://github.com/aravinho/frankmocap/tree/6a150a9cb96e9b32a60d8047eaa84d0c37e471f5
SplAtConv2d
from torch.nn import Module import torch from torch import nn import torch.nn.functional as F from torch.nn import Conv2d from torch.nn import ReLU from torch.nn.modules.utils import _pair class DropBlock2D(object): def __init__(self, *args, **kwargs): raise NotImplementedError class rSoftMax(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....
DYF-AI/openvino-x
SplAtConv2d
false
5,054
[ "Apache-2.0" ]
1
0f18ebb240ea3394f7e461aca34fac158e686d95
https://github.com/DYF-AI/openvino-x/tree/0f18ebb240ea3394f7e461aca34fac158e686d95
PolicyNet
# 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...
JohnJim0816/rl-tutorials
PolicyNet
false
8,370
[ "MIT" ]
16
e99daea815da85f9f25dff2d01b030249a203d22
https://github.com/JohnJim0816/rl-tutorials/tree/e99daea815da85f9f25dff2d01b030249a203d22
Decoder
import torch import torch.nn as nn class Decoder(nn.Module): def __init__(self): super(Decoder, self).__init__() self.layers = nn.Sequential() self.layers.add_module('Conv3', nn.Conv2d(64, 32, 3, 1, 1)) self.layers.add_module('Act3', nn.ReLU(inplace=True)) self.layers.add_...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
VarunBabbar/Image_Compressor
Decoder
false
1,192
[ "MIT" ]
0
254d8d411f7cd16f3ce242275532c9fca537269c
https://github.com/VarunBabbar/Image_Compressor/tree/254d8d411f7cd16f3ce242275532c9fca537269c
TokenLearnedEncoding
# 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 import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
ishikasingh/teach
TokenLearnedEncoding
false
15,618
[ "MIT" ]
54
5554f02f55c22abfe5c2a749dbb24c13377726c8
https://github.com/ishikasingh/teach/tree/5554f02f55c22abfe5c2a749dbb24c13377726c8
Decoder5
import torch import torch.nn as nn class Decoder5(nn.Module): def __init__(self, model=None, fixed=False): super(Decoder5, self).__init__() self.fixed = fixed self.conv51 = nn.Conv2d(512, 512, 3, 1, 0) self.conv44 = nn.Conv2d(512, 512, 3, 1, 0) self.conv43 = nn.Conv2d(512,...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
EndyWon/Texture-Reformer
Decoder5
false
8,226
[ "MIT" ]
11
f84f95accb3574c7b759a7f03c0b0b4e150314b5
https://github.com/EndyWon/Texture-Reformer/tree/f84f95accb3574c7b759a7f03c0b0b4e150314b5
Neumann
import math import torch import torch.nn as nn class Neumann(nn.Module): def __init__(self, n_features, depth, residual_connection, mlp_depth, init_type): super().__init__() self.depth = depth self.n_features = n_features self.residual_connection = residual_connection ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
alexprz/NeuMiss
Neumann
false
18,272
[ "BSD-3-Clause" ]
9
bf4f68ba4dd29b51ec3de9d6eef85deecebfa68d
https://github.com/alexprz/NeuMiss/tree/bf4f68ba4dd29b51ec3de9d6eef85deecebfa68d
GeneralizedDiceLoss
import collections import torch import warnings from typing import Optional from typing import Union from typing import Any from typing import Callable from typing import Tuple import torch.nn from torch.nn.modules.loss import _Loss from enum import Enum import collections.abc def issequenceiterable(obj: 'Any') ->boo...
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 collections from typi...
Alxaline/MONAI
GeneralizedDiceLoss
false
4,894
[ "Apache-2.0" ]
1
6b8fdf9db7f13ed7d88d605155a0463840abcbf2
https://github.com/Alxaline/MONAI/tree/6b8fdf9db7f13ed7d88d605155a0463840abcbf2
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....
bblinn2017/IM-NET-pytorch
encoder
false
3,195
[ "MIT" ]
0
82ff646aaf2f93ae1560debb40fe05f1420ff655
https://github.com/bblinn2017/IM-NET-pytorch/tree/82ff646aaf2f93ae1560debb40fe05f1420ff655
FocalLoss
import torch import torch.nn as nn import torch.nn.functional as F def reduce_loss(loss, reduction): """Reduce loss as specified. Args: loss (Tensor): Elementwise loss tensor. reduction (str): Options are "none", "mean" and "sum". Return: Tensor: Reduced loss tensor. """ ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
JiYuanFeng/mmclassification
FocalLoss
false
13,893
[ "Apache-2.0" ]
1,190
b337ef1f11b85148cca4b6fb0c4da3f8cc2eede6
https://github.com/JiYuanFeng/mmclassification/tree/b337ef1f11b85148cca4b6fb0c4da3f8cc2eede6
Squash
import torch import torch.nn as nn class Squash(nn.Module): def forward(self, x, dim=-1): squared_norm = (x ** 2).sum(dim=dim, keepdim=True) scale = squared_norm / (1 + squared_norm) return scale * x / (squared_norm.sqrt() + 1e-08) def get_inputs(): return [torch.rand([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_...
MobtgZhang/MWMLNet
Squash
false
5,602
[ "MIT" ]
1
125bb39935916b6b4be505c51cb6a04eb49b96d0
https://github.com/MobtgZhang/MWMLNet/tree/125bb39935916b6b4be505c51cb6a04eb49b96d0
MaxPool2dLayer
# 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...
fuzhanrahmanian/lucent
MaxPool2dLayer
false
15,380
[ "Apache-2.0" ]
449
13b24c3c37784185275da73c7a11095b2ae809c5
https://github.com/fuzhanrahmanian/lucent/tree/13b24c3c37784185275da73c7a11095b2ae809c5
SimpleModel
# 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.nn.functional import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data...
ZVK/jukebox
SimpleModel
false
18,192
[ "MIT" ]
5
23fd6753f2892214ad3d97f6f2b59f8cc8d0c57a
https://github.com/ZVK/jukebox/tree/23fd6753f2892214ad3d97f6f2b59f8cc8d0c57a
ScaledDotProductAttention
import torch import torch.nn as nn import torch.nn.functional as F 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_dropo...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
MinkiJ/SnaTCHer
ScaledDotProductAttention
false
8,564
[ "MIT" ]
12
335c42469f0a7ad72c5c3480c8effc8c293823e0
https://github.com/MinkiJ/SnaTCHer/tree/335c42469f0a7ad72c5c3480c8effc8c293823e0
AttentionPool2d
# 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....
Liujingxiu23/guided-diffusion
AttentionPool2d
false
5,573
[ "MIT" ]
1
0ba878e517b276c45d1195eb29f6f5f72659a05b
https://github.com/Liujingxiu23/guided-diffusion/tree/0ba878e517b276c45d1195eb29f6f5f72659a05b
LeakyReLU
import torch class Activation(torch.nn.Module): def __init__(self) ->None: super().__init__() def forward(self, inputs: 'torch.Tensor') ->torch.Tensor: raise NotImplementedError class LeakyReLU(Activation): def forward(self, inputs: 'torch.Tensor') ->torch.Tensor: return 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
altescy/xtorch
LeakyReLU
false
9,708
[ "MIT" ]
0
bcbbbe645f4d62c211af5b3555c526cc60792c32
https://github.com/altescy/xtorch/tree/bcbbbe645f4d62c211af5b3555c526cc60792c32
LinearAttentionLayer
# 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....
HuyTu7/dl_optimizers
LinearAttentionLayer
false
9,136
[ "MIT" ]
0
245242718324cebcabe657bdbc704aa54ad0b8d2
https://github.com/HuyTu7/dl_optimizers/tree/245242718324cebcabe657bdbc704aa54ad0b8d2
TorchClampOptionMaxMin
import torch class TorchClampOptionMaxMin(torch.nn.Module): def forward(self, x): return torch.clamp(x, min=-0.1, max=0.1) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
PogChamper/torch2trt
TorchClampOptionMaxMin
false
14,283
[ "MIT" ]
3,363
43b12627ec0de4d212efb6d02b07570205085ccc
https://github.com/PogChamper/torch2trt/tree/43b12627ec0de4d212efb6d02b07570205085ccc
DiracInitBlock
import torch import torch.nn as nn import torch.utils.data class DiracInitBlock(nn.Module): """ DiracNetV2 specific initial block. Parameters: ---------- in_channels : int Number of input channels. out_channels : int Number of output channels. """ def __init__(self, i...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
earhian/imgclsmob
DiracInitBlock
false
6,624
[ "MIT" ]
1
c87c0942420876941868c016211073dec4392e4d
https://github.com/earhian/imgclsmob/tree/c87c0942420876941868c016211073dec4392e4d
GeneralizedMeanPoolingFpn
# 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 abc import ABC from tor...
catcodee/cluster-contrast-reid
GeneralizedMeanPoolingFpn
false
3,279
[ "MIT" ]
0
f6359990a4326375f23c3fd654df3fc6dcc9c579
https://github.com/catcodee/cluster-contrast-reid/tree/f6359990a4326375f23c3fd654df3fc6dcc9c579
LearnedPositionalEncoding
import torch from torch import nn class LayerNorm(nn.Module): """A layernorm module in the TF style (epsilon inside the square root).""" def __init__(self, d_model, variance_epsilon=1e-12): super().__init__() self.gamma = nn.Parameter(torch.ones(d_model)) self.beta = nn.Parameter(torc...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
JamesNgo3781/vietocr
LearnedPositionalEncoding
false
5,377
[ "Apache-2.0" ]
1
9d311bbeb18c51c8ff90022f07c0463b204407dc
https://github.com/JamesNgo3781/vietocr/tree/9d311bbeb18c51c8ff90022f07c0463b204407dc
UpBlock
import torch import torch.nn as nn class UpBlock(nn.Module): def __init__(self, in_f, out_f, stride=2, add_blur=False): super(UpBlock, self).__init__() self.shuffle = nn.ConvTranspose2d(in_f, out_f, kernel_size=3, stride=stride, padding=0) self.has_blur = add_blur if 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...
parth-shettiwar/Image-Toonification
UpBlock
false
12,859
[ "MIT" ]
0
a24d76fa9737558ac38a2fdf23469376f25c0abd
https://github.com/parth-shettiwar/Image-Toonification/tree/a24d76fa9737558ac38a2fdf23469376f25c0abd
ShallowCombination
from _paritybench_helpers import _mock_config import torch import torch.nn as nn class ShallowCombination(nn.Module): """This Module can be used to generate a shallow combination from two embeddings using a gate.""" def __init__(self, bertram_config: 'BertramConfig'): super(ShallowCombination, 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 assert_size_stride = torch._C._dynamo.guards.assert_size_s...
stefan-it/bertram
ShallowCombination
false
16,497
[ "Apache-2.0" ]
50
2e449cdc677577d1ca8b9daf852f324be4074940
https://github.com/stefan-it/bertram/tree/2e449cdc677577d1ca8b9daf852f324be4074940
Attention
import math import torch import torch.nn as nn import torch.optim import torch.nn.functional as F class Attention(nn.Module): """Attention layer - Custom layer to perform weighted average over the second axis (axis=1) Transforming a tensor of size [N, W, H] to [N, 1, H]. N: batch size W: n...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
ovechkinVT/SkipRNN
Attention
false
7,436
[ "MIT" ]
1
7c1f37349d464b1b6bf8835520abad22b199f1ad
https://github.com/ovechkinVT/SkipRNN/tree/7c1f37349d464b1b6bf8835520abad22b199f1ad
TinyCnn
import torch import torch.nn as nn class TinyCnn(nn.Module): def __init__(self, feature_extraction=False) ->None: super().__init__() self.feature_extraction = feature_extraction self.conv1 = nn.Conv2d(3, 3, 5) self.relu1 = nn.ReLU() self.pool1 = nn.MaxPool2d(2, 2) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
aravipati12/captum
TinyCnn
false
10,098
[ "BSD-3-Clause" ]
0
ef3e81d89c8c4404a49c384cf0727f2e7d393f5f
https://github.com/aravipati12/captum/tree/ef3e81d89c8c4404a49c384cf0727f2e7d393f5f
AdaIN
# 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.optim import torch.utils.data assert_size_st...
VITA-Group/Sandwich-Batch-Normalization
AdaIN
false
14,537
[ "MIT" ]
46
25e7df6e64a67cebd7e70b911f874cfc1bd19df0
https://github.com/VITA-Group/Sandwich-Batch-Normalization/tree/25e7df6e64a67cebd7e70b911f874cfc1bd19df0
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....
Yingting-dev/ReChorus
MultiHeadAttention
false
2,985
[ "MIT" ]
0
a16bc1e42f3e90e889133d7476c52ada44db573b
https://github.com/Yingting-dev/ReChorus/tree/a16bc1e42f3e90e889133d7476c52ada44db573b
SquaredErrorBayesRisk
# 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.nn import Module import torch.utils.data import torch.nn.functional import torch.autograd assert_size_stride = torch._C._dynamo.g...
mcx/annotated_deep_learning_paper_implementations
SquaredErrorBayesRisk
false
7,214
[ "MIT" ]
1
f169f3a71dd2d36eb28ad31062d3475efa367b88
https://github.com/mcx/annotated_deep_learning_paper_implementations/tree/f169f3a71dd2d36eb28ad31062d3475efa367b88
QNetwork
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
QwQ2000/E2GAN
QNetwork
false
8,668
[ "MIT" ]
34
f27b715362de4459129206217d100ae5b6cf82c8
https://github.com/QwQ2000/E2GAN/tree/f27b715362de4459129206217d100ae5b6cf82c8
DHead
import torch import torch.nn as nn from math import * class DHead(nn.Module): def __init__(self): super().__init__() self.conv = nn.Conv2d(256, 1, 4) def forward(self, x): output = torch.sigmoid(self.conv(x)) return output def get_inputs(): return [torch.rand([4, 256, 6...
import torch from torch._inductor.select_algorithm import extern_kernels import 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 * assert_size_stride = torch._C._dynamo.g...
pengyuzhang97/NIID-Bench
DHead
false
16,234
[ "MIT" ]
124
235b6f5c2bf218a587f9effae346a2f616de1855
https://github.com/pengyuzhang97/NIID-Bench/tree/235b6f5c2bf218a587f9effae346a2f616de1855
templateModel
# 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 logging import numpy a...
awoloshuk/NephNet
templateModel
false
6,308
[ "MIT" ]
1
562431364874fef1680069c7a5235c67b96504b8
https://github.com/awoloshuk/NephNet/tree/562431364874fef1680069c7a5235c67b96504b8
RMulInt
import torch class RMulInt(torch.nn.Module): def __init__(self): super(RMulInt, self).__init__() def forward(self, x): return 10 * 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
bunderhi/torch2trt
RMulInt
false
1,605
[ "MIT" ]
0
fa5e31e742a0f0c9a9ee38909a6fa56bb07ba96d
https://github.com/bunderhi/torch2trt/tree/fa5e31e742a0f0c9a9ee38909a6fa56bb07ba96d
SimpleReluModel
# 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.jit import torch.onnx import torch.nn assert_size_stride = torch._C._dynamo....
YaronBenAtar/glow
SimpleReluModel
false
14,674
[ "Apache-2.0" ]
2,838
a13706a4239fa7eaf059c670dc573e3eb0768f86
https://github.com/YaronBenAtar/glow/tree/a13706a4239fa7eaf059c670dc573e3eb0768f86
HardSigmoid
# 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...
DetectionBLWX/WSDDN.pytorch
HardSigmoid
false
17,216
[ "MIT" ]
7
05020d9d0445af90ba0af3f095aa12b18e3da7d2
https://github.com/DetectionBLWX/WSDDN.pytorch/tree/05020d9d0445af90ba0af3f095aa12b18e3da7d2
AdaptiveBilinear
import torch import torch.nn.functional as F import torch.nn as nn class AdaptiveBilinear(nn.Module): def __init__(self): super(AdaptiveBilinear, self).__init__() def forward(self, x1, x2): """ :param x1: (b, l1, dim1) :param x2: (b, l2, dim2) :return: """ ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
LindgeW/BiaffineNER
AdaptiveBilinear
false
8,459
[ "Apache-2.0" ]
13
0ae179e9ff731362f6c8ba6d0b24485ad45e8bbf
https://github.com/LindgeW/BiaffineNER/tree/0ae179e9ff731362f6c8ba6d0b24485ad45e8bbf
Scale
import torch import torch.nn as nn class Scale(nn.Module): def __init__(self, nchannels, bias=True, init_scale=1.0): super().__init__() self.nchannels = nchannels self.weight = nn.Parameter(torch.Tensor(1, nchannels, 1, 1)) if bias: self.bias = nn.Parameter(torch.Tenso...
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...
CuongNguyen218/ObjectDetection-OneStageDet
Scale
false
359
[ "MIT" ]
0
60efe8b0ee6782b2aea20a32264b2ce1fc21901f
https://github.com/CuongNguyen218/ObjectDetection-OneStageDet/tree/60efe8b0ee6782b2aea20a32264b2ce1fc21901f
TransformDecoder4
import torch import torch.nn as nn class TransformDecoder4(nn.Module): def __init__(self): super(TransformDecoder4, self).__init__() self.conv41 = nn.Conv2d(1024, 256, 3, 1, 0) self.conv34 = nn.Conv2d(256, 256, 3, 1, 0) self.conv33 = nn.Conv2d(256, 256, 3, 1, 0) self.conv3...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
MingSun-Tse/pytorch-AdaIN
TransformDecoder4
false
2,694
[ "MIT" ]
0
02ae320345232983c754ea233613aedc21e4d348
https://github.com/MingSun-Tse/pytorch-AdaIN/tree/02ae320345232983c754ea233613aedc21e4d348
GEGLU
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
samedii/latent-diffusion
GEGLU
false
16,362
[ "MIT" ]
563
f13bf9bf463d95b5a16aeadd2b02abde31f769f8
https://github.com/samedii/latent-diffusion/tree/f13bf9bf463d95b5a16aeadd2b02abde31f769f8
VisErrorLoss
# 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.functi...
gathierry/FashionAI-KeyPointsDetectionOfApparel
VisErrorLoss
false
15,426
[ "Apache-2.0" ]
174
2e0942b42b4a9cd974cdddc151675738dc8a8cb4
https://github.com/gathierry/FashionAI-KeyPointsDetectionOfApparel/tree/2e0942b42b4a9cd974cdddc151675738dc8a8cb4
NormedLinear
import torch import torch.nn as nn import torch.nn.functional as F from torch.nn import Parameter class NormedLinear(nn.Module): def __init__(self, in_features, out_features): super(NormedLinear, self).__init__() self.weight = Parameter(torch.Tensor(in_features, out_features)) self.weight...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
ZonghaiZhu/EZBM
NormedLinear
false
1,321
[ "MIT" ]
0
b4f6fbd10598c79f144b778ef848554ac62a173a
https://github.com/ZonghaiZhu/EZBM/tree/b4f6fbd10598c79f144b778ef848554ac62a173a
Discriminator
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C....
Shen-Lab/GraphCL
Discriminator
false
14,408
[ "MIT" ]
275
1d43f79d7f33f8133f9d4b4b8254d8aaeb09a615
https://github.com/Shen-Lab/GraphCL/tree/1d43f79d7f33f8133f9d4b4b8254d8aaeb09a615
SeqAttendImgAttOnlyFusion
import torch from torch import nn class SeqAttendImgFusion(nn.Module): def __init__(self, seq_dim, img_dim, hidden_dim, att_dropout, att_scale_factor=1, **kwargs): super(SeqAttendImgFusion, self).__init__() self.SeqTrans = nn.Linear(seq_dim, hidden_dim, bias=False) self.ImgTrans =...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Asichurter/MalFusionFSL
SeqAttendImgAttOnlyFusion
false
16,993
[ "MIT" ]
4
713bf64cc07a3489f42941fd2299837075575ac0
https://github.com/Asichurter/MalFusionFSL/tree/713bf64cc07a3489f42941fd2299837075575ac0
decoder3
# 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....
SofiaValdiviesov/LinearStyleTransfer
decoder3
false
9,660
[ "BSD-2-Clause" ]
0
6837c6a9be16bb5981fa0744e5d23f61d08e6940
https://github.com/SofiaValdiviesov/LinearStyleTransfer/tree/6837c6a9be16bb5981fa0744e5d23f61d08e6940
SquaredErrorBayesRisk
from torch.nn import Module import torch import torch.utils.data import torch.nn.functional import torch.autograd class SquaredErrorBayesRisk(Module): """ <a id="SquaredErrorBayesRisk"></a> ## Bayes Risk with Squared Error Loss Here the cost function is squared error, $$\\sum_{k=1}^K (y_k - p_k)...
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 import torch.utils.data import torch.nn.functional import torch.autograd assert_size_stride = torch._C._dynamo.g...
techthiyanes/annotated_deep_learning_paper_implementations
SquaredErrorBayesRisk
false
16,587
[ "MIT" ]
3,714
8af24da2dd39a9a87482a4d18c2dc829bbd3fd47
https://github.com/techthiyanes/annotated_deep_learning_paper_implementations/tree/8af24da2dd39a9a87482a4d18c2dc829bbd3fd47
BasicNN
# AOT ID: ['1_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....
DNCoelho/clipper
BasicNN
false
13,541
[ "Apache-2.0" ]
1,403
0144078c9da757ee319d60b362d9f51538657ca8
https://github.com/DNCoelho/clipper/tree/0144078c9da757ee319d60b362d9f51538657ca8
GroupGRUCell
# 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 ...
Hritikbansal/RNNs_SVA_OOD
GroupGRUCell
false
17,397
[ "MIT" ]
4
a1c73955342d9d35c49da5fcb7b315e37b0f75d1
https://github.com/Hritikbansal/RNNs_SVA_OOD/tree/a1c73955342d9d35c49da5fcb7b315e37b0f75d1
Mnist_CNN
import torch import torch.nn as nn import torch.nn.functional as F import torch.quantization import torch.onnx import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed class Mnist_CNN(nn.Module): def __init__(self): super().__init__() self.conv1 = 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 import torch.nn as nn import ...
harrydrippin/tutorials
Mnist_CNN
false
12,491
[ "BSD-3-Clause" ]
0
a8def2dfd44b4b8e22c36a3e4470f37b59ebedfb
https://github.com/harrydrippin/tutorials/tree/a8def2dfd44b4b8e22c36a3e4470f37b59ebedfb
LayerNorm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import torch.optim assert_size_stride = torch._C._dynamo....
Arsenaut/comet-commonsense
LayerNorm
false
13,311
[ "Apache-2.0" ]
521
ffa4691ba6bfcb46ea2ed4ce91de5c6815f66e52
https://github.com/Arsenaut/comet-commonsense/tree/ffa4691ba6bfcb46ea2ed4ce91de5c6815f66e52
DistillLoss
import torch import torch.nn as nn class DistillLoss(nn.Module): def __init__(self): super(DistillLoss, self).__init__() def forward(self, t_feat, feat, cams): assert len(cams) == feat.shape[0] and feat.shape[0] == t_feat.shape[0] t_feat = t_feat / t_feat.norm(p=2, dim=1, keepdim=Tru...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert...
Terminator8758/Precise-ICS-master
DistillLoss
false
18,009
[ "MIT" ]
4
9f4591fee6ab64d9dd91f551355d29562bf663cb
https://github.com/Terminator8758/Precise-ICS-master/tree/9f4591fee6ab64d9dd91f551355d29562bf663cb
h_sigmoid
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed class h_sigmoid(nn.Module): def __init__(self, inplace=True, h_max=1): super(h_sigmoid, self).__init__() self.relu = nn.ReLU6(inplace=inplace) self.h_...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data...
SpectrePrediction/micronet
h_sigmoid
false
2,838
[ "MIT" ]
0
f56269c7a8744f750e9870f0baa9fb6e68f27b9c
https://github.com/SpectrePrediction/micronet/tree/f56269c7a8744f750e9870f0baa9fb6e68f27b9c
Highway
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
thophan92/cs224n-winter2019
Highway
false
4,426
[ "MIT" ]
0
f3f8041b35e949e73167135d662a2bd93e7406de
https://github.com/thophan92/cs224n-winter2019/tree/f3f8041b35e949e73167135d662a2bd93e7406de
Fp32GroupNorm
import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data import torch.onnx.operators import torch.optim import torch.optim.lr_scheduler class Fp32GroupNorm(nn.GroupNorm): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def forward(self, input)...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import torch.utils.data import torch.onnx.operators impor...
AbhilashMathews/adahessian
Fp32GroupNorm
false
4,836
[ "MIT" ]
1
bacccecc7a078c3e9e72aa55b17d8e46d21dc9c9
https://github.com/AbhilashMathews/adahessian/tree/bacccecc7a078c3e9e72aa55b17d8e46d21dc9c9
SRCNN
# 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....
akimotty877/mmediting
SRCNN
false
3,080
[ "Apache-2.0" ]
0
cae872d6f3e867ba144c7c0dbc29a0ee1a29e5a6
https://github.com/akimotty877/mmediting/tree/cae872d6f3e867ba144c7c0dbc29a0ee1a29e5a6
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...
carankt/FastSpeech2-1
MultiLayeredConv1d
false
6,383
[ "Apache-2.0" ]
1
42c06e4fbdf741a0719154d1cb4617b7d3f15a5c
https://github.com/carankt/FastSpeech2-1/tree/42c06e4fbdf741a0719154d1cb4617b7d3f15a5c
Critic
# 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...
BenKang34/deep-reinforcement-learning-nanodegree
Critic
false
151
[ "MIT" ]
0
17c9007f757dfb1217c869fdee51798c4a21ba92
https://github.com/BenKang34/deep-reinforcement-learning-nanodegree/tree/17c9007f757dfb1217c869fdee51798c4a21ba92
MagnitudeTestModel
# 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 torchvision import models as models import torch.nn.pa...
aalborov/openvino_training_extensions
MagnitudeTestModel
false
6,038
[ "Apache-2.0" ]
1
a0bb39424151a98e1ca80c4aa5c865636d401785
https://github.com/aalborov/openvino_training_extensions/tree/a0bb39424151a98e1ca80c4aa5c865636d401785
ClassHead
import torch import torch.nn as nn import torch._utils from itertools import product as product import torch.utils.data.distributed class ClassHead(nn.Module): def __init__(self, inchannels=512, num_anchors=3): super(ClassHead, self).__init__() self.num_anchors = num_anchors self.conv1x1 ...
import torch from torch._inductor.select_algorithm import extern_kernels import 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
ClassHead
false
5,028
[ "Apache-2.0" ]
1
029786c40d8aba15d891d33973de25fcd7e5399a
https://github.com/Capetian/FaceX-Zoo/tree/029786c40d8aba15d891d33973de25fcd7e5399a