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
CircleLoss
import torch from typing import * import torch.nn as nn import torch.nn.functional as F class CircleLoss(nn.Module): def __init__(self, gamma, m): super().__init__() self.gamma = gamma self.m = m def forward(self, s_p, s_n): alpha_p = torch.clamp_min(1 + self.m - s_p, 0) ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math from typing...
IntelLabs/MICSAS
CircleLoss
false
17,429
[ "MIT", "BSD-3-Clause" ]
7
4124991a683cc10004e403f3f3eb442f58616519
https://github.com/IntelLabs/MICSAS/tree/4124991a683cc10004e403f3f3eb442f58616519
Hswish
import torch import torch.nn as nn import torch.utils.data class Hswish(nn.Module): def __init__(self, inplace=True): super(Hswish, self).__init__() self.relu = nn.ReLU6(inplace=inplace) def forward(self, x): return self.relu(x + 3) / 6 def get_inputs(): return [torch.rand([4, ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dynamo.guard...
COEN-390/YOLOv5-Lite
Hswish
false
11,262
[ "MIT" ]
0
06a53f5d001c5d37729f55f47cbd46cc8eb63f84
https://github.com/COEN-390/YOLOv5-Lite/tree/06a53f5d001c5d37729f55f47cbd46cc8eb63f84
Scale1Minus1
import torch class Scale1Minus1(torch.nn.Module): def __init__(self): super().__init__() def forward(self, x): x = x / 254.0 * 2 - 1 return x def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
Filco306/WASP-GANs
Scale1Minus1
false
470
[ "Apache-2.0" ]
0
e50cf096a5e3eb26d33a3cbf164d728b9789e41b
https://github.com/Filco306/WASP-GANs/tree/e50cf096a5e3eb26d33a3cbf164d728b9789e41b
ExtractTensorPatches
import torch import torch.nn as nn import torch.nn.functional as F from typing import Tuple from typing import Union from typing import Optional from torch.nn.modules.utils import _pair def _extract_tensor_patchesnd(input: 'torch.Tensor', window_sizes: 'Tuple[int, ...]', strides: 'Tuple[int, ...]') ->torch.Tensor...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.functional as F from typing import Tuple from typing import Union from typing import Optional from tor...
NickleDave/kornia
ExtractTensorPatches
false
2,681
[ "ECL-2.0", "Apache-2.0" ]
0
5392651d0bc268da577fa0a49aa50f957289c7dd
https://github.com/NickleDave/kornia/tree/5392651d0bc268da577fa0a49aa50f957289c7dd
ConvPlus
# 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...
jiangbestone/detect_rcnn
ConvPlus
false
6,938
[ "MIT" ]
1
41c4f4d3f8409cc146314c41a3d02ceafa9a7477
https://github.com/jiangbestone/detect_rcnn/tree/41c4f4d3f8409cc146314c41a3d02ceafa9a7477
MegatronGelu
import torch import torch.nn import torch.onnx class MegatronGelu(torch.nn.Module): def forward(self, x): return x * 0.5 * (torch.erf(x / 1.41421) + 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 import torch.nn import torch.onnx assert_size_stride = torch._C._dynamo.guards....
RyanUnderhill/onnxruntime
MegatronGelu
false
11,816
[ "MIT" ]
0
6df4e293ffbb47d739d2dedfbb87fa6234b8c37c
https://github.com/RyanUnderhill/onnxruntime/tree/6df4e293ffbb47d739d2dedfbb87fa6234b8c37c
AttnGCNLayer
import math import torch import torch.nn as nn import torch.utils.data class GCNLayer(nn.Module): def __init__(self, embed_size, dropout=0.0): super().__init__() self.embed_size = embed_size self.ctx_layer = nn.Linear(self.embed_size, self.embed_size, bias=False ) 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....
Fenkail/hgr_v2t
AttnGCNLayer
false
13,696
[ "MIT" ]
190
d8cc1c18cdaae54fd1878d6dc7b8e9c60d83fcbb
https://github.com/Fenkail/hgr_v2t/tree/d8cc1c18cdaae54fd1878d6dc7b8e9c60d83fcbb
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 import torch.nn as nn import torch.onnx assert_size_stride = torch._C._dynamo.gu...
chandar-lab/CriticalGradientOptimization
FeedForward
false
6,419
[ "MIT" ]
1
1af4b1df40489991289bb50bb69859a00b2c97c6
https://github.com/chandar-lab/CriticalGradientOptimization/tree/1af4b1df40489991289bb50bb69859a00b2c97c6
Theta
from torch.autograd import Function import torch import torch.nn as nn from typing import Tuple from typing import Optional import torch.nn.parallel import torch.utils.data import torch.utils.data.distributed from typing import Any class GradientReverseFunction(Function): @staticmethod def forward(ctx: 'Any'...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import 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 torch.nn as nn from typing import Tup...
Liuhong99/CST
Theta
false
8,502
[ "MIT" ]
20
f6653a4ee7968fa3ba875a182670636f648be783
https://github.com/Liuhong99/CST/tree/f6653a4ee7968fa3ba875a182670636f648be783
Classify
import torch import torch.nn as nn def autopad(k, p=None): if p is None: p = k // 2 if isinstance(k, int) else [(x // 2) for x in k] return p class Classify(nn.Module): def __init__(self, c1, c2, k=1, s=1, p=None, g=1): super().__init__() self.aap = nn.AdaptiveAvgPool2d(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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
HarryPham0123/FPT_data_centric_competition
Classify
false
5,305
[ "Apache-2.0" ]
1
3fa1e0ac48fdae2649b639229d9a74f75e461878
https://github.com/HarryPham0123/FPT_data_centric_competition/tree/3fa1e0ac48fdae2649b639229d9a74f75e461878
MLP
import torch import torch.nn as nn class MLP(nn.Module): def __init__(self, input_dim, hidden_dim, num_layers, output_dim): super(MLP, self).__init__() self.hidden_dim = hidden_dim self.num_layers = num_layers self.fc1 = nn.Linear(input_dim, hidden_dim) self.act = nn.ReLU(...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
NefeliTav/Stock-Prediction
MLP
false
2,673
[ "Apache-2.0" ]
0
b422a246c762685ceb94c9714a2322fce71186e1
https://github.com/NefeliTav/Stock-Prediction/tree/b422a246c762685ceb94c9714a2322fce71186e1
Beta2
# 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 numpy as np import torch.nn as nn assert_size_stride = torch._C._d...
RohanPankaj/apex
Beta2
false
998
[ "MIT" ]
0
74e96386bf9446d1179106d6d65ea0368c1b5b27
https://github.com/RohanPankaj/apex/tree/74e96386bf9446d1179106d6d65ea0368c1b5b27
OptimizedBlock
import math import torch import torch.nn as nn import torch.nn.functional as F def _downsample(x): return F.avg_pool2d(x, 2) class OptimizedBlock(nn.Module): def __init__(self, in_channels, out_channels, ksize=3, pad=1, activation=F.relu, bn=False): super(OptimizedBlock, self).__init__() ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import math import torch.nn a...
appa-ayephyu/RobGAN
OptimizedBlock
false
1,463
[ "MIT" ]
0
1d4577edb5b858e9d0c1e76a4c323de18201190c
https://github.com/appa-ayephyu/RobGAN/tree/1d4577edb5b858e9d0c1e76a4c323de18201190c
GeneralizedMeanPooling
import torch from torch import nn class GeneralizedMeanPooling(nn.Module): """Applies a 2D power-average adaptive pooling over an input signal composed of several input planes. The function computed is: :math:`f(X) = pow(sum(pow(X, p)), 1/p)` - At p = infinity, one gets Max Pooling - At p = 1,...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_...
gmt710/fast-reid
GeneralizedMeanPooling
false
12,441
[ "Apache-2.0" ]
0
44a609280013eb6928f67c418c7212d67e40fb5d
https://github.com/gmt710/fast-reid/tree/44a609280013eb6928f67c418c7212d67e40fb5d
PairwiseBCELoss
# 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...
GT-SALT/LADA
PairwiseBCELoss
false
8,138
[ "MIT" ]
31
2838a4c90694bf1054c6bab7f3b60ab5e04a5d4d
https://github.com/GT-SALT/LADA/tree/2838a4c90694bf1054c6bab7f3b60ab5e04a5d4d
ConvLayer
# 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_...
VIVelev/capsnets
ConvLayer
false
1,176
[ "MIT" ]
0
dca4bfcd4007977a6bc3534a4676880326fcf94a
https://github.com/VIVelev/capsnets/tree/dca4bfcd4007977a6bc3534a4676880326fcf94a
PARALoss
import torch import torch.nn as nn import torch.nn.functional as F class PARALoss(nn.Module): """ Softmax classifier for sentence-level relation extraction. """ def __init__(self): """ Args: sentence_encoder: encoder for sentences num_class: number of classes ...
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...
igorvlnascimento/redn
PARALoss
false
15,598
[ "MIT" ]
100
f40f19a0fdfbb11a7987996d520716a05bafd77b
https://github.com/igorvlnascimento/redn/tree/f40f19a0fdfbb11a7987996d520716a05bafd77b
Net2
# 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....
SarodYatawatta/federated-pytorch-test
Net2
false
8,763
[ "Apache-2.0" ]
33
42a51ba12a92b32fa19273340d5b61e74e11d8e0
https://github.com/SarodYatawatta/federated-pytorch-test/tree/42a51ba12a92b32fa19273340d5b61e74e11d8e0
FocalLossBinary
import torch import torch.jit import torch.nn.functional as F import torch.nn.functional from functools import partial from torch.nn.modules.loss import _Loss def reduced_focal_loss(outputs: 'torch.Tensor', targets: 'torch.Tensor', threshold: 'float'=0.5, gamma: 'float'=2.0, reduction='mean'): """ Compute...
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...
CamilaGL/nnUNet
FocalLossBinary
false
185
[ "Apache-2.0" ]
0
471ab73a6e4f67fc72d476183b5344be4cccf7ca
https://github.com/CamilaGL/nnUNet/tree/471ab73a6e4f67fc72d476183b5344be4cccf7ca
LayerNorm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
ParadoxZW/CosAttention2d
LayerNorm
false
5,708
[ "Apache-2.0" ]
1
19b3e655cf0ebc40721b806eb46a3132c488a188
https://github.com/ParadoxZW/CosAttention2d/tree/19b3e655cf0ebc40721b806eb46a3132c488a188
LinearEmbedding
# 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.utils.data import torch.nn as nn assert_size_stride = torch._C._dyn...
swift88-clone/Trajectory-Transformer
LinearEmbedding
false
13,011
[ "MIT" ]
0
62983b645ec88d8972bc2c2af1b7b4a299d3feb0
https://github.com/swift88-clone/Trajectory-Transformer/tree/62983b645ec88d8972bc2c2af1b7b4a299d3feb0
C
import torch import torch.nn as nn class C(nn.Module): def __init__(self, input_channel, output_channel, kernel_size, stride, padding, activation=None): """ At the final layer, a 3x3 convolution is used to map each 64-component feature vector to the desired number of classes. ...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
Nikronic/Deep-Halftoning
C
false
893
[ "MIT" ]
0
9564c592abf139ccab2791c1dbb354505edab5f9
https://github.com/Nikronic/Deep-Halftoning/tree/9564c592abf139ccab2791c1dbb354505edab5f9
C1
import torch import torch.nn as nn from collections import OrderedDict class C1(nn.Module): def __init__(self): super(C1, self).__init__() self.c1 = nn.Sequential(OrderedDict([('c1', nn.Conv2d(1, 6, kernel_size=(5, 5))), ('relu1', nn.ReLU()), ('s1', nn.MaxPool2d (kernel_si...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn from co...
zjgbz/img_cls
C1
false
4,664
[ "MIT" ]
0
513d5ae423d95e008a82a6ffe443db49f8ed9ac2
https://github.com/zjgbz/img_cls/tree/513d5ae423d95e008a82a6ffe443db49f8ed9ac2
Highway
import torch from torch import nn import torch.nn.functional as F class NonCausalConv1d(nn.Module): """Non causal Conv1d with appropriate padding to ensure sequence length stays the same. Note Convolutions always have stride of 1 following layout in paper. """ def __init__(self, in_channels, ou...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
lstsm12345/DCTTS-PyTorch
Highway
false
3,944
[ "MIT" ]
0
d44b9407b654abc2069bd2a7ef6231572ace1fa7
https://github.com/lstsm12345/DCTTS-PyTorch/tree/d44b9407b654abc2069bd2a7ef6231572ace1fa7
MuLawDecoding
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_str...
tbright17/audio
MuLawDecoding
false
10,917
[ "BSD-2-Clause" ]
0
00d38203e401b8d9472a8f8394a10e2c309be02c
https://github.com/tbright17/audio/tree/00d38203e401b8d9472a8f8394a10e2c309be02c
Encoder_attention
import torch import torch.nn as nn class Encoder_attention(nn.Module): def __init__(self, n_h): super(Encoder_attention, self).__init__() self.linear = nn.Linear(n_h, 1) self.softmax = nn.Softmax(dim=1) def forward(self, x): """Output: X """ x1 = self.linear(x).squeez...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
CrowdDynamicsLab/InfoMotif
Encoder_attention
false
17,177
[ "BSD-3-Clause" ]
7
cca1ffa14cc94408a5c4c50b7b1707c608e3bc9b
https://github.com/CrowdDynamicsLab/InfoMotif/tree/cca1ffa14cc94408a5c4c50b7b1707c608e3bc9b
BlendLinear
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dyn...
Justin-Tan/ffjord
BlendLinear
false
681
[ "MIT" ]
0
2caf8a4ff84933672fe0d94255d665b3dd7a6791
https://github.com/Justin-Tan/ffjord/tree/2caf8a4ff84933672fe0d94255d665b3dd7a6791
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...
ArrowLuo/GRACE
BertOutput
false
8,774
[ "Apache-2.0" ]
17
f27b500ba905685c03eee6d91d87adc9ef78b4d1
https://github.com/ArrowLuo/GRACE/tree/f27b500ba905685c03eee6d91d87adc9ef78b4d1
Attention
import torch import torch.nn.functional as F import torch.nn as nn def new_parameter(*size): out = nn.Parameter(torch.FloatTensor(*size)) torch.nn.init.xavier_normal_(out) return out class Attention(nn.Module): def __init__(self, attention_size): super(Attention, self).__init__() se...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
aaronbae/acl2020-dialogue-coherence-assessment
Attention
false
1,343
[ "MIT" ]
0
98142558b2f80ace390d6b583a3242a373803a85
https://github.com/aaronbae/acl2020-dialogue-coherence-assessment/tree/98142558b2f80ace390d6b583a3242a373803a85
Iter_Downsample
import torch import torch.nn as nn from math import sqrt as sqrt from itertools import product as product class Iter_Downsample(nn.Module): def __init__(self): super(Iter_Downsample, self).__init__() self.init_ds = nn.Sequential(nn.MaxPool2d(kernel_size=2, stride=2, padding=0), nn.Max...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn from math import sqrt as sqrt from itertools import product as prod...
vaesl/LFIP
Iter_Downsample
false
16,659
[ "MIT" ]
59
eb9d934616c508c9a9032f170baa1d97fa792822
https://github.com/vaesl/LFIP/tree/eb9d934616c508c9a9032f170baa1d97fa792822
SelfGating
import torch from torch import nn import torch as th import torch.hub import torch.utils.data class SelfGating(nn.Module): def __init__(self, input_dim): super(SelfGating, self).__init__() self.fc = nn.Linear(input_dim, input_dim) def forward(self, input_tensor): """Feature gating as...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import 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.hub import torch.utils.data assert_size_stride...
nicholasneo78/wav2vec-demo
SelfGating
false
12,832
[ "MIT" ]
0
c37db7b8211458dc810a85d4262ef41e3e3e4f12
https://github.com/nicholasneo78/wav2vec-demo/tree/c37db7b8211458dc810a85d4262ef41e3e3e4f12
AdaptiveFeatureNorm
import torch class AdaptiveFeatureNorm(torch.nn.Module): """ Implementation of the loss in [Larger Norm More Transferable: An Adaptive Feature Norm Approach for Unsupervised Domain Adaptation](https://arxiv.org/abs/1811.07456). Encourages features to gradually have larger and larger L2 norms. ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_c...
KevinMusgrave/pytorch-adapt
AdaptiveFeatureNorm
false
13,944
[ "MIT" ]
131
ff1491e1bfcc586afb8ee619712c8816ddf10358
https://github.com/KevinMusgrave/pytorch-adapt/tree/ff1491e1bfcc586afb8ee619712c8816ddf10358
MaskL1Loss
import torch import torch.nn as nn class MaskL1Loss(nn.Module): """ Loss from paper <Pose Guided Person Image Generation> Sec3.1 pose mask loss """ def __init__(self, ratio=1): super(MaskL1Loss, self).__init__() self.criterion = nn.L1Loss() self.ratio = ratio def forward(...
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 ...
pasan1992/Human-Pose-Transfer
MaskL1Loss
false
16,231
[ "MIT" ]
64
a7febc632d4fbf627ba05740d2048accb25575f2
https://github.com/pasan1992/Human-Pose-Transfer/tree/a7febc632d4fbf627ba05740d2048accb25575f2
BinaryFocalLossWithLogits
import torch import warnings from typing import Optional import torch.nn as nn import torch.nn.functional as F def binary_focal_loss_with_logits(input: 'torch.Tensor', target: 'torch.Tensor', alpha: 'float'=0.25, gamma: 'float'=2.0, reduction: 'str'='none', eps: 'Optional[float]'=None) ->torch.Tensor: """...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import warn...
YanivHollander/kornia
BinaryFocalLossWithLogits
false
14,631
[ "ECL-2.0", "Apache-2.0" ]
418
ccd258d0956da89b1feca96448eff8e4969d405a
https://github.com/YanivHollander/kornia/tree/ccd258d0956da89b1feca96448eff8e4969d405a
AdaIN
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.optim assert_size_stride = torch._C._dynamo.guards.assert_size_str...
ai-in-motion/moai
AdaIN
false
18,311
[ "Apache-2.0" ]
10
e38cac046c059d2e2331ef4883bbabc5a500a5cf
https://github.com/ai-in-motion/moai/tree/e38cac046c059d2e2331ef4883bbabc5a500a5cf
ParityPonderGRU
from torch.nn import Module import torch from torch import nn from typing import Tuple import torch.utils.data import torch.nn.functional import torch.autograd class ParityPonderGRU(Module): """ ## PonderNet with GRU for Parity Task This is a simple model that uses a [GRU Cell](https://pytorch.org/docs/s...
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.nn import Module from torch import nn import...
techthiyanes/annotated_deep_learning_paper_implementations
ParityPonderGRU
false
16,605
[ "MIT" ]
3,714
8af24da2dd39a9a87482a4d18c2dc829bbd3fd47
https://github.com/techthiyanes/annotated_deep_learning_paper_implementations/tree/8af24da2dd39a9a87482a4d18c2dc829bbd3fd47
CatKLLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math from torch.nn.modules.loss import _Loss assert_size_stride = torch._C._dy...
imguozhen/proactive-chat
CatKLLoss
false
10,289
[ "Apache-2.0" ]
0
80d13e28cb93c26a65ace0a028c53fd0bafcdbf9
https://github.com/imguozhen/proactive-chat/tree/80d13e28cb93c26a65ace0a028c53fd0bafcdbf9
Conv1d
# 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...
gheyret/EfficientConformer
Conv1d
false
15,429
[ "Apache-2.0" ]
101
b28a0aaa3b182f72abaccbeb12df0402adf96097
https://github.com/gheyret/EfficientConformer/tree/b28a0aaa3b182f72abaccbeb12df0402adf96097
BertPreTrainingHeads
from _paritybench_helpers import _mock_config import math import torch from torch import nn def gelu(x): """Gaussian Error Linear Unitという活性化関数です。 LeLUが0でカクっと不連続なので、そこを連続になるように滑らかにした形のLeLUです。 """ return x * 0.5 * (1.0 + torch.erf(x / math.sqrt(2.0))) class BertLayerNorm(nn.Module): def __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.triton_helpers import libdevice import math from to...
kimihitosugiyama/text_analysis
BertPreTrainingHeads
false
3,841
[ "Apache-2.0" ]
0
8f51022957928c31e52af1e0fd407daca3addb40
https://github.com/kimihitosugiyama/text_analysis/tree/8f51022957928c31e52af1e0fd407daca3addb40
PairwiseDistanceMatrix
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.parallel import torch.utils.data assert_si...
DreamBlack/APCNet
PairwiseDistanceMatrix
false
379
[ "MIT" ]
0
d76bc9e46c3b631035c5c67e2367b6fb80621333
https://github.com/DreamBlack/APCNet/tree/d76bc9e46c3b631035c5c67e2367b6fb80621333
FeatureEmbedder
import torch import numpy as np import torch.nn as nn from torch.utils import tensorboard as tensorboard class FeatureEmbedder(nn.Module): def __init__(self, d_feat, d_model): super(FeatureEmbedder, self).__init__() self.d_model = d_model self.embedder = nn.Linear(d_feat, d_model) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
valterlej/CustomBMT
FeatureEmbedder
false
16,852
[ "MIT" ]
157
c9326752d1355c81f845f2caab9c047be76067de
https://github.com/valterlej/CustomBMT/tree/c9326752d1355c81f845f2caab9c047be76067de
HuEtAl
# 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....
giorgosouz/HSI-classification-using-state-of-the-art-models
HuEtAl
false
12,426
[ "MIT" ]
0
a925972ffe02c2cd1e5dde2b163e1faa854a4966
https://github.com/giorgosouz/HSI-classification-using-state-of-the-art-models/tree/a925972ffe02c2cd1e5dde2b163e1faa854a4966
Net
import torch import torch.nn as nn import torch.nn.functional as F class Net(nn.Module): def __init__(self, input_size, out_size, drop_prob=0.5): super(Net, self).__init__() self.fc1 = nn.Linear(input_size, 256) self.fc2 = nn.Linear(256, out_size) self.drop_prob = drop_prob d...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
AlexMoreo/inntt
Net
false
18,410
[ "MIT" ]
2
6f48a37ad5b451f1fef0d2ca1c4c46dd5abc6689
https://github.com/AlexMoreo/inntt/tree/6f48a37ad5b451f1fef0d2ca1c4c46dd5abc6689
ReshapeF
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.utils.data import torch import torch.nn as nn assert_size_stride =...
bronemos/contrastive-unpaired-translation-focal
ReshapeF
false
3,248
[ "BSD-3-Clause" ]
0
50b9008d08a86439ede081a910d02df5da8e32df
https://github.com/bronemos/contrastive-unpaired-translation-focal/tree/50b9008d08a86439ede081a910d02df5da8e32df
LossesOfConVIRT
import torch import torch.nn as nn class LossesOfConVIRT(nn.Module): """ """ def __init__(self, tau=0.1, lambd=0.75): super(LossesOfConVIRT, self).__init__() self.tau = tau self.lambd = lambd def tmp_loss(self, v, u, index): """ """ assert v.size(0) ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
funnyzhou/REFERS
LossesOfConVIRT
false
15,374
[ "MIT" ]
46
392eddf13cbf3c3a7dc0bf8bfffd108ca4a65a19
https://github.com/funnyzhou/REFERS/tree/392eddf13cbf3c3a7dc0bf8bfffd108ca4a65a19
LocalDiscriminator
import torch import torch.nn as nn import torch.nn.functional as F import torch.optim class LocalDiscriminator(nn.Module): """The local discriminator class. A network that analyses the relation between the output of the encoder y, and the feature map M. It is called "local" because it compares y with...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
ValerioB88/self-supervised-relational-reasoning
LocalDiscriminator
false
9,680
[ "MIT" ]
0
12692b93d5c8dd3f56a31aa8b790366556e7a621
https://github.com/ValerioB88/self-supervised-relational-reasoning/tree/12692b93d5c8dd3f56a31aa8b790366556e7a621
BboxHead
import torch import torch.nn as nn from itertools import product as product class BboxHead(nn.Module): def __init__(self, inchannels=512, num_anchors=2): super(BboxHead, self).__init__() self.conv1x1 = nn.Conv2d(inchannels, num_anchors * 4, kernel_size=( 1, 1), stride=1, padding=0) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from itertools import product as product assert_size_strid...
huigs/retinaface-pytorch
BboxHead
false
10,241
[ "MIT" ]
0
0d7551d5863d172c2122bdd8d2d58be36e1b10fd
https://github.com/huigs/retinaface-pytorch/tree/0d7551d5863d172c2122bdd8d2d58be36e1b10fd
ConvReLUNorm
# 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....
PiotrDabkowski/NeMo
ConvReLUNorm
false
11,785
[ "Apache-2.0" ]
0
7c251e9035b24136cf130f3caf760087e5ccf07c
https://github.com/PiotrDabkowski/NeMo/tree/7c251e9035b24136cf130f3caf760087e5ccf07c
MixerBlock
# 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 ...
amayuelas/NNKGReasoning
MixerBlock
false
6,191
[ "MIT" ]
1
0e3623b344fd4e3088ece897f898ddbb1f80888d
https://github.com/amayuelas/NNKGReasoning/tree/0e3623b344fd4e3088ece897f898ddbb1f80888d
Attention
import torch import torch.nn as nn class Attention(nn.Module): def __init__(self, dim, heads, dropout): super().__init__() self.heads = heads head_dim = dim // heads self.scale = head_dim ** -0.5 self.attn = None self.qkv = nn.Linear(dim, dim * 3) self.attn...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
shampooma/segmenter
Attention
false
16,411
[ "MIT" ]
418
b08fd481da6758e37d108ba28676229b62f757aa
https://github.com/shampooma/segmenter/tree/b08fd481da6758e37d108ba28676229b62f757aa
ConvMlp
import torch from torch import nn import torch.cuda class ConvMlp(nn.Module): """ MLP using 1x1 convs that keeps spatial dims """ def __init__(self, in_features, hidden_features=None, out_features=None, act_layer=nn.ReLU, norm_layer=None, drop=0.0): super().__init__() out_features...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn import t...
LoveEachDay/towhee
ConvMlp
false
11,659
[ "Apache-2.0" ]
0
513c9c2626676cadaaf0a16ac3c828d96bec91a1
https://github.com/LoveEachDay/towhee/tree/513c9c2626676cadaaf0a16ac3c828d96bec91a1
RgbaToBgr
import torch import torch.nn as nn def bgr_to_rgb(image: 'torch.Tensor') ->torch.Tensor: """Convert a BGR image to RGB. Args: image (torch.Tensor): BGR Image to be converted to BGR of shape :math:`(*,3,H,W)`. Returns: torch.Tensor: RGB version of the image with shape of shape :math:`(*,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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
NickleDave/kornia
RgbaToBgr
false
2,683
[ "ECL-2.0", "Apache-2.0" ]
0
5392651d0bc268da577fa0a49aa50f957289c7dd
https://github.com/NickleDave/kornia/tree/5392651d0bc268da577fa0a49aa50f957289c7dd
EqualLinearActModule
# 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 copy import deepcopy import torch.nn as nn from functools import partial fr...
jiangwenj02/mmgeneration
EqualLinearActModule
false
12,614
[ "Apache-2.0" ]
0
da9ad377ae19260467fc332ddb88f505c38a915a
https://github.com/jiangwenj02/mmgeneration/tree/da9ad377ae19260467fc332ddb88f505c38a915a
HighwayNetwork
import torch import torch.nn as nn import torch.nn.functional as F class HighwayNetwork(nn.Module): def __init__(self, size): super().__init__() self.W1 = nn.Linear(size, size) self.W2 = nn.Linear(size, size) self.W1.bias.data.fill_(0.0) def forward(self, x): x1 = 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_...
Rongjiehuang/Multiband-WaveRNN
HighwayNetwork
false
8,726
[ "MIT" ]
18
432e449678220eed841fcb4971415e2e0ac4d9bb
https://github.com/Rongjiehuang/Multiband-WaveRNN/tree/432e449678220eed841fcb4971415e2e0ac4d9bb
AvgPool
# 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...
Thagio/kaggle-aptos
AvgPool
false
9,543
[ "MIT" ]
0
f565335d34b46b7fa7ca925b7d325397df8e1fee
https://github.com/Thagio/kaggle-aptos/tree/f565335d34b46b7fa7ca925b7d325397df8e1fee
RightSVDLayer
import math import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.parameter import Parameter class RightSVDLayer(nn.Module): def __init__(self, iw, ow, dropout=None, bias=True): super().__init__() self.weight = Parameter(torch.Tensor(iw, ow)) self.dropout = drop...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math import torch.nn as nn from torch.nn.parameter import Parameter asser...
collodi/ml_svd
RightSVDLayer
false
1,733
[ "MIT" ]
0
67a608ca10d3d37bf861e4e7490e62d298fa83b9
https://github.com/collodi/ml_svd/tree/67a608ca10d3d37bf861e4e7490e62d298fa83b9
Conv2dBlock
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel class AdaptiveInstanceNorm2d(nn.Module): def __init__(self, num_features, eps=1e-05, momentum=0.1): super(AdaptiveInstanceNorm2d, self).__init__() self.num_features = num_features self.eps = eps ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
FUTUREEEEEE/S2R-DepthNet
Conv2dBlock
false
2,249
[ "MIT" ]
0
415cc40aef10f9540026ff435d14a9ba9e30ad74
https://github.com/FUTUREEEEEE/S2R-DepthNet/tree/415cc40aef10f9540026ff435d14a9ba9e30ad74
ParentChildClassifier
# 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....
YilunZhou/wikihow-embedding
ParentChildClassifier
false
18,135
[ "MIT" ]
8
bfbcaf6aca854cd7e0dedfd5ecf77627138e8425
https://github.com/YilunZhou/wikihow-embedding/tree/bfbcaf6aca854cd7e0dedfd5ecf77627138e8425
NextSentencePrediction
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed import torch.distributions class NextSentencePrediction(nn.Module): """ 2-class classification model : is_next, is_not_next """ def __init__(self, hidden): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
greenstar1151/pytorch-benchmark
NextSentencePrediction
false
10,446
[ "BSD-3-Clause" ]
0
8b7808d3be6b7ca1d57f1812e35fd2df5e470f8b
https://github.com/greenstar1151/pytorch-benchmark/tree/8b7808d3be6b7ca1d57f1812e35fd2df5e470f8b
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 from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
ExpectationMax/Translational-Equivariant-Performers
FeedForward
false
8,075
[ "MIT" ]
10
c7a55af3b581426512eb4a57d3a13eb20e93fbd6
https://github.com/ExpectationMax/Translational-Equivariant-Performers/tree/c7a55af3b581426512eb4a57d3a13eb20e93fbd6
AttentionModule
import torch from torch import nn from torch.nn import functional as F class AttentionModule(nn.Module): """ A neural module that takes a feature map and attention, attends to the features, and produces an attention. Extended Summary ---------------- A :class:`AttentionModule` takes input fea...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
kdexd/probnmn-clevr
AttentionModule
false
15,795
[ "MIT" ]
69
9c1b2286cf30e9fb045370153c9242a39760e02e
https://github.com/kdexd/probnmn-clevr/tree/9c1b2286cf30e9fb045370153c9242a39760e02e
DiceLoss
import collections import torch import warnings from typing import Optional from typing import Union from typing import Any from typing import Callable from typing import Tuple import torch.nn from torch.nn.modules.loss import _Loss from enum import Enum import collections.abc def issequenceiterable(obj: 'Any') ->boo...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import collections from typing import Optional from typing import Union from typing import Any from typing import Callable from typing impor...
LucasFidon/MONAI
DiceLoss
false
2,592
[ "Apache-2.0" ]
0
a7ef9d567775dd7a222f93bab08191c0e3532c92
https://github.com/LucasFidon/MONAI/tree/a7ef9d567775dd7a222f93bab08191c0e3532c92
Transformer
import torch from torch import nn import torch.nn.functional as F import torch.utils.data class Transformer(nn.Module): def __init__(self, in_channels, out_channels): super(Transformer, self).__init__() self.T_sigma = nn.Linear(in_channels, out_channels) self.T_gamma = nn.Linear(in_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 from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math fr...
JunLi-Galios/PGGAN
Transformer
false
13,911
[ "Apache-2.0" ]
58
b8bd3dc44c71a985315fb82070e911378cf210db
https://github.com/JunLi-Galios/PGGAN/tree/b8bd3dc44c71a985315fb82070e911378cf210db
ImgSenRanking
# 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....
ypxie/HDGan
ImgSenRanking
false
16,770
[ "MIT" ]
160
d98e2a85f7ae6ce7bfacd1c15e519558d97cb931
https://github.com/ypxie/HDGan/tree/d98e2a85f7ae6ce7bfacd1c15e519558d97cb931
SAP
import torch import torch.nn as nn class SelfAttentionPooling(nn.Module): """ Implementation of SelfAttentionPooling Original Paper: Self-Attention Encoding and Pooling for Speaker Recognition https://arxiv.org/pdf/2008.01077v1.pdf """ def __init__(self, input_dim): super(SelfAttenti...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
B06901052/s3prl
SAP
false
123
[ "MIT" ]
0
5f63d2df043d2d7c81580cd042fa2cea34746f48
https://github.com/B06901052/s3prl/tree/5f63d2df043d2d7c81580cd042fa2cea34746f48
NormedLinear
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch.nn.functional as F from torch.nn import Parameter class NormedLinear(nn.Module): def __init__(self, in_features, out_features): super(NormedLinear, self).__init__() self.weight = 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....
dixit-dude7/LDAM-DRW
NormedLinear
false
12,285
[ "MIT" ]
0
6366f4756d3ac0c6b6db784b7f20e16066967ed4
https://github.com/dixit-dude7/LDAM-DRW/tree/6366f4756d3ac0c6b6db784b7f20e16066967ed4
AFMLayer
import itertools import torch import torch.nn as nn import torch.nn.functional as F from sklearn.metrics import * class AFMLayer(nn.Module): """Attentonal Factorization Machine models pairwise (order-2) feature interactions without linear term and bias. Input shape - A list of 3D tensor with sha...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
chenkkkk/DeepCTR-PyTorch
AFMLayer
false
6,475
[ "Apache-2.0" ]
1
a10a3ace4ad79171e7fb182407b3e4d22bf753e7
https://github.com/chenkkkk/DeepCTR-PyTorch/tree/a10a3ace4ad79171e7fb182407b3e4d22bf753e7
WordAttentionPool
from _paritybench_helpers import _mock_config import torch import torch.nn as nn class WordAttentionPool(nn.Module): def __init__(self, cfg): super(WordAttentionPool, self).__init__() input_size = cfg.INPUT_SIZE hidden_size = cfg.HIDDEN_SIZE self.stride = cfg.STRIDE self.v...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
CFM-MSG/Code_LEORN
WordAttentionPool
false
6,030
[ "MIT" ]
1
fabea1e1ded973a4db692e51e2df442bde55f626
https://github.com/CFM-MSG/Code_LEORN/tree/fabea1e1ded973a4db692e51e2df442bde55f626
CrossNet
# 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 from sklearn.metrics import * assert_size_stride = torch._...
Fanxingye/DeepRS
CrossNet
false
14,035
[ "Apache-2.0" ]
1,770
06b98cf2cb2781656805eafc577fbd088f37d17d
https://github.com/Fanxingye/DeepRS/tree/06b98cf2cb2781656805eafc577fbd088f37d17d
Reorg
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
CharlesPikachu/CharlesFace
Reorg
false
7,840
[ "MIT" ]
13
90bfe38c58068228d0069dce43b55b2570acaa16
https://github.com/CharlesPikachu/CharlesFace/tree/90bfe38c58068228d0069dce43b55b2570acaa16
HardSwish
import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data import torchvision.transforms.functional as F from torch.nn import functional as F def hard_swish(x, inplace: 'bool'=False): inner = F.relu6(x + 3.0).div_(6.0) return x.mul_(inner) if inplace else x.mul(inner) class H...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.nn.functional as F import torch.utils.data import torc...
BigFishMaster/tnt
HardSwish
false
17,506
[ "BSD-3-Clause" ]
3
8b80bb3b194eb87ac18924428ef0924c2fb263c5
https://github.com/BigFishMaster/tnt/tree/8b80bb3b194eb87ac18924428ef0924c2fb263c5
SPPblock
import torch from torch import nn import torch.nn.functional as F import torch.nn.parallel class SPPblock(nn.Module): def __init__(self, in_channels): super(SPPblock, self).__init__() self.pool1 = nn.MaxPool2d(kernel_size=[2, 2], stride=2) self.pool2 = nn.MaxPool2d(kernel_size=[3, 3], str...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn import t...
Minerva-J/Pytorch-Segmentation-multi-models
SPPblock
false
14,071
[ "Apache-2.0" ]
84
0845b54d4fbc8d38c70f158054b7ab1be2b3ceb9
https://github.com/Minerva-J/Pytorch-Segmentation-multi-models/tree/0845b54d4fbc8d38c70f158054b7ab1be2b3ceb9
PixelNorm
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Dolorousrtur/style-people
PixelNorm
false
8,003
[ "MIT" ]
15
c48b12b245cc50f8230c0654dffe40016f2a69f1
https://github.com/Dolorousrtur/style-people/tree/c48b12b245cc50f8230c0654dffe40016f2a69f1
SceneParserHead
# 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.utils.data from torch import nn assert_size_stride = torch._C._dyna...
hangwudy/pytorch_tutorial
SceneParserHead
false
10,184
[ "MIT" ]
0
857b128253bd1e2bd30cb85e995c757e5acbb3a2
https://github.com/hangwudy/pytorch_tutorial/tree/857b128253bd1e2bd30cb85e995c757e5acbb3a2
BiaffineAttention
import torch import torch.utils.checkpoint import torch.utils.data class BiaffineAttention(torch.nn.Module): """Implements a biaffine attention operator for binary relation classification. PyTorch implementation of the biaffine attention operator from "End-to-end neural relation extraction using deep bia...
import torch from torch._inductor.select_algorithm import extern_kernels import 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.checkpoint import torch.utils.data assert_size_stride = torch...
rushabh-v/unilm
BiaffineAttention
false
7,605
[ "MIT" ]
1
a62a023bd5d3500c23ac454be0a8b0107e18a6ce
https://github.com/rushabh-v/unilm/tree/a62a023bd5d3500c23ac454be0a8b0107e18a6ce
CAM_Module
# 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....
mlcb-jlu/wsMedSeg
CAM_Module
false
4,021
[ "MIT" ]
0
63bd1fd28583f11444f292f4b961870ea1b12635
https://github.com/mlcb-jlu/wsMedSeg/tree/63bd1fd28583f11444f292f4b961870ea1b12635
InnerProductLayer
# 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...
dreaming-qin/RecBole
InnerProductLayer
false
12,312
[ "MIT" ]
0
d6de39521484ded60c387ca604abaf86310acdbe
https://github.com/dreaming-qin/RecBole/tree/d6de39521484ded60c387ca604abaf86310acdbe
ConcatSquashConv2d
# 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...
ClaraBing/ffjord
ConcatSquashConv2d
false
13,509
[ "MIT" ]
518
a97c34ff546a063316828f53bd041555e663428d
https://github.com/ClaraBing/ffjord/tree/a97c34ff546a063316828f53bd041555e663428d
EncoderImageWeightNormPrecomp
# 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 collections im...
ChopinSharp/SCAN
EncoderImageWeightNormPrecomp
false
4,996
[ "Apache-2.0" ]
1
4a165b2aeb3007685054d0c550540893b2006b17
https://github.com/ChopinSharp/SCAN/tree/4a165b2aeb3007685054d0c550540893b2006b17
Transition
# 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 ...
Roxbili/T2T-ViT
Transition
false
9,445
[ "BSD-3-Clause-Clear" ]
0
c5442bc560ea15b421130f13e31c4b68f52c1e5a
https://github.com/Roxbili/T2T-ViT/tree/c5442bc560ea15b421130f13e31c4b68f52c1e5a
Squash
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch.nn import Module import torch.utils.data import torch.nn.functional ...
ppvalluri09/annotated_deep_learning_paper_implementations
Squash
false
11,078
[ "MIT" ]
0
387b6dfd1ef1f6d295e9394c24b5798071d9a3e4
https://github.com/ppvalluri09/annotated_deep_learning_paper_implementations/tree/387b6dfd1ef1f6d295e9394c24b5798071d9a3e4
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 import torch.nn as nn assert...
EmmaW8/EISNet
ContrastiveLoss
false
8,038
[ "MIT" ]
40
97c420d6763c5f825e88ed732edee4e75f3b947e
https://github.com/EmmaW8/EISNet/tree/97c420d6763c5f825e88ed732edee4e75f3b947e
ResBlock
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data import torch.nn as nn assert_size_stride = torch._C._dyn...
WestCityInstitute/InvDN
ResBlock
false
14,608
[ "Apache-2.0" ]
122
3846cf3548ccf6690e58be3aafe1f6d98c56b90d
https://github.com/WestCityInstitute/InvDN/tree/3846cf3548ccf6690e58be3aafe1f6d98c56b90d
MixtureDensityHead
from _paritybench_helpers import _mock_config import torch import torch.nn as nn from torch.autograd import Variable from torch.distributions import Categorical class MixtureDensityHead(nn.Module): def __init__(self, config: 'DictConfig', **kwargs): self.hparams = config super().__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.triton_helpers import libdevice import torch.nn as ...
robburdon/pytorch_tabular
MixtureDensityHead
false
16,685
[ "MIT" ]
560
9bf75f22c6e1b3033ad699713e77c283d55f3555
https://github.com/robburdon/pytorch_tabular/tree/9bf75f22c6e1b3033ad699713e77c283d55f3555
LayerNorm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Artanic30/RentalPrediction
LayerNorm
false
1,982
[ "MIT" ]
0
5804ab9b453d2a40bce2bb304c31efc98a803ed8
https://github.com/Artanic30/RentalPrediction/tree/5804ab9b453d2a40bce2bb304c31efc98a803ed8
RingLoss
import torch import warnings import torch.nn as nn from torchvision.transforms import * class RingLoss(nn.Module): """Ring loss. Reference: Zheng et al. Ring loss: Convex Feature Normalization for Face Recognition. CVPR 2018. """ def __init__(self): super(RingLoss, self).__init__() ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import warnings import torch.nn as nn from torchvision.transforms import * asse...
xijiali/ABD_Net
RingLoss
false
4,579
[ "MIT" ]
0
8d2d9b316b7c181ce441ceb4b1c62fb9a6d53153
https://github.com/xijiali/ABD_Net/tree/8d2d9b316b7c181ce441ceb4b1c62fb9a6d53153
FactorTransfer
import torch from torch import nn import torch.nn.functional as F class FactorTransfer(nn.Module): """Paraphrasing Complex Network: Network Compression via Factor Transfer, NeurIPS 2018""" def __init__(self, p1=2, p2=1): super(FactorTransfer, self).__init__() self.p1 = p1 self.p2 = p2...
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 ...
kctsiolis/RepDistiller
FactorTransfer
false
3,930
[ "BSD-2-Clause" ]
0
ce88f6e53fcf8ef81c5bac2d20ad31628dd279ac
https://github.com/kctsiolis/RepDistiller/tree/ce88f6e53fcf8ef81c5bac2d20ad31628dd279ac
ConvNorm
# 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.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size...
CODEJIN/TacoSinger
ConvNorm
false
4,934
[ "MIT" ]
1
af58a8f4e8b20e8817990f28a3ba22168c853655
https://github.com/CODEJIN/TacoSinger/tree/af58a8f4e8b20e8817990f28a3ba22168c853655
MeanPooling
import torch from torch import nn class MeanPooling(nn.Module): def __init__(self): super(MeanPooling, self).__init__() def forward(self, doc_state, entity_mapping, entity_lens): entity_states = entity_mapping.unsqueeze(3) * doc_state.unsqueeze(1) mean_pooled = torch.sum(entity_state...
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...
jennybae1024/DFGN-pytorch
MeanPooling
false
15,683
[ "MIT" ]
191
056d9317f772cd10bdd215bfafdbac5cbd330026
https://github.com/jennybae1024/DFGN-pytorch/tree/056d9317f772cd10bdd215bfafdbac5cbd330026
EncoderImagePrecomp
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import numpy as np ...
ascott02/vsepp
EncoderImagePrecomp
false
9,736
[ "Apache-2.0" ]
0
c09abd2be5f1fec237ccfe3d7f41bfdea2acfde2
https://github.com/ascott02/vsepp/tree/c09abd2be5f1fec237ccfe3d7f41bfdea2acfde2
layer_normalization
import torch import torch.nn as nn class layer_normalization(nn.Module): def __init__(self, features, epsilon=1e-08): """Applies layer normalization. Args: epsilon: A floating number. A very small number for preventing ZeroDivision Error. """ super(layer_normalization, ...
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_...
Woodytse/transformer
layer_normalization
false
11,968
[ "MIT" ]
0
56f7c3051765e8cb3c34d2e9a41d483cec162256
https://github.com/Woodytse/transformer/tree/56f7c3051765e8cb3c34d2e9a41d483cec162256
Generator
import torch import torch.nn as nn import torch.nn.functional as F class Generator(nn.Module): """Define standard linear + softmax generation step.""" def __init__(self, hidden_size, vocab_size): super(Generator, self).__init__() self.proj = nn.Linear(hidden_size, vocab_size, bias=False) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Yixuan-Lee/yixuan-lee.github.io
Generator
false
2,983
[ "MIT" ]
0
139dd141544302ca1802a6104f7db7aeb1ace825
https://github.com/Yixuan-Lee/yixuan-lee.github.io/tree/139dd141544302ca1802a6104f7db7aeb1ace825
BCEDiceLossWithLogits
import torch import torch.nn as nn import torch.utils.data def flatten_samples(input_): """ Flattens a tensor or a variable such that the channel axis is first and the sample axis is second. The shapes are transformed as follows: (N, C, H, W) --> (C, N * H * W) (N, C, D, H, W) --> (C, 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 libdevice, math as tl_math import torc...
JoOkuma/torch-em
BCEDiceLossWithLogits
false
667
[ "MIT" ]
0
68b723683f9013723a0e4fc8cfef1d6a2a9c9dff
https://github.com/JoOkuma/torch-em/tree/68b723683f9013723a0e4fc8cfef1d6a2a9c9dff
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 ...
SeungyounShin/pytorch-A3C
Net
false
1,040
[ "MIT" ]
0
acb9c05a5e1a697c48a7d4c1a48b1c86326faf91
https://github.com/SeungyounShin/pytorch-A3C/tree/acb9c05a5e1a697c48a7d4c1a48b1c86326faf91
decoder3
import torch import torch.nn as nn class decoder3(nn.Module): def __init__(self): super(decoder3, self).__init__() self.reflecPad7 = nn.ReflectionPad2d((1, 1, 1, 1)) self.conv7 = nn.Conv2d(256, 128, 3, 1, 0) self.relu7 = nn.ReLU(inplace=True) self.unpool = nn.UpsamplingNea...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
cy-xu/LinearStyleTransfer
decoder3
false
6,540
[ "BSD-2-Clause" ]
1
a07ab32db037f60a122e252588d6bd504b7d70d7
https://github.com/cy-xu/LinearStyleTransfer/tree/a07ab32db037f60a122e252588d6bd504b7d70d7
LinearExcitability
# 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.parameter import Parameter assert...
GMvandeVen/progressive-learning-pytorch
LinearExcitability
false
17,285
[ "MIT" ]
4
165645b2d7595d94d036f765c9a311d505e667a3
https://github.com/GMvandeVen/progressive-learning-pytorch/tree/165645b2d7595d94d036f765c9a311d505e667a3
Perplexity
# 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 ...
kefirski/contiguous-succotash
Perplexity
false
15,804
[ "MIT" ]
57
7497efd1392693248ed98805dcdbbf5dc125afc2
https://github.com/kefirski/contiguous-succotash/tree/7497efd1392693248ed98805dcdbbf5dc125afc2
AdjustLog
from torch.nn import Module import torch from torch import Tensor from typing import Optional def KORNIA_CHECK_IS_TENSOR(x, msg: 'Optional[str]'=None): if not isinstance(x, Tensor): raise TypeError(f'Not a Tensor type. Got: {type(x)}.\n{msg}') def adjust_log(image: 'Tensor', gain: 'float'=1, inv: 'bool'...
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 Module ...
YanivHollander/kornia
AdjustLog
false
14,632
[ "ECL-2.0", "Apache-2.0" ]
418
ccd258d0956da89b1feca96448eff8e4969d405a
https://github.com/YanivHollander/kornia/tree/ccd258d0956da89b1feca96448eff8e4969d405a
PartialConv
import math import torch import torch.nn as nn def weights_init(init_type='gaussian'): def init_fun(m): classname = m.__class__.__name__ if (classname.find('Conv') == 0 or classname.find('Linear') == 0 ) and hasattr(m, 'weight'): if init_type == 'gaussian': ...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
Northshoot/3d-photo-inpainting
PartialConv
false
11,772
[ "MIT" ]
0
49dd36ce4a277929831f09d978721b3fdb87eb25
https://github.com/Northshoot/3d-photo-inpainting/tree/49dd36ce4a277929831f09d978721b3fdb87eb25
Pointnet
import torch import torch.utils.data import torch.nn as nn class Pointnet(nn.Module): def __init__(self, in_channels, out_channels, hidden_dim, segmentation= False): super().__init__() self.fc_in = nn.Conv1d(in_channels, 2 * hidden_dim, 1) self.fc_0 = nn.Conv1d(2 * hidden_dim, hid...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
StructuralNeurobiologyLab/LightConvPoint
Pointnet
false
14,458
[ "Apache-2.0" ]
58
3f353f45e9e910fa390a74520dfd478e3e88f104
https://github.com/StructuralNeurobiologyLab/LightConvPoint/tree/3f353f45e9e910fa390a74520dfd478e3e88f104