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
LinModel
# 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....
Lisennlp/distributed_train_pytorch
LinModel
false
17,578
[ "Apache-2.0" ]
10
da43ac6b5f4484b5f7bc92e3c778539b9017cb82
https://github.com/Lisennlp/distributed_train_pytorch/tree/da43ac6b5f4484b5f7bc92e3c778539b9017cb82
MuLawEncoding
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math assert_size_stride = torch._C._dynamo.guards.assert_size_strid...
tbright17/audio
MuLawEncoding
false
10,919
[ "BSD-2-Clause" ]
0
00d38203e401b8d9472a8f8394a10e2c309be02c
https://github.com/tbright17/audio/tree/00d38203e401b8d9472a8f8394a10e2c309be02c
BboxHead
import torch from itertools import product as product import torch.nn as nn class BboxHead(nn.Module): def __init__(self, inchannels=512, num_anchors=3): 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 from itertools import product as product import torch.nn as nn assert_size_strid...
Jung-Jun-Uk/UNPG
BboxHead
false
17,542
[ "Apache-2.0" ]
7
a6f9c1731a68fc035eb8fe8198f5a5c643825a5b
https://github.com/Jung-Jun-Uk/UNPG/tree/a6f9c1731a68fc035eb8fe8198f5a5c643825a5b
StdConv2d
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 class StdConv2d(nn.Conv2d): def forward(self, x): w = self.weight s = w.std(dim=[1, 2, 3], keepdim=True) m = w.mean...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
BigFishMaster/tnt
StdConv2d
false
17,510
[ "BSD-3-Clause" ]
3
8b80bb3b194eb87ac18924428ef0924c2fb263c5
https://github.com/BigFishMaster/tnt/tree/8b80bb3b194eb87ac18924428ef0924c2fb263c5
resBlock
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
SeokjaeLIM/DSSN_release-Pytorch
resBlock
false
17,897
[ "Apache-2.0" ]
7
fef1dac120d7b83367b4c69f239b089ab5f004d7
https://github.com/SeokjaeLIM/DSSN_release-Pytorch/tree/fef1dac120d7b83367b4c69f239b089ab5f004d7
Network
import torch import torch.nn as nn import torch.nn.functional as F class Network(nn.Module): def __init__(self, n_feature, n_hidden, n_output): super(Network, self).__init__() self.fc = torch.nn.Linear(n_feature, n_hidden) self.out = torch.nn.Linear(n_hidden, n_output) def forward(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 import torch.nn as nn assert_...
ShiZhuming/ChallengeCup
Network
false
5,818
[ "MIT" ]
1
c422d1e9864e2bc663a3ddb5e3487a04a0525fcc
https://github.com/ShiZhuming/ChallengeCup/tree/c422d1e9864e2bc663a3ddb5e3487a04a0525fcc
GELU
# 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 from torch.optim.lr_scheduler import * from torch.optim im...
Challyfilio/NAIC2021
GELU
false
231
[ "MIT" ]
0
11b38a920dcc902f9b798dc43ae360062862e6e4
https://github.com/Challyfilio/NAIC2021/tree/11b38a920dcc902f9b798dc43ae360062862e6e4
HubertFeatureProjection
# 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...
sajastu/transformers-sent-curr
HubertFeatureProjection
false
4,240
[ "Apache-2.0" ]
0
6dc41545c4ac298a010090fbca4b454c2eaf3dbb
https://github.com/sajastu/transformers-sent-curr/tree/6dc41545c4ac298a010090fbca4b454c2eaf3dbb
MLP
import torch import torch.nn as nn from collections import OrderedDict class MLP(nn.Module): def __init__(self, input_dims, n_hiddens, n_class): super(MLP, self).__init__() assert isinstance(input_dims, int), 'Please provide int for input_dims' self.input_dims = input_dims current...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
luk1684tw/Precision-Reduction
MLP
false
12,843
[ "MIT" ]
0
c782e9a121ed176b12eb9a081aa1960fabd40019
https://github.com/luk1684tw/Precision-Reduction/tree/c782e9a121ed176b12eb9a081aa1960fabd40019
convnet
import torch import torch.nn as nn class convnet(nn.Module): def __init__(self, in_channel, dim): super(convnet, self).__init__() self.conv1 = nn.Conv2d(in_channel, 32, kernel_size=3, padding=1) self.conv2 = nn.Conv2d(32, 1, kernel_size=1) def forward(self, x): x = self.conv1...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
lzz0007/pyGAT
convnet
false
3,957
[ "MIT" ]
0
ea09c56037185ec5924dcd20b9c09d151174d1a3
https://github.com/lzz0007/pyGAT/tree/ea09c56037185ec5924dcd20b9c09d151174d1a3
TactileWeightModel
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data import torch.nn as nn from typing import Optional import torch.linalg assert_size_stride = torch._C._dynamo.guards.a...
jeffin07/theseus
TactileWeightModel
false
15,676
[ "MIT" ]
236
3498bbddf9cca740c2703d0c1aa3a78a7264cb15
https://github.com/jeffin07/theseus/tree/3498bbddf9cca740c2703d0c1aa3a78a7264cb15
Classifier3
# 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 import torch....
yuping1624/1082NCTU-Deep-Learning
Classifier3
false
4,739
[ "MIT" ]
0
dc83e1c8709e9610a996f02091fe626f07b3c10f
https://github.com/yuping1624/1082NCTU-Deep-Learning/tree/dc83e1c8709e9610a996f02091fe626f07b3c10f
Linker
# 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...
daniel03c1/audio_augment
Linker
false
1,770
[ "MIT" ]
0
ee73bb0844e22c57c9cbeb129560da4a3853f77d
https://github.com/daniel03c1/audio_augment/tree/ee73bb0844e22c57c9cbeb129560da4a3853f77d
PatchMerging
import torch import torch.nn as nn import torch.nn.functional as F from math import sqrt from torch import optim as optim class PatchMerging(nn.Module): """Patch Merging Layer. Args: input_resolution (tuple[int]): Resolution of input feature. dim (int): Number of input channels. norm_...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
taokong/ibot
PatchMerging
false
16,532
[ "Apache-2.0" ]
327
a2ee1ae7495d4ea8fb9ba100434c062f1bd3d1f0
https://github.com/taokong/ibot/tree/a2ee1ae7495d4ea8fb9ba100434c062f1bd3d1f0
ExpActivation
import torch import torch.nn as nn class ExpActivation(nn.Module): def __init__(self): super(ExpActivation, self).__init__() def forward(self, x): return torch.exp(-x ** 2) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
mahkons/orthogonal
ExpActivation
false
3,955
[ "MIT" ]
0
19a69134ca9a01ef564eab624b8c1526291770aa
https://github.com/mahkons/orthogonal/tree/19a69134ca9a01ef564eab624b8c1526291770aa
SelfAttentionUnit
# 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....
dohnlee/qufa2021
SelfAttentionUnit
false
12,304
[ "MIT" ]
0
5fb42caee09ec228358e49768e32c75e3c0094ce
https://github.com/dohnlee/qufa2021/tree/5fb42caee09ec228358e49768e32c75e3c0094ce
BinaryNLLEntropy
import torch import torch.nn.functional as F from torch.nn.modules.loss import _Loss class BinaryNLLEntropy(_Loss): def __init__(self, size_average=True): super(BinaryNLLEntropy, self).__init__() self.size_average = size_average def forward(self, net_output, label_output): """ ...
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....
Jupaoqq/Jupaoqq_LaRL
BinaryNLLEntropy
false
673
[ "Apache-2.0" ]
0
ae64adda5627987d71f2948f499daa11e9f309ad
https://github.com/Jupaoqq/Jupaoqq_LaRL/tree/ae64adda5627987d71f2948f499daa11e9f309ad
Smooth_loss
import torch import torch.nn as nn import torch.nn.functional as F class Smooth_loss(nn.Module): def __init__(self, Smooth_weight=1): super(Smooth_loss, self).__init__() self.Smooth_weight = Smooth_weight def forward(self, x): _b, _c, h, w = x.size() x_h = F.pad(x, (0, 0, 1, ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
SeokjaeLIM/DSLR-release
Smooth_loss
false
8,753
[ "Apache-2.0" ]
14
861429482faf50ee3d6570948af8c48df1fc7f43
https://github.com/SeokjaeLIM/DSLR-release/tree/861429482faf50ee3d6570948af8c48df1fc7f43
DilatedResConv
import torch import torch.nn as nn import torch.nn.functional as F class DilatedResConv(nn.Module): def __init__(self, channels, dilation=1, activation='relu', padding=1, kernel_size=3, left_pad=0): super().__init__() in_channels = channels if activation == 'relu': 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 import ...
ChesterHuynh/Wavenet-CPC-Music-Translation
DilatedResConv
false
266
[ "MIT" ]
0
60632b0330a61a10bac1a129826c55372f685427
https://github.com/ChesterHuynh/Wavenet-CPC-Music-Translation/tree/60632b0330a61a10bac1a129826c55372f685427
BertSelfAttention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
MingjieWang0606/2021-Sohu-Text-Matching-TOP2
BertSelfAttention
false
18,080
[ "MIT" ]
5
830a286cc978cb285cb63ae5a457e1d3813fa68a
https://github.com/MingjieWang0606/2021-Sohu-Text-Matching-TOP2/tree/830a286cc978cb285cb63ae5a457e1d3813fa68a
JustConvBody
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 JustConvBody(nn.Module): def __init__(self, in_channels=4): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
Louis-Bagot/DeepRL
JustConvBody
false
9,703
[ "MIT" ]
0
0b152c52bbba90362c8276c223fee3f9a464eb32
https://github.com/Louis-Bagot/DeepRL/tree/0b152c52bbba90362c8276c223fee3f9a464eb32
Value
import torch import torch.nn as nn import torch.nn.functional as F class Value(nn.Module): def __init__(self, num_inputs): super(Value, self).__init__() self.affine1 = nn.Linear(num_inputs, 64) self.affine2 = nn.Linear(64, 64) self.value_head = nn.Linear(64, 1) self.value_...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
tpbarron/pytorch-ppo
Value
false
16,608
[ "MIT" ]
47
f73226865e34443f93dbec58939329c9278828e8
https://github.com/tpbarron/pytorch-ppo/tree/f73226865e34443f93dbec58939329c9278828e8
PointerSwitch
import torch import torch.nn as nn class Linear(nn.Linear): """ Apply linear projection to the last dimention of a tensor. """ def forward(self, x): size = x.size() return super().forward(x.contiguous().view(-1, size[-1])).view(* size[:-1], -1) class ConcatAndProject(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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
CrafterKolyan/TabularSemanticParsing
PointerSwitch
false
2,109
[ "BSD-3-Clause" ]
0
2d75a3b71fa4c58f2c14ac43a33916747e8f4d1f
https://github.com/CrafterKolyan/TabularSemanticParsing/tree/2d75a3b71fa4c58f2c14ac43a33916747e8f4d1f
Conv2dTransposeBlock
# 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.nn import function...
CompVis/interactive-image2video-synthesis
Conv2dTransposeBlock
false
7,928
[ "MIT" ]
20
05ea449d3a2704b6d79a5f08683035220d615576
https://github.com/CompVis/interactive-image2video-synthesis/tree/05ea449d3a2704b6d79a5f08683035220d615576
Highway
# 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_...
Kailianghu/Character-Aware-Neural-Language-Model
Highway
false
8,386
[ "MIT" ]
35
6bd72ce00a3ac9eb152ba006bdae8a6922e0ad35
https://github.com/Kailianghu/Character-Aware-Neural-Language-Model/tree/6bd72ce00a3ac9eb152ba006bdae8a6922e0ad35
GeLU
# 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 math import torch.nn as nn import torch.utils.data assert_size_stride = ...
ashutoshbaghel/tgifqa-lxmert
GeLU
false
1,469
[ "MIT" ]
0
7969f478d20fbfbba1c0eaaf0b96891654bfcc26
https://github.com/ashutoshbaghel/tgifqa-lxmert/tree/7969f478d20fbfbba1c0eaaf0b96891654bfcc26
MultiHeadAttentionBlock
import math import torch import torch.nn as nn import torch.utils.data import torch.backends.cudnn def mask_logits(inputs, mask, mask_value=-1e+30): mask = mask.type(torch.float32) return inputs + (1.0 - mask) * mask_value class Conv1D(nn.Module): def __init__(self, in_dim, out_dim, kernel_size=1, stri...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
IsaacChanghau/VSLNet
MultiHeadAttentionBlock
false
13,890
[ "MIT" ]
62
3793c625f2e251a5f19a0d59f0c83b12e386f808
https://github.com/IsaacChanghau/VSLNet/tree/3793c625f2e251a5f19a0d59f0c83b12e386f808
HardSwish
import torch from torch import nn import torch.nn.functional as F def hard_swish(x: 'torch.Tensor', inplace: 'bool'=False) ->torch.Tensor: inner = F.relu6(x + 3.0).div_(6.0) return x.mul_(inner) if inplace else x.mul(inner) class HardSwish(nn.Module): """ HardSwish activiation layer. Applies th...
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 import torch.nn.functional as F assert_size_stride = torch._C._dynam...
SimonCqk/towhee
HardSwish
false
9,623
[ "Apache-2.0" ]
0
a187833b1411216106a80a71e6f2c6e68e1be330
https://github.com/SimonCqk/towhee/tree/a187833b1411216106a80a71e6f2c6e68e1be330
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 assert_size_stride = torch._...
QTIM-Lab/SiameseChange
ContrastiveLoss
false
8,654
[ "MIT" ]
14
a58fe2a93487b3e164f1d7e0b27f5a3321bc2672
https://github.com/QTIM-Lab/SiameseChange/tree/a58fe2a93487b3e164f1d7e0b27f5a3321bc2672
FastGRNNCell
import torch import torch.nn as nn import torch.onnx from itertools import product as product def gen_nonlinearity(A, nonlinearity): """ Returns required activation for a tensor based on the inputs nonlinearity is either a callable or a value in ['tanh', 'sigmoid', 'relu', 'quantTanh', 'quantSigm...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
ShishirPatil/EdgeML-1
FastGRNNCell
false
1,076
[ "MIT" ]
0
cbba9f8b989e545788427c004eb8450e7e4c1a21
https://github.com/ShishirPatil/EdgeML-1/tree/cbba9f8b989e545788427c004eb8450e7e4c1a21
VAE
import torch from torch import nn from torch.nn import functional as F class VAE(nn.Module): def __init__(self): super(VAE, self).__init__() self.fc1 = nn.Linear(84 * 84, 400) self.fc21 = nn.Linear(400, 20) self.fc22 = nn.Linear(400, 20) self.fc3 = nn.Linear(20, 400) ...
import torch from torch import device from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from...
TannerSorensen/speech_production_manifolds
VAE
false
5,884
[ "MIT" ]
1
0dcc2c099ad0e1e157c7f108e28f5957d4ac2f48
https://github.com/TannerSorensen/speech_production_manifolds/tree/0dcc2c099ad0e1e157c7f108e28f5957d4ac2f48
MyMul
# 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 math as tl_math from torch import nn import torch.nn.parallel import torch.optim import t...
JurijsNazarovs/bayesian_nn
MyMul
false
17,519
[ "MIT" ]
6
936bf55e0a1e620504d5159c100a74493bd16399
https://github.com/JurijsNazarovs/bayesian_nn/tree/936bf55e0a1e620504d5159c100a74493bd16399
ContentLoss
import torch from torch import nn class ContentLoss(nn.Module): def forward(self, content_weight, content_current, content_original): """ Compute the content loss for style transfer. Inputs: - content_weight: Scalar giving the weighting for the content loss. ...
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...
Kuga23/Deep-Learning
ContentLoss
false
2,483
[ "MIT" ]
0
86980338208c702b6bfcbcfffdb18498e389a56b
https://github.com/Kuga23/Deep-Learning/tree/86980338208c702b6bfcbcfffdb18498e389a56b
Actor
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
mpgussert/fundamentalRL
Actor
false
7,276
[ "MIT" ]
1
4f45436226e0823c21cac316dec8bbf1df697467
https://github.com/mpgussert/fundamentalRL/tree/4f45436226e0823c21cac316dec8bbf1df697467
DuelingQNetwork
import torch import torch.nn.functional as F import torch.nn as nn class DuelingQNetwork(nn.Module): """Actor (Policy) Model.""" def __init__(self, state_size, action_size, seed, fc1_units=48): """Initialize parameters and build model. Params ====== state_size (int): Dimen...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
bobiblazeski/navigation
DuelingQNetwork
false
6,349
[ "MIT" ]
1
bb863b4475a90ff26bede20af647ae4882a0f6fb
https://github.com/bobiblazeski/navigation/tree/bb863b4475a90ff26bede20af647ae4882a0f6fb
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 from torch._inductor.runtime.triton_helpers import math as tl_math import torch....
LenKerr/Semantic-Colorization-GAN
GatedConv2d
false
5,500
[ "MIT" ]
1
2ce52406ca6fc92e69692b451b1c9ae66ba3b76f
https://github.com/LenKerr/Semantic-Colorization-GAN/tree/2ce52406ca6fc92e69692b451b1c9ae66ba3b76f
Attention
import torch from typing import Tuple from torch import nn class Attention(nn.Module): """ Attention network Parameters ---------- rnn_size : int Size of Bi-LSTM """ def __init__(self, rnn_size: 'int') ->None: super(Attention, self).__init__() self.w = nn.Linear(r...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Renovamen/Text-Classification
Attention
false
14,279
[ "MIT" ]
72
4a4aa4001c402ed4371ebaabe1393b27794e5992
https://github.com/Renovamen/Text-Classification/tree/4a4aa4001c402ed4371ebaabe1393b27794e5992
Temporal_Gated_conv
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Zhangtianpu/GEE_Classification
Temporal_Gated_conv
false
6,027
[ "MIT" ]
1
153356689b1cf3a9bffac1b0afd02891372295ca
https://github.com/Zhangtianpu/GEE_Classification/tree/153356689b1cf3a9bffac1b0afd02891372295ca
RGBDiff
import torch from torch import nn from torchvision import models as models import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed from torchvision.transforms import * import torch.onnx class RGBDiff(nn.Module): def __init__(self, dim=1): super().__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 import nn from torchvision import models as models import torch.nn.parallel import torch.optim import torch.utils.data import tor...
aalborov/openvino_training_extensions
RGBDiff
false
6,034
[ "Apache-2.0" ]
1
a0bb39424151a98e1ca80c4aa5c865636d401785
https://github.com/aalborov/openvino_training_extensions/tree/a0bb39424151a98e1ca80c4aa5c865636d401785
StateActionEmbedding
import math import torch import numpy as np from abc import ABC from abc import abstractmethod from abc import abstractproperty from torch import nn from enum import Enum def tensor_to_numpy(tensor): return tensor.detach().cpu().numpy() class MLPParamHandler(ABC): def __init__(self) ->None: """Inte...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math import numpy as np from abc import ABC from abc import abstractmethod from abc import abstractproperty from torch import nn from...
Sebastian-Griesbach/Improving-Policy-Conditioned-Value-Functions
StateActionEmbedding
false
1,052
[ "MIT" ]
0
ec4125c5e056753e507df0406fcd60b6b6c3dc25
https://github.com/Sebastian-Griesbach/Improving-Policy-Conditioned-Value-Functions/tree/ec4125c5e056753e507df0406fcd60b6b6c3dc25
BertTextPooler
from _paritybench_helpers import _mock_config import torch import torch.nn as nn class BertTextPooler(nn.Module): def __init__(self, config): super(BertTextPooler, self).__init__() self.dense = nn.Linear(config.hidden_size, config.bi_hidden_size) self.activation = nn.ReLU() def forwa...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
amitakamath/vilbert-multi-task
BertTextPooler
false
12,086
[ "MIT" ]
0
5a11b8265fab3598fcdcd7f7c33453b914d8ff2c
https://github.com/amitakamath/vilbert-multi-task/tree/5a11b8265fab3598fcdcd7f7c33453b914d8ff2c
DummyEmbedder
# 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...
HumaticsLAB/GTM-Transformer
DummyEmbedder
false
17,402
[ "MIT" ]
7
94124d3246c7c22d8b952beeda53639a9ad170e3
https://github.com/HumaticsLAB/GTM-Transformer/tree/94124d3246c7c22d8b952beeda53639a9ad170e3
MLP
import torch from torch import nn from torch.utils.data import * import torch.nn.functional as F class MLP(nn.Module): def __init__(self): super(MLP, self).__init__() self.fc1 = nn.Linear(784, 512) self.fc2 = nn.Linear(512, 128) self.fc3 = nn.Linear(128, 10) def forward(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....
Cjkkkk/nnfusion
MLP
false
8,911
[ "MIT" ]
0
7ee61dfdd66fbf67eb178fcc5cfa1cddb99b3c13
https://github.com/Cjkkkk/nnfusion/tree/7ee61dfdd66fbf67eb178fcc5cfa1cddb99b3c13
GramMatrix
import torch import torch.nn as nn class GramMatrix(nn.Module): """ Base Gram Matrix calculation as per Gatys et al. 2015 """ def forward(self, input): b, c, h, w = input.size() F = input.view(b, c, h * w) G = torch.bmm(F, F.transpose(1, 2)) G = G.div_(h * w) r...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
ChuckHend/nst-zoo
GramMatrix
false
2,098
[ "MIT" ]
0
130e485289c5a9417c3dc36980b87373f12f3697
https://github.com/ChuckHend/nst-zoo/tree/130e485289c5a9417c3dc36980b87373f12f3697
AsymmetricLossOptimized
import torch import torch.nn as nn class AsymmetricLossOptimized(nn.Module): """ Notice - optimized version, minimizes memory allocation and gpu uploading, favors inplace operations""" def __init__(self, gamma_neg=4, gamma_pos=1, clip=0.05, eps=1e-08, disable_torch_grad_focal_loss=False): ...
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...
imvladikon/pytorch-loss
AsymmetricLossOptimized
false
6,869
[ "MIT" ]
1
6cfaabe1be898e1ff000b3dffb46d0ef09096f6b
https://github.com/imvladikon/pytorch-loss/tree/6cfaabe1be898e1ff000b3dffb46d0ef09096f6b
DisConvModule
import torch import torch.nn as nn from torch.nn.utils import spectral_norm as spectral_norm_fn from torch.nn.utils import weight_norm as weight_norm_fn def dis_conv(input_dim, output_dim, kernel_size=5, stride=2, padding=0, rate=1, activation='lrelu'): return Conv2dBlock(input_dim, output_dim, kernel_size, 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 import torch.nn as nn from torch.nn.utils import spectral_norm as spectral_norm_...
xy-gao/generative-inpainting-pytorch
DisConvModule
false
13,135
[ "MIT" ]
0
24f2183a11fd48a0383c9862e3d1a6354fbb6cda
https://github.com/xy-gao/generative-inpainting-pytorch/tree/24f2183a11fd48a0383c9862e3d1a6354fbb6cda
LocationEncoder
import torch import torch.nn as nn import torch.nn.functional as F class NormalizeScale(nn.Module): def __init__(self, dim, init_norm=20): super(NormalizeScale, self).__init__() self.init_norm = init_norm self.weight = nn.Parameter(torch.ones(1, dim) * init_norm) def forward(self, bo...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
sibeiyang/sgmn
LocationEncoder
false
16,444
[ "MIT" ]
130
00731b4f2202246d40a36d2a6727c599e6e649aa
https://github.com/sibeiyang/sgmn/tree/00731b4f2202246d40a36d2a6727c599e6e649aa
MidNet2
import torch import torch.nn as nn class MidNet2(nn.Module): def forward(self, x_in): """Network with dilation rate 2 :param x_in: input convolutional features :returns: processed convolutional features :rtype: Tensor """ x = self.lrelu(self.conv1...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
deshwalmahesh/CURL---cpu-gpu
MidNet2
false
3,409
[ "BSD-3-Clause" ]
0
f4e87275b6cce556b9e04a188cf7ae13d810d82a
https://github.com/deshwalmahesh/CURL---cpu-gpu/tree/f4e87275b6cce556b9e04a188cf7ae13d810d82a
LipSwish
import torch class LipSwish(torch.nn.Module): def forward(self, x): return 0.909 * torch.nn.functional.silu(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...
Zymrael/torchsde
LipSwish
false
6,028
[ "Apache-2.0" ]
1
b31825280e50293bce327ae6d89a7b7e4f5bfce1
https://github.com/Zymrael/torchsde/tree/b31825280e50293bce327ae6d89a7b7e4f5bfce1
Normalize
import torch class Normalize(torch.nn.Module): def __init__(self, *args, **kwargs): super(Normalize, self).__init__() self.args = args self.kwargs = kwargs def forward(self, x): return torch.nn.functional.normalize(x, *self.args, **self.kwargs) def get_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 from torch._inductor.runtime.triton_helpers import libdevice assert_size_stride = torch._...
Akababa/torch2trt
Normalize
false
18,425
[ "MIT" ]
2
03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7
https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7
Network
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_s...
gray-li/HalfRainbowDQN
Network
false
12,473
[ "MIT" ]
0
43e2b12945c14e0e39eea3bbf56c7af785c48720
https://github.com/gray-li/HalfRainbowDQN/tree/43e2b12945c14e0e39eea3bbf56c7af785c48720
DotAttention
# 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....
zake7749/DeepToxic
DotAttention
false
16,796
[ "MIT" ]
206
92710446c55fe60526099f808a7e1179402e199f
https://github.com/zake7749/DeepToxic/tree/92710446c55fe60526099f808a7e1179402e199f
TriangleMultiplicativeModule
import torch from torch import nn from torch import einsum from inspect import isfunction def exists(val): return val is not None def default(val, d): if exists(val): return val return d() if isfunction(d) else d class TriangleMultiplicativeModule(nn.Module): def __init__(self, *, dim, hi...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
aced125/alphafold2
TriangleMultiplicativeModule
false
6,083
[ "MIT" ]
1
c85682ece37d37c608773cef3ec342b9ddc7fca0
https://github.com/aced125/alphafold2/tree/c85682ece37d37c608773cef3ec342b9ddc7fca0
LCCALayer
# 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 ...
Cai631/PMDN
LCCALayer
false
195
[ "Apache-2.0" ]
0
3eca931fbef64f612572d24c856a91342bbdea59
https://github.com/Cai631/PMDN/tree/3eca931fbef64f612572d24c856a91342bbdea59
MedianPool2d
import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.modules.utils import _pair from torch.nn.modules.utils import _quadruple class MedianPool2d(nn.Module): """Median pool (usable as median filter when stride=1) module. Args: kernel_size: size of pooling kernel, int or 2-...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn from torch.nn.modules.utils import _pair from torch...
Jiaqi0602/adversarial-attack-from-leakage
MedianPool2d
false
17,473
[ "BSD-3-Clause" ]
9
90db721bed10094ac7d458b232ad5b1573884338
https://github.com/Jiaqi0602/adversarial-attack-from-leakage/tree/90db721bed10094ac7d458b232ad5b1573884338
Invertible1x1Conv
import torch import torch.nn.functional as F from torch.autograd import Variable import torch.utils.data class Invertible1x1Conv(torch.nn.Module): """ The layer outputs both the convolution, and the log determinant of its weight matrix. If reverse=True it does convolution with inverse """ de...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn.functional as F from torch.autograd import Variable import torch...
eba472/fastPitchPyTorch
Invertible1x1Conv
false
10,041
[ "BSD-3-Clause" ]
0
0f946c05539102e6868f72f5bf2c461d9711e7d7
https://github.com/eba472/fastPitchPyTorch/tree/0f946c05539102e6868f72f5bf2c461d9711e7d7
MaskedTransformerEncoderLayer
from torch.nn import Module import torch import torch.nn as nn import torch.nn.functional as F from torch.nn import Linear from torch.nn import Dropout from torch.nn import LayerNorm from torch.nn import Identity def drop_path(x, drop_prob: 'float'=0.0, training: 'bool'=False): """Drop paths (Stochastic Depth) pe...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
yifanc96/yifanc-DL
MaskedTransformerEncoderLayer
false
11,123
[ "MIT" ]
0
25d56cec776fb151c8f6bcbd997bca94f07f3597
https://github.com/yifanc96/yifanc-DL/tree/25d56cec776fb151c8f6bcbd997bca94f07f3597
DiceLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
HolyCrap96/mmocr-1
DiceLoss
false
9,181
[ "Apache-2.0" ]
0
c6c4acd39b1c56fec1b87530b2d241fe8af4ceed
https://github.com/HolyCrap96/mmocr-1/tree/c6c4acd39b1c56fec1b87530b2d241fe8af4ceed
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 from torch._inductor.runtime....
wenh06/OpenAttack
PositionwiseFeedForward
false
10,976
[ "MIT" ]
0
412d1b2777dea5009fe97ac264044bfda65dfa5d
https://github.com/wenh06/OpenAttack/tree/412d1b2777dea5009fe97ac264044bfda65dfa5d
GeneratorLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math from torch ...
akanametov/CycleGAN
GeneratorLoss
false
6,130
[ "MIT" ]
1
a61e76134cfdda43306e326e3dbba38d8cb21163
https://github.com/akanametov/CycleGAN/tree/a61e76134cfdda43306e326e3dbba38d8cb21163
DeepCoxMixturesTorch
import torch import torch.nn as nn def create_representation(inputdim, layers, activation): """Helper function to generate the representation function for DSM. Deep Survival Machines learns a representation (\\ Phi(X) \\) for the input data. This representation is parameterized using a Non Linear Multilayer ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
mononitogoswami/auton-survival
DeepCoxMixturesTorch
false
10,604
[ "MIT" ]
0
04739adac55e47d3d2c61101d92784a9fbb2dd86
https://github.com/mononitogoswami/auton-survival/tree/04739adac55e47d3d2c61101d92784a9fbb2dd86
GraphConvolution
from torch.nn import Module import torch from torch.nn import functional as F from torch.nn import Parameter import torch.utils.data import torch.multiprocessing from torch.nn.parameter import Parameter from torch.nn.modules.module import Module import torch.nn.modules.loss from scipy.sparse import * def dropout(x, 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 from torch.nn import Module f...
LucasAPayne/graph4nlp
GraphConvolution
false
9,689
[ "Apache-2.0" ]
0
3b72308f6ed9ce04c535f78b4b21b6ae0a8f5421
https://github.com/LucasAPayne/graph4nlp/tree/3b72308f6ed9ce04c535f78b4b21b6ae0a8f5421
StableLayerNorm
import torch from torch import nn class StableLayerNorm(nn.Module): def __init__(self, dim): super().__init__() self.norm = nn.LayerNorm(dim) def forward(self, x): x = x / x.amax(dim=-1, keepdim=True).detach() return self.norm(x) 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 from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_...
ryok/nuwa-pytorch
StableLayerNorm
false
10,747
[ "MIT" ]
0
6bde90ee6d87bdce8c9aa52c6bbb2ad15a1f5f54
https://github.com/ryok/nuwa-pytorch/tree/6bde90ee6d87bdce8c9aa52c6bbb2ad15a1f5f54
MlpMixer
import torch import torch.nn as nn import torch.nn.functional as F class MlpBlock(nn.Module): def __init__(self, features, hidden_dim): super().__init__() self.hidden_dim = hidden_dim self.features = features self.fc1 = nn.Linear(self.features, self.hidden_dim) self.fc2 = ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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
MlpMixer
false
6,221
[ "MIT" ]
1
0e3623b344fd4e3088ece897f898ddbb1f80888d
https://github.com/amayuelas/NNKGReasoning/tree/0e3623b344fd4e3088ece897f898ddbb1f80888d
Extractor
# 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....
OlegJakushkin/FragmentVC
Extractor
false
14,212
[ "MIT" ]
136
8aa673157b855bf3b67f06fdb6eb4b2a12ed0005
https://github.com/OlegJakushkin/FragmentVC/tree/8aa673157b855bf3b67f06fdb6eb4b2a12ed0005
MultiHeadedAttention
# 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....
rosinality/vision-transformers-pytorch
MultiHeadedAttention
false
16,343
[ "MIT" ]
77
b884b5da79900c96e4ce17fbb575cf1c5cb3cd5f
https://github.com/rosinality/vision-transformers-pytorch/tree/b884b5da79900c96e4ce17fbb575cf1c5cb3cd5f
CAMMNISTClassifier
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn as nn fr...
RobinMaas95/GTSRB_Visualization
CAMMNISTClassifier
false
1,008
[ "MIT" ]
0
fa837ff94e089a936ef4f4418970d262b35f70b6
https://github.com/RobinMaas95/GTSRB_Visualization/tree/fa837ff94e089a936ef4f4418970d262b35f70b6
LayerScale_Block
import torch import torch.nn as nn class Mlp(nn.Module): def __init__(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.0): super().__init__() out_features = out_features or in_features hidden_features = hidden_features or in_features se...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Uzair-Khattak/deit
LayerScale_Block
false
9,670
[ "Apache-2.0" ]
0
896004fc84d4ad2c4c9aa792822df7426af5903d
https://github.com/Uzair-Khattak/deit/tree/896004fc84d4ad2c4c9aa792822df7426af5903d
h_sigmoid
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data...
SpectrePrediction/micronet
h_sigmoid
false
2,838
[ "MIT" ]
0
f56269c7a8744f750e9870f0baa9fb6e68f27b9c
https://github.com/SpectrePrediction/micronet/tree/f56269c7a8744f750e9870f0baa9fb6e68f27b9c
Model
from torch.nn import Module import torch import torch.nn.functional from torch.nn import Parameter from torch.nn.parameter import Parameter from torch.nn.modules import Module import torch.nn.parallel import torch.utils.data import torch.optim import torch.utils.data.distributed from torch.nn import Module class Mode...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch.nn import Module import torch.nn.functional from torch.nn import Parameter from torch.nn.parameter import Parameter from torch.nn...
ROCmSoftwarePlatform/apex
Model
false
18,394
[ "BSD-3-Clause" ]
6
db92ee13ca55e284342bdca84bddc38c3812f1ed
https://github.com/ROCmSoftwarePlatform/apex/tree/db92ee13ca55e284342bdca84bddc38c3812f1ed
SE
# 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 itertools import chain a...
billcai/SlowFast
SE
false
1,557
[ "Apache-2.0" ]
0
778888e63351e55861801996b37c7ff9a3746587
https://github.com/billcai/SlowFast/tree/778888e63351e55861801996b37c7ff9a3746587
attention2d
import torch import torch.nn as nn import torch.nn.functional as F class attention2d(nn.Module): def __init__(self, in_planes, ratios, K, temperature, init_weight=True): super(attention2d, self).__init__() assert temperature % 3 == 1 self.avgpool = nn.AdaptiveAvgPool2d(1) if in_pl...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
PengJingchao/DFNet
attention2d
false
954
[ "MIT" ]
0
49e83501f81515aebca211351e315896da7afc54
https://github.com/PengJingchao/DFNet/tree/49e83501f81515aebca211351e315896da7afc54
EncoderLayer
import torch import torch.nn as nn import torch.nn.functional as F class Lambda(nn.Module): """An easy way to create a pytorch layer for a simple `func`.""" def __init__(self, func): """create a layer that simply calls `func` with `x`""" super().__init__() self.func = func def fo...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
BHD233/PaddleOCR2Pytorch
EncoderLayer
false
13,393
[ "Apache-2.0" ]
364
f114069b3e2669c6adf0adf9596756205f184c9c
https://github.com/BHD233/PaddleOCR2Pytorch/tree/f114069b3e2669c6adf0adf9596756205f184c9c
SingleKaistAutoEncoder
# 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....
DouCir/mmdetection
SingleKaistAutoEncoder
false
392
[ "Apache-2.0" ]
0
44613202c379d85315ed47ca670fd9853f90c3a5
https://github.com/DouCir/mmdetection/tree/44613202c379d85315ed47ca670fd9853f90c3a5
CRF
import torch from torch import nn import torch.nn.init class CRF(nn.Module): """ Conditional Random Field. """ def __init__(self, hidden_dim, tagset_size): """ :param hidden_dim: size of word RNN/BLSTM's output :param tagset_size: number of tags """ super(CRF, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import 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.init assert_size_stride = torch._C._dynamo....
sgrvinod/a-PyTorch-Tutorial-to-Sequence-Labeling
CRF
false
16,391
[ "MIT" ]
334
ee3f34b45a6e24dd748a144bfc25b1adf9e1f077
https://github.com/sgrvinod/a-PyTorch-Tutorial-to-Sequence-Labeling/tree/ee3f34b45a6e24dd748a144bfc25b1adf9e1f077
ShiftedSoftplus
import torch import torch.nn.functional as F class ShiftedSoftplus(torch.nn.Module): def __init__(self): super(ShiftedSoftplus, self).__init__() self.shift = torch.log(torch.tensor(2.0)).item() def forward(self, x): return F.softplus(x) - self.shift def get_inputs(): return [to...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math assert_size_stride = torch._C._dynamo.guards.assert_size_strid...
BaratiLab/AugLiChem
ShiftedSoftplus
false
7,754
[ "MIT" ]
16
37258b5ce2c653436b3e819b58d2659052d6edcc
https://github.com/BaratiLab/AugLiChem/tree/37258b5ce2c653436b3e819b58d2659052d6edcc
pixel_attention
import torch from torch import nn class pixel_attention(nn.Module): def __init__(self, in_channels, feature_size): super(pixel_attention, self).__init__() self.fc1 = nn.Linear(feature_size * feature_size, feature_size, bias=False) self.relu1 = nn.ReLU(inplace=True) 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 from torch._inductor.runtime....
SCUT-AILab/AFA
pixel_attention
false
17,889
[ "BSD-3-Clause" ]
7
acfb42236ce0114d63f22a821fc5954c8c149f45
https://github.com/SCUT-AILab/AFA/tree/acfb42236ce0114d63f22a821fc5954c8c149f45
FM
# 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 from sklearn.metrics import * assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = tor...
Sunmyunghan/Final_Project
FM
false
1,117
[ "MIT" ]
0
28cde293dc6d07521b2e1c5613b20444aea91d21
https://github.com/Sunmyunghan/Final_Project/tree/28cde293dc6d07521b2e1c5613b20444aea91d21
CrossEntropyLossIIT
import torch import torch.nn as nn import torch.utils.data class CrossEntropyLossIIT(nn.Module): def __init__(self): super().__init__() self.loss = nn.CrossEntropyLoss(reduction='mean') def forward(self, preds, labels): return self.loss(preds[0], labels[:, 0]) + self.loss(preds[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 math as tl_math import torch.nn as nn ...
atticusg/cs224u
CrossEntropyLossIIT
false
1,493
[ "Apache-2.0" ]
0
66e0f2714e246dcb8836f706ae9ff5613c51ed34
https://github.com/atticusg/cs224u/tree/66e0f2714e246dcb8836f706ae9ff5613c51ed34
Multi_Head_Attention
import torch import torch.nn as nn import torch.nn.functional as F class Scaled_Dot_Product_Attention(nn.Module): """Scaled Dot-Product Attention """ def __init__(self): super(Scaled_Dot_Product_Attention, self).__init__() def forward(self, Q, K, V, scale=None): """ Args: ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math im...
NTDXYG/Text-Classify-based-pytorch
Multi_Head_Attention
false
8,593
[ "Apache-2.0" ]
20
b12a264a0ea64b2f8b46fafd5383ef0a8025ef2f
https://github.com/NTDXYG/Text-Classify-based-pytorch/tree/b12a264a0ea64b2f8b46fafd5383ef0a8025ef2f
FeatureMapPairEncoderV2
import torch from torch import nn import torch.nn.functional as F class FeatureMapPairEncoderV2(nn.Module): def __init__(self, init_scale=1.0, no_weight_init=False): super(FeatureMapPairEncoderV2, self).__init__() self.conv1 = nn.Conv2d(96, 256, kernel_size=3, stride=1) self.conv2 = nn.Co...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
KH-Kyle/rmp_nav
FeatureMapPairEncoderV2
false
8,761
[ "MIT" ]
30
d598fe70664a4cdc0e9b9dd4b52e84aa3de1b551
https://github.com/KH-Kyle/rmp_nav/tree/d598fe70664a4cdc0e9b9dd4b52e84aa3de1b551
LayerLeakyReLU
import random import torch import torch.nn as nn class LayerLeakyReLU(nn.Module): """ Test for nn.layers based types """ def __init__(self): super(LayerLeakyReLU, self).__init__() self.negative_slope = random.random() self.leaky_relu = nn.LeakyReLU(negative_slope=self.negative...
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 random import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.gu...
dawnclaude/onnx2keras
LayerLeakyReLU
false
15,142
[ "MIT" ]
115
3d2a47c0a228b91fd434232274e216e491da36e3
https://github.com/dawnclaude/onnx2keras/tree/3d2a47c0a228b91fd434232274e216e491da36e3
InstanceNorm
import torch import torch.nn as nn class InstanceNorm(nn.Module): def __init__(self, epsilon=1e-08): """ avoid in-place ops. https://discuss.pytorch.org/t/encounter-the-runtimeerror-one-of-the-variables-needed-for-gradient-computation-has-been-modified-by-an-inplace-operation/836/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 assert_size_stride = torch._C._dynamo.guards.assert_size_...
Holmes-Alan/Photo2Sketch
InstanceNorm
false
529
[ "MIT" ]
0
43a0ca6bb8a8e645b35a2ab23d11ed5efe117e09
https://github.com/Holmes-Alan/Photo2Sketch/tree/43a0ca6bb8a8e645b35a2ab23d11ed5efe117e09
SEBlock
import torch from torch import nn import torch.nn.functional as F class HardSigmoid(nn.Module): def __init__(self, slope=0.2, offset=0.5): super().__init__() self.slope = slope self.offset = offset def forward(self, x): x = self.slope * x + self.offset x = F.threshold...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
DYF-AI/openvino-x
SEBlock
false
5,047
[ "Apache-2.0" ]
1
0f18ebb240ea3394f7e461aca34fac158e686d95
https://github.com/DYF-AI/openvino-x/tree/0f18ebb240ea3394f7e461aca34fac158e686d95
SFU
import torch import torch.nn as nn import torch.nn.functional as F class SFU(nn.Module): """Semantic Fusion Unit The ouput vector is expected to not only retrieve correlative information from fusion vectors, but also retain partly unchange as the input vector """ def __init__(self, input_size, fu...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
csarron/QAModels
SFU
false
1,758
[ "BSD-3-Clause" ]
0
2db2d7b0f546b88211e111b42744408bbf9b6f35
https://github.com/csarron/QAModels/tree/2db2d7b0f546b88211e111b42744408bbf9b6f35
GatedConv1d
import torch import torch.nn as nn import torch.onnx class MaskedConv1d(nn.Conv1d): def __init__(self, in_channels, out_channels, kernel_size, dilation=1, groups=1, bias=True, causal=True): if causal: padding = (kernel_size - 1) * dilation else: padding = (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 import torch.nn as nn import torch.onnx assert_size_stride = torch._C._dynamo.gu...
jonndoe/Character-Level-Language-Modeling-with-Deeper-Self-Attention-pytorch
GatedConv1d
false
3,771
[ "MIT" ]
0
d27d2d390f0831330405c16bd29c7f331ad2007a
https://github.com/jonndoe/Character-Level-Language-Modeling-with-Deeper-Self-Attention-pytorch/tree/d27d2d390f0831330405c16bd29c7f331ad2007a
ConformerFeedForward
import torch from torch import nn import torch.utils.data import torch.optim class Swish(nn.Module): """ Swish activation function introduced in 'https://arxiv.org/abs/1710.05941' """ def forward(self, x): return x * torch.sigmoid(x) class ConformerFeedForward(nn.Module): """ feed-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 import nn import torch.utils.data import torch.optim assert_size_stri...
Oktai15/NeMo
ConformerFeedForward
false
5,673
[ "Apache-2.0" ]
1
5b6dd3850129898be47cf0d65587897ec45a5b59
https://github.com/Oktai15/NeMo/tree/5b6dd3850129898be47cf0d65587897ec45a5b59
MaskedMSE
# 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...
dhruvramani/AccentTransfer
MaskedMSE
false
1,832
[ "MIT" ]
0
63a35b4aa37bc41c1f66dfb4bae76e2924183d7c
https://github.com/dhruvramani/AccentTransfer/tree/63a35b4aa37bc41c1f66dfb4bae76e2924183d7c
AttentionBlock
# 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....
Oreoluwa1234/NeMo
AttentionBlock
false
9,724
[ "Apache-2.0" ]
0
b01e3ceed34efe31fd43866685dbdd19a6b30928
https://github.com/Oreoluwa1234/NeMo/tree/b01e3ceed34efe31fd43866685dbdd19a6b30928
Self_Attentive_Pooling
import torch import torch.nn as nn import torch.nn.functional as F class Self_Attentive_Pooling(nn.Module): def __init__(self, dim): """SAP Paper: Self-Attentive Speaker Embeddings for Text-Independent Speaker Verification Link: https://danielpovey.com/files/2018_interspeech_xvector_atten...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
ikunsaikou/lhy_ML2021Spring
Self_Attentive_Pooling
false
6,870
[ "WTFPL" ]
1
80d8922077e2f5abba6a440c17654a143ebc8c9c
https://github.com/ikunsaikou/lhy_ML2021Spring/tree/80d8922077e2f5abba6a440c17654a143ebc8c9c
BertLayer
# 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....
IsmaelElsharkawi/new_pororo_repo
BertLayer
false
8,820
[ "MIT" ]
19
4617083b420615b8a3eb0f44d02e4e91a8f407f7
https://github.com/IsmaelElsharkawi/new_pororo_repo/tree/4617083b420615b8a3eb0f44d02e4e91a8f407f7
TimeEncoding
# 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...
Tim-blo/ACTOR
TimeEncoding
false
2,903
[ "MIT" ]
0
f10d7534a34fa557ab6b1739217649ae4f654505
https://github.com/Tim-blo/ACTOR/tree/f10d7534a34fa557ab6b1739217649ae4f654505
MVNormalNetwork
import torch import torch.nn as nn class MVNormalNetwork(nn.Module): def __init__(self, latent_dim): super().__init__() self.mean = nn.Linear(latent_dim, latent_dim) self.sc = nn.Linear(latent_dim, latent_dim) def forward(self, x): mean = self.mean(x) sc = self.sc(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.triton_helpers import math as tl_math import torch....
mgb45/OC-notebooks
MVNormalNetwork
false
7,223
[ "MIT" ]
1
67b1899d1fb3455ab3caab58f94429b9f432164b
https://github.com/mgb45/OC-notebooks/tree/67b1899d1fb3455ab3caab58f94429b9f432164b
Gaussian
import torch import torch.nn as nn class Gaussian(nn.Module): def forward(self, x): return torch.exp(-x * x / 2.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 math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
awlange/pysurvival
Gaussian
false
14,925
[ "Apache-2.0" ]
242
841b9bc6ce700ba8898d2a1488aa9cd25ee7a8e6
https://github.com/awlange/pysurvival/tree/841b9bc6ce700ba8898d2a1488aa9cd25ee7a8e6
_GateAddNorm
# 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 T...
gdevos010/darts
_GateAddNorm
false
3,673
[ "Apache-2.0" ]
0
96c97c1e241500ae7b91d32bbfa21d811e4a7d71
https://github.com/gdevos010/darts/tree/96c97c1e241500ae7b91d32bbfa21d811e4a7d71
SSWELoss
# 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...
Aurelius84/SPWE
SSWELoss
false
16,954
[ "MIT" ]
9
5f9fc5495e879b5272c118271a69c5adad4ba260
https://github.com/Aurelius84/SPWE/tree/5f9fc5495e879b5272c118271a69c5adad4ba260
HGNN_conv
import math import torch import torch.nn as nn from torch.nn.parameter import Parameter class HGNN_conv(nn.Module): def __init__(self, in_ft, out_ft, bias=True): super(HGNN_conv, self).__init__() self.weight = Parameter(torch.Tensor(in_ft, out_ft)) if bias: self.bias = Paramet...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
iMoonLab/HHDTI
HGNN_conv
false
6,844
[ "MIT" ]
1
b2dd0e78818888e676afc91af1425dada5b3258a
https://github.com/iMoonLab/HHDTI/tree/b2dd0e78818888e676afc91af1425dada5b3258a
BertPSIHead
# 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...
Sologa/awesome-align
BertPSIHead
false
14,424
[ "BSD-3-Clause" ]
173
62eaae7eac9bac06c10627fac6cc942c07a50e64
https://github.com/Sologa/awesome-align/tree/62eaae7eac9bac06c10627fac6cc942c07a50e64
Critic
import torch import torch.nn as nn import torch.nn.functional as F class Critic(nn.Module): def __init__(self, state_dim, action_dim): super(Critic, self).__init__() self.l1 = nn.Linear(state_dim + action_dim, 400) self.l2 = nn.Linear(400, 300) self.l3 = nn.Linear(300, 1) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
jinPrelude/ksp-ai
Critic
false
12,616
[ "MIT" ]
0
d8b235d1ef77afe413fbff2e859e1210330bde37
https://github.com/jinPrelude/ksp-ai/tree/d8b235d1ef77afe413fbff2e859e1210330bde37
ArcMarginProduct_subcenter
import math import torch import torch.nn.functional as F import torch.nn as nn class ArcMarginProduct_subcenter(nn.Module): def __init__(self, in_features, out_features, k=3): super().__init__() self.weight = nn.Parameter(torch.FloatTensor(out_features * k, in_features)) self....
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Fkaneko/kaggle-hpa-single-cell-image-classification
ArcMarginProduct_subcenter
false
5,170
[ "MIT" ]
1
52000cbf5c7eec6ace29274d9e85b5b24fac281b
https://github.com/Fkaneko/kaggle-hpa-single-cell-image-classification/tree/52000cbf5c7eec6ace29274d9e85b5b24fac281b