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
EqualLinear
import math import torch import torch.nn as nn from torch.nn import functional as F class EqualLinear(nn.Module): """Equalized Linear as StyleGAN2. Args: in_channels (int): Size of each sample. out_channels (int): Size of each output sample. bias (bool): If set to ``False``, the layer...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.a...
naarkhoo/GFPGAN
EqualLinear
false
10,565
[ "BSD-3-Clause" ]
0
73559ec44a734fe084b6a0e28107295c5e98f335
https://github.com/naarkhoo/GFPGAN/tree/73559ec44a734fe084b6a0e28107295c5e98f335
ContrastiveLoss
import torch import torch.nn.functional as F class ContrastiveLoss(torch.nn.Module): """Contrastive loss function""" def __init__(self, margin=1.0): super(ContrastiveLoss, self).__init__() self.margin = margin def forward(self, output1, output2, label): euclidean_distance = F.pai...
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 assert_size_stride = torch._...
hz512/Smart-Parking-Enforcement-System
ContrastiveLoss
false
10,175
[ "MIT" ]
0
e990903de545693ad6e2536bf167c69ab672d16a
https://github.com/hz512/Smart-Parking-Enforcement-System/tree/e990903de545693ad6e2536bf167c69ab672d16a
Upsample2d
import functools import torch import typing import torch.optim class Upsample2d(torch.nn.Module): def __init__(self, resolution: 'typing.Sequence[int]'=None, scale: 'float'=2.0, mode: 'str'='bilinear'): super(Upsample2d, self).__init__() if resolution: self.upsample = functool...
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 functools import typing import torch.optim assert_size_stride = torch._C._dynamo.g...
ai-in-motion/moai
Upsample2d
false
18,330
[ "Apache-2.0" ]
10
e38cac046c059d2e2331ef4883bbabc5a500a5cf
https://github.com/ai-in-motion/moai/tree/e38cac046c059d2e2331ef4883bbabc5a500a5cf
Repeat_Explore_Mechanism
# 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....
Ahren09/RecBole
Repeat_Explore_Mechanism
false
1,932
[ "MIT" ]
0
b3921818dfbc1b81f9eda8d5e9f05bc9d9114089
https://github.com/Ahren09/RecBole/tree/b3921818dfbc1b81f9eda8d5e9f05bc9d9114089
GatedConv2d
import torch import torch.nn as nn import torch.utils.data class GatedConv2d(nn.Module): def __init__(self, input_channels, output_channels, kernel_size, stride, padding, dilation=1, activation=None): super(GatedConv2d, self).__init__() self.activation = activation self.sigmoid = ...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
AWehenkel/UMNN
GatedConv2d
false
13,259
[ "BSD-3-Clause" ]
69
f93cb36040783dd60e14e0eda927899d3919825c
https://github.com/AWehenkel/UMNN/tree/f93cb36040783dd60e14e0eda927899d3919825c
ReinforcedReceiver
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel import torch.utils.data from torch.distributions import Bernoulli import torch.distributions class ReinforcedReceiver(nn.Module): def __init__(self, n_bits, n_hidden): super(ReinforcedReceiver, self).__init__() ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.parallel import torch.utils.data import to...
XeniaOhmer/SystematicRepresentations
ReinforcedReceiver
false
1,241
[ "MIT" ]
0
825208d1be659dc820e61f577cdb53afc47302f4
https://github.com/XeniaOhmer/SystematicRepresentations/tree/825208d1be659dc820e61f577cdb53afc47302f4
LogLoss
import torch from torch.nn import MSELoss class LogLoss(MSELoss): def __init__(self): super(LogLoss, self).__init__() self.loss = torch.nn.MSELoss() self.loss2 = torch.nn.MSELoss() def forward(self, input, target): tgt = torch.atan(target) inp = torch.atan(input) ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice from torch.nn import MSELoss...
slaveuser/testRepo20181123
LogLoss
false
4,355
[ "MIT" ]
0
0651de19b3b7d02f8c9094b8b24346ccc2e30480
https://github.com/slaveuser/testRepo20181123/tree/0651de19b3b7d02f8c9094b8b24346ccc2e30480
ResidualBlock
# 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....
rileypsmith/Fast-Style-Transfer
ResidualBlock
false
4,196
[ "MIT" ]
0
8b2164f8bc6d63530f914610b6c5c5c1b0f4ffd5
https://github.com/rileypsmith/Fast-Style-Transfer/tree/8b2164f8bc6d63530f914610b6c5c5c1b0f4ffd5
ResidualConvUnit
# 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_...
anlok/depthmap-loktev
ResidualConvUnit
false
1,475
[ "MIT" ]
0
c5af9156985524063c5e49c52bc28aab3290da71
https://github.com/anlok/depthmap-loktev/tree/c5af9156985524063c5e49c52bc28aab3290da71
AdaptiveInstanceNormalization
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import torch.fft assert_size_stride = torch._C._dynamo.gu...
NejcHirci/material-addon
AdaptiveInstanceNormalization
false
17,771
[ "MIT" ]
4
c08e2081413c3319b712c2f7193ac8013f601382
https://github.com/NejcHirci/material-addon/tree/c08e2081413c3319b712c2f7193ac8013f601382
SmallDecoder2_16x
import torch import torch.nn as nn class SmallDecoder2_16x(nn.Module): def __init__(self, model=None, fixed=False): super(SmallDecoder2_16x, self).__init__() self.fixed = fixed self.conv21 = nn.Conv2d(32, 16, 3, 1, 0) self.conv12 = nn.Conv2d(16, 16, 3, 1, 0, dilation=1) 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....
EndyWon/Texture-Reformer
SmallDecoder2_16x
false
8,145
[ "MIT" ]
11
f84f95accb3574c7b759a7f03c0b0b4e150314b5
https://github.com/EndyWon/Texture-Reformer/tree/f84f95accb3574c7b759a7f03c0b0b4e150314b5
NormImageUint8ToFloat
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch.nn import Module assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._em...
CeadeS/PyTorchH5Dataset
NormImageUint8ToFloat
false
2,079
[ "BSD-3-Clause" ]
0
9ee6e49f2a780345abd708abf2e0c47bb5475e0a
https://github.com/CeadeS/PyTorchH5Dataset/tree/9ee6e49f2a780345abd708abf2e0c47bb5475e0a
Conv2dWithConstraint
import torch import torch as th from torch import nn class Conv2dWithConstraint(nn.Conv2d): def __init__(self, *args, max_norm=1, **kwargs): self.max_norm = max_norm super(Conv2dWithConstraint, self).__init__(*args, **kwargs) def forward(self, x): self.weight.data = th.renorm(self.we...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
sylvchev/braindecode
Conv2dWithConstraint
false
16,514
[ "BSD-3-Clause" ]
260
c37ace8fcb90eee0d447c97d1c0a06ce58e8f6ad
https://github.com/sylvchev/braindecode/tree/c37ace8fcb90eee0d447c97d1c0a06ce58e8f6ad
Return
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strid...
P-Schumacher/tonic
Return
false
9,345
[ "MIT" ]
0
8d45a1668a3d60430bb36a7119947fc97d2690aa
https://github.com/P-Schumacher/tonic/tree/8d45a1668a3d60430bb36a7119947fc97d2690aa
SinLU
import torch class SinLU(torch.nn.Module): def __init__(self): super(SinLU, self).__init__() self.thr = torch.nn.Threshold(0, 0) def forward(self, x): return self.thr(x) - self.thr(-x).sin() def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_str...
Praneethsv/prob_mbrl
SinLU
false
14,229
[ "MIT" ]
108
7b1adee6bff742b6f90e9b96ea243f12c9153b9b
https://github.com/Praneethsv/prob_mbrl/tree/7b1adee6bff742b6f90e9b96ea243f12c9153b9b
TransposedConvLayer
import torch from torch.optim import * import torch.nn as nn class TransposedConvLayer(nn.Module): """ Transposed convolutional layer to increase spatial resolution (x2) in a decoder. Default: bias, ReLU, no downsampling, no batch norm. """ def __init__(self, in_channels, out_channels, kernel_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.optim import * imp...
EvilPerfectionist/ssl_e2vid
TransposedConvLayer
false
8,078
[ "MIT" ]
24
84f7c7e59875f134e97c14ec423f396725e04be7
https://github.com/EvilPerfectionist/ssl_e2vid/tree/84f7c7e59875f134e97c14ec423f396725e04be7
MaxBlock
import torch import torch.utils.data import torch.nn as nn class MaxBlock(nn.Module): def __init__(self, in_dim, out_dim): super().__init__() self.proj = nn.Linear(in_dim, out_dim) def forward(self, x): xm, _ = x.max(dim=1, keepdim=True) x = self.proj(x - xm) return 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.utils.data impor...
CS236G/pcgan
MaxBlock
false
4,942
[ "MIT" ]
1
e1ac013a087617f93c14347428a0d234d6d2a012
https://github.com/CS236G/pcgan/tree/e1ac013a087617f93c14347428a0d234d6d2a012
Scaled_Dot_Product_Attention
import torch import torch.nn as nn import torch.nn.functional as F class Scaled_Dot_Product_Attention(nn.Module): """Scaled Dot-Product Attention """ def __init__(self): super(Scaled_Dot_Product_Attention, self).__init__() def forward(self, Q, K, V, scale=None): """ Args: ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
NTDXYG/Text-Classify-based-pytorch
Scaled_Dot_Product_Attention
false
8,574
[ "Apache-2.0" ]
20
b12a264a0ea64b2f8b46fafd5383ef0a8025ef2f
https://github.com/NTDXYG/Text-Classify-based-pytorch/tree/b12a264a0ea64b2f8b46fafd5383ef0a8025ef2f
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....
bigheiniu/FakeReviewAll
Attention
false
3,253
[ "Apache-2.0" ]
0
b5efc0fe8ad88b5aff986e900f50d4e0b90fbff1
https://github.com/bigheiniu/FakeReviewAll/tree/b5efc0fe8ad88b5aff986e900f50d4e0b90fbff1
BertOutput
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import n...
Splendon/examples
BertOutput
false
4,746
[ "MIT" ]
0
ed4a8a01857b6ddca49559141acf5d0986eb01e1
https://github.com/Splendon/examples/tree/ed4a8a01857b6ddca49559141acf5d0986eb01e1
PositionalEncodingImage
# 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 math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guar...
alisiahkoohi/survae_flows
PositionalEncodingImage
false
14,792
[ "MIT" ]
262
e1747b05524c7ab540a211ed360ab3e67bc3e96d
https://github.com/alisiahkoohi/survae_flows/tree/e1747b05524c7ab540a211ed360ab3e67bc3e96d
ConvDecoder
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn from to...
alec-tschantz/planet
ConvDecoder
false
18,250
[ "MIT" ]
7
bf68722993c93129263bb9606a582d24cb4f2a58
https://github.com/alec-tschantz/planet/tree/bf68722993c93129263bb9606a582d24cb4f2a58
Vgg16
import torch import torch.nn as nn import torch.nn.functional as F class Vgg16(nn.Module): def __init__(self): super(Vgg16, self).__init__() self.conv1_1 = nn.Conv2d(3, 64, kernel_size=3, stride=1, padding=1) self.conv1_2 = nn.Conv2d(64, 64, kernel_size=3, stride=1, padding=1) sel...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
Boyiliee/PONO
Vgg16
false
13,529
[ "MIT" ]
133
b9108e8bf8ba0228635532ba5bdc973b7393d045
https://github.com/Boyiliee/PONO/tree/b9108e8bf8ba0228635532ba5bdc973b7393d045
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.triton_helpers import libdevice, math as tl_math fr...
tanreinama/jigsaw_unintendedbiasclassification_validation_model
Attention
false
10,817
[ "Apache-2.0" ]
0
af1644488e0d0f7d54ce5d8186ae38a8b079b2db
https://github.com/tanreinama/jigsaw_unintendedbiasclassification_validation_model/tree/af1644488e0d0f7d54ce5d8186ae38a8b079b2db
RMSEFeaturesLoss
# 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 import torch.utils.data assert_size_stride = torch._C._dynamo.guard...
RerRayne/learn3d
RMSEFeaturesLoss
false
14,284
[ "MIT" ]
335
83e4ac657c6538fb4cbed6e00b2e3ed6cbf43555
https://github.com/RerRayne/learn3d/tree/83e4ac657c6538fb4cbed6e00b2e3ed6cbf43555
Policy
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
LaRiffle/private-RL
Policy
false
17,564
[ "MIT" ]
4
05fdcefbc0aa8bddcb5e2eaf64d203d0c0a38a58
https://github.com/LaRiffle/private-RL/tree/05fdcefbc0aa8bddcb5e2eaf64d203d0c0a38a58
FeatureDiscriminator
# 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...
HotaekHan/Synthetically_Supervised_Text_Recognition
FeatureDiscriminator
false
17,427
[ "MIT" ]
8
a6bb7d3039b1280c6efe177b69d8b985d2e13285
https://github.com/HotaekHan/Synthetically_Supervised_Text_Recognition/tree/a6bb7d3039b1280c6efe177b69d8b985d2e13285
NCESoftmaxLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch import nn i...
Shreyas-Gururaj/Point_Contrast_ME0.5.3
NCESoftmaxLoss
false
9,441
[ "MIT" ]
0
72bc78001b0b4529ca96f193764dcac0c5a0ce0f
https://github.com/Shreyas-Gururaj/Point_Contrast_ME0.5.3/tree/72bc78001b0b4529ca96f193764dcac0c5a0ce0f
LastLevelMaxPool
# 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 from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._...
Friedrich1006/maskrcnn-benchmark
LastLevelMaxPool
false
815
[ "MIT" ]
0
bfd36ce2b90218e0805dc30e72be9257a9bc129b
https://github.com/Friedrich1006/maskrcnn-benchmark/tree/bfd36ce2b90218e0805dc30e72be9257a9bc129b
SmoothContourLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch import nn a...
yueyu-stu/EdgeAwareSpixel
SmoothContourLoss
false
11,071
[ "MIT" ]
0
f7f9fcb15bfa8e31bd4ad9473f9058c44a8391d7
https://github.com/yueyu-stu/EdgeAwareSpixel/tree/f7f9fcb15bfa8e31bd4ad9473f9058c44a8391d7
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....
AlbertoPaz/ABSA-PyTorch
Attention
false
7,650
[ "MIT" ]
20
070a4b6f20cde0e2021c72b84c534659d749f36e
https://github.com/AlbertoPaz/ABSA-PyTorch/tree/070a4b6f20cde0e2021c72b84c534659d749f36e
ConvAE
import math import torch import torch.nn as nn import torch.nn.functional as F class Conv2dSamePad(nn.Module): """ Implement Tensorflow's 'SAME' padding mode in Conv2d. When an odd number, say `m`, of pixels are need to pad, Tensorflow will pad one more column at right or one more row at bottom. But P...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import math import torch.nn a...
Xanadu12138/DSCN-superpixels
ConvAE
false
18,093
[ "MIT" ]
4
babe16edde9c61699ef203effbfc9f03246765f3
https://github.com/Xanadu12138/DSCN-superpixels/tree/babe16edde9c61699ef203effbfc9f03246765f3
FCDiscriminator
import torch from torch import nn class FCDiscriminator(nn.Module): def __init__(self, num_classes, ndf=64): super(FCDiscriminator, self).__init__() self.conv1 = nn.Conv2d(num_classes, ndf, kernel_size=4, stride=2, padding=1) self.conv2 = nn.Conv2d(ndf, ndf * 2, kernel_size=4,...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_s...
JohanVer/heatnet
FCDiscriminator
false
17,529
[ "MIT" ]
7
a2de9ec918fbbc6d9433aba344cbbcb2a2cdc85e
https://github.com/JohanVer/heatnet/tree/a2de9ec918fbbc6d9433aba344cbbcb2a2cdc85e
DoubleAttention
# 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....
Nitin-Mane/External-Attention-pytorch
DoubleAttention
false
14,107
[ "MIT" ]
4,466
1ceda306c41063af11c956334747763444a4d83f
https://github.com/Nitin-Mane/External-Attention-pytorch/tree/1ceda306c41063af11c956334747763444a4d83f
GCNModelVAE
# 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 import device from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
jiangnanboy/gcn_for_prediction_of_protein_interactions
GCNModelVAE
false
6,943
[ "Apache-2.0" ]
1
b2a9eb06cdfe0971d0c352299db1075ec4827dd9
https://github.com/jiangnanboy/gcn_for_prediction_of_protein_interactions/tree/b2a9eb06cdfe0971d0c352299db1075ec4827dd9
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...
taufique74/nemotest
StyleResidual
false
4,406
[ "Apache-2.0" ]
0
812f201913cb9922bedc1b225dff844ffc765bf1
https://github.com/taufique74/nemotest/tree/812f201913cb9922bedc1b225dff844ffc765bf1
MaxPoolPad
import torch import torch.nn.functional import torch.nn as nn class MaxPoolPad(nn.Module): def __init__(self): super(MaxPoolPad, self).__init__() self.pad = nn.ZeroPad2d((1, 0, 1, 0)) self.pool = nn.MaxPool2d(3, stride=2, padding=1) def forward(self, x): x = self.pad(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 import triton_helpers import torch.nn.functional import torch.nn as nn assert_size_stride = torch._C._dynamo.gu...
CarlosPena00/pytorchvision
MaxPoolPad
false
220
[ "MIT" ]
0
824b3a5a8940f3ee6b4da5de7a391a88e5aa36a2
https://github.com/CarlosPena00/pytorchvision/tree/824b3a5a8940f3ee6b4da5de7a391a88e5aa36a2
L2Norm
import torch import torch.nn as nn class Scale(nn.Module): def __init__(self, nchannels, bias=True, init_scale=1.0): super().__init__() self.nchannels = nchannels self.weight = nn.Parameter(torch.Tensor(1, nchannels, 1, 1)) if bias: self.bias = nn.Parameter(torch.Tenso...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
IrisDinge/YoloV3_DOTA
L2Norm
false
5,353
[ "MIT" ]
1
cdfe6375a2323e9ee162e50a46478d8a66529e6c
https://github.com/IrisDinge/YoloV3_DOTA/tree/cdfe6375a2323e9ee162e50a46478d8a66529e6c
CombineContext
# 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...
dmcinerney/Summarization
CombineContext
false
3,433
[ "Apache-2.0" ]
0
4d30900757308f7981a6544b4d6890f15133f269
https://github.com/dmcinerney/Summarization/tree/4d30900757308f7981a6544b4d6890f15133f269
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 import triton_helpers import torch.utils.data from ...
dmetehan/associative-embedding
Conv
false
3,483
[ "BSD-3-Clause" ]
0
a2c2e86e622cd97feec621fcfd34c3f97934e388
https://github.com/dmetehan/associative-embedding/tree/a2c2e86e622cd97feec621fcfd34c3f97934e388
FusionLayer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn from torch.nn import init assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C...
tansyl/6883-SOD
FusionLayer
false
13,020
[ "MIT" ]
0
3a32c45be1c6c449fc7de145fe01746e3eeb16df
https://github.com/tansyl/6883-SOD/tree/3a32c45be1c6c449fc7de145fe01746e3eeb16df
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.functional as F import torch.nn as nn assert_...
arpradha/deep-reinforcement-learning
Critic
false
12,128
[ "MIT" ]
0
01cfc7ab19453285886900d9c6332c8cb435df51
https://github.com/arpradha/deep-reinforcement-learning/tree/01cfc7ab19453285886900d9c6332c8cb435df51
FocalLoss
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch import torch.nn.functional as F def focal_loss(input_values, gamma): """Computes the focal loss""" p = torch.exp(-input_values) loss = (1 - p) ** gamma * input_values return loss.mean() ...
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 ...
caisarl76/LDAM-DRW
FocalLoss
false
9,872
[ "MIT" ]
0
f3d7e98ec40bfbf2c9a806387764a54c5a31d22d
https://github.com/caisarl76/LDAM-DRW/tree/f3d7e98ec40bfbf2c9a806387764a54c5a31d22d
PoolingF
import torch import torch.utils.data import torch from torch import nn class Normalize(nn.Module): def __init__(self, power=2): super(Normalize, self).__init__() self.power = power def forward(self, x): norm = x.pow(self.power).sum(1, keepdim=True).pow(1.0 / self.power) out =...
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...
guyii54/Contrastive-I2I
PoolingF
false
6,779
[ "BSD-3-Clause" ]
1
e73daa0f9d3770c2280a304c39678d5b22440647
https://github.com/guyii54/Contrastive-I2I/tree/e73daa0f9d3770c2280a304c39678d5b22440647
FocalLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
zwx8981/DBCNN-Pytorch
FocalLoss
false
16,829
[ "MIT" ]
150
16c3156054a30a3eabb45dffcf538f42452a14f3
https://github.com/zwx8981/DBCNN-Pytorch/tree/16c3156054a30a3eabb45dffcf538f42452a14f3
BiAvg
# 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...
urchade/urchade-byte_search
BiAvg
false
10,891
[ "MIT" ]
0
5155adb1550dcab873db4e9b124c42da24c99b8e
https://github.com/urchade/urchade-byte_search/tree/5155adb1550dcab873db4e9b124c42da24c99b8e
Attention_ElementWiseProduct
# 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...
liangzhang-lz/SparrowRecSys
Attention_ElementWiseProduct
false
7,087
[ "Apache-2.0" ]
1
9fe1a27d3903117e6e2b5487c0689c0bd9281473
https://github.com/liangzhang-lz/SparrowRecSys/tree/9fe1a27d3903117e6e2b5487c0689c0bd9281473
Mlp
import torch import torch.nn as nn class Mlp(nn.Module): def __init__(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.0): super().__init__() out_features = out_features or in_features hidden_features = hidden_features or in_features se...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
Arnav0400/ViT-Slim
Mlp
false
7,712
[ "MIT" ]
14
78edd4fecbb8cd4043e9878148576b1c327c74f9
https://github.com/Arnav0400/ViT-Slim/tree/78edd4fecbb8cd4043e9878148576b1c327c74f9
Loss_fn
import torch import torch.nn as nn class Loss_fn(nn.Module): def __init__(self, eps=0.001): super().__init__() self.eps = eps def forward(self, ip, target): diff = ip - target loss = torch.mean(torch.sqrt(diff * diff + self.eps * self.eps)) return loss def get_input...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert...
Vrushank264/Low-Light-Enhancement
Loss_fn
false
5,943
[ "MIT" ]
1
3c13a10a16eab8183b8fbd0c063d9815b662259a
https://github.com/Vrushank264/Low-Light-Enhancement/tree/3c13a10a16eab8183b8fbd0c063d9815b662259a
BalancedLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math from torch ...
gabrielsluz/vince
BalancedLoss
false
15,391
[ "Apache-2.0" ]
61
f4e17a2cf70c080a7e01e46d15537e33224c869b
https://github.com/gabrielsluz/vince/tree/f4e17a2cf70c080a7e01e46d15537e33224c869b
Debayer2x2
import torch import torch.nn as nn import torch.nn.functional as F class Debayer2x2(nn.Module): """Demosaicing of Bayer images using 2x2 convolutions. Requires BG-Bayer color filter array layout. That is, the image[1,1]='B', image[1,2]='G'. """ def __init__(self): super(Debayer2x2, 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 import torch.nn as nn assert_...
delldu/ImageClean
Debayer2x2
false
1,822
[ "MIT" ]
0
ffa5b180d36afb3840c6b36c08a767c520068498
https://github.com/delldu/ImageClean/tree/ffa5b180d36afb3840c6b36c08a767c520068498
SIG_LOSS
import torch from torch import nn class SIG_LOSS(nn.Module): def __init__(self, device): super(SIG_LOSS, self).__init__() self.m_device = device self.m_criterion = nn.BCEWithLogitsLoss(reduction='mean') def forward(self, preds, targets): loss = self.m_criterion(preds, targets...
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 ...
HCDM/XRec
SIG_LOSS
false
501
[ "MIT" ]
0
dae7d3e1237b8e41913656eb33d81e78c61424ea
https://github.com/HCDM/XRec/tree/dae7d3e1237b8e41913656eb33d81e78c61424ea
MatrixTree
import torch import torch.nn as nn import torch.cuda import torch.distributed class MatrixTree(nn.Module): """Implementation of the matrix-tree theorem for computing marginals of non-projective dependency parsing. This attention layer is used in the paper "Learning Structured Text Representations" :ci...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn import torch.cuda import torch.distributed assert_s...
DenDen047/data2text-macro-plan-py
MatrixTree
false
7,981
[ "MIT" ]
20
bb01ec6e23dab28c1e969f23bd55776b597fb995
https://github.com/DenDen047/data2text-macro-plan-py/tree/bb01ec6e23dab28c1e969f23bd55776b597fb995
Discriminator
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
karavik18/Federated_Learning_for_Missing_MRI_Sequence
Discriminator
false
7,024
[ "Apache-2.0" ]
1
42924f8475f354e6b429d05867f99530aa485b96
https://github.com/karavik18/Federated_Learning_for_Missing_MRI_Sequence/tree/42924f8475f354e6b429d05867f99530aa485b96
HirarchicalAttention
# 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....
code-backdoor/code-backdoor
HirarchicalAttention
false
15,054
[ "MIT" ]
71
1eeb3d79aa8a54c8f08e8d0156b569de5edd974e
https://github.com/code-backdoor/code-backdoor/tree/1eeb3d79aa8a54c8f08e8d0156b569de5edd974e
LearnedPositionalEmbedding
import torch import torch.nn as nn import torch.nn.functional as F class LearnedPositionalEmbedding(nn.Embedding): """ This module learns positional embeddings up to a fixed maximum size. Padding ids are ignored by either offsetting based on padding_idx or by setting padding_idx to None and ensuring t...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
qinwang-ai/Contact-Distil
LearnedPositionalEmbedding
false
4,153
[ "Apache-2.0" ]
0
5e98389de70e0d9c4d16bd91ca1326689dc220a6
https://github.com/qinwang-ai/Contact-Distil/tree/5e98389de70e0d9c4d16bd91ca1326689dc220a6
SelfAttention
# 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....
ZonePG/Machine-Learning-Collection
SelfAttention
false
14,734
[ "MIT" ]
3,094
85f1e761fab85b61d4dbd44285d6483b75ba649c
https://github.com/ZonePG/Machine-Learning-Collection/tree/85f1e761fab85b61d4dbd44285d6483b75ba649c
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...
Danil328/Pytorch_Retinaface
ClassHead
false
2,211
[ "MIT" ]
0
048a1d68217b2a99fbf83e2537ecc7e281ed6bd6
https://github.com/Danil328/Pytorch_Retinaface/tree/048a1d68217b2a99fbf83e2537ecc7e281ed6bd6
L2PenaltyConstraintLoss
import torch from torch import nn from torch.nn import functional as F class L2PenaltyConstraintLoss(nn.Module): def __init__(self): super(L2PenaltyConstraintLoss, self).__init__() def forward(self, x): gap_constraint = F.relu(x) return torch.norm(gap_constraint, p=2) def get_input...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_...
ykt345/fairtorch
L2PenaltyConstraintLoss
false
11,013
[ "MIT" ]
0
fe7e0cfaec3de0fc2b9c92943bb02639acd46bb4
https://github.com/ykt345/fairtorch/tree/fe7e0cfaec3de0fc2b9c92943bb02639acd46bb4
ResidualDenseBlock
# 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...
Frognar/Super-Resolution
ResidualDenseBlock
false
5,187
[ "MIT" ]
1
406b909d71e156aa11ee589698744e3ad9abfee7
https://github.com/Frognar/Super-Resolution/tree/406b909d71e156aa11ee589698744e3ad9abfee7
UnpackLayerConv2d
# 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 ...
aycatakmaz/packnet-sfm
UnpackLayerConv2d
false
12,144
[ "MIT" ]
0
d89cae81290133f136f6a1d1e288affc67eed1f7
https://github.com/aycatakmaz/packnet-sfm/tree/d89cae81290133f136f6a1d1e288affc67eed1f7
PositionWiseFeedForward
from _paritybench_helpers import _mock_config import math import torch import torch.nn as nn def gelu(x): """Implementation of the gelu activation function by Hugging Face""" return x * 0.5 * (1.0 + torch.erf(x / math.sqrt(2.0))) class PositionWiseFeedForward(nn.Module): """ FeedForward Neural Networks ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import math import ...
AWarno/CodeHateChallenge
PositionWiseFeedForward
false
18,452
[ "MIT" ]
3
f02bab7ca93a2441b7b2901094bedee72830b266
https://github.com/AWarno/CodeHateChallenge/tree/f02bab7ca93a2441b7b2901094bedee72830b266
Return
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strid...
Eyalcohenx/tonic
Return
false
13,667
[ "MIT" ]
350
afc15c6fa23fed4f696f68f0acf961964b0172dc
https://github.com/Eyalcohenx/tonic/tree/afc15c6fa23fed4f696f68f0acf961964b0172dc
ClippedValueFunctionLoss
from torch.nn import Module import torch import torch.utils.data import torch.nn.functional import torch.autograd class ClippedValueFunctionLoss(Module): """ ## Clipped Value Function Loss Similarly we clip the value function update also. egin{align} V^{\\pi_ heta}_{CLIP}(s_t) &= clip\\Big...
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.nn import Module import torch.utils.data import torch.nn.functional import tor...
techthiyanes/annotated_deep_learning_paper_implementations
ClippedValueFunctionLoss
false
16,542
[ "MIT" ]
3,714
8af24da2dd39a9a87482a4d18c2dc829bbd3fd47
https://github.com/techthiyanes/annotated_deep_learning_paper_implementations/tree/8af24da2dd39a9a87482a4d18c2dc829bbd3fd47
Layer_scale_init_Block_only_token
# 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....
Uzair-Khattak/deit
Layer_scale_init_Block_only_token
false
9,674
[ "Apache-2.0" ]
0
896004fc84d4ad2c4c9aa792822df7426af5903d
https://github.com/Uzair-Khattak/deit/tree/896004fc84d4ad2c4c9aa792822df7426af5903d
CSAM
# 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_...
mgpadalkar/pidinet
CSAM
false
16,042
[ "MIT" ]
137
781924fe30469cdc64f63ce6666a3e1f5b4e576f
https://github.com/mgpadalkar/pidinet/tree/781924fe30469cdc64f63ce6666a3e1f5b4e576f
TCB
import torch import torch.nn as nn from itertools import product as product class TCB(nn.Module): """ Transfer Connection Block Architecture This block """ def __init__(self, lateral_channels, channles, internal_channels=256, is_batchnorm=False): """ :param lateral_channel...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn from it...
SaralaSewwandi/refinedet-pytorch
TCB
false
8,743
[ "MIT" ]
43
d1eb9f84216085858562d816f19aeb77c2ab604a
https://github.com/SaralaSewwandi/refinedet-pytorch/tree/d1eb9f84216085858562d816f19aeb77c2ab604a
MultiHeadAttentionBlock
# 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....
IsaacChanghau/VSLNet
MultiHeadAttentionBlock
false
13,890
[ "MIT" ]
62
3793c625f2e251a5f19a0d59f0c83b12e386f808
https://github.com/IsaacChanghau/VSLNet/tree/3793c625f2e251a5f19a0d59f0c83b12e386f808
AsymmetricLoss
# 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...
ckvic3/query2labels
AsymmetricLoss
false
1,723
[ "MIT" ]
0
e9c30e1b445be773be397a093fa66aef71d54556
https://github.com/ckvic3/query2labels/tree/e9c30e1b445be773be397a093fa66aef71d54556
MIRB2
from _paritybench_helpers import _mock_config import torch import torch.nn as nn class ConvBlock(nn.Module): def __init__(self, in_channels, out_channels, groups=3): super(ConvBlock, self).__init__() self.in_channels = in_channels self.out_channels = out_channels self.groups = gro...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
wwjfsfs/wwjyyds
MIRB2
false
13,209
[ "MIT" ]
0
80cd6267fde7cd98838078a0d5178a557ceb7414
https://github.com/wwjfsfs/wwjyyds/tree/80cd6267fde7cd98838078a0d5178a557ceb7414
DiceCoefficientLoss
# 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...
HalestormAI/efficientnet-unet
DiceCoefficientLoss
false
2,329
[ "MIT" ]
0
b6d5ec86d667ce7ac1f689bc16269dca83a079f0
https://github.com/HalestormAI/efficientnet-unet/tree/b6d5ec86d667ce7ac1f689bc16269dca83a079f0
BatchLinear
# 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...
RisingStockPrices/multi-shape-siren
BatchLinear
false
2,767
[ "MIT" ]
0
f78d6deb94660fd11ef0caf55f88095b74d3e223
https://github.com/RisingStockPrices/multi-shape-siren/tree/f78d6deb94660fd11ef0caf55f88095b74d3e223
Softmax
# 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...
THAKAORI/SalsaNext
Softmax
false
11,904
[ "MIT" ]
0
855cd7e9ebb83ee62538ba4753a011ada7bbfb6c
https://github.com/THAKAORI/SalsaNext/tree/855cd7e9ebb83ee62538ba4753a011ada7bbfb6c
Conv_ReLU_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 from torch._inductor.runtime import triton_helpers from torch import nn assert_s...
HwangToeMat/Asym_VDSR
Conv_ReLU_Block
false
17,417
[ "MIT" ]
4
598200f745434fc6e1bb46b6da7d6cf7b0fdaa50
https://github.com/HwangToeMat/Asym_VDSR/tree/598200f745434fc6e1bb46b6da7d6cf7b0fdaa50
SRCNN
import logging import torch import torch.nn as nn def get_root_logger(log_file=None, log_level=logging.INFO): """Get the root logger. The logger will be initialized if it has not been initialized. By default a StreamHandler will be added. If `log_file` is specified, a FileHandler will also be added. ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
akimotty877/mmediting
SRCNN
false
3,080
[ "Apache-2.0" ]
0
cae872d6f3e867ba144c7c0dbc29a0ee1a29e5a6
https://github.com/akimotty877/mmediting/tree/cae872d6f3e867ba144c7c0dbc29a0ee1a29e5a6
FFN
import torch import torch.utils.data import torchvision.transforms.functional as F import torch.nn as nn import torch.nn.functional as F class FFN(nn.Module): def __init__(self, d_model, d_ffn, dropout=0): super().__init__() self.linear1 = nn.Linear(d_model, d_ffn) self.activation = F.rel...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
SelvamArul/MOTR
FFN
false
1,059
[ "MIT" ]
0
2a0b70288feaca665d460096159100d5077e9312
https://github.com/SelvamArul/MOTR/tree/2a0b70288feaca665d460096159100d5077e9312
GeM
import torch import torch.nn as nn import torch.nn.functional as F class GeM(nn.Module): def __init__(self, p=3, eps=1e-06, requires_grad=False): super(GeM, self).__init__() self.p = nn.Parameter(torch.ones(1) * p, requires_grad=requires_grad) self.eps = eps def forward(self, 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 import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import...
flrngel/DOLG-pytorch
GeM
false
15,372
[ "MIT" ]
56
97732d2932ef6733f17cf8ac1aee990effe6fd64
https://github.com/flrngel/DOLG-pytorch/tree/97732d2932ef6733f17cf8ac1aee990effe6fd64
StochasticPool2D
# 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 from torch.nn.modules.utils import _pair assert_size_stride = torch...
abhishek30-ml/Multiple-Deep-Network-Learning
StochasticPool2D
false
1,351
[ "MIT" ]
0
adf705c004cc8a1e517eeed99e7030acb476dfd9
https://github.com/abhishek30-ml/Multiple-Deep-Network-Learning/tree/adf705c004cc8a1e517eeed99e7030acb476dfd9
EncoderLayer
import torch import torch.nn.functional as F import torch.nn as nn class ScaledDotProductAttention(nn.Module): """ Scaled Dot-Product Attention """ def __init__(self, temperature, attn_dropout=0.1): super().__init__() self.temperature = temperature self.dropout = nn.Dropout(attn_dropo...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
RogerTsai917/attention-is-all-you-need-pytorch
EncoderLayer
false
2,792
[ "MIT" ]
0
64197e55d275e5c819bc786a9ff19849cdf2f6b9
https://github.com/RogerTsai917/attention-is-all-you-need-pytorch/tree/64197e55d275e5c819bc786a9ff19849cdf2f6b9
CNormalized_Linear
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import math import ...
BadrYoubiIdrissi/CausalDiscoveryToolbox
CNormalized_Linear
false
2,005
[ "MIT" ]
0
1e729d002a64ea1942caecd21b9dc8cc217ea0e2
https://github.com/BadrYoubiIdrissi/CausalDiscoveryToolbox/tree/1e729d002a64ea1942caecd21b9dc8cc217ea0e2
SAModule_Head
import torch import torch.nn as nn import torch.nn.functional as F class BasicConv(nn.Module): def __init__(self, in_channels, out_channels, use_bn=False, **kwargs): super(BasicConv, self).__init__() self.use_bn = use_bn self.conv = nn.Conv2d(in_channels, out_channels, bias=not 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....
DecAngel/C-3-Framework
SAModule_Head
false
369
[ "MIT" ]
0
00b792b4481a0ec9d7e30e290c66e7020235e79b
https://github.com/DecAngel/C-3-Framework/tree/00b792b4481a0ec9d7e30e290c66e7020235e79b
SmoothL1Loss
# 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.utils.data assert_size_stride = torch._C._dynamo.guards.asse...
qilei123/FreeAnchor
SmoothL1Loss
false
16,298
[ "MIT" ]
495
80361a7addb7d84a50863a6b34734d28034c7256
https://github.com/qilei123/FreeAnchor/tree/80361a7addb7d84a50863a6b34734d28034c7256
CapsuleConvLayer
import torch import torch.nn as nn class CapsuleConvLayer(nn.Module): def __init__(self, in_channels, out_channels): super(CapsuleConvLayer, self).__init__() self.conv0 = nn.Conv2d(in_channels=in_channels, out_channels= out_channels, kernel_size=9, stride=1, bias=True) self.re...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
juingzhou/Base-on-PyTorch-implementation-CapsuleNet
CapsuleConvLayer
false
10,318
[ "MIT" ]
0
6b030bf93b258d9d6496379bcbe4b94542366817
https://github.com/juingzhou/Base-on-PyTorch-implementation-CapsuleNet/tree/6b030bf93b258d9d6496379bcbe4b94542366817
PSNR
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice from torch.nn.modules.loss i...
zzh-tech/RSCD
PSNR
false
16,839
[ "MIT" ]
57
b287b1621121f8ca7ece6b27ebd4e28a5f8e6f5e
https://github.com/zzh-tech/RSCD/tree/b287b1621121f8ca7ece6b27ebd4e28a5f8e6f5e
XOR
import torch import torch.utils.data.distributed import torch.nn as nn import torch.utils.data class XOR(nn.Module): def __init__(self, input_dim, output_dim): super(XOR, self).__init__() self.lin1 = nn.Linear(input_dim, 8) self.lin2 = nn.Linear(8, output_dim) def forward(self, featu...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
Infi-zc/horovod
XOR
false
13,828
[ "Apache-2.0" ]
5,089
94cd8561a21d449fc8c80c8fef422025b84dfc22
https://github.com/Infi-zc/horovod/tree/94cd8561a21d449fc8c80c8fef422025b84dfc22
CausalConv1d
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cu...
xingtaodhu/logdeep
CausalConv1d
false
10,998
[ "MIT" ]
0
9626fa4b3345799940cb293c7aedb34dd33b5637
https://github.com/xingtaodhu/logdeep/tree/9626fa4b3345799940cb293c7aedb34dd33b5637
Psi2QNet
# 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.nn.parameter import Parameter import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided...
IanWangg/Multi-Context-RL
Psi2QNet
false
9,162
[ "MIT" ]
0
a268b16c5ad421b35339cb85de5347d4cf56b3dd
https://github.com/IanWangg/Multi-Context-RL/tree/a268b16c5ad421b35339cb85de5347d4cf56b3dd
ScaledDotProductAttention
import torch import numpy as np from torch import nn class ScaledDotProductAttention(nn.Module): """ Scaled Dot-Product Attention """ def __init__(self, temperature, attn_dropout=0.1): super().__init__() self.temperature = temperature self.dropout = nn.Dropout(attn_dropout) 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....
ArrowLuo/GRACE
ScaledDotProductAttention
false
7,744
[ "Apache-2.0" ]
17
f27b500ba905685c03eee6d91d87adc9ef78b4d1
https://github.com/ArrowLuo/GRACE/tree/f27b500ba905685c03eee6d91d87adc9ef78b4d1
SymmSoftplus
import torch from torch.utils.data import Dataset as Dataset import torch.utils.data def symm_softplus(x, softplus_=torch.nn.functional.softplus): return softplus_(x) - 0.5 * x class SymmSoftplus(torch.nn.Module): def forward(self, x): return symm_softplus(x) def get_inputs(): return [torch.r...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math from torch.utils.data import Dataset as Dataset import torch.u...
JunLi-Galios/CP-Flow
SymmSoftplus
false
11,586
[ "MIT" ]
0
69272636c8c644ce3c96bbc4d610591756b8e3ff
https://github.com/JunLi-Galios/CP-Flow/tree/69272636c8c644ce3c96bbc4d610591756b8e3ff
SACCriticNetwork
# 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_...
benvoe/mushroom-rl-benchmark
SACCriticNetwork
false
1,543
[ "MIT" ]
0
217d8c077bf6f3febaed92821a2cf183c83f703b
https://github.com/benvoe/mushroom-rl-benchmark/tree/217d8c077bf6f3febaed92821a2cf183c83f703b
TripletLoss
import torch import torch.nn as nn import torch._utils import torch.utils.data import torch.utils.data.distributed import torch.nn.functional as F import torch.nn.parallel import torch.optim class TripletLoss(nn.Module): """ Triplet loss Takes embeddings of an anchor sample, a positive sample and a negati...
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._utils import torch.utils.data import torch.utils.data...
fsImageries/video-to-pose3D
TripletLoss
false
10,181
[ "MIT" ]
0
098c87ce19dc3331da03e6eac0b9744684eb66f6
https://github.com/fsImageries/video-to-pose3D/tree/098c87ce19dc3331da03e6eac0b9744684eb66f6
StdConv2d
# 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 ...
dustasa/senior_software_HW
StdConv2d
false
3,443
[ "Apache-2.0" ]
0
767d1d7bbd5e7d7414c17fa14b92b942e53d84ed
https://github.com/dustasa/senior_software_HW/tree/767d1d7bbd5e7d7414c17fa14b92b942e53d84ed
Decoder1
import torch import torch.nn as nn class Decoder1(nn.Module): def __init__(self): super(Decoder1, self).__init__() self.reflecPad2 = nn.ReflectionPad2d((1, 1, 1, 1)) self.conv3 = nn.Conv2d(64, 3, 3, 1, 0) def forward(self, x): out = self.reflecPad2(x) out = self.conv3...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch....
hologerry/wct_experiment
Decoder1
false
6,814
[ "MIT" ]
1
890d885561dc8df8c4ae732aebd902aa838257e6
https://github.com/hologerry/wct_experiment/tree/890d885561dc8df8c4ae732aebd902aa838257e6
FocalLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
NakedKoala/sed_time_freq_segmentation
FocalLoss
false
2,660
[ "MIT" ]
0
5379e9cdddfba34b6ce4a243580671d32afdac9a
https://github.com/NakedKoala/sed_time_freq_segmentation/tree/5379e9cdddfba34b6ce4a243580671d32afdac9a
FilterResponseNorm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import...
ankmathur96/torchsupport
FilterResponseNorm
false
3,200
[ "MIT" ]
0
77bf4a90b8770a408665e2604428808c3ed2f979
https://github.com/ankmathur96/torchsupport/tree/77bf4a90b8770a408665e2604428808c3ed2f979
AdaptiveConcatPool3d
import torch import torch.nn as nn import torch.nn.functional as F class AdaptiveConcatPool3d(nn.Module): def forward(self, x): return torch.cat((F.adaptive_avg_pool3d(x, 1), F. adaptive_max_pool3d(x, 1)), dim=1) 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
i-pan/kaggle-melanoma
AdaptiveConcatPool3d
false
15,565
[ "MIT" ]
68
caaec0d7e9cafc7b405eb86e7fdf00107d89e1d9
https://github.com/i-pan/kaggle-melanoma/tree/caaec0d7e9cafc7b405eb86e7fdf00107d89e1d9
AconC
import torch import torch.nn as nn class AconC(nn.Module): """ ACON activation (activate or not). AconC: (p1*x-p2*x) * sigmoid(beta*(p1*x-p2*x)) + p2*x, beta is a learnable parameter according to "Activate or Not: Learning Customized Activation" <https://arxiv.org/pdf/2009.04759.pdf>. """ def __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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
GoalballAnalysis/GUI
AconC
false
2,302
[ "MIT" ]
0
c7f1cc27f4fd7f861c3ca09f5ca25d1a3f19a8a7
https://github.com/GoalballAnalysis/GUI/tree/c7f1cc27f4fd7f861c3ca09f5ca25d1a3f19a8a7
PredictiveEntropy
# 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 ...
kowshikthopalli/MULDENS
PredictiveEntropy
false
7,060
[ "MIT" ]
1
e2d5f8ec51024c5bdda6d1fcde4a96a3f31e6930
https://github.com/kowshikthopalli/MULDENS/tree/e2d5f8ec51024c5bdda6d1fcde4a96a3f31e6930
BalancedL1Loss
import functools import torch import numpy as np import torch.nn as nn import torch.nn.functional as F def reduce_loss(loss, reduction): """Reduce loss as specified. Args: loss (Tensor): Elementwise loss tensor. reduction (str): Options are "none", "mean" and "sum". Return: Tenso...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import functools impor...
CK-er/mmdet
BalancedL1Loss
false
2,073
[ "Apache-2.0" ]
0
9bea4068efbcf7bf739dbe41917a68d525c29868
https://github.com/CK-er/mmdet/tree/9bea4068efbcf7bf739dbe41917a68d525c29868
MeanPool
# 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.utils.checkpoint assert_size_stride = torch._C._dynamo.guards.assert_size_stride ...
MarvinLvn/platalea
MeanPool
false
807
[ "Apache-2.0" ]
0
31def0813c90a3259f86f7d86cb576cd66dca3fe
https://github.com/MarvinLvn/platalea/tree/31def0813c90a3259f86f7d86cb576cd66dca3fe