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
ActSquare
# 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...
High-East/BCI-ToolBox
ActSquare
false
17,374
[ "MIT" ]
10
57015ae5fd008e8636889b9afba49c64c3a35ff3
https://github.com/High-East/BCI-ToolBox/tree/57015ae5fd008e8636889b9afba49c64c3a35ff3
PcamPool
# 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...
DavidChenL/Chexpert
PcamPool
false
13,565
[ "Apache-2.0" ]
202
0300057d3a51301cff35a65f79729436678b4a79
https://github.com/DavidChenL/Chexpert/tree/0300057d3a51301cff35a65f79729436678b4a79
RingLoss
# 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 warnings import torch.nn as nn assert_size_stride = torch._C._dynamo.gua...
Danish-VSL/deep-person-reid
RingLoss
false
13,571
[ "MIT" ]
244
2e3a4b6706b84c77203f9905683b917ab0871b93
https://github.com/Danish-VSL/deep-person-reid/tree/2e3a4b6706b84c77203f9905683b917ab0871b93
ModelBasic
import torch import torch.nn as nn class ModelBasic(nn.Module): """parallel passing of data, categorical output with one unit per number of clusters""" def __init__(self, n_obs, n_units=100, n_timesteps=10, max_K=10): super(ModelBasic, self).__init__() self.fc_input = nn.Linear(2 * n_obs, n_u...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
HeikoSchuett/hard-inference
ModelBasic
false
9,086
[ "MIT" ]
0
eb850d97458dbbf8a5c434df71c802065c8e348f
https://github.com/HeikoSchuett/hard-inference/tree/eb850d97458dbbf8a5c434df71c802065c8e348f
BertAttention
from _paritybench_helpers import _mock_config import math import torch import torch.nn as nn class BertLayerNorm(nn.Module): def __init__(self, hidden_size, eps=1e-12): """Construct a layernorm module in the TF style (epsilon inside the square root). """ super(BertLayerNorm, self).__init_...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
RoshanTanisha/TVCaption
BertAttention
false
1,901
[ "MIT" ]
0
8b14a340134ec69ed87426ee1f0e93e53f6456e5
https://github.com/RoshanTanisha/TVCaption/tree/8b14a340134ec69ed87426ee1f0e93e53f6456e5
InverseDepthSmoothnessLoss
import torch import torch.nn as nn def _gradient_x(img: 'torch.Tensor') ->torch.Tensor: assert len(img.shape) == 4, img.shape return img[:, :, :, :-1] - img[:, :, :, 1:] def _gradient_y(img: 'torch.Tensor') ->torch.Tensor: assert len(img.shape) == 4, img.shape return img[:, :, :-1, :] - img[:, :, 1:...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
JoanFM/kornia
InverseDepthSmoothnessLoss
false
11,551
[ "ECL-2.0", "Apache-2.0" ]
0
808898887cde69074ca3e3df9b24dea9682aad90
https://github.com/JoanFM/kornia/tree/808898887cde69074ca3e3df9b24dea9682aad90
InvDepth
import torch import torch.nn as nn class InvDepth(nn.Module): def __init__(self, height, width, min_depth=0.5, max_depth=25.0): super(InvDepth, self).__init__() self._min_range = 1.0 / max_depth self._max_range = 1.0 / min_depth self.w = nn.Parameter(self._init_weights(height, wid...
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...
IEM-Computer-Vision/kornia
InvDepth
false
9,260
[ "ECL-2.0", "Apache-2.0" ]
0
f98bd9a2158a6e59cda076d55d476acf13f4e0af
https://github.com/IEM-Computer-Vision/kornia/tree/f98bd9a2158a6e59cda076d55d476acf13f4e0af
tri_att
# 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 ...
bysen32/WS-DAN.PyTorch
tri_att
false
9,876
[ "MIT" ]
0
de206591f037ea82fc52eaf6915de7f64375e0c9
https://github.com/bysen32/WS-DAN.PyTorch/tree/de206591f037ea82fc52eaf6915de7f64375e0c9
MyCustom
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
ElliotHYLee/MyPyTorchAPI
MyCustom
false
11,392
[ "MIT" ]
0
edb25b724372367e96e3bd2f420c023c4efbfcd7
https://github.com/ElliotHYLee/MyPyTorchAPI/tree/edb25b724372367e96e3bd2f420c023c4efbfcd7
ResBlock
import torch from torch import nn class ResBlock(nn.Module): def __init__(self, channels): super(ResBlock, self).__init__() self.conv1 = nn.Conv2d(channels, channels, kernel_size=5, stride=1, padding=2, bias=False) self.bn1 = nn.InstanceNorm2d(channels) self.relu = nn....
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Rming/DocTr
ResBlock
false
14,330
[ "MIT" ]
111
e61e3d34f65d1bd70997f2e2e583f640b8779a3c
https://github.com/Rming/DocTr/tree/e61e3d34f65d1bd70997f2e2e583f640b8779a3c
PositionwiseFeedForward
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
GMDennis/claf
PositionwiseFeedForward
false
8,151
[ "MIT" ]
10
d1e064e593127e5d654f000f5506c5ae1caab5ce
https://github.com/GMDennis/claf/tree/d1e064e593127e5d654f000f5506c5ae1caab5ce
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 from torch._inductor.runtime....
JinYAnGHe/openvino_training_extensions
ResBlock
false
2,717
[ "Apache-2.0" ]
0
a0b4456a3c9fe6c1b7eabc9d5eb4e74d01453dee
https://github.com/JinYAnGHe/openvino_training_extensions/tree/a0b4456a3c9fe6c1b7eabc9d5eb4e74d01453dee
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 from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Adelashl6/mask_transformers
LayerNorm
false
4,804
[ "MIT" ]
1
2a2e4d1b40ae3ed546cb850d041af246806b63e7
https://github.com/Adelashl6/mask_transformers/tree/2a2e4d1b40ae3ed546cb850d041af246806b63e7
Conv2D
import torch import torch.utils.data from torch import nn class Conv2D(nn.Module): def __init__(self, in_channels, out_channels, kernel_size=3, dilation_h =1, dilation_w=1, causal=True): super(Conv2D, self).__init__() self.causal = causal self.dilation_h, self.dilation_w = dilatio...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
leoauri/WaveFlow
Conv2D
false
10,375
[ "BSD-3-Clause" ]
0
a34843f06a8b70acf8d4a3ffa5c2e8d5a07a7d66
https://github.com/leoauri/WaveFlow/tree/a34843f06a8b70acf8d4a3ffa5c2e8d5a07a7d66
GLU
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data import torch.onnx.operators import torch.optim import torch.optim.lr_scheduler assert_size_str...
IIP-Sogang/Audio-Visual-Speech-Recognition
GLU
false
17,423
[ "MIT" ]
9
bd03be91135acbc6162b83092d462b7fe71dd007
https://github.com/IIP-Sogang/Audio-Visual-Speech-Recognition/tree/bd03be91135acbc6162b83092d462b7fe71dd007
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_...
RevanMacQueen/DRQN
QNetwork
false
9,410
[ "MIT" ]
0
7b8a743935679f65817ad4f41d28c2c155e7a62a
https://github.com/RevanMacQueen/DRQN/tree/7b8a743935679f65817ad4f41d28c2c155e7a62a
AbsLayer
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math from torch.nn import Module from torch.nn.modules import Module import to...
Mathieu4141/avalanche
AbsLayer
false
9,352
[ "MIT" ]
0
09c922459edcf90441abb6912a73e351dcbd8b49
https://github.com/Mathieu4141/avalanche/tree/09c922459edcf90441abb6912a73e351dcbd8b49
ModMSELoss
import torch class ModMSELoss(torch.nn.Module): def __init__(self, shape_r_gt, shape_c_gt): super(ModMSELoss, self).__init__() self.shape_r_gt = shape_r_gt self.shape_c_gt = shape_c_gt def forward(self, output, label, prior): prior_size = prior.shape output_max = 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 import triton_helpers assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
HeosSacer/saliency_web_mapper
ModMSELoss
false
11,485
[ "MIT" ]
0
a2fd744b821086dc1a0af0498361207f7bcddee6
https://github.com/HeosSacer/saliency_web_mapper/tree/a2fd744b821086dc1a0af0498361207f7bcddee6
CharbonnierLoss
import torch import torch.nn as nn from torch import autograd as autograd import torch.fft from itertools import product as product class CharbonnierLoss(nn.Module): """Charbonnier Loss (L1)""" def __init__(self, eps=1e-09): super(CharbonnierLoss, self).__init__() self.eps = eps def forw...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn from t...
hduba/KAIR
CharbonnierLoss
false
3,581
[ "MIT" ]
0
dbd7596c7e4a4667b9b7baac369fc6c02571fa58
https://github.com/hduba/KAIR/tree/dbd7596c7e4a4667b9b7baac369fc6c02571fa58
Reorg
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C....
AP-EPFL/DA-segmentation-driven-pose
Reorg
false
4,761
[ "MIT" ]
1
451b8ee3619b16db152ac37ba2b64f7ebf5e2832
https://github.com/AP-EPFL/DA-segmentation-driven-pose/tree/451b8ee3619b16db152ac37ba2b64f7ebf5e2832
SparsemaxBisect
from torch.autograd import Function import torch import torch.nn as nn def sparsemax_bisect(X, dim=-1, n_iter=50, ensure_sum_one=True): """sparsemax: normalizing sparse transform (a la softmax), via bisection. Solves the projection: min_p ||x - p||_2 s.t. p >= 0, sum(p) == 1. Parameters ...
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.autograd import Function import torch.nn as nn assert_size_stride = torch._C._...
antoniogois/entmax
SparsemaxBisect
false
14,957
[ "MIT" ]
298
7ff3fa6b09ee53e04514173aacae9de90c95ca75
https://github.com/antoniogois/entmax/tree/7ff3fa6b09ee53e04514173aacae9de90c95ca75
Memory
# 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....
ts170/T2I_CL
Memory
false
10,912
[ "MIT" ]
0
8754bea1101aabcbf8108b95e722f7aaeb385869
https://github.com/ts170/T2I_CL/tree/8754bea1101aabcbf8108b95e722f7aaeb385869
Norm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
nlakshmanan/Transformer
Norm
false
10,641
[ "Apache-2.0" ]
0
4562f8e9b282d0a70f26903a7b4410cb6132364b
https://github.com/nlakshmanan/Transformer/tree/4562f8e9b282d0a70f26903a7b4410cb6132364b
ScoreLayer
# 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.parallel import torch.optim import torch.ut...
Dcasadoherraez/siamese-tracking
ScoreLayer
false
2,130
[ "MIT" ]
0
ce3a2ee32fbe3e4a84a8352be22f929a8512dd25
https://github.com/Dcasadoherraez/siamese-tracking/tree/ce3a2ee32fbe3e4a84a8352be22f929a8512dd25
HardAttn
import torch import torch.nn as nn from torch.nn import functional as F from torchvision.transforms import * class HardAttn(nn.Module): """Hard Attention (Sec. 3.1.II)""" def __init__(self, in_channels): super(HardAttn, self).__init__() self.fc = nn.Linear(in_channels, 4 * 2) self.ini...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
DRACOyu/deep-person-reid
HardAttn
false
5,196
[ "MIT" ]
1
8ca8be28c204dbc37cff76e77691f29045773aa2
https://github.com/DRACOyu/deep-person-reid/tree/8ca8be28c204dbc37cff76e77691f29045773aa2
GramMatrix
import torch import torch.nn as nn class GramMatrix(nn.Module): def forward(self, input): n_batches, n_channels, height, width = input.size() flattened = input.view(n_batches, n_channels, height * width) return torch.bmm(flattened, flattened.transpose(1, 2)).div_(height * widt...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
andreweskeclarke/style-transfer
GramMatrix
false
1,462
[ "MIT" ]
0
e4b18f4cdb3f473bf946f12cc39447b2f6bb15ca
https://github.com/andreweskeclarke/style-transfer/tree/e4b18f4cdb3f473bf946f12cc39447b2f6bb15ca
CmapPafHeadAttention
# 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....
KeithStoke/POSE_Test
CmapPafHeadAttention
false
9,243
[ "MIT" ]
0
581aaf6f3d4fd50e56aa16c43913292af7d36879
https://github.com/KeithStoke/POSE_Test/tree/581aaf6f3d4fd50e56aa16c43913292af7d36879
OutConv
import torch import torch.nn as nn class OutConv(nn.Module): def __init__(self, in_channels, out_channels): super(OutConv, self).__init__() self.conv = nn.Conv2d(in_channels, out_channels, kernel_size=1) self.softmax = nn.Softmax(dim=1) def forward(self, x): tmp = self.conv(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 from torch._inductor.runtime....
Orelbenr/acoustic-fencing
OutConv
false
11,776
[ "MIT" ]
0
2d8c6121c915d2f12fae3c9d776e6339f028e35a
https://github.com/Orelbenr/acoustic-fencing/tree/2d8c6121c915d2f12fae3c9d776e6339f028e35a
DimReduction
import torch import torch.nn as nn class residual_block(nn.Module): def __init__(self, nChn=512): super(residual_block, self).__init__() self.block = nn.Sequential(nn.Linear(nChn, nChn, bias=False), nn. ReLU(inplace=True), nn.Linear(nChn, nChn, bias=False), nn.ReLU( inplac...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
hrzhang1123/DTFD-MIL
DimReduction
false
3,630
[ "MIT" ]
0
5cf22db83d0c031e69b17d5b668b546940d829bc
https://github.com/hrzhang1123/DTFD-MIL/tree/5cf22db83d0c031e69b17d5b668b546940d829bc
GaussianKLLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
kekayan/Info-HCVAE
GaussianKLLoss
false
15,802
[ "Apache-2.0" ]
120
1f4d536523767f439e689d8963c54a55fb75c6f9
https://github.com/kekayan/Info-HCVAE/tree/1f4d536523767f439e689d8963c54a55fb75c6f9
Conv1dLinear
import torch import torch.nn class Conv1dLinear(torch.nn.Module): """Conv1D + Linear for Transformer block. A variant of MultiLayeredConv1d, which replaces second conv-layer to linear. """ def __init__(self, in_chans, hidden_chans, kernel_size, dropout_rate): """Initialize Conv1dLinear modu...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 assert_size_s...
fancyliumeng/asv-subtools
Conv1dLinear
false
6,682
[ "Apache-2.0" ]
1
56a13484472e7ae6eb00d762c00d57e581e78eb4
https://github.com/fancyliumeng/asv-subtools/tree/56a13484472e7ae6eb00d762c00d57e581e78eb4
QGOODLoss
import math import torch import torch.nn as nn import torch.distributions import torch.utils.data class QGOODLoss(nn.Module): def __init__(self, quantile=0.8): super().__init__() self.quantile = quantile def forward(self, ub_log_conf): batch_size_out = ub_log_conf.shape[0] l ...
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.distributions import torch.utils.data assert...
AlexMeinke/Provable-OOD-Detection
QGOODLoss
false
7,713
[ "MIT" ]
21
9a132aec994ff718c96b81885736ab866df60d87
https://github.com/AlexMeinke/Provable-OOD-Detection/tree/9a132aec994ff718c96b81885736ab866df60d87
MLP
# 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...
KoichiYasuoka/SuPar
MLP
false
11,639
[ "MIT" ]
0
9bcf10fb946cae75b6a311d4cd19bec5bb1a9487
https://github.com/KoichiYasuoka/SuPar/tree/9bcf10fb946cae75b6a311d4cd19bec5bb1a9487
RelPositionMultiHeadedAttention
import math import numpy import torch import torch.nn as nn class RelPositionMultiHeadedAttention(nn.Module): """Multi-Head Attention layer with relative position encoding. This class is aquired from https://github.com/espnet/espnet/blob/master/espnet/nets/pytorch_backend/transformer/attention.py (Ap...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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
PSNR
import torch import torch as th import torch.utils.data class PSNR(th.nn.Module): def __init__(self): super(PSNR, self).__init__() self.mse = th.nn.MSELoss() def forward(self, out, ref): mse = self.mse(out, ref) return -10 * th.log10(mse + 1e-12) def get_inputs(): retur...
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 as th import to...
sutkarsh/ttools
PSNR
false
10,933
[ "MIT" ]
0
a2e5fbf308566c0c54ab9d6ad1d9f8bc63f8fe99
https://github.com/sutkarsh/ttools/tree/a2e5fbf308566c0c54ab9d6ad1d9f8bc63f8fe99
FactorizationMachine
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_...
JazonJiao/pytorch-fm
FactorizationMachine
false
13,880
[ "MIT" ]
734
7192e7861fa54341d5b2df995f92858f583ea09e
https://github.com/JazonJiao/pytorch-fm/tree/7192e7861fa54341d5b2df995f92858f583ea09e
multiloss
import torch import torch.nn as nn class multiloss(nn.Module): def __init__(self, objective_num): super(multiloss, self).__init__() self.objective_num = objective_num self.log_var = nn.Parameter(torch.zeros(self.objective_num)) def forward(self, losses): for i in range(len(lo...
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...
ShaharLutatiPersonal/hyperhypernetworks
multiloss
false
2,825
[ "MIT" ]
0
16e2595d89ad0533c9d5a2c62870fb90f1b1dc42
https://github.com/ShaharLutatiPersonal/hyperhypernetworks/tree/16e2595d89ad0533c9d5a2c62870fb90f1b1dc42
InstanceNormLayer
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
huaji0353/higan
InstanceNormLayer
false
12,511
[ "MIT" ]
0
a082dc2be8651725d38b8d48d7e1c7261740013d
https://github.com/huaji0353/higan/tree/a082dc2be8651725d38b8d48d7e1c7261740013d
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....
Zhendong-Wang/arsm_image_captioning
Attention
false
11,137
[ "MIT" ]
0
2282b76ab03b53952269d94d6c4b19ab98636ca5
https://github.com/Zhendong-Wang/arsm_image_captioning/tree/2282b76ab03b53952269d94d6c4b19ab98636ca5
Mix
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
ShenZheng2000/Syn2Real-Pytorch
Mix
false
5,815
[ "MIT" ]
1
214c800914e2bcd57d4ca74a4c8476a11e1b5905
https://github.com/ShenZheng2000/Syn2Real-Pytorch/tree/214c800914e2bcd57d4ca74a4c8476a11e1b5905
Normalizer
# 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 from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
YangXuanyue/Neural-Unaligned-Phoneme-Sequence-Prediction
Normalizer
false
18,139
[ "BSD-3-Clause" ]
5
91ef1c95478367f5b421da125f07660cfc9bed98
https://github.com/YangXuanyue/Neural-Unaligned-Phoneme-Sequence-Prediction/tree/91ef1c95478367f5b421da125f07660cfc9bed98
PermEqMean
# 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...
AustenLamacraft/QuaRL
PermEqMean
false
7,740
[ "MIT" ]
13
1764f0ccd0ba90d44e799b6ac908df76be14a52e
https://github.com/AustenLamacraft/QuaRL/tree/1764f0ccd0ba90d44e799b6ac908df76be14a52e
MLP
# 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_...
NefeliTav/Stock-Prediction
MLP
false
2,673
[ "Apache-2.0" ]
0
b422a246c762685ceb94c9714a2322fce71186e1
https://github.com/NefeliTav/Stock-Prediction/tree/b422a246c762685ceb94c9714a2322fce71186e1
RPN_Up
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.functional as F assert_size_stride = torch...
Re3write/siamdw
RPN_Up
false
11,912
[ "MIT" ]
0
f5d7d4bda36cb8c14e93b460fbc77bb225aa8572
https://github.com/Re3write/siamdw/tree/f5d7d4bda36cb8c14e93b460fbc77bb225aa8572
GRUCell
# 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 ...
DeepLearnXMU/IRSEG
GRUCell
false
8,033
[ "Apache-2.0" ]
14
6027c9601dbcb626d4adaf429c4bed07febb1034
https://github.com/DeepLearnXMU/IRSEG/tree/6027c9601dbcb626d4adaf429c4bed07febb1034
MultiHeadSelfAttention
import torch import numpy as np import torch.nn.functional as F import torch.nn as nn import torch.distributed import torch.distributions def compute_attention(q, k, v, dropout=None, mask=None): """ :param q: Query [B, NH, NQ, EL] or [NH, 1, EL] (in this case NQ=1) :param k: Key [B, NH, NK, EL] :param...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Zed-Wu/ManiSkill-Learn
MultiHeadSelfAttention
false
3,106
[ "Apache-2.0" ]
0
8056fe327752cd0863f8730672fe62bd85a0ec12
https://github.com/Zed-Wu/ManiSkill-Learn/tree/8056fe327752cd0863f8730672fe62bd85a0ec12
MaxPool
# 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...
Hiroaki-Ozaki/modelib-classification
MaxPool
false
17,382
[ "WTFPL" ]
10
11077704cc0bc9a42fc4b94da60b57d31ff0f65c
https://github.com/Hiroaki-Ozaki/modelib-classification/tree/11077704cc0bc9a42fc4b94da60b57d31ff0f65c
Conv2dSame
# 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 from typing import List from typing import Union from torch import n...
LoveEachDay/towhee
Conv2dSame
false
11,653
[ "Apache-2.0" ]
0
513c9c2626676cadaaf0a16ac3c828d96bec91a1
https://github.com/LoveEachDay/towhee/tree/513c9c2626676cadaaf0a16ac3c828d96bec91a1
Reconstruction_Layer
# 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...
arjunsbalaji/oct
Reconstruction_Layer
false
1,478
[ "Apache-2.0" ]
0
f21e11f6dda952cd914444512ddadb4141757951
https://github.com/arjunsbalaji/oct/tree/f21e11f6dda952cd914444512ddadb4141757951
FocalLoss
import torch import torch.nn as nn class FocalLoss(nn.Module): def __init__(self, gamma=2, eps=1e-07): super(FocalLoss, self).__init__() self.gamma = gamma self.eps = eps self.ce = nn.CrossEntropyLoss() def forward(self, input, target): logp = self.ce(input, target) ...
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 ...
T-Visor/face.evoLVe
FocalLoss
false
9,636
[ "MIT" ]
0
73f41a63eec2d95928d4a5401977d4a913d97eba
https://github.com/T-Visor/face.evoLVe/tree/73f41a63eec2d95928d4a5401977d4a913d97eba
GroupNorm32
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
dbanys/glide-text2im
GroupNorm32
false
3,396
[ "MIT" ]
0
5177545ec62f1fddc3075a8a69b63df3eb2256a5
https://github.com/dbanys/glide-text2im/tree/5177545ec62f1fddc3075a8a69b63df3eb2256a5
ConvLSTMCell
# 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 ...
BenQLange/AttentionAugmentedConvLSTM
ConvLSTMCell
false
7,766
[ "MIT" ]
30
d8419b7a628b02ac49e8450deb3d60450c7b2d6b
https://github.com/BenQLange/AttentionAugmentedConvLSTM/tree/d8419b7a628b02ac49e8450deb3d60450c7b2d6b
Mul
# 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 as ch assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strid...
Hadisalman/ffcv
Mul
false
13,750
[ "Apache-2.0" ]
1,969
64bd2b9e9c9fc3779ba13ef958ae479ecfac9c7f
https://github.com/Hadisalman/ffcv/tree/64bd2b9e9c9fc3779ba13ef958ae479ecfac9c7f
Hswish
import torch import torch.nn as nn from torch.quantization import QuantStub from torch.quantization import DeQuantStub class Hswish(nn.Module): def __init__(self, add_stub=False): super().__init__() self.quant = QuantStub() self.dequant = DeQuantStub() self.add_stub = add_stub ...
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 from torch.quantization import QuantStub from torch.quantization im...
T-head-Semi/tvm
Hswish
false
17,961
[ "Apache-2.0" ]
4
c1b8e06685c92fb7cacbe989e147b0622aee4503
https://github.com/T-head-Semi/tvm/tree/c1b8e06685c92fb7cacbe989e147b0622aee4503
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 import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice from torch import nn import ...
LiFH/MySR
Upsample
false
780
[ "MIT" ]
0
f6075f8711853aba6f0aae9cef18c5da84abb78c
https://github.com/LiFH/MySR/tree/f6075f8711853aba6f0aae9cef18c5da84abb78c
GeneralizedDiceLoss
# 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 collections from typi...
danielschulz/MONAI
GeneralizedDiceLoss
false
1,811
[ "Apache-2.0" ]
0
54ef6e9e700f0de3d50184c0148f953be871a58e
https://github.com/danielschulz/MONAI/tree/54ef6e9e700f0de3d50184c0148f953be871a58e
LandmarksLoss
# 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 numpy as np import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strid...
homomorfism/wise-programming
LandmarksLoss
false
6,812
[ "MIT" ]
1
e0589e8900237ddc9c3abf54c85be532cacf2d33
https://github.com/homomorfism/wise-programming/tree/e0589e8900237ddc9c3abf54c85be532cacf2d33
UpsamplingLinear1d
import torch import torch.nn.functional as F import torch.nn as nn class UpsamplingLinear1d(nn.Module): def __init__(self, scale_factor=2.0): super().__init__() self.scale_factor = scale_factor def forward(self, x): return F.interpolate(x, scale_factor=self.scale_factor, mode= ...
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...
tailintalent/ar-pde-cnn
UpsamplingLinear1d
false
16,518
[ "MIT" ]
51
88c130d7296af4ef7c13ec28a287fec4af3639f7
https://github.com/tailintalent/ar-pde-cnn/tree/88c130d7296af4ef7c13ec28a287fec4af3639f7
BCEDiceLossWithLogits
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
JoOkuma/torch-em
BCEDiceLossWithLogits
false
667
[ "MIT" ]
0
68b723683f9013723a0e4fc8cfef1d6a2a9c9dff
https://github.com/JoOkuma/torch-em/tree/68b723683f9013723a0e4fc8cfef1d6a2a9c9dff
SingleHead
# 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 ...
WFDetector/WFDetection
SingleHead
false
2,954
[ "Apache-2.0" ]
0
b16d35b3a3a5de62de9e0bac83eccd21b6358b53
https://github.com/WFDetector/WFDetection/tree/b16d35b3a3a5de62de9e0bac83eccd21b6358b53
ScaledDotProductAttention
import torch import numpy as np import torch.nn as nn class ScaledDotProductAttention(nn.Module): """ Scaled Dot-Product Attention """ def __init__(self, temperature, attn_dropout=0.1): super(ScaledDotProductAttention, self).__init__() self.temperature = temperature self.dropout = nn....
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
dani3l125/TDNet
ScaledDotProductAttention
false
15,104
[ "MIT" ]
195
3f8b5378fcc7f97c26b3760ddaf3d4402cf477d1
https://github.com/dani3l125/TDNet/tree/3f8b5378fcc7f97c26b3760ddaf3d4402cf477d1
ffnn
import torch import torch.nn as nn import torch.utils.data.dataloader import torch.nn def get_shape(t): return list(t.shape) class ffnn(nn.Module): def __init__(self, emb_size, num_layers, hidden_size, output_size, dropout, output_weights_initializer=None): super(ffnn, self).__init__() ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data.dataloader import torch.nn assert_...
db-bionlp/CLNER
ffnn
false
15,152
[ "MIT" ]
46
77910311acf0411252b9fea8c3e6efb7175eb21f
https://github.com/db-bionlp/CLNER/tree/77910311acf0411252b9fea8c3e6efb7175eb21f
DiceLoss
import torch import torch.nn as nn class DiceLoss(nn.Module): def __init__(self, smooth=1e-06): super(DiceLoss, self).__init__() self.smooth = smooth def forward(self, y_pred, y_true): assert y_pred.size() == y_true.size() y_pred = y_pred.contiguous().view(y_pred.shape[0], -1...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
fadamsyah/pytorch-brain-mri-segmentation
DiceLoss
false
6,674
[ "MIT" ]
1
bdb310ecacbddfce2cef20d50cf0b638dd1bc7b1
https://github.com/fadamsyah/pytorch-brain-mri-segmentation/tree/bdb310ecacbddfce2cef20d50cf0b638dd1bc7b1
GroupNorm2d
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
AnirudhMaiya/pytorch-Group-Normalization
GroupNorm2d
false
8,828
[ "MIT" ]
0
9792e7beafc91387540df2191669c1ba540ee2de
https://github.com/AnirudhMaiya/pytorch-Group-Normalization/tree/9792e7beafc91387540df2191669c1ba540ee2de
SA_block_def
# 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....
reinforcementdriving/SA-Det3D
SA_block_def
false
16,326
[ "MIT" ]
134
682cbf5a3023bd580632435d1e4e0acb0ae08ab8
https://github.com/reinforcementdriving/SA-Det3D/tree/682cbf5a3023bd580632435d1e4e0acb0ae08ab8
Envelope
import torch import torch.utils.data class Envelope(torch.nn.Module): def __init__(self, exponent): super(Envelope, self).__init__() self.p = exponent self.a = -(self.p + 1) * (self.p + 2) / 2 self.b = self.p * (self.p + 2) self.c = -self.p * (self.p + 1) / 2 def forw...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_...
shnhrtkyk/pytorch_geometric
Envelope
false
10,807
[ "MIT" ]
0
b971fd2ebba10736e6398d6305757be2d81ca681
https://github.com/shnhrtkyk/pytorch_geometric/tree/b971fd2ebba10736e6398d6305757be2d81ca681
UpsampleConv
# 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...
henryaddison/score_sde_pytorch
UpsampleConv
false
12,499
[ "Apache-2.0" ]
0
be07c3a3346bf8ceadabf6a3b436db5d5c3d0252
https://github.com/henryaddison/score_sde_pytorch/tree/be07c3a3346bf8ceadabf6a3b436db5d5c3d0252
SimpleMinModule
# 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....
briancoutinho/glow
SimpleMinModule
false
12,582
[ "Apache-2.0" ]
0
4c919d60b3c33296c4109aec8020a1733c98f5b5
https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5
ConveRTOuterFeedForward
# 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 ...
luweishuang/ConveRT-pytorch
ConveRTOuterFeedForward
false
10,569
[ "Apache-2.0" ]
0
e14aaf2287eb3a78ee7d83ea02d9bd322863227f
https://github.com/luweishuang/ConveRT-pytorch/tree/e14aaf2287eb3a78ee7d83ea02d9bd322863227f
QNetwork
import torch import torch.nn as nn import torch.nn.functional as F class QNetwork(nn.Module): def __init__(self, num_inputs, num_actions, hidden_size, init_w=0.003): super(QNetwork, self).__init__() self.linear1 = nn.Linear(num_inputs + num_actions, hidden_size) self.linear2 = nn.Linear(h...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
chagri/SOTA-RL-Algorithms
QNetwork
false
1,709
[ "Apache-2.0" ]
0
58b416e7c706d8426dc402482e72ca7283568e71
https://github.com/chagri/SOTA-RL-Algorithms/tree/58b416e7c706d8426dc402482e72ca7283568e71
FastGuidedFilter
# 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 torchvision.transforms i...
LightTwist/RobustVideoMatting
FastGuidedFilter
false
8,495
[ "Apache-2.0" ]
11
79eb143fef3a4c58b4857c1a5a927a318f528093
https://github.com/LightTwist/RobustVideoMatting/tree/79eb143fef3a4c58b4857c1a5a927a318f528093
PoolingF
# 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.utils.data impo...
bronemos/contrastive-unpaired-translation-focal
PoolingF
false
3,242
[ "BSD-3-Clause" ]
0
50b9008d08a86439ede081a910d02df5da8e32df
https://github.com/bronemos/contrastive-unpaired-translation-focal/tree/50b9008d08a86439ede081a910d02df5da8e32df
MaxMinGroup
import torch import torch.nn as nn def process_maxmin_groupsize(x, group_size, axis=-1): size = list(x.size()) num_channels = size[axis] if num_channels % group_size: raise ValueError( 'number of features({}) is not a multiple of group_size({})'. format(num_channels, num_ch...
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...
Schwartz-Zha/My-invertible-resnet
MaxMinGroup
false
1,028
[ "MIT" ]
0
5415975bb0d640f3bf3ef4a7b986563e84109270
https://github.com/Schwartz-Zha/My-invertible-resnet/tree/5415975bb0d640f3bf3ef4a7b986563e84109270
fixed_loss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
delldu/ImageClean
fixed_loss
false
1,824
[ "MIT" ]
0
ffa5b180d36afb3840c6b36c08a767c520068498
https://github.com/delldu/ImageClean/tree/ffa5b180d36afb3840c6b36c08a767c520068498
N_R_Align
# 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 as nn assert...
weihangzhang/EAkit
N_R_Align
false
16,701
[ "MIT" ]
102
dde8e914480cd1a3585271f70db11d567d9c2a04
https://github.com/weihangzhang/EAkit/tree/dde8e914480cd1a3585271f70db11d567d9c2a04
CharbonnierLoss
import torch import torch.utils.data import torch.nn as nn class CharbonnierLoss(nn.Module): """Charbonnier Loss (L1)""" def __init__(self, eps=1e-06): super(CharbonnierLoss, self).__init__() self.eps = eps def forward(self, x, y): diff = x - y loss = torch.sum(torch.sqrt...
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.utils.data impo...
GuoShi28/GCP-Net
CharbonnierLoss
false
8,162
[ "Apache-2.0" ]
24
cef7513fa242343055af64e612429e4384d3c1d7
https://github.com/GuoShi28/GCP-Net/tree/cef7513fa242343055af64e612429e4384d3c1d7
SimpleAddMmModule
# 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.jit import torch.onnx import torch.nn assert_size_stride = torch._C...
YaronBenAtar/glow
SimpleAddMmModule
false
14,651
[ "Apache-2.0" ]
2,838
a13706a4239fa7eaf059c670dc573e3eb0768f86
https://github.com/YaronBenAtar/glow/tree/a13706a4239fa7eaf059c670dc573e3eb0768f86
MinElementwise
import torch class MinElementwise(torch.nn.Module): def forward(self, x, y): return torch.min(x, y) def get_inputs(): return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
Ilyabasharov/torch2trt
MinElementwise
false
2,538
[ "MIT" ]
0
76bf298b3da408509665e23e2494922b131afb10
https://github.com/Ilyabasharov/torch2trt/tree/76bf298b3da408509665e23e2494922b131afb10
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 from torch._inductor.runtime....
krodyush/training_extensions
ResBlock
false
10,987
[ "Apache-2.0" ]
0
542f4004dfbc6fc62a622065367ba4f85a703dd3
https://github.com/krodyush/training_extensions/tree/542f4004dfbc6fc62a622065367ba4f85a703dd3
Sine
import torch import torch.nn as nn class Sine(nn.Module): def __init__(self, w0: 'float'=30.0): super(Sine, self).__init__() self.w0 = w0 def forward(self, x: 'torch.Tensor') ->torch.Tensor: return torch.sin(self.w0 * x) 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.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
Irlirion/ocp
Sine
false
13,840
[ "MIT", "BSD-3-Clause" ]
242
6fb3e794eef31559db990300198eca20f41d8f37
https://github.com/Irlirion/ocp/tree/6fb3e794eef31559db990300198eca20f41d8f37
Self_Attn
import torch import torch.nn as nn import torch.nn.parallel class Self_Attn(nn.Module): """ Self attention Layer""" def __init__(self, in_dim, activation): super(Self_Attn, self).__init__() self.chanel_in = in_dim self.activation = activation self.query_conv = nn.Conv2d(in_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._inductor.runtime....
qiyuqianxai/debvc
Self_Attn
false
10,780
[ "MIT" ]
0
1d919019a3191d1c6a7da9b8f16e47bca6b3aef9
https://github.com/qiyuqianxai/debvc/tree/1d919019a3191d1c6a7da9b8f16e47bca6b3aef9
Norm
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data from torch.optim.lr_scheduler import * import torch.optim.lr_scheduler import torch.onnx import torch.testing class Norm(nn.Module): """ A module wrapper for vector/matrix norm """ def __init__(self...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import...
Emily0219/distiller
Norm
false
5,137
[ "Apache-2.0" ]
1
445ed35b671fb54586acc280b53d951f18bf97ae
https://github.com/Emily0219/distiller/tree/445ed35b671fb54586acc280b53d951f18bf97ae
TripletLoss
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed import torch.nn.functional as F class TripletLoss(nn.Module): """ Triplet loss Takes embeddings of an anchor sample, a positive sample and a negative sample """ ...
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...
lxy5513/cvToolkit
TripletLoss
false
15,965
[ "MIT" ]
47
51586c8016b47f5e7852032f9f3211c89d80f537
https://github.com/lxy5513/cvToolkit/tree/51586c8016b47f5e7852032f9f3211c89d80f537
SobLoss
import torch class SobLoss(torch.nn.Module): """ Sobolev norm penalty on function (sum |x_{i} - x{i+1}|^p)^{1/p} parameters: p - dimension of norm """ def __init__(self, p): super(SobLoss, self).__init__() self.p = p def forward(self, beta): hdiff = beta[...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_c...
phernst/TopologyLayer
SobLoss
false
12,880
[ "MIT" ]
0
aad72704114235156a244ddaa14dc805530e3fc7
https://github.com/phernst/TopologyLayer/tree/aad72704114235156a244ddaa14dc805530e3fc7
TimeDecayMSELoss
import torch from torch import Tensor from torch import nn class TimeDecayMSELoss(nn.Module): def __init__(self, decay_factor=0.99): super().__init__() self.decay_factor = decay_factor def forward(self, input: 'Tensor', target: 'Tensor') ->Tensor: size = [input.size(0), -1] i...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
Zinoex/hyperverlet
TimeDecayMSELoss
false
18,178
[ "MIT" ]
7
431ef92fa2448ce69c357f01c0862353067bfa8a
https://github.com/Zinoex/hyperverlet/tree/431ef92fa2448ce69c357f01c0862353067bfa8a
distLinear
import torch import torch.nn as nn import torch.optim import torch.utils.data.sampler from torch.nn.utils.weight_norm import WeightNorm class distLinear(nn.Module): def __init__(self, indim, outdim): super(distLinear, self).__init__() self.L = nn.Linear(indim, outdim, bias=False) self.cla...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
artificially-ai/FewShotVision
distLinear
false
14,902
[ "MIT" ]
90
02c1132828bc9caba4cadd0b2f731bd63f66b826
https://github.com/artificially-ai/FewShotVision/tree/02c1132828bc9caba4cadd0b2f731bd63f66b826
up
# 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...
aribryan/pytorch_task
up
false
9,766
[ "MIT" ]
0
c661f201bbf03cfd06a13deb4c1c0c61d017adb1
https://github.com/aribryan/pytorch_task/tree/c661f201bbf03cfd06a13deb4c1c0c61d017adb1
ValueNetwork
import torch import torch.nn.functional as F import torch.nn as nn def mish(x): """ Mish: A Self Regularized Non-Monotonic Neural Activation Function https://arxiv.org/abs/1908.08681v1 implemented for PyTorch / FastAI by lessw2020 https://github.com/lessw2020/mish param: ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Crawford-fang/ROS_pytorch_RL
ValueNetwork
false
17,160
[ "Apache-2.0" ]
10
2d3476f15d51aa1f5b5ae9edc5d7f4c776e5de9f
https://github.com/Crawford-fang/ROS_pytorch_RL/tree/2d3476f15d51aa1f5b5ae9edc5d7f4c776e5de9f
AverageAttention
import math import torch import torch.nn as nn import torch.cuda import torch.distributed def get_activation_fn(activation): """Return an activation function Module according to its name.""" if activation == 'gelu': fn = GELU() elif activation == 'relu': fn = nn.ReLU() elif activation ...
import torch from torch._inductor.select_algorithm import extern_kernels import 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.cuda import torch.distributed ass...
SivilTaram/dialogue-utterance-rewriter-pytorch
AverageAttention
false
2,922
[ "MIT" ]
0
92c2254958b7a1ee9199836f7f2236575270983f
https://github.com/SivilTaram/dialogue-utterance-rewriter-pytorch/tree/92c2254958b7a1ee9199836f7f2236575270983f
GlobalMaxPool1d
import torch from torch import nn class GlobalMaxPool1d(nn.Module): """Performs global max pooling over the entire length of a batched 1D tensor # Arguments input: Input tensor """ def forward(self, input): return nn.functional.max_pool1d(input, kernel_size=input.size()[2:] ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
drjosephliu/few-shot-learning
GlobalMaxPool1d
false
6,609
[ "MIT" ]
1
707c7ce2a0b1813327fb4e39660415b9437b8ec1
https://github.com/drjosephliu/few-shot-learning/tree/707c7ce2a0b1813327fb4e39660415b9437b8ec1
mfm
import torch import torch.nn as nn class mfm(nn.Module): def __init__(self, in_channels, out_channels, kernel_size=3, stride=1, padding=1, type=1): super(mfm, self).__init__() self.out_channels = out_channels if type == 1: self.filter = nn.Conv2d(in_channels, 2 * out_c...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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
Critic
import torch import numpy as np import torch.nn.functional as F import torch.nn as nn def hidden_init(layer): fan_in = layer.weight.data.size()[0] lim = 1.0 / np.sqrt(fan_in) return -lim, lim class Critic(nn.Module): """Critic (Value) Model.""" def __init__(self, state_size, action_size, seed, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import numpy as np import torch.nn as nn assert_size_stride = torch._C._dynamo.g...
ahgit2021/deep-reinforcement-learning
Critic
false
3,046
[ "MIT" ]
0
081464ba45f803663e841e1635d829aa00cce870
https://github.com/ahgit2021/deep-reinforcement-learning/tree/081464ba45f803663e841e1635d829aa00cce870
NormalizeLinear
import torch from torch.nn import functional as F from torch import nn import torch.utils.data import torch.utils.data.distributed class NormalizeLinear(nn.Module): def __init__(self, act_dim, k_value): super().__init__() self.lin = nn.Linear(act_dim, k_value) def normalize(self): 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....
coupriec/enc_dec
NormalizeLinear
false
1,735
[ "MIT" ]
0
5e31a1cd384f24ac48e932b623780bd0c70103d9
https://github.com/coupriec/enc_dec/tree/5e31a1cd384f24ac48e932b623780bd0c70103d9
WordPredictor
import torch import torch.nn.functional as F import torch.nn as nn import torch.onnx.operators class WordPredictor(nn.Module): def __init__(self, encoder_output_dim, hidden_dim, output_dim): super().__init__() self.encoder_output_dim = encoder_output_dim self.hidden_dim = hidden_dim ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
gardenia22/translate
WordPredictor
false
6,745
[ "BSD-3-Clause" ]
1
0be57c8f55b52fc9d39197efa02e05d1c1cda024
https://github.com/gardenia22/translate/tree/0be57c8f55b52fc9d39197efa02e05d1c1cda024
Entmax15
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice from torch.autograd import F...
roholazandie/entmax
Entmax15
false
7,574
[ "MIT" ]
1
657374e6a792ec6840b6f78bc759cc1f51570aad
https://github.com/roholazandie/entmax/tree/657374e6a792ec6840b6f78bc759cc1f51570aad
Conv2dBlock
import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data def l2normalize(v, eps=1e-12): return v / (v.norm() + eps) class AdaptiveInstanceNorm2d(nn.Module): def __init__(self, num_features, eps=1e-05, momentum=0.1): super(AdaptiveInstanceNorm2d, self).__init__() ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
AllenPu/mbdg
Conv2dBlock
false
7,687
[ "MIT" ]
27
243f53a57dcf4bfb6e717c0c9f64a839cff8d548
https://github.com/AllenPu/mbdg/tree/243f53a57dcf4bfb6e717c0c9f64a839cff8d548
Symmetric
# 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.quantization import torch.onnx import torch.nn.parallel import torch.utils.data import torch.fx import to...
Ismail-Mustapha/tutorials
Symmetric
false
13,849
[ "BSD-3-Clause" ]
6,424
0ccfbf0047db855e93e2aadb43c89c92e89f52b8
https://github.com/Ismail-Mustapha/tutorials/tree/0ccfbf0047db855e93e2aadb43c89c92e89f52b8
NsKlCriterion
# 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...
chunhuililili/mt_dnn
NsKlCriterion
false
10,206
[ "MIT" ]
0
4c6efaf21724c7b8103a05e46b5b44d7b246225e
https://github.com/chunhuililili/mt_dnn/tree/4c6efaf21724c7b8103a05e46b5b44d7b246225e
CRF
# 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...
dradientgescent/NCRF
CRF
false
1,879
[ "Apache-2.0" ]
0
21e95c0e0f965de2b1daa2d446306052b3703b6a
https://github.com/dradientgescent/NCRF/tree/21e95c0e0f965de2b1daa2d446306052b3703b6a
StdConv
import torch from torch import nn class StdConv(nn.Conv2d): def forward(self, x): return self._conv_forward(x, self.standarize(self.weight), self.bias) def standarize(self, x): return (x - x.mean(dim=(1, 2, 3), keepdim=True)) / (x.std(dim=(1, 2, 3), keepdim=True) + 1e-06) def g...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
hankyul2/ImageClassification
StdConv
false
6,783
[ "Apache-2.0" ]
1
c4df6bf3dc1ee804f9885d586aa581ebb4d7ca05
https://github.com/hankyul2/ImageClassification/tree/c4df6bf3dc1ee804f9885d586aa581ebb4d7ca05