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
ExgLayer
import torch import torch.nn as nn class ExgLayer(nn.Module): def __init__(self, x_size, h_size, g_size, out_size): super(ExgLayer, self).__init__() self.h_size = h_size self.g_size = g_size self.out_size = out_size self.x_size = x_size self.linear_x2 = nn.Linear(x...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
ayyyq/T-LSTM
ExgLayer
false
6,301
[ "MIT" ]
1
36dbc88ac710d3925851cd87c2368ecfc7061b70
https://github.com/ayyyq/T-LSTM/tree/36dbc88ac710d3925851cd87c2368ecfc7061b70
FractionProposalModel
import torch from torch import nn from torch.nn import functional as F class FractionProposalModel(nn.Module): def __init__(self, in_dim, out_dim): super(FractionProposalModel, self).__init__() self.in_dim = in_dim self.out_dim = out_dim self.layer = nn.Linear(self.in_dim, self.ou...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
alirezakazemipour/Distributional-RL
FractionProposalModel
false
1,424
[ "MIT" ]
0
a3de3a1707bdd57a420f85c6d64a3fb84fb075af
https://github.com/alirezakazemipour/Distributional-RL/tree/a3de3a1707bdd57a420f85c6d64a3fb84fb075af
RelativeScalePredictor
import torch from torch import nn class RelativeScalePredictor(nn.Module): def __init__(self, in_size, out_size): super(RelativeScalePredictor, self).__init__() self.predictor = nn.Linear(in_size, out_size) def forward(self, feat): predictions = self.predictor.forward(feat) + 1 ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
JasonQSY/Associative3D
RelativeScalePredictor
false
8,342
[ "MIT" ]
25
c50818b593ec48c38ed7ee3e109c23531089da32
https://github.com/JasonQSY/Associative3D/tree/c50818b593ec48c38ed7ee3e109c23531089da32
Conv2d
from torch.autograd import Function import torch import numpy as np import torchvision.transforms.functional as F import torch.nn as nn import torch.nn.functional as F def _setup_kernel(k): k = np.asarray(k, dtype=np.float32) if k.ndim == 1: k = np.outer(k, k) k /= np.sum(k) assert k.ndim == 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.autograd import Function import numpy as np import torchvision.transf...
DeepTitan/PNDM
Conv2d
false
13,934
[ "Apache-2.0" ]
61
4037a4f40011c9a0d47b92303e64d47fcc7ed56a
https://github.com/DeepTitan/PNDM/tree/4037a4f40011c9a0d47b92303e64d47fcc7ed56a
softmax_with_multiuse_input
# 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.cuda impo...
JudeDavis1/intel-extension-for-pytorch
softmax_with_multiuse_input
false
2,593
[ "Apache-2.0" ]
0
364e34cb4917a709f5108c07d4005bf82f3d5067
https://github.com/JudeDavis1/intel-extension-for-pytorch/tree/364e34cb4917a709f5108c07d4005bf82f3d5067
ResnetBlock
# 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.nn.functional as F import torch.utils.data imp...
MiaoyunZhao/GANTransferLimitedData
ResnetBlock
false
8,539
[ "MIT" ]
41
5545bc37a1d7d4f28a9c3588aaa12a616bbddd88
https://github.com/MiaoyunZhao/GANTransferLimitedData/tree/5545bc37a1d7d4f28a9c3588aaa12a616bbddd88
AFTSimple
# 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....
Datta0/aft-pytorch
AFTSimple
false
2,134
[ "MIT" ]
0
a0ebad01ea6616b00bde319b0c5e63bea467c400
https://github.com/Datta0/aft-pytorch/tree/a0ebad01ea6616b00bde319b0c5e63bea467c400
ResBlock
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn.functional as...
derwind/dmfont
ResBlock
false
15,180
[ "MIT" ]
95
17a91a9cc1917d2485eaa8e92b68245578920c76
https://github.com/derwind/dmfont/tree/17a91a9cc1917d2485eaa8e92b68245578920c76
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...
jinsongpan/NeMo
StyleResidual
false
10,383
[ "Apache-2.0" ]
0
27f5f2dc6ecf7e0fd4225eedb2500cee6284e7d7
https://github.com/jinsongpan/NeMo/tree/27f5f2dc6ecf7e0fd4225eedb2500cee6284e7d7
InvertibleChannelMixing1D
from torch.autograd import Function import torch from torch import nn from warnings import warn def _cayley(A): I = torch.eye(A.shape[-1], device=A.device) LU = torch.lu(I + A, pivot=True) return torch.lu_solve(I - A, *LU) def _cayley_frechet(A, H, Q=None): I = torch.eye(A.shape[-1], device=A.device...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import 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 from torch import nn from warnings import wa...
cetmann/iunets
InvertibleChannelMixing1D
false
15,015
[ "MIT" ]
86
80ed7cce0e505a0396c42359eaf27819222d71f6
https://github.com/cetmann/iunets/tree/80ed7cce0e505a0396c42359eaf27819222d71f6
Connect2Model
# 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....
quangchiem139/AlphaZeroSimple
Connect2Model
false
16,305
[ "MIT" ]
76
1b1096cc4b2aded6337a90035aee56b370ea1d3a
https://github.com/quangchiem139/AlphaZeroSimple/tree/1b1096cc4b2aded6337a90035aee56b370ea1d3a
NormedLinear
# 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....
raman32/LDAM-DRW
NormedLinear
false
7,534
[ "MIT" ]
1
7ce2251c01b94c7259108a1e188457f0b720651d
https://github.com/raman32/LDAM-DRW/tree/7ce2251c01b94c7259108a1e188457f0b720651d
Residual
# 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....
RicCu/NeuralStyle
Residual
false
5,774
[ "MIT" ]
1
97dc6aec6b2072a9a187276e047aea885566e1be
https://github.com/RicCu/NeuralStyle/tree/97dc6aec6b2072a9a187276e047aea885566e1be
ConvGLU
# 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.cuda from torch import nn import torch.distributed import torch.uti...
hamjam/NeMo
ConvGLU
false
15,488
[ "Apache-2.0" ]
4,145
b3484d32e1317666151f931bfa39867d88ed8658
https://github.com/hamjam/NeMo/tree/b3484d32e1317666151f931bfa39867d88ed8658
MHAttentionMap
import torch import torch.nn as nn from torch.nn import functional as F import torch._utils class MHAttentionMap(nn.Module): """This is a 2D attention module, which only returns the attention softmax (no multiplication by value)""" def __init__(self, query_dim, hidden_dim, num_heads=1, dropout=0.0, b...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
dingmyu/mmclassification
MHAttentionMap
false
12,290
[ "Apache-2.0" ]
0
c600b22907fb9423899f7c308c659168c2d01cd8
https://github.com/dingmyu/mmclassification/tree/c600b22907fb9423899f7c308c659168c2d01cd8
UpSample
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
Hadryan/nn
UpSample
false
9,384
[ "MIT" ]
0
b10e3dea2c7e1f6569bfdf8e1a48f8d48b5a645d
https://github.com/Hadryan/nn/tree/b10e3dea2c7e1f6569bfdf8e1a48f8d48b5a645d
LayerCake
# 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...
Saran-nns/delve
LayerCake
false
1,021
[ "MIT" ]
0
3489d8aa13181b392d3c47a19f9d9a47d87f8790
https://github.com/Saran-nns/delve/tree/3489d8aa13181b392d3c47a19f9d9a47d87f8790
BiLinearSim
# 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.optim.lr_scheduler import * assert_size_stride = torch._C._dynamo.gua...
kiminh/mt-dnn
BiLinearSim
false
7,022
[ "MIT" ]
1
133884b380244dbe74acc4d7507e551b2c5035b3
https://github.com/kiminh/mt-dnn/tree/133884b380244dbe74acc4d7507e551b2c5035b3
CXLoss
# 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._inductor.runtime....
drgripa1/deepvecfont
CXLoss
false
15,263
[ "MIT" ]
68
a44d81ba19a22e43b4e576cd8ebc5c2fd961a621
https://github.com/drgripa1/deepvecfont/tree/a44d81ba19a22e43b4e576cd8ebc5c2fd961a621
ImgAttention
from _paritybench_helpers import _mock_config import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import * import torch.nn.init class ImgAttention(nn.Module): def __init__(self, opt): super(ImgAttention, self).__init__() self.rnn_size = opt.rnn_size self...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
WuJie1010/Fine-Grained-Image-Captioning
ImgAttention
false
18,066
[ "MIT" ]
9
340bc1868634f3bf0fdd62d439fec32ee1b45407
https://github.com/WuJie1010/Fine-Grained-Image-Captioning/tree/340bc1868634f3bf0fdd62d439fec32ee1b45407
SoftArgmax2D
import torch import torch.nn as nn from typing import Optional def create_meshgrid(x: 'torch.Tensor', normalized_coordinates: 'Optional[bool]' ) ->torch.Tensor: assert len(x.shape) == 4, x.shape _, _, height, width = x.shape _device, _dtype = x.device, x.dtype if normalized_coordinates: xs...
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 ...
danyayay/ynet_adaptive
SoftArgmax2D
false
1,792
[ "MIT" ]
0
f1daea6f3d5ec8a7349c2ee72bf742df83786103
https://github.com/danyayay/ynet_adaptive/tree/f1daea6f3d5ec8a7349c2ee72bf742df83786103
BinaryLoss
# 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, math as tl_math import torch.nn as nn import torch.distributions import torch....
AlexMeinke/Provable-OOD-Detection
BinaryLoss
false
7,672
[ "MIT" ]
21
9a132aec994ff718c96b81885736ab866df60d87
https://github.com/AlexMeinke/Provable-OOD-Detection/tree/9a132aec994ff718c96b81885736ab866df60d87
ActorCritic
import copy import torch import torch.nn as nn import torch.nn.functional as F class ActorCritic(nn.Module): def __init__(self, num_inputs, num_outputs, hidden=64): super(ActorCritic, self).__init__() self.affine1 = nn.Linear(num_inputs, hidden) self.affine2 = nn.Linear(hidden, hidden) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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
ActorCritic
false
16,617
[ "MIT" ]
47
f73226865e34443f93dbec58939329c9278828e8
https://github.com/tpbarron/pytorch-ppo/tree/f73226865e34443f93dbec58939329c9278828e8
LinearWithGroupNorm
# 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....
MCZhi/nuplan-devkit
LinearWithGroupNorm
false
795
[ "Apache-2.0" ]
0
3c4f5b8dcd517b27cfd258915ca5fe5c54e3cb0c
https://github.com/MCZhi/nuplan-devkit/tree/3c4f5b8dcd517b27cfd258915ca5fe5c54e3cb0c
Highway
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.utils import torch.onnx class Highway(nn.Module): def __init__(self, e_word): super(Highway, self).__init__() self.embed_size = e_word self.w_proj = nn.Linear(self.embed_size, self.embed_size, bias=True) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
evazhang612/honygenerator
Highway
false
6,662
[ "MIT" ]
1
cafcf1736faba978ecaed624b949ebc1498477ee
https://github.com/evazhang612/honygenerator/tree/cafcf1736faba978ecaed624b949ebc1498477ee
ConvTemporalGraphical
import torch import torch.nn as nn class ConvTemporalGraphical(nn.Module): """The basic module for applying a graph convolution. Args: in_channels (int): Number of channels in the input sequence data out_channels (int): Number of channels produced by the convolution kernel_size (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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Alexis-Fab/mmaction2
ConvTemporalGraphical
false
11,221
[ "Apache-2.0" ]
0
6f76bb465a7164f907318cf58f77fc3d613f8f0f
https://github.com/Alexis-Fab/mmaction2/tree/6f76bb465a7164f907318cf58f77fc3d613f8f0f
Anomaly
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.utils.data from ...
sccc19/anomalydetector
Anomaly
false
16,440
[ "MIT" ]
180
a963ef8d7f30971e99d21a748d059e26f2163b09
https://github.com/sccc19/anomalydetector/tree/a963ef8d7f30971e99d21a748d059e26f2163b09
_Decoder
import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data class _Decoder(nn.Module): def __init__(self, z_dim): super(_Decoder, self).__init__() self.fc1 = nn.Linear(z_dim, 600) self.fc2 = nn.Linear(600, 600) self.fc3 = nn.Linear(600, 784) def...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
mori97/revae
_Decoder
false
4,034
[ "MIT" ]
0
465009076a9be78e8ddb9021a0699b32fc695f30
https://github.com/mori97/revae/tree/465009076a9be78e8ddb9021a0699b32fc695f30
CNN
# 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 ...
igorvlnascimento/DeepREF
CNN
false
3,649
[ "MIT" ]
0
0fed8120571e44e12ee3d1861289bc101c0a275f
https://github.com/igorvlnascimento/DeepREF/tree/0fed8120571e44e12ee3d1861289bc101c0a275f
SimpleSumModule
# 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
SimpleSumModule
false
14,687
[ "Apache-2.0" ]
2,838
a13706a4239fa7eaf059c670dc573e3eb0768f86
https://github.com/YaronBenAtar/glow/tree/a13706a4239fa7eaf059c670dc573e3eb0768f86
GatedConv2d
import torch import torch.nn as nn 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_features = num_features self....
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math im...
kangzhiq/DeepFillv2_Pytorch
GatedConv2d
false
10,438
[ "MIT" ]
0
9c7ed61b25bb995713f89108b712490737abe1b1
https://github.com/kangzhiq/DeepFillv2_Pytorch/tree/9c7ed61b25bb995713f89108b712490737abe1b1
LayerNorm
import torch from torch import nn class LayerNorm(nn.Module): def __init__(self, dim, eps=1e-05): super().__init__() self.eps = eps self.g = nn.Parameter(torch.ones(1, dim, 1, 1)) self.b = nn.Parameter(torch.zeros(1, dim, 1, 1)) def forward(self, x): var = torch.var(x...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
psemchyshyn/diffusion_reconstruction
LayerNorm
false
12,938
[ "MIT" ]
0
c7ccc8c9f47c858606a46c2c29fcb64016565b4e
https://github.com/psemchyshyn/diffusion_reconstruction/tree/c7ccc8c9f47c858606a46c2c29fcb64016565b4e
SubPixelConvolutionalBlock
# 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...
f74066357/SR
SubPixelConvolutionalBlock
false
3,497
[ "MIT" ]
0
374ac141dfbfb4f851379d1c3c7c7f6bf1a21c67
https://github.com/f74066357/SR/tree/374ac141dfbfb4f851379d1c3c7c7f6bf1a21c67
Elu
import torch import torch.fx class Elu(torch.nn.Module): def __init__(self): super(Elu, self).__init__() self.elu = torch.nn.ELU() def forward(self, x): return self.elu(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 libdevice import torch.fx assert_size_stride = torch._C._dynamo.guards.assert_size_stride...
NVIDIA/Torch-TensorRT
Elu
false
14,070
[ "BSD-3-Clause" ]
430
1a22204fecec690bc3c2a318dab4f57b98c57f05
https://github.com/NVIDIA/Torch-TensorRT/tree/1a22204fecec690bc3c2a318dab4f57b98c57f05
PositionalEncoding
import math import torch from torch import nn class PositionalEncoding(nn.Module): def __init__(self, dimension: 'int', dropout: 'float'=0.1): super().__init__() self.dropout = nn.Dropout(p=dropout) self.dimension = dimension def forward(self, x: 'torch.Tensor') ->torch.Tensor: ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch import nn a...
IMDxD/NonAttentiveTacotron
PositionalEncoding
false
17,416
[ "MIT" ]
4
a227fba1bdfa4c5ec63a0f0364313f3ac0fef1ba
https://github.com/IMDxD/NonAttentiveTacotron/tree/a227fba1bdfa4c5ec63a0f0364313f3ac0fef1ba
BCELoss
import torch import torch.nn as nn import torch.nn.functional as F class BCELoss(nn.Module): """Binary Cross Entropy loss.""" def __init__(self, use_target_weight=False, loss_weight=1.0): super().__init__() self.criterion = F.binary_cross_entropy self.use_target_weight = use_target_we...
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...
atoaiari/mmpose
BCELoss
false
6,266
[ "Apache-2.0" ]
1
256a9117767008e8c33b4038a346aca12233e300
https://github.com/atoaiari/mmpose/tree/256a9117767008e8c33b4038a346aca12233e300
SampaddingConv1D
import torch import torch.nn as nn class SampaddingConv1D(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, use_bias=True): super(SampaddingConv1D, self).__init__() self.use_bias = use_bias self.padding = nn.ConstantPad1d((int((kernel_size - 1) / 2), 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
amoonfana/Knowledge_Distillation
SampaddingConv1D
false
6,192
[ "Apache-2.0" ]
1
1ee814a8f70ae00d17e1e1ee778d5420d96c43c4
https://github.com/amoonfana/Knowledge_Distillation/tree/1ee814a8f70ae00d17e1e1ee778d5420d96c43c4
Value
# 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 ...
zwc662/Safe_GAIL
Value
false
13,182
[ "MIT" ]
0
536dd73c91d277b418ef04efdd42aa6c87fdad33
https://github.com/zwc662/Safe_GAIL/tree/536dd73c91d277b418ef04efdd42aa6c87fdad33
L1_Charbonnier_loss_color
# 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 from torch.nn.modules.loss import _Loss assert_size_str...
YDDDDG/3D2Unet
L1_Charbonnier_loss_color
false
6,001
[ "MIT" ]
1
daca056958fb2ae319dc18a350e04b3cefe0d99f
https://github.com/YDDDDG/3D2Unet/tree/daca056958fb2ae319dc18a350e04b3cefe0d99f
LabelwiseAttention
import torch import torch.nn.functional as F import torch.nn as nn class LabelwiseAttention(nn.Module): """Applies attention technique to summarize the sequence for each label See `Explainable Prediction of Medical Codes from Clinical Text <https://aclanthology.org/N18-1100.pdf>`_ Args: input_siz...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
JamesLYC88/LibMultiLabel
LabelwiseAttention
false
9,161
[ "MIT" ]
0
042b76b3564409d916cf735ace617319009ae118
https://github.com/JamesLYC88/LibMultiLabel/tree/042b76b3564409d916cf735ace617319009ae118
IReLU
# 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 math assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided...
rupumped/DFL
IReLU
false
4,208
[ "BSD-3-Clause" ]
0
a4e4d96b7ce7522cf7fee3c2cfdbb54eb7a473f2
https://github.com/rupumped/DFL/tree/a4e4d96b7ce7522cf7fee3c2cfdbb54eb7a473f2
AngularPenaltySMLoss
# 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....
Seb-Good/physionet-challenge-2020
AngularPenaltySMLoss
false
8,810
[ "BSD-2-Clause" ]
13
c6f1648a148335babc0a26d8a589120616327548
https://github.com/Seb-Good/physionet-challenge-2020/tree/c6f1648a148335babc0a26d8a589120616327548
SelfAttentionUnit
import torch from torch import nn class SelfAttentionUnit(nn.Module): def __init__(self, embed_dim, num_heads, max_len, dropout=0.8, bias= False, skip_connection=True): super(SelfAttentionUnit, self).__init__() self.skip_connection = skip_connection self.attn = nn.MultiheadAttenti...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
dohnlee/qufa2021
SelfAttentionUnit
false
12,304
[ "MIT" ]
0
5fb42caee09ec228358e49768e32c75e3c0094ce
https://github.com/dohnlee/qufa2021/tree/5fb42caee09ec228358e49768e32c75e3c0094ce
ClassHead
import torch from itertools import product as product import torch.nn as nn class ClassHead(nn.Module): def __init__(self, inchannels=512, num_anchors=3): super(ClassHead, self).__init__() self.num_anchors = num_anchors self.conv1x1 = nn.Conv2d(inchannels, self.num_anchors * 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 itertools import product as product import torch.nn as nn assert_size_strid...
BossunWang/Pytorch_Retinaface
ClassHead
false
8,983
[ "MIT" ]
0
01ec6cfbcced1e8cc8802084e4e566ccaf2513a8
https://github.com/BossunWang/Pytorch_Retinaface/tree/01ec6cfbcced1e8cc8802084e4e566ccaf2513a8
Downsample
import torch import torch.nn as nn def conv_nd(dims, *args, **kwargs): """ Create a 1D, 2D, or 3D convolution module. """ if dims == 1: return nn.Conv1d(*args, **kwargs) elif dims == 2: return nn.Conv2d(*args, **kwargs) elif dims == 3: return nn.Conv3d(*args, **kwargs) ...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
Liujingxiu23/guided-diffusion
Downsample
false
5,545
[ "MIT" ]
1
0ba878e517b276c45d1195eb29f6f5f72659a05b
https://github.com/Liujingxiu23/guided-diffusion/tree/0ba878e517b276c45d1195eb29f6f5f72659a05b
C1
# 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 co...
devillove084/DeepSignal
C1
false
12,263
[ "MIT" ]
0
1fe122b32752b11e10ca4bef3d07ddd7de4348b5
https://github.com/devillove084/DeepSignal/tree/1fe122b32752b11e10ca4bef3d07ddd7de4348b5
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....
EVA4-RS-Group/Phase2
Attention
false
414
[ "Apache-2.0" ]
0
7c551e3894979cc425dd51baeddbfa5a51b7878d
https://github.com/EVA4-RS-Group/Phase2/tree/7c551e3894979cc425dd51baeddbfa5a51b7878d
AE
import torch import torch.nn as nn class AE(nn.Module): def __init__(self): super(AE, self).__init__() self.leaky_reLU = nn.LeakyReLU(0.2) self.pool = nn.MaxPool2d(kernel_size=2, stride=2, padding=1, return_indices=True) self.unpool = nn.MaxUnpool2d(kernel_size=2, stri...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
personwhofloat/Line-Segmentation-Model
AE
false
7,576
[ "MIT" ]
1
f00b65c7914f44fa31e14d41120903d0da2d5496
https://github.com/personwhofloat/Line-Segmentation-Model/tree/f00b65c7914f44fa31e14d41120903d0da2d5496
NeuralNetwork
# 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....
keyshor/homework
NeuralNetwork
false
12,679
[ "MIT" ]
0
687f9edf73bbac8fc492dfd82d634c19a38f5aab
https://github.com/keyshor/homework/tree/687f9edf73bbac8fc492dfd82d634c19a38f5aab
RelateModule
# 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 ...
SpyrosMouselinos/DeltaFormers
RelateModule
false
5,858
[ "Apache-2.0" ]
1
38508fa9b85f2c50aa0031b67e7e8feff1a75b27
https://github.com/SpyrosMouselinos/DeltaFormers/tree/38508fa9b85f2c50aa0031b67e7e8feff1a75b27
ResidualBlock
import torch from torch import nn class ConvRelu(nn.Module): def __init__(self, in_: 'int', out: 'int', activate=True): super(ConvRelu, self).__init__() self.activate = activate self.conv = nn.Conv2d(in_, out, 3, padding=1) self.activation = nn.ReLU(inplace=True) def forward(...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
haonguyen1107/style_transfer
ResidualBlock
false
3,574
[ "MIT" ]
0
8df9b20ce8ebc446cf2c0a67393001b3cf318fed
https://github.com/haonguyen1107/style_transfer/tree/8df9b20ce8ebc446cf2c0a67393001b3cf318fed
moving_avg
import torch import torch.nn as nn class moving_avg(nn.Module): """ Moving average block to highlight the trend of time series """ def __init__(self, kernel_size, stride): super(moving_avg, self).__init__() self.kernel_size = kernel_size self.avg = nn.AvgPool1d(kernel_size=ker...
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...
thuml/Autoformer
moving_avg
false
16,583
[ "MIT" ]
263
6bf300d0bf3e7f3cb4d795dd8ed14ede2000a9ab
https://github.com/thuml/Autoformer/tree/6bf300d0bf3e7f3cb4d795dd8ed14ede2000a9ab
SpatialAttention
import torch import torch.nn as nn class CompressChannels(nn.Module): """ Compresses the input channels to 2 by concatenating the results of Global Average Pooling(GAP) and Global Max Pooling(GMP). HxWxC => HxWx2 """ def forward(self, x): return torch.cat((torch.max(x, 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_...
Vrushank264/Low-Light-Enhancement
SpatialAttention
false
5,946
[ "MIT" ]
1
3c13a10a16eab8183b8fbd0c063d9815b662259a
https://github.com/Vrushank264/Low-Light-Enhancement/tree/3c13a10a16eab8183b8fbd0c063d9815b662259a
Wide_Conv
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
YJiangcm/Chinese-sentence-pair-modeling
Wide_Conv
false
14,650
[ "Apache-2.0" ]
49
90adbc5c121832ce3e4a4057e30417a6ec5e7ebc
https://github.com/YJiangcm/Chinese-sentence-pair-modeling/tree/90adbc5c121832ce3e4a4057e30417a6ec5e7ebc
Net
import torch from torch import nn import torch.nn.functional as F import torch.optim class Net(nn.Module): def __init__(self): super(Net, self).__init__() self.conv1 = nn.Conv2d(in_channels=3, out_channels=32, kernel_size= 3, padding=1) self.max2 = nn.MaxPool2d(kernel_size=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 from torch import nn import t...
kawano8811/deep-learning-v2-pytorch
Net
false
13,232
[ "MIT" ]
0
b7c453728cb85edf3b30e0aeb66b3861747bc043
https://github.com/kawano8811/deep-learning-v2-pytorch/tree/b7c453728cb85edf3b30e0aeb66b3861747bc043
SimpleCosModule
import torch import torch.jit import torch.onnx import torch.nn class SimpleCosModule(torch.nn.Module): def __init__(self): super(SimpleCosModule, self).__init__() def forward(self, a): return torch.cos(a + a) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs():...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.jit import torch.onnx import torch.nn assert_size_stride = t...
briancoutinho/glow
SimpleCosModule
false
12,564
[ "Apache-2.0" ]
0
4c919d60b3c33296c4109aec8020a1733c98f5b5
https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5
Concat
import torch from torch import nn import torch.nn import torch.optim class Concat(nn.Module): def forward(self, state: 'torch.Tensor', action: 'torch.Tensor'): return torch.cat((state, action), dim=-1) def get_inputs(): return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])] def get_init_inpu...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn import torch.nn import torch.optim assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda =...
BerenLuthien/ReAgent
Concat
false
13,389
[ "BSD-3-Clause" ]
1,156
52f666670a7fa03206812ef48949f6b934d400f7
https://github.com/BerenLuthien/ReAgent/tree/52f666670a7fa03206812ef48949f6b934d400f7
RKDLoss
import torch from torch import nn import torch.nn.functional as F class RKDLoss(nn.Module): """Relational Knowledge Disitllation, CVPR2019""" def __init__(self, w_d=25, w_a=50): super(RKDLoss, self).__init__() self.w_d = w_d self.w_a = w_a def forward(self, f_s, f_t): stu...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
UBCDingXin/RepDistiller
RKDLoss
false
14,529
[ "BSD-2-Clause" ]
1,347
dcc043277f2820efafd679ffb82b8e8195b7e222
https://github.com/UBCDingXin/RepDistiller/tree/dcc043277f2820efafd679ffb82b8e8195b7e222
BlendLinear
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dyn...
D-hash-code/ffjord
BlendLinear
false
11,357
[ "MIT" ]
0
3647ab35537a8bac3b4dc1e45a593819ac8e2c18
https://github.com/D-hash-code/ffjord/tree/3647ab35537a8bac3b4dc1e45a593819ac8e2c18
SimpleCNN
import torch import torch.nn as nn from torch.nn import functional as F class SimpleCNN(nn.Module): def __init__(self): super(SimpleCNN, self).__init__() self.fc1 = nn.Linear(28 * 28, 500) self.fc2 = nn.Linear(500, 256) self.fc3 = nn.Linear(256, 10) def forward(self, x): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
AnweshCR7/autonomous_greenhouse
SimpleCNN
false
4,867
[ "MIT" ]
1
a29cfe37d0152001d2544216ed65c3472f572b4e
https://github.com/AnweshCR7/autonomous_greenhouse/tree/a29cfe37d0152001d2544216ed65c3472f572b4e
IOUloss
import torch import torch.nn as nn class IOUloss(nn.Module): def __init__(self, reduction='none', loss_type='iou'): super(IOUloss, self).__init__() self.reduction = reduction self.loss_type = loss_type def forward(self, pred, target): assert pred.shape[0] == target.shape[0] ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
ankandrew/YOLOX
IOUloss
false
12,087
[ "Apache-2.0" ]
0
28da975944887d550f052ebadd8cbdd82d14aed6
https://github.com/ankandrew/YOLOX/tree/28da975944887d550f052ebadd8cbdd82d14aed6
AugCNN
import torch import torch.nn as nn import torch.nn.functional as F def apply_init_(modules): """ Initialize NN modules """ for m in modules: if isinstance(m, nn.Conv2d): nn.init.xavier_uniform_(m.weight) if m.bias is not None: nn.init.constant_(m.bias, 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 import torch.nn.functional as F assert_size_stride = torch...
agarwl/auto-drac
AugCNN
false
3,034
[ "MIT" ]
0
d86c480b51929e6e4ec0ae1adba84d9f78e91705
https://github.com/agarwl/auto-drac/tree/d86c480b51929e6e4ec0ae1adba84d9f78e91705
DilatedResidualLayer
# 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_...
anonymous-rubick/ms-tcn-bilinear
DilatedResidualLayer
false
1,454
[ "MIT" ]
0
b95d3ca834dc4811af563d38185acef975970e82
https://github.com/anonymous-rubick/ms-tcn-bilinear/tree/b95d3ca834dc4811af563d38185acef975970e82
DiceBCELoss
import torch from torch import nn from torch.nn import functional as F class DiceBCELoss(nn.Module): def __init__(self, weight=None, size_average=True): super(DiceBCELoss, self).__init__() def forward(self, inputs, targets, smooth=1): inputs = torch.sigmoid(inputs) inputs = inputs.vi...
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 ...
Michaelistaken/PathPretrain
DiceBCELoss
false
839
[ "MIT" ]
0
650b7eb02e67f6d864d81808eb7230c48fe6946a
https://github.com/Michaelistaken/PathPretrain/tree/650b7eb02e67f6d864d81808eb7230c48fe6946a
GeM
# 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 import torch.nn.functional a...
esha-singh/DL_project
GeM
false
3,478
[ "MIT" ]
0
11ac2874845bc3982435cc37f4e0b8896b95660e
https://github.com/esha-singh/DL_project/tree/11ac2874845bc3982435cc37f4e0b8896b95660e
PVABlock
# 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....
wu0004in/vedastr
PVABlock
false
4,561
[ "Apache-2.0" ]
0
83511a408b68c264561a30daff5154cd0148bebd
https://github.com/wu0004in/vedastr/tree/83511a408b68c264561a30daff5154cd0148bebd
PositionwiseFeedForward
import torch import torch.nn as nn class PositionwiseFeedForward(nn.Module): """ A two-feed-forward-layer module """ def __init__(self, d_in, d_hid, dropout=0.1): super().__init__() self.w_1 = nn.Linear(d_in, d_hid) self.w_2 = nn.Linear(d_hid, d_in) self.layer_norm = nn.LayerN...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Jincheng-Sun/Kylearn-pytorch
PositionwiseFeedForward
false
661
[ "MIT" ]
0
e72f2ab45a3f4724e843a27bec37664d3612fdca
https://github.com/Jincheng-Sun/Kylearn-pytorch/tree/e72f2ab45a3f4724e843a27bec37664d3612fdca
AdaptiveInstanceNorm
# 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.utils....
zhengqili/Crowdsampling-the-Plenoptic-Function
AdaptiveInstanceNorm
false
16,807
[ "MIT" ]
70
3164e9f9574d597690f83dfdfb34cc470d2dcb88
https://github.com/zhengqili/Crowdsampling-the-Plenoptic-Function/tree/3164e9f9574d597690f83dfdfb34cc470d2dcb88
L2N
import torch import torch.nn as nn def l2n(x, eps=1e-06): return x / (torch.norm(x, p=2, dim=1, keepdim=True) + eps).expand_as(x) class L2N(nn.Module): def __init__(self, eps=1e-06): super(L2N, self).__init__() self.eps = eps def forward(self, x): return l2n(x, eps=self.eps) ...
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_...
SamSweere/CV-PIRE
L2N
false
2,804
[ "MIT" ]
0
d857167b3058cb51d10662150c6a4ba3c85f2903
https://github.com/SamSweere/CV-PIRE/tree/d857167b3058cb51d10662150c6a4ba3c85f2903
NormedLinear
import torch import torch.nn.functional as F from torch import nn class NormedLinear(nn.Linear): """Normalized Linear Layer. Args: tempeature (float, optional): Tempeature term. Default to 20. power (int, optional): Power term. Default to 1.0. eps (float, optional): The minimal 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.triton_helpers import libdevice from torch import n...
HT-hlf/mmdetection_miner-2.22.0
NormedLinear
false
2,323
[ "Apache-2.0" ]
0
76eb94d6547f9f95cd58f41bb5c91941e82322b9
https://github.com/HT-hlf/mmdetection_miner-2.22.0/tree/76eb94d6547f9f95cd58f41bb5c91941e82322b9
Dense
import math import torch import torch.nn as nn from string import ascii_lowercase import torch.optim class Dense(nn.Module): def __init__(self, input_features, output_features=None): super(Dense, self).__init__() self.input_features = input_features self.output_features = (input_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 math import torch.nn as nn from string import ascii_lowercase import torc...
andrew-xu-monash/UMM-Modified
Dense
false
18,326
[ "Apache-2.0" ]
4
18729dc34733c203e8cd3873fec2b9f7d0b56dba
https://github.com/andrew-xu-monash/UMM-Modified/tree/18729dc34733c203e8cd3873fec2b9f7d0b56dba
SoftDetectionModule
import torch import torch.utils import torch.nn as nn import torch.nn.functional as F class SoftDetectionModule(nn.Module): def __init__(self, soft_local_max_size=3): super(SoftDetectionModule, self).__init__() self.soft_local_max_size = soft_local_max_size self.pad = self.soft_local_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 from torch._inductor.runtime.triton_helpers import math as tl_math import torch.utils imp...
xmlyqing00/d2-net
SoftDetectionModule
false
4,588
[ "BSD-3-Clause-Clear" ]
0
3454a2862088682a6bdb2532ff049fd6cd82729c
https://github.com/xmlyqing00/d2-net/tree/3454a2862088682a6bdb2532ff049fd6cd82729c
Addition_Module
# 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...
LMdeLiangMi/captum
Addition_Module
false
5,467
[ "BSD-3-Clause" ]
1
8bd9686013fe0ba8996e9b1cbeb0ea8e91512787
https://github.com/LMdeLiangMi/captum/tree/8bd9686013fe0ba8996e9b1cbeb0ea8e91512787
ShakeResNet
import math import torch from torch.nn import functional as F from torch import nn class ShakeShake(torch.autograd.Function): @staticmethod def forward(ctx, x1, x2, training=True): if training: alpha = torch.FloatTensor(x1.size(0)).uniform_() alpha = alpha.view(alpha.size(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 import math from torch.nn imp...
ang421/dda
ShakeResNet
false
9,912
[ "MIT" ]
0
391ad696ec8479ce41a0d7d6bfbfae06edaddf67
https://github.com/ang421/dda/tree/391ad696ec8479ce41a0d7d6bfbfae06edaddf67
ATLoss
import torch from torch import Tensor import torch.nn as nn import torch.nn.functional as F class ATLoss(nn.Module): def __init__(self): super().__init__() def forward(self, logits: 'Tensor', labels: 'Tensor') ->float: """ Args: logits: predicted probabilities (shape: bat...
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 Tens...
BunnyNoBugs/DeepPavlov
ATLoss
false
11,258
[ "Apache-2.0" ]
0
b2213db633a669d27d6f745dd780530574ccf8b5
https://github.com/BunnyNoBugs/DeepPavlov/tree/b2213db633a669d27d6f745dd780530574ccf8b5
AlignDifferential
import torch from torch import nn class AlignDifferential(nn.Module): def __init__(self): super().__init__() def new_length(self, length): return length def forward(self, states): """ :param states: [batch, length, *] """ padded_states = torch.cat([states...
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...
C-SUNSHINE/TOQ-Nets-PyTorch-Release
AlignDifferential
false
17,119
[ "MIT" ]
6
05e06bf633fb3c6b610dda9a5126ecd7af1db02f
https://github.com/C-SUNSHINE/TOQ-Nets-PyTorch-Release/tree/05e06bf633fb3c6b610dda9a5126ecd7af1db02f
MotionEncoder
import torch import torch.nn as nn import torch.nn.functional as F class MotionEncoder(nn.Module): """ Encodes motion features from the correlation levels of the pyramid and the input flow estimate using convolution layers. Parameters ---------- corr_radius : int Correlation radius o...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
NeelayS/ezflow
MotionEncoder
false
14,142
[ "MIT" ]
94
b93a48c4adf5021f7eacbfc43220c7efa5ae55cd
https://github.com/NeelayS/ezflow/tree/b93a48c4adf5021f7eacbfc43220c7efa5ae55cd
BertSelfAttention
# 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....
Worm4047/TVR
BertSelfAttention
false
14,607
[ "MIT" ]
106
2a8ce2edbdc0966aef3b84c28872267039f01700
https://github.com/Worm4047/TVR/tree/2a8ce2edbdc0966aef3b84c28872267039f01700
AFTFull
import torch from torch import nn class AFTFull(nn.Module): def __init__(self, max_seqlen, dim, hidden_dim=64): super().__init__() """ max_seqlen: the maximum number of timesteps (sequence length) to be fed in dim: the embedding dimension of the tokens hidden_dim: the hidd...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 im...
Datta0/aft-pytorch
AFTFull
false
2,138
[ "MIT" ]
0
a0ebad01ea6616b00bde319b0c5e63bea467c400
https://github.com/Datta0/aft-pytorch/tree/a0ebad01ea6616b00bde319b0c5e63bea467c400
DCENetLoss
# 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 ...
SeongjuLee/DCENet-PyTorch
DCENetLoss
false
8,757
[ "MIT" ]
10
eb477ce06356ae597c162dd3229285400ebf9168
https://github.com/SeongjuLee/DCENet-PyTorch/tree/eb477ce06356ae597c162dd3229285400ebf9168
GlobalPerceptron
# 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 ...
liuruiyang98/Jittor-MLP
GlobalPerceptron
false
15,934
[ "MIT" ]
49
b86656b65cf5f18ba9eb760d1f7565ed95e7e96e
https://github.com/liuruiyang98/Jittor-MLP/tree/b86656b65cf5f18ba9eb760d1f7565ed95e7e96e
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.triton_helpers import libdevice import numpy as np ...
Harshdeep1996/jina-hub
EncoderImagePrecomp
false
2,327
[ "Apache-2.0" ]
0
880ff719715b89969860c70219d26a931a031d10
https://github.com/Harshdeep1996/jina-hub/tree/880ff719715b89969860c70219d26a931a031d10
EncoderLayer
import torch import torch as th import torch.nn as nn class FeedForwardNetwork(nn.Module): def __init__(self, hidden_size, ffn_size, dropout_rate): super(FeedForwardNetwork, self).__init__() self.layer1 = nn.Linear(hidden_size, ffn_size) self.gelu = nn.GELU() self.layer2 = nn.Line...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Roestlab/massformer
EncoderLayer
false
17,877
[ "BSD-2-Clause" ]
6
c6324970c392f8ee96651679f49d21e430caa0c9
https://github.com/Roestlab/massformer/tree/c6324970c392f8ee96651679f49d21e430caa0c9
PositionwiseFeedForward
import torch import torch.utils.data import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel from typing import Optional class PositionwiseFeedForward(nn.Module): """Position-wise Feed Forward Network block from Attention is All You Need. Apply two linear transformations to each input,...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.utils.data impor...
YanLu-nyu/transferlearning
PositionwiseFeedForward
false
14,629
[ "MIT" ]
9,657
037806c6eb8b0c12aefbfbf3e35cbf893093cff9
https://github.com/YanLu-nyu/transferlearning/tree/037806c6eb8b0c12aefbfbf3e35cbf893093cff9
BiaffineAttention
# 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....
Dadmatech/DadmaTools
BiaffineAttention
false
7,991
[ "Apache-2.0" ]
25
c1b7add5c33544f69c1ba1c5250a5ea07caf9aa2
https://github.com/Dadmatech/DadmaTools/tree/c1b7add5c33544f69c1ba1c5250a5ea07caf9aa2
BiInteractionPooling
import torch import torch.nn as nn from sklearn.metrics import * class BiInteractionPooling(nn.Module): """Bi-Interaction Layer used in Neural FM,compress the pairwise element-wise product of features into one single vector. Input shape - A 3D tensor with shape:``(batch_size,field_size,embeddi...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from sklearn.metrics import * assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = tor...
Fanxingye/DeepRS
BiInteractionPooling
false
13,836
[ "Apache-2.0" ]
1,770
06b98cf2cb2781656805eafc577fbd088f37d17d
https://github.com/Fanxingye/DeepRS/tree/06b98cf2cb2781656805eafc577fbd088f37d17d
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...
Nightmare4214/FracNet
DiceLoss
false
2,690
[ "Apache-2.0" ]
0
db397adb50f71387155d9d110302a5968f86f756
https://github.com/Nightmare4214/FracNet/tree/db397adb50f71387155d9d110302a5968f86f756
GEGLU
import torch from torch import nn import torch.nn.functional as F class GEGLU(nn.Module): def forward(self, x): x, gates = x.chunk(2, dim=-1) return x * F.gelu(gates) 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 libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Gitsamshi/DALLE-pytorch
GEGLU
false
13,718
[ "MIT" ]
4,025
6cfc43158a4615865e97c839133290afcf289824
https://github.com/Gitsamshi/DALLE-pytorch/tree/6cfc43158a4615865e97c839133290afcf289824
FC_Block
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math import torch.nn as nn import torch.optim import torch.multiprocessin...
bouracha/Gen_Motion
FC_Block
false
9,929
[ "MIT" ]
0
873caa496d14c9a9723581cdf1464f44db4cf358
https://github.com/bouracha/Gen_Motion/tree/873caa496d14c9a9723581cdf1464f44db4cf358
Vgg16
# 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...
chaitrasj/GAN-based-Visible-Thermal-Person-ReID
Vgg16
false
10,145
[ "MIT" ]
0
8fd65ce3ab5403056fbe6e3574d1a7d02a315e62
https://github.com/chaitrasj/GAN-based-Visible-Thermal-Person-ReID/tree/8fd65ce3ab5403056fbe6e3574d1a7d02a315e62
Actor
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
dongminlee94/Samsung-DRL-Code
Actor
false
15,198
[ "MIT" ]
116
c96f8739a09cfd708c265954ee8ecf0ea3b67395
https://github.com/dongminlee94/Samsung-DRL-Code/tree/c96f8739a09cfd708c265954ee8ecf0ea3b67395
depthwise_conv
import torch import torch.nn as nn import torch.utils.data class depthwise_conv(nn.Module): def __init__(self, kernel_size=3, stride=1, padding=1): super(depthwise_conv, self).__init__() self.depthwise = nn.Conv2d(1, 1, kernel_size=kernel_size, stride= stride, padding=padding) de...
import torch from torch._inductor.select_algorithm import extern_kernels import 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._dyn...
Zacchaeus14/lang-seg
depthwise_conv
false
9,786
[ "MIT" ]
0
ad1196a4d33830f3219dbe2260a69364a745f094
https://github.com/Zacchaeus14/lang-seg/tree/ad1196a4d33830f3219dbe2260a69364a745f094
AddCoords
# 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...
hoseDUDEface/AdaptiveWingLoss
AddCoords
false
12,512
[ "Apache-2.0" ]
0
9185799d87567044f437147639c3999418529684
https://github.com/hoseDUDEface/AdaptiveWingLoss/tree/9185799d87567044f437147639c3999418529684
ActorCritic
import torch import torch.nn as nn import torch.nn.functional as F class ActorCritic(nn.Module): """ Actor Critic neural network with shared body. The Actor maps states (actions) to action, log_probs, entropy. The Critic maps states to values. """ def __init__(self, state_size, action_size, seed=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....
ImmanuelXIV/ppo-self-play
ActorCritic
false
17,445
[ "MIT" ]
7
21c000492b2450628b5a506d4101b7b12e5755e0
https://github.com/ImmanuelXIV/ppo-self-play/tree/21c000492b2450628b5a506d4101b7b12e5755e0
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...
PARMAGroup/UNet-Instance-Cell-Segmentation
DiceLoss
false
8,624
[ "MIT" ]
30
79655a2c5781d2e20c7d5760f631fbb0be392292
https://github.com/PARMAGroup/UNet-Instance-Cell-Segmentation/tree/79655a2c5781d2e20c7d5760f631fbb0be392292
Whitening2d
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_s...
TranNhiem/solo-learn
Whitening2d
false
1,151
[ "MIT" ]
0
7539732b68d153087d09a26a23e1edfdc49bc086
https://github.com/TranNhiem/solo-learn/tree/7539732b68d153087d09a26a23e1edfdc49bc086
SoftmaxLayer
import torch import torch.nn as nn class SoftmaxLayer(nn.Module): """ Naive softmax-layer """ def __init__(self, output_dim, n_class): """ :param output_dim: int :param n_class: int """ super(SoftmaxLayer, self).__init__() self.hidden2tag = nn.Linear(output_dim, n_class) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Sy-Zhang/ELMoForManyLangs
SoftmaxLayer
false
14,452
[ "MIT" ]
1,414
f82bf0fef80df617e39d34baa3e46d9857e94e65
https://github.com/Sy-Zhang/ELMoForManyLangs/tree/f82bf0fef80df617e39d34baa3e46d9857e94e65
vd_linear_1L
import math import torch import numpy as np import torch.nn as nn import torch.nn.functional as F import torch.utils.data def calculate_kl(log_alpha): return 0.5 * torch.sum(torch.log1p(torch.exp(-log_alpha))) class VdLinear(nn.Module): """ variational dropout """ def __init__(self, n_in, n_ou...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Neronjust2017/Bayesian-neural-networks
vd_linear_1L
false
17,778
[ "MIT" ]
4
9d7f781f5c2dfa8fadf26300b4b5b64366c939cd
https://github.com/Neronjust2017/Bayesian-neural-networks/tree/9d7f781f5c2dfa8fadf26300b4b5b64366c939cd
GAT
import torch import numpy as np import torch.nn as nn import torch.nn.functional as F class GraphAttentionLayer(nn.Module): """ Simple GAT layer, similar to https://arxiv.org/abs/1710.10903 """ def __init__(self, in_features, out_features, dropout, alpha, concat=True): super(GraphAttentionLay...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
EagleW/PaperRobot-Incremental-Draft-Generation-of-Scientific-Ideas
GAT
false
14,106
[ "MIT" ]
453
a338abf3974ba9ce916ae846835063a42b9e6689
https://github.com/EagleW/PaperRobot-Incremental-Draft-Generation-of-Scientific-Ideas/tree/a338abf3974ba9ce916ae846835063a42b9e6689
LightHead
# 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...
grok-phantom/pytorch_tempest
LightHead
false
3,702
[ "MIT" ]
0
37921b5824f9fcb853da3f54d929c4855672416e
https://github.com/grok-phantom/pytorch_tempest/tree/37921b5824f9fcb853da3f54d929c4855672416e