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
ContrastiveLoss
# 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 assert_...
CV-ZMH/human-action-recognition
ContrastiveLoss
false
7,841
[ "MIT" ]
36
009bd1da71c087c3071173b325e34ed342599581
https://github.com/CV-ZMH/human-action-recognition/tree/009bd1da71c087c3071173b325e34ed342599581
DistanceNetwork
# 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....
stamatiad/MatchingNetworks
DistanceNetwork
false
16,495
[ "MIT" ]
316
07c4567c15578664a550903c222c7eaa2abfe113
https://github.com/stamatiad/MatchingNetworks/tree/07c4567c15578664a550903c222c7eaa2abfe113
CmapPafHeadAttention
import torch import torch.utils.data import torch.nn import torch.optim class UpsampleCBR(torch.nn.Sequential): def __init__(self, input_channels, output_channels, count=1, num_flat=0): layers = [] for i in range(count): if i == 0: inch = input_channels els...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
ajsampathk/trt_pose
CmapPafHeadAttention
false
18,263
[ "MIT" ]
7
592e038cacaf43b6a502b759a035a4e7cae9db9e
https://github.com/ajsampathk/trt_pose/tree/592e038cacaf43b6a502b759a035a4e7cae9db9e
NasPathBranch
# 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...
earhian/imgclsmob
NasPathBranch
false
6,628
[ "MIT" ]
1
c87c0942420876941868c016211073dec4392e4d
https://github.com/earhian/imgclsmob/tree/c87c0942420876941868c016211073dec4392e4d
SimpleModel
# 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....
mbeacom/DeepSpeed
SimpleModel
false
12,817
[ "MIT" ]
0
012d91df67a9ddd66df847c7608481af027cace9
https://github.com/mbeacom/DeepSpeed/tree/012d91df67a9ddd66df847c7608481af027cace9
DummyLoss
import torch import torch.nn as nn class DummyLoss(nn.Module): """ Dummy Loss for debugging """ def __init__(self): super(DummyLoss, self).__init__() def forward(self, inp, target): delta = inp - target None return delta.mean() def get_inputs(): return [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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
adriangrepo/segmentl
DummyLoss
false
18,221
[ "MIT" ]
5
9b520bf6cfd005eef9bba3db36ee6b3bb373b085
https://github.com/adriangrepo/segmentl/tree/9b520bf6cfd005eef9bba3db36ee6b3bb373b085
BoundSoftmaxImpl
import torch import torch.nn as nn class BoundSoftmaxImpl(nn.Module): def __init__(self, axis): super().__init__() self.axis = axis def forward(self, x): max_x = torch.max(x, dim=self.axis).values assert self.axis == int(self.axis) x = torch.exp(x - max_x.unsqueeze(se...
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 ...
mnmueller/auto_LiRPA
BoundSoftmaxImpl
false
7,253
[ "BSD-3-Clause" ]
1
55cb270b0b99f07b74541d55706c69fbb9daff66
https://github.com/mnmueller/auto_LiRPA/tree/55cb270b0b99f07b74541d55706c69fbb9daff66
Encoder3
# 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....
le0x99/deep-generative-modeling
Encoder3
false
7,081
[ "MIT" ]
1
40ffd1640dc3e5a6a2b4ba16a1d767034f081475
https://github.com/le0x99/deep-generative-modeling/tree/40ffd1640dc3e5a6a2b4ba16a1d767034f081475
ValueNet
# 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_...
wondervictor/DeepQLearning
ValueNet
false
13,110
[ "MIT" ]
0
48d1a5c9e3dff38845366a31830d9114e9eefedc
https://github.com/wondervictor/DeepQLearning/tree/48d1a5c9e3dff38845366a31830d9114e9eefedc
SymmetricBCELoss
import torch import torch.nn as nn import torch.nn.functional as F import torch.hub class SymmetricBCELoss(nn.Module): def __init__(self, alpha=0.1, beta=0.1): super().__init__() self.alpha = alpha self.beta = beta def forward(self, input, target): y_true = target y_p...
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...
thangnx183/kaggle-understanding-clouds
SymmetricBCELoss
false
16,580
[ "BSD-2-Clause" ]
207
15ad2a9029958262437b899cb00525579da23911
https://github.com/thangnx183/kaggle-understanding-clouds/tree/15ad2a9029958262437b899cb00525579da23911
SimpleMaxModule
# 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....
opti-mix/glow
SimpleMaxModule
false
7,396
[ "Apache-2.0" ]
1
4ba074df5da9822986a23a6679ab592c22660f6d
https://github.com/opti-mix/glow/tree/4ba074df5da9822986a23a6679ab592c22660f6d
SmoothL1Loss
import torch import torch.utils.data def smooth_l1_loss(input, target, beta=1.0 / 9, size_average=True): """ very similar to the smooth_l1_loss from pytorch, but with the extra beta parameter """ n = torch.abs(input - target) cond = n < beta loss = torch.where(cond, 0.5 * n ** 2 / beta, n ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.utils.dat...
anslt/retinamask
SmoothL1Loss
false
6,210
[ "MIT" ]
1
12b58febfd0a5ed6914796a4a3db60c2a8181370
https://github.com/anslt/retinamask/tree/12b58febfd0a5ed6914796a4a3db60c2a8181370
TwoLayerFCBodyWithAction
import torch import torch.nn as nn import torch.nn.functional as F def layer_init(layer, w_scale=1.0): nn.init.orthogonal_(layer.weight.data) layer.weight.data.mul_(w_scale) nn.init.constant_(layer.bias.data, 0) return layer class TwoLayerFCBodyWithAction(nn.Module): def __init__(self, state_di...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
Fieps1/p3-tennis
TwoLayerFCBodyWithAction
false
585
[ "MIT" ]
0
29f3dab5810d7cd7f84120416a615956d266c256
https://github.com/Fieps1/p3-tennis/tree/29f3dab5810d7cd7f84120416a615956d266c256
EqualLinear
# 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.autograd import Function import math import torch.utils.data from tor...
achrefjarray/ESRGANplus-master
EqualLinear
false
1,381
[ "Apache-2.0" ]
0
ba470ec5c565a6dc8b48575b1e185ef6b796aec6
https://github.com/achrefjarray/ESRGANplus-master/tree/ba470ec5c565a6dc8b48575b1e185ef6b796aec6
ActorCriticNetwork
import torch import torch.nn as nn import torch.nn.functional as F class ActorCriticNetwork(nn.Module): def __init__(self, num_inputs, num_actions, hidden_size=256): super(ActorCriticNetwork, self).__init__() self.num_actions = num_actions self.critic_linear1 = nn.Linear(num_inputs, hidde...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
bluebibi/rl_book_codes
ActorCriticNetwork
false
3,236
[ "MIT" ]
0
ef7fc9993eb66618e4b4e80e59cc2879a8db3522
https://github.com/bluebibi/rl_book_codes/tree/ef7fc9993eb66618e4b4e80e59cc2879a8db3522
GCN
import torch from torch import nn import torch.nn.functional as F import torch.nn.parallel class Conv2D(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, padding= 'same', stride=1, dilation=1, groups=1): super(Conv2D, self).__init__() assert type(kernel_size) in [int,...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn import torch.nn.functional as F import torch.nn.parallel as...
EllisHui/outOfRailWay
GCN
false
433
[ "BSD-2-Clause" ]
0
e3bf9aaa18879bee5536740d55006c872f06278f
https://github.com/EllisHui/outOfRailWay/tree/e3bf9aaa18879bee5536740d55006c872f06278f
convBlock
# 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 assert_size_stride = torch._C._...
junyuchen245/TransMorph_Transformer_for_Medical_Image_Registration
convBlock
false
15,751
[ "MIT" ]
82
dfa24a47a564a000aa9b4eea95a6e83a24568359
https://github.com/junyuchen245/TransMorph_Transformer_for_Medical_Image_Registration/tree/dfa24a47a564a000aa9b4eea95a6e83a24568359
EquiangularAvgUnpool
import math import torch from torch import nn import torch.nn.functional as F def equiangular_bandwidth(nodes): """Calculate the equiangular bandwidth based on input nodes Args: nodes (int): the number of nodes should be a power of 4 Returns: int: the corresponding bandwidth """ ...
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 from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guard...
phil-hawkins/deepsphere-pytorch
EquiangularAvgUnpool
false
16,244
[ "MIT" ]
99
f23c531445b3ddf234c7e98cdadb010163051e6d
https://github.com/phil-hawkins/deepsphere-pytorch/tree/f23c531445b3ddf234c7e98cdadb010163051e6d
DocumentEncoder
import torch from torch import nn import torch.nn.functional as F class DocumentEncoder(nn.Module): def __init__(self, input_size, hidden_layer_sizes=(100,), activation=( 'relu',), solver='adam'): super(DocumentEncoder, self).__init__() self.fc1 = nn.Linear(input_size, 12) self.fc...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
huyi-work/UnifiedEmbeddingModel
DocumentEncoder
false
15,563
[ "MIT" ]
50
85c8442122213d1f1b1027df0fd34f428259aaa4
https://github.com/huyi-work/UnifiedEmbeddingModel/tree/85c8442122213d1f1b1027df0fd34f428259aaa4
SineODE
# 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 math assert_size_stride = torch._C._dynamo.guards.assert_size_stri...
MaricelaM/torchdiffeq
SineODE
false
14,002
[ "MIT" ]
4,088
4e070fb687167e53082a91f32e102af7f4521058
https://github.com/MaricelaM/torchdiffeq/tree/4e070fb687167e53082a91f32e102af7f4521058
ModulatedConv2d
# 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.autograd...
Dolorousrtur/style-people
ModulatedConv2d
false
8,008
[ "MIT" ]
15
c48b12b245cc50f8230c0654dffe40016f2a69f1
https://github.com/Dolorousrtur/style-people/tree/c48b12b245cc50f8230c0654dffe40016f2a69f1
Gaussian
# 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.triton_helpers import libd...
Fischer19/GMVAE
Gaussian
false
9,025
[ "MIT" ]
0
b960e24df8a10e9e07b2111ccb8939dd2556a6c2
https://github.com/Fischer19/GMVAE/tree/b960e24df8a10e9e07b2111ccb8939dd2556a6c2
ChannelNorm
# 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_...
AyushExel/s3prl
ChannelNorm
false
1,989
[ "MIT" ]
0
6531904e9621a778978b9cfef3ba9f582e56639a
https://github.com/AyushExel/s3prl/tree/6531904e9621a778978b9cfef3ba9f582e56639a
HidingRes
import torch import torch.nn as nn import torch.nn.parallel import torch.utils.data import torch.nn.functional as F class ResidualBlock(nn.Module): def __init__(self, channel_num, dilation=1, group=1): super(ResidualBlock, self).__init__() self.conv1 = nn.Conv2d(channel_num, channel_num, 3, 1, pa...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Hwihuni/Deep-Model-Watermarking
HidingRes
false
682
[ "MIT" ]
0
73ea2286ace0aac3d55f6056da38ea2bc38ed00d
https://github.com/Hwihuni/Deep-Model-Watermarking/tree/73ea2286ace0aac3d55f6056da38ea2bc38ed00d
DepthWiseSeparableConv2d
# 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.jit import torch.nn assert_size_stride = torc...
ankmathur96/torchsupport
DepthWiseSeparableConv2d
false
3,198
[ "MIT" ]
0
77bf4a90b8770a408665e2604428808c3ed2f979
https://github.com/ankmathur96/torchsupport/tree/77bf4a90b8770a408665e2604428808c3ed2f979
Head
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
Head
false
14,327
[ "MIT" ]
111
e61e3d34f65d1bd70997f2e2e583f640b8779a3c
https://github.com/Rming/DocTr/tree/e61e3d34f65d1bd70997f2e2e583f640b8779a3c
TransposeAdaINConv2dLayer
import torch import torch.nn as nn import torch.nn.functional as F from torch.nn import Parameter def l2normalize(v, eps=1e-12): return v / (v.norm() + eps) class SpectralNorm(nn.Module): def __init__(self, module, name='weight', power_iterations=1): super(SpectralNorm, self).__init__() 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.triton_helpers import libdevice import torch.nn as ...
LenKerr/Semantic-Colorization-GAN
TransposeAdaINConv2dLayer
false
5,529
[ "MIT" ]
1
2ce52406ca6fc92e69692b451b1c9ae66ba3b76f
https://github.com/LenKerr/Semantic-Colorization-GAN/tree/2ce52406ca6fc92e69692b451b1c9ae66ba3b76f
AllReduceLinear
# 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.distributed as dist import torch.nn as nn from torch.nn import Line...
dobbytk/parallelformers
AllReduceLinear
false
6,588
[ "Apache-2.0" ]
1
a05780b1d178b4ac5100e42c2b6eec7aedc7dd33
https://github.com/dobbytk/parallelformers/tree/a05780b1d178b4ac5100e42c2b6eec7aedc7dd33
_Enc
import torch import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed class _NestedEnc(torch.nn.Module): def __init__(self, f): super().__init__() self.f = f def forward(self, x): return self.f(x) class _Enc(torch.nn.Module): def ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn.parallel import torch.optim import torch.utils.data import torch...
xuanyuzhou98/higher
_Enc
false
16,741
[ "Apache-2.0" ]
1,401
a28b488d8d4c80b38d3a2d322258233d74a89656
https://github.com/xuanyuzhou98/higher/tree/a28b488d8d4c80b38d3a2d322258233d74a89656
SeparatedLoss
import torch import torch.nn as nn class BCEFocalLoss(nn.Module): def __init__(self, alpha=0.25, gamma=2.0): super().__init__() self.alpha = alpha self.gamma = gamma def forward(self, preds, targets): bce_loss = nn.BCEWithLogitsLoss(reduction='none')(preds, targets) p...
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...
koukyo1994/riadd-competition
SeparatedLoss
false
7,056
[ "MIT" ]
1
0e399305aef21d40125cadccee55be1f0b310216
https://github.com/koukyo1994/riadd-competition/tree/0e399305aef21d40125cadccee55be1f0b310216
GEGLU
import torch from torch import nn import torch.nn.functional as F class GEGLU(nn.Module): def forward(self, x): x, gate = x.chunk(2, dim=-1) return F.gelu(gate) * x def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
activeloopai/gpt-neox
GEGLU
false
6,068
[ "MIT" ]
1
89749e0b76938fa1ff84a3dd1cbcbe64521d861b
https://github.com/activeloopai/gpt-neox/tree/89749e0b76938fa1ff84a3dd1cbcbe64521d861b
SimpleCNNContainerConvBlocks
import torch import torch.nn.functional as F import torch.nn as nn class SimpleCNNContainerConvBlocks(nn.Module): def __init__(self, input_channel, num_filters, kernel_size, output_dim=10): super(SimpleCNNContainerConvBlocks, self).__init__() """ A testing cnn container, which allows 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 assert_...
coasxu/FedMA
SimpleCNNContainerConvBlocks
false
15,056
[ "MIT" ]
254
21f4d32338fd2563ebd97c737e3b9f4f470029d9
https://github.com/coasxu/FedMA/tree/21f4d32338fd2563ebd97c737e3b9f4f470029d9
output
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
glc12125/EAST
output
false
15,445
[ "MIT" ]
366
cec7ae98f9c21a475b935f74f4c3969f3a989bd4
https://github.com/glc12125/EAST/tree/cec7ae98f9c21a475b935f74f4c3969f3a989bd4
LayerNormAVG
import torch import torch.nn as nn import torch.cuda import torch.distributed class LayerNormAVG(nn.Module): """ Layer Normalization class inspired by Transformer normalization, but here we normalize to given average to preserve magnitue of USE """ def __init__(self, features, desired_avg...
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.cuda import torch.distributed assert_size_st...
USE-sum/usesum
LayerNormAVG
false
2,911
[ "MIT" ]
0
eaf6dae0c451459551f728c0a8866777c20ed707
https://github.com/USE-sum/usesum/tree/eaf6dae0c451459551f728c0a8866777c20ed707
DiceScore
# 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.backends.cudnn import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride em...
ArmenGhambaryan/kaggle_carvana_segmentation
DiceScore
false
13,292
[ "MIT" ]
447
648a6b5c807cb69011316fe6501241dacc027db2
https://github.com/ArmenGhambaryan/kaggle_carvana_segmentation/tree/648a6b5c807cb69011316fe6501241dacc027db2
Upsampler
import math import torch from torchvision.transforms import * class ConvBlock(torch.nn.Module): def __init__(self, input_size, output_size, kernel_size=3, stride=1, padding=1, bias=True, activation='prelu', norm=None): super(ConvBlock, self).__init__() self.conv = torch.nn.Conv2d(input_si...
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 from torchvision.transforms import * assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch....
DengZeshuai/DBPN-Pytorch
Upsampler
false
2,563
[ "MIT" ]
0
a90d241a1c4b07830c6d812ad8389d13e8cf05d1
https://github.com/DengZeshuai/DBPN-Pytorch/tree/a90d241a1c4b07830c6d812ad8389d13e8cf05d1
SequenceSummaryLayer
import torch import torch.nn as nn class SequenceSummaryLayer(nn.Module): def __init__(self, hidden_size, summary_layers): super().__init__() self.summary_layers = summary_layers self.linear = nn.Linear(hidden_size * summary_layers, hidden_size) self.pooler = nn.Linear(hidden_size...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
Zaaachary/CSQA
SequenceSummaryLayer
false
1,294
[ "BSD-3-Clause" ]
0
6da6e076f67e9458deacb665d31463db14c7d860
https://github.com/Zaaachary/CSQA/tree/6da6e076f67e9458deacb665d31463db14c7d860
DirichletLayer
# 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 ...
Cogito2012/OpenTAL
DirichletLayer
false
7,904
[ "BSD-3-Clause" ]
16
a7ab938a52b3fb82163eb1ba5403888359eb7e6a
https://github.com/Cogito2012/OpenTAL/tree/a7ab938a52b3fb82163eb1ba5403888359eb7e6a
PixelWiseModel
import torch from torch import nn as nn class PixelWiseModel(nn.Module): """ Baseline class for pixelwise models Args: """ def __init__(self, const, **kwargs): super(PixelWiseModel, self).__init__() self.const = const def forward(self, x): ret = torch.zeros_like(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 import nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._emp...
ciubecca/3dunet-cavity
PixelWiseModel
false
1,704
[ "MIT" ]
0
cfcc827773b18a95d221ab86c1afc5e2f7c30ecb
https://github.com/ciubecca/3dunet-cavity/tree/cfcc827773b18a95d221ab86c1afc5e2f7c30ecb
SKL
import torch import torch.nn as nn import torch.nn.functional as F class SKL(nn.Module): def __init__(self, epsilon=1e-08): super(SKL, self).__init__() self.epsilon = epsilon def forward(self, input, target): logit = input.view(-1, input.size(-1)).float() target = target.view...
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 ...
Raiselimit/TorchBlocks
SKL
false
5,749
[ "MIT" ]
1
a5baecb9a2470ff175087475630f2b7db3f7ef51
https://github.com/Raiselimit/TorchBlocks/tree/a5baecb9a2470ff175087475630f2b7db3f7ef51
DistillKL
import torch import torch.nn.functional as F from torch import nn class DistillKL(nn.Module): """KL divergence for distillation""" def __init__(self, T): super(DistillKL, self).__init__() self.T = T def forward(self, y_s, y_t): p_s = F.log_softmax(y_s / self.T, dim=1) p_t...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math from torch ...
JJuOn/Few-shot_Class_Incremental_Learning
DistillKL
false
5,369
[ "MIT" ]
1
a2178051a6fefcd73b60f5e4236116bf828a801c
https://github.com/JJuOn/Few-shot_Class_Incremental_Learning/tree/a2178051a6fefcd73b60f5e4236116bf828a801c
Encoder
import torch from torch import nn import torch.nn.functional as F class Encoder(nn.Module): """Estimation of the nonnegative mixture weight by a 1-D conv layer. """ def __init__(self, kernel_size, enc_dim, audio_channels): super(Encoder, self).__init__() self.conv1d_U = nn.Conv1d(audio_ch...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
PanagiotisP/demucs
Encoder
false
11,771
[ "MIT" ]
0
d115d0773ca08a081f5b6bfe274cf0e4ed9e2677
https://github.com/PanagiotisP/demucs/tree/d115d0773ca08a081f5b6bfe274cf0e4ed9e2677
ELUPlus
import torch from torch import nn import torch.nn class ELUPlus(nn.Module): def __init__(self): super().__init__() self.elu = nn.ELU() def forward(self, x): return self.elu(x) + 1.0 def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn import torch.nn assert_size_stride = torch._C._dynamo.guar...
dennisprangle/nflows
ELUPlus
false
10,062
[ "MIT" ]
0
d3160c60845a4f22f3bf505dc11210d55848e69f
https://github.com/dennisprangle/nflows/tree/d3160c60845a4f22f3bf505dc11210d55848e69f
ResidualAttentionBlock
import math import torch import torch.nn as nn import torch as th class LayerNorm(nn.LayerNorm): """ Implementation that supports fp16 inputs but fp32 gains/biases. """ def forward(self, x: 'th.Tensor'): return super().forward(x.float()) class QKVMultiheadAttention(nn.Module): def __in...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
dbanys/glide-text2im
ResidualAttentionBlock
false
3,408
[ "MIT" ]
0
5177545ec62f1fddc3075a8a69b63df3eb2256a5
https://github.com/dbanys/glide-text2im/tree/5177545ec62f1fddc3075a8a69b63df3eb2256a5
FusedLeakyReLU
import torch from torch import nn from torch.nn.functional import leaky_relu class FusedLeakyReLU(nn.Module): def __init__(self, channel, negative_slope=0.2, scale=2 ** 0.5): super().__init__() self.bias = nn.Parameter(torch.zeros(channel)) self.negative_slope = negative_slope sel...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
jchetboun/anycost-gan
FusedLeakyReLU
false
10,386
[ "MIT" ]
0
7e0005e50b915e2dfeb90fe7a9846c5df38d7c06
https://github.com/jchetboun/anycost-gan/tree/7e0005e50b915e2dfeb90fe7a9846c5df38d7c06
Actor
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 Actor(nn.Module): """Actor (Policy) Model.""" def __init__(self, state_size, action_size, seed, f...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
joyce-fang/deep-reinforcement-learning
Actor
false
3,774
[ "MIT" ]
0
62cedab584465bd1c3ef112eb149e8fc611546e3
https://github.com/joyce-fang/deep-reinforcement-learning/tree/62cedab584465bd1c3ef112eb149e8fc611546e3
QuantizableHSigmoid
import torch import torch.nn as nn import torch.quantization class QuantizableHSigmoid(nn.Module): """Hard Sigmoid for quantization.""" def __init__(self, inplace: 'bool'=True) ->None: """Initialize.""" super(QuantizableHSigmoid, self).__init__() self.relu6 = nn.ReLU6(inplace=inplace)...
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.quantization assert_size_stride = torch._C._dynamo.gua...
dhlee347/model_compression
QuantizableHSigmoid
false
6,567
[ "MIT" ]
1
274b85ff56d81f0b7cf6907cbc1bd10e16cdb956
https://github.com/dhlee347/model_compression/tree/274b85ff56d81f0b7cf6907cbc1bd10e16cdb956
GlobalMaxPool1d
# 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 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
Generator
import math import torch import torch.nn as nn class LayerNorm(nn.Module): """Construct a layernorm module (See citation for details).""" def __init__(self, features, eps=1e-06): super(LayerNorm, self).__init__() self.a_2 = nn.Parameter(torch.ones(features)) self.b_2 = nn.Parameter(to...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
nigelnnk/MATCh-sensitivity
Generator
false
7,338
[ "MIT" ]
1
aaf2b924ac98c8c5925bbf431481724d11a102f8
https://github.com/nigelnnk/MATCh-sensitivity/tree/aaf2b924ac98c8c5925bbf431481724d11a102f8
WassersteinDiscriminatorLossCutMix
import torch from typing import Tuple import torch.nn as nn class WassersteinDiscriminatorLossCutMix(nn.Module): """ This class implements the Wasserstein loss for a discriminator network when utilizing cut mix augmentation. """ def __init__(self) ->None: """ Constructor method ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
ChristophReich1996/Multi-StyleGAN
WassersteinDiscriminatorLossCutMix
false
17,102
[ "MIT" ]
7
988f2dfea85b3205126b40c61edfb28107eb3173
https://github.com/ChristophReich1996/Multi-StyleGAN/tree/988f2dfea85b3205126b40c61edfb28107eb3173
AsymmetricLoss
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed class AsymmetricLoss(nn.Module): def __init__(self, gamma_neg=4, gamma_pos=1, clip=0.05, eps=1e-08, disable_torch_grad_focal_loss=False): super(AsymmetricLoss...
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...
davidaderup/query2labels
AsymmetricLoss
false
15,123
[ "MIT" ]
164
5a10c861dda85d94ba01ec6ad4119eef67a9f441
https://github.com/davidaderup/query2labels/tree/5a10c861dda85d94ba01ec6ad4119eef67a9f441
ActFirstResBlock
# 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 math as tl_math import torch....
Alikfp/research-GANwriting
ActFirstResBlock
false
7,656
[ "MIT" ]
41
2190954218a733deac52c929f51bb85bca5d7216
https://github.com/Alikfp/research-GANwriting/tree/2190954218a733deac52c929f51bb85bca5d7216
GELU
import torch import numpy as np import torch.nn as nn import torch.utils.data import torch.onnx.operators import torch.optim import torch.optim.lr_scheduler class GELU(nn.Module): def forward(self, x): cdf = 0.5 * (1.0 + torch.tanh(np.sqrt(2 / np.pi) * (x + 0.044715 * torch.pow(x, 3)))) ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import torch.utils.data import torch.onnx.operators impor...
YNNEKUW/fairseq
GELU
false
11,989
[ "MIT" ]
0
ef145b330ef26e7fb76609524504ab7933b88172
https://github.com/YNNEKUW/fairseq/tree/ef145b330ef26e7fb76609524504ab7933b88172
RQLoss
from torch.nn import Module import torch from typing import cast from torch.nn.modules import Module import torch.nn.functional as F class RQLoss(Module): """The RQ (backwards) loss between class probabilities and predictions. This loss is defined in `'Resolving label uncertainty with implicit generative ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
ethanwhite/torchgeo
RQLoss
false
15,315
[ "MIT" ]
678
cb20e1abfd9213f9ee7700df972385db13568642
https://github.com/ethanwhite/torchgeo/tree/cb20e1abfd9213f9ee7700df972385db13568642
CosineSimilarityLoss
# 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...
LTTM/LSR
CosineSimilarityLoss
false
5,479
[ "Apache-2.0" ]
1
ab204895a86160a5d278fe3cee14c11532251218
https://github.com/LTTM/LSR/tree/ab204895a86160a5d278fe3cee14c11532251218
PaddedMaxPool2d
# 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...
hilman-dayo/ObjectDetection-OneStageDet
PaddedMaxPool2d
false
15,516
[ "MIT" ]
331
44054ad335e24e99a98fdad0d18b9bf3a80c941c
https://github.com/hilman-dayo/ObjectDetection-OneStageDet/tree/44054ad335e24e99a98fdad0d18b9bf3a80c941c
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 from to...
hamishivi/claf
PositionwiseFeedForward
false
3,563
[ "MIT" ]
0
8e35f30e3fc4a45a45cc0766eb6ab55a6ba3f0c2
https://github.com/hamishivi/claf/tree/8e35f30e3fc4a45a45cc0766eb6ab55a6ba3f0c2
TensorCumsum
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
Minyus/pipelinex
TensorCumsum
false
14,031
[ "Apache-2.0" ]
188
f35c524ec9c50751ee27d9a42d98317e16f1c544
https://github.com/Minyus/pipelinex/tree/f35c524ec9c50751ee27d9a42d98317e16f1c544
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....
Aleph0Inc/HDSA-Dialog
ScaledDotProductAttention
false
13,254
[ "MIT" ]
146
88e2604adb5dc38ae32205410b15b2ac39116ecd
https://github.com/Aleph0Inc/HDSA-Dialog/tree/88e2604adb5dc38ae32205410b15b2ac39116ecd
tofp16
import torch import torch.utils.data import torch import torch.nn as nn class tofp16(nn.Module): def __init__(self): super(tofp16, self).__init__() def forward(self, input): return input.half() 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 import torch.utils.data import torch import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cud...
Icep2020/CrowdGAN
tofp16
false
17,424
[ "MIT" ]
7
4adebaa09460f2f8296d368ffeba03f32c963d4d
https://github.com/Icep2020/CrowdGAN/tree/4adebaa09460f2f8296d368ffeba03f32c963d4d
upsampleBlock
import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data def swish(x): return x * F.sigmoid(x) class upsampleBlock(nn.Module): def __init__(self, in_channels, out_channels): super(upsampleBlock, self).__init__() self.conv = nn.Conv2d(in_channels, out_channe...
import torch from torch._inductor.select_algorithm import extern_kernels import 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 import torch.utils.data as...
tomron27/srganus
upsampleBlock
false
11,007
[ "Apache-2.0" ]
0
5dab73540535138375203bf31e31246cd203f3c0
https://github.com/tomron27/srganus/tree/5dab73540535138375203bf31e31246cd203f3c0
ConcatSquashConv2d
import torch import torch.nn as nn import torch.utils.data class ConcatSquashConv2d(nn.Module): def __init__(self, dim_in, dim_out, ksize=3, stride=1, padding=0, dilation=1, groups=1, bias=True, transpose=False): super(ConcatSquashConv2d, self).__init__() module = nn.ConvTranspose2d if tr...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dyn...
D-hash-code/ffjord
ConcatSquashConv2d
false
11,361
[ "MIT" ]
0
3647ab35537a8bac3b4dc1e45a593819ac8e2c18
https://github.com/D-hash-code/ffjord/tree/3647ab35537a8bac3b4dc1e45a593819ac8e2c18
Discriminator
from _paritybench_helpers import _mock_config import torch import torch.nn as nn class Discriminator(nn.Module): def __init__(self, num_inputs, args): super(Discriminator, self).__init__() self.fc1 = nn.Linear(num_inputs, args.hidden_size) self.fc2 = nn.Linear(args.hidden_size, args.hidde...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
amy12xx/lets-do-irl
Discriminator
false
14,828
[ "MIT" ]
408
fd469e9fb7426e41b07c83ce4b87962ac3543b1e
https://github.com/amy12xx/lets-do-irl/tree/fd469e9fb7426e41b07c83ce4b87962ac3543b1e
L2Norm
# 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_...
albutko/vlb
L2Norm
false
6,153
[ "BSD-2-Clause" ]
1
437245c0991948eeb36a277937a7e67d389041e4
https://github.com/albutko/vlb/tree/437245c0991948eeb36a277937a7e67d389041e4
Scale
import math import torch import torch.nn as nn class Scale(nn.Module): def __init__(self, d_model): super(Scale, self).__init__() self.d_model = d_model def forward(self, x): return x * math.sqrt(self.d_model) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_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...
voidism/End-to-end-ASR-Pytorch
Scale
false
13,069
[ "MIT" ]
0
509c389fa6ab98c30e227c6f4c8f7474adbc1bb2
https://github.com/voidism/End-to-end-ASR-Pytorch/tree/509c389fa6ab98c30e227c6f4c8f7474adbc1bb2
GatedConv2d
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Nintorac/survae_experiments
GatedConv2d
false
903
[ "MIT" ]
0
d68cc25e2604aab08b53617c1f3ffe4716f166c4
https://github.com/Nintorac/survae_experiments/tree/d68cc25e2604aab08b53617c1f3ffe4716f166c4
Feedforward
# 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...
fywu85/eecs206a_project
Feedforward
false
6,708
[ "MIT" ]
1
73ea518779da4d187df8bbe4cbe46bca6d1a0714
https://github.com/fywu85/eecs206a_project/tree/73ea518779da4d187df8bbe4cbe46bca6d1a0714
DistillKL
import torch from torch import nn import torch.nn.functional as F class DistillKL(nn.Module): """Distilling the Knowledge in a Neural Network""" def __init__(self, T): super(DistillKL, self).__init__() self.T = T def forward(self, y_s, y_t): p_s = F.log_softmax(y_s / self.T, dim=...
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 ...
bobo0810/RepDistiller
DistillKL
false
10,165
[ "BSD-2-Clause" ]
0
0a4cea2142221b9b31c8e995920273f5619b37f8
https://github.com/bobo0810/RepDistiller/tree/0a4cea2142221b9b31c8e995920273f5619b37f8
ResHead
from torch.nn import Module import torch import torch.utils.data import torch.nn as nn def gap2d(_w_in): """Helper for building a gap2d layer.""" return nn.AdaptiveAvgPool2d((1, 1)) def gap2d_cx(cx, _w_in): """Accumulates complexity of gap2d into cx = (h, w, flops, params, acts).""" flops, params, a...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch.nn import Module import torch.utils.data import torch.nn as nn assert...
KateHaeun/pycls
ResHead
false
11,605
[ "MIT" ]
0
f3d87a36cb0a8adead31c7ad98f43facf7fe4c47
https://github.com/KateHaeun/pycls/tree/f3d87a36cb0a8adead31c7ad98f43facf7fe4c47
FocalFrequencyLoss
import torch import torch.nn as nn import torch.utils.data class FocalFrequencyLoss(nn.Module): """The torch.nn.Module class that implements focal frequency loss - a frequency domain loss function for optimizing generative models. Ref: Focal Frequency Loss for Image Reconstruction and Synthesis. In 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 import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C....
EndlessSora/focal-frequency-loss
FocalFrequencyLoss
false
13,645
[ "MIT" ]
364
dcaa01ecbfbbd9d8f83f7e5993474e1aa087227c
https://github.com/EndlessSora/focal-frequency-loss/tree/dcaa01ecbfbbd9d8f83f7e5993474e1aa087227c
DenseSAGEConv
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
NunoEdgarGFlowHub/pytorch_geometric
DenseSAGEConv
false
14,135
[ "MIT" ]
62
4a03a7e6484c38805a24a2e7362ef32b7e279036
https://github.com/NunoEdgarGFlowHub/pytorch_geometric/tree/4a03a7e6484c38805a24a2e7362ef32b7e279036
RWKV_TimeMix
# 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....
ofooo/AI-Writer
RWKV_TimeMix
false
12,861
[ "BSD-3-Clause" ]
0
1ba84894c15c9e5605d3c6cd7521d5c6dab6eb6d
https://github.com/ofooo/AI-Writer/tree/1ba84894c15c9e5605d3c6cd7521d5c6dab6eb6d
WCE_loss
import torch import torch.nn as nn class WCE_loss(nn.Module): def __init__(self): super(WCE_loss, self).__init__() def sum_ij(self, x): return torch.sum(torch.sum(x, dim=3), dim=2) def forward(self, pred, gt): N_fg = self.sum_ij(gt) N_bg = self.sum_ij(1 - gt) L_f...
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...
atch841/pytorch-one-shot-texture-segmentation
WCE_loss
false
1,498
[ "MIT" ]
0
8b781b861d17eb1e1e7014f54f8fd39dc10dd2b8
https://github.com/atch841/pytorch-one-shot-texture-segmentation/tree/8b781b861d17eb1e1e7014f54f8fd39dc10dd2b8
BatchSpectralShrinkage
import torch import torch.nn as nn import torch.utils.data class BatchSpectralShrinkage(nn.Module): """ The regularization term in `Catastrophic Forgetting Meets Negative Transfer: Batch Spectral Shrinkage for Safe Transfer Learning (NIPS 2019) <https://proceedings.neurips.cc/paper/2019/file/c6bff625bdb03...
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....
XianyuanLiu/Transfer-Learning-Library
BatchSpectralShrinkage
false
10,138
[ "MIT" ]
0
25f83f32437032df88ca6101ecd1f63ec7a0aa2c
https://github.com/XianyuanLiu/Transfer-Learning-Library/tree/25f83f32437032df88ca6101ecd1f63ec7a0aa2c
Net
# 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 ...
apaleyes/pybnn
Net
false
1,476
[ "BSD-3-Clause" ]
0
1362546662ebdf5d7f507add16a386fa665c51a1
https://github.com/apaleyes/pybnn/tree/1362546662ebdf5d7f507add16a386fa665c51a1
Pad_Conv
# 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 math from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guard...
Hullimulli/EEGEyeNet
Pad_Conv
false
566
[ "MIT" ]
0
677a791b39800f44dc254553b16ee2f92e62c423
https://github.com/Hullimulli/EEGEyeNet/tree/677a791b39800f44dc254553b16ee2f92e62c423
pixelwise_norm_layer
import torch import torch.nn as nn class pixelwise_norm_layer(nn.Module): def __init__(self): super(pixelwise_norm_layer, self).__init__() self.eps = 1e-08 def forward(self, x): return x / (torch.mean(x ** 2, dim=1, keepdim=True) + self.eps) ** 0.5 def get_inputs(): return [tor...
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_...
mikanCan/PG-GAN
pixelwise_norm_layer
false
10,640
[ "MIT" ]
0
bc4a1bd2101f836c22a164174381f80b3f5c73c1
https://github.com/mikanCan/PG-GAN/tree/bc4a1bd2101f836c22a164174381f80b3f5c73c1
NeuralNet1
import torch import torch.nn as nn class NeuralNet1(nn.Module): def __init__(self, input_size, hidden_size): super(NeuralNet1, self).__init__() self.linear1 = nn.Linear(input_size, hidden_size) self.relu = nn.ReLU() self.linear2 = nn.Linear(hidden_size, 1) def forward(self, x...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
jaykasundra2/pytorchTutorial
NeuralNet1
false
12,608
[ "MIT" ]
0
954a96797353d463cb96c66596272e180c602134
https://github.com/jaykasundra2/pytorchTutorial/tree/954a96797353d463cb96c66596272e180c602134
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...
PogChamper/torch2trt
MinElementwise
false
14,194
[ "MIT" ]
3,363
43b12627ec0de4d212efb6d02b07570205085ccc
https://github.com/PogChamper/torch2trt/tree/43b12627ec0de4d212efb6d02b07570205085ccc
SoftCrossEntropyLoss
import torch def soft_cross_entropy(logit, label, weight=None, reduce=None, reduction='mean' ): if weight is not None and weight.requires_grad: raise RuntimeError('gradient for weight is not supported') losses = SoftCrossEntropyFunction.apply(logit, label, weight) reduction = {(True): '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 assert_size_stride = t...
Jingkang50/ICCV21_SCOOD
SoftCrossEntropyLoss
false
8,364
[ "MIT" ]
34
51204e3788a9e81aa334611072bef106fd9d13ad
https://github.com/Jingkang50/ICCV21_SCOOD/tree/51204e3788a9e81aa334611072bef106fd9d13ad
dense_warp
# 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...
fqhank/HESIC
dense_warp
false
6,699
[ "Apache-2.0" ]
1
f15cb8e6822af45f0022ea4887fce915e250ed75
https://github.com/fqhank/HESIC/tree/f15cb8e6822af45f0022ea4887fce915e250ed75
SquaredReLU
# 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.nn import Module from torch import nn import torch.utils.data import torch.nn....
mcx/annotated_deep_learning_paper_implementations
SquaredReLU
false
7,205
[ "MIT" ]
1
f169f3a71dd2d36eb28ad31062d3475efa367b88
https://github.com/mcx/annotated_deep_learning_paper_implementations/tree/f169f3a71dd2d36eb28ad31062d3475efa367b88
FakeReLUM
# 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.utils.data from torch.utils import data as data import torch.nn as nn from t...
BCV-Uniandes/RSR
FakeReLUM
false
8,074
[ "zlib-acknowledgement" ]
14
dad60eedd3560f2655e3d1ed444153ed2616af2e
https://github.com/BCV-Uniandes/RSR/tree/dad60eedd3560f2655e3d1ed444153ed2616af2e
GCN_encoder
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
jonathangomesselman/graph-generation
GCN_encoder
false
6,980
[ "MIT" ]
1
72a8be30d54a414fcca9ea0fad1a62e38b85ee2f
https://github.com/jonathangomesselman/graph-generation/tree/72a8be30d54a414fcca9ea0fad1a62e38b85ee2f
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....
Brandon-mg/LipReader-Transformer
SelfAttention
false
2,043
[ "MIT" ]
0
0fe52957943368d7c5b8d1b0df39e3fb14f7c035
https://github.com/Brandon-mg/LipReader-Transformer/tree/0fe52957943368d7c5b8d1b0df39e3fb14f7c035
Net
# 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...
AstroHiro/NCM
Net
false
7,737
[ "MIT" ]
23
720db63ec018a1986ac9e370613f8209328b89e1
https://github.com/AstroHiro/NCM/tree/720db63ec018a1986ac9e370613f8209328b89e1
L1_log
import torch import torch.nn.functional as F import torch.nn as nn class L1_log(nn.Module): def __init__(self): super(L1_log, self).__init__() def forward(self, fake, real): if not fake.shape == real.shape: _, _, H, W = real.shape fake = F.upsample(fake, size=(H, W), ...
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 ...
Khoronus/MonoDepth-FPN-PyTorch
L1_log
false
714
[ "MIT" ]
0
6e41e297723d1490c537e04afff905c61d6f0ff8
https://github.com/Khoronus/MonoDepth-FPN-PyTorch/tree/6e41e297723d1490c537e04afff905c61d6f0ff8
Net
# 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_...
bradford415/multiclassification
Net
false
6,364
[ "MIT" ]
1
ee0234ec0a85b04f78cd86c3e5c52e5d658f19ac
https://github.com/bradford415/multiclassification/tree/ee0234ec0a85b04f78cd86c3e5c52e5d658f19ac
UNET
import torch from torch import nn class UNET(nn.Module): def __init__(self): super(UNET, self).__init__() self.conv1_1 = nn.Conv2d(in_channels=3, out_channels=16, kernel_size=3, stride=1, padding=1) self.conv1_2 = nn.Conv2d(in_channels=16, out_channels=16, kernel_s...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_s...
quenting44/semantic_segmentation
UNET
false
10,832
[ "MIT" ]
0
bd197ddda3c6891d69ff7e552a0c224c7ec1269a
https://github.com/quenting44/semantic_segmentation/tree/bd197ddda3c6891d69ff7e552a0c224c7ec1269a
EncoderLayer
# 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....
TheShadow29/vognet-pytorch
EncoderLayer
false
14,505
[ "MIT" ]
70
238e93c37cf9f03a2fd376a14760bb3d334a113d
https://github.com/TheShadow29/vognet-pytorch/tree/238e93c37cf9f03a2fd376a14760bb3d334a113d
cSE
import torch import torch.nn as nn class cSE(nn.Module): def __init__(self, out_channels): super().__init__() self.linear1 = nn.Linear(in_features=out_channels, out_features=int (out_channels / 2), bias=False) self.linear2 = nn.Linear(in_features=int(out_channels / 2), ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
Soo95/segmentation_models.pytorch
cSE
false
2,843
[ "MIT" ]
0
9131b336d6939dfabbadecd0d56d382283f46803
https://github.com/Soo95/segmentation_models.pytorch/tree/9131b336d6939dfabbadecd0d56d382283f46803
WeightedAttention
# 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....
ajabri/slot-attention
WeightedAttention
false
1,387
[ "MIT" ]
0
32acb6614f1bd511f2dc3c263f852ed2dbe9c213
https://github.com/ajabri/slot-attention/tree/32acb6614f1bd511f2dc3c263f852ed2dbe9c213
JS_div
# 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...
Sun915/MCALN
JS_div
false
2,859
[ "MIT" ]
0
e52600fddc62922148480ab9dce6aefc1d3788eb
https://github.com/Sun915/MCALN/tree/e52600fddc62922148480ab9dce6aefc1d3788eb
ResBlk
import torch import torch.nn as nn import torch.nn.functional as F class FRN(nn.Module): def __init__(self, num_features, eps=1e-05): super(FRN, self).__init__() self.tau = nn.Parameter(torch.zeros(1, num_features, 1, 1)) self.gamma = nn.Parameter(torch.ones(1, num_features, 1, 1)) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
UdonDa/StarGAN-v2-pytorch-nonofficial
ResBlk
false
18,050
[ "MIT" ]
9
219df6b7fd4bd533686e2093ee914a337914ca9b
https://github.com/UdonDa/StarGAN-v2-pytorch-nonofficial/tree/219df6b7fd4bd533686e2093ee914a337914ca9b
SELayer
# 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 torch import nn from torch.nn import functional as F import tor...
IST-DASLab/ACDC
SELayer
false
17,432
[ "Apache-2.0" ]
6
ac53210b6adc1f2506ff909de08172ed9cad25d5
https://github.com/IST-DASLab/ACDC/tree/ac53210b6adc1f2506ff909de08172ed9cad25d5
AndMLP
# 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_...
amayuelas/NNKGReasoning
AndMLP
false
6,173
[ "MIT" ]
1
0e3623b344fd4e3088ece897f898ddbb1f80888d
https://github.com/amayuelas/NNKGReasoning/tree/0e3623b344fd4e3088ece897f898ddbb1f80888d
ExtremeLinear
# 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 torch import nn from torch import autograd from torch.nn import...
crazyleg/lateral_research
ExtremeLinear
false
3,456
[ "MIT" ]
0
e186d218cd4b3ac3770e9fa375bc57133e4dafe5
https://github.com/crazyleg/lateral_research/tree/e186d218cd4b3ac3770e9fa375bc57133e4dafe5
BalancedBinaryCrossEntropy
import torch import torch.nn as nn from typing import Any import torch.nn.functional as F class BalancedBinaryCrossEntropy(nn.Module): """二分类加权交叉熵""" def __init__(self, reduction: 'str'='mean', class_weight: 'Any'=None, loss_weight: 'float'=1.0, activation: 'bool'=False) ->None: super(Balance...
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...
hehaoming/RSI-ChangeDetection
BalancedBinaryCrossEntropy
false
6,796
[ "MIT" ]
1
f24a1d79c03fb9fefc49bc91bc94b3c120992496
https://github.com/hehaoming/RSI-ChangeDetection/tree/f24a1d79c03fb9fefc49bc91bc94b3c120992496
AUGRUCell
import torch import torch.nn as nn import torch.nn.functional as F from sklearn.metrics import * import torch.onnx import torch as torch class AUGRUCell(nn.Module): """ Effect of GRU with attentional update gate (AUGRU) Reference: - Deep Interest Evolution Network for Click-Through Rate Predicti...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
dulvqingyunLT/DeepCTR-Torch
AUGRUCell
false
10,311
[ "Apache-2.0" ]
0
f40cf08f3469aa471f9ca69e44c5de51180341cc
https://github.com/dulvqingyunLT/DeepCTR-Torch/tree/f40cf08f3469aa471f9ca69e44c5de51180341cc
AttentionPool2d
import torch import torch.nn.functional as F from torch import nn class AttentionPool2d(nn.Module): def __init__(self, spacial_dim: 'int', embed_dim: 'int', num_heads: 'int', output_dim: 'int'=None): super().__init__() self.positional_embedding = nn.Parameter(torch.randn(spacial_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....
HIT-SCIR-xuanxuan/OpenKS
AttentionPool2d
false
13,771
[ "Apache-2.0" ]
88
a7f2ce0890822113322aad22e98d6c961e63caef
https://github.com/HIT-SCIR-xuanxuan/OpenKS/tree/a7f2ce0890822113322aad22e98d6c961e63caef