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 |
|---|---|---|---|---|---|---|---|---|---|---|
MultipleInputModel | import torch
from torch import nn as nn
from torch import optim as optim
class TemplateModel(nn.Module):
def __init__(self, mix_data=False):
""" Base model for testing. The setting ``mix_data=True`` simulates a wrong implementation. """
super().__init__()
self.mix_data = mix_data
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn as nn
from torch import optim as optim
assert_size_stride =... | oke-aditya/pytorch-lightning-bolts | MultipleInputModel | false | 7,361 | [
"Apache-2.0"
] | 1 | 268df20bb442e7385b709b1488d37fd2767aba3c | https://github.com/oke-aditya/pytorch-lightning-bolts/tree/268df20bb442e7385b709b1488d37fd2767aba3c |
Attention | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | AshuAkshi0708/Attention_based_image_captioning | Attention | false | 8,858 | [
"Apache-2.0"
] | 0 | 33db9caa5763e687fa4f6b2b813f424d0d1fc00c | https://github.com/AshuAkshi0708/Attention_based_image_captioning/tree/33db9caa5763e687fa4f6b2b813f424d0d1fc00c |
QNetwork | import torch
import torch.nn.functional as F
import torch.nn as nn
class QNetwork(nn.Module):
"""Actor (Policy) Model."""
def __init__(self, state_size, action_size, seed, fc1_units=64,
fc2_units=64):
"""Initialize parameters and build model.
Params
======
state_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
assert_... | CCThompson82/deep-reinforcement-learning | QNetwork | false | 8,899 | [
"MIT"
] | 0 | f93faf0fb2b2dd8cfafeb8a4480e5520cefe6cb2 | https://github.com/CCThompson82/deep-reinforcement-learning/tree/f93faf0fb2b2dd8cfafeb8a4480e5520cefe6cb2 |
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 torch.nn as nn
import torch.utils.data
import torch.onnx.operators
impor... | CUMLSec/stateformer | GELU_ | false | 7,911 | [
"MIT"
] | 41 | 87cb3c906c43fcff42b2ca820eb6e7fd918d0a1c | https://github.com/CUMLSec/stateformer/tree/87cb3c906c43fcff42b2ca820eb6e7fd918d0a1c |
WeightedView | # 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
import torch.nn as nn
import torch.optim
import torch.utils.data
assert_s... | BeautyOfWeb/AffinityNet | WeightedView | false | 7,763 | [
"MIT"
] | 34 | d3f79823fa0182328894483165d4f0853740ee53 | https://github.com/BeautyOfWeb/AffinityNet/tree/d3f79823fa0182328894483165d4f0853740ee53 |
IOUloss | import torch
import torch.nn as nn
class IOUloss(nn.Module):
def __init__(self, reduction='none', loss_type='iou'):
super(IOUloss, self).__init__()
self.reduction = reduction
self.loss_type = loss_type
def forward(self, pred, target):
assert pred.shape[0] == target.shape[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
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
emp... | DerryHub/ByteTrack-attack | IOUloss | false | 17,237 | [
"MIT"
] | 6 | f237894c7985863c0830401933ebd89ca92bde96 | https://github.com/DerryHub/ByteTrack-attack/tree/f237894c7985863c0830401933ebd89ca92bde96 |
Lookahead | import torch
import torch.utils.data.distributed
import torch.nn as nn
import torch.nn.functional as F
class Lookahead(nn.Module):
def __init__(self, n_features, context):
super(Lookahead, self).__init__()
assert context > 0
self.context = context
self.n_features = n_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
import torch.utils.data.distributed
import torch.nn as nn
assert_size_stride = t... | MrXJC/deepspeech.pytorch | Lookahead | false | 5,605 | [
"MIT"
] | 1 | 6379c18d3f56cad8896a51d45166ea979423e0bf | https://github.com/MrXJC/deepspeech.pytorch/tree/6379c18d3f56cad8896a51d45166ea979423e0bf |
Transform | import torch
import torch.nn as nn
import torch.backends.cudnn
def calc_mean_std(feat, eps=1e-05):
size = feat.size()
assert len(size) == 4
N, C = size[:2]
feat_var = feat.view(N, C, -1).var(dim=2) + eps
feat_std = feat_var.sqrt().view(N, C, 1, 1)
feat_mean = feat.view(N, C, -1).mean(dim=2).vi... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | TimandXiyu/SANet-style-transfer- | Transform | false | 5,911 | [
"MIT"
] | 1 | 91c3dd1344d1dded61aa2e79618240a49345b40e | https://github.com/TimandXiyu/SANet-style-transfer-/tree/91c3dd1344d1dded61aa2e79618240a49345b40e |
ChannelNorm | import torch
import torch.nn as nn
class ChannelNorm(nn.Module):
def __init__(self, numFeatures, epsilon=1e-05, affine=True):
super(ChannelNorm, self).__init__()
if affine:
self.weight = nn.parameter.Parameter(torch.Tensor(1,
numFeatures, 1))
self.bias = nn... | 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_... | albertvillanova/s3prl | ChannelNorm | false | 6,158 | [
"MIT"
] | 1 | b127ade4ed2f80a1027901bbd2f204b4fb1aaf03 | https://github.com/albertvillanova/s3prl/tree/b127ade4ed2f80a1027901bbd2f204b4fb1aaf03 |
TrainablePositionalEncoding | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_... | IsaacChanghau/ReLoCLNet | TrainablePositionalEncoding | false | 8,322 | [
"MIT"
] | 31 | 56cb666ce516cce9acbcfce78fb4e95d81e11e54 | https://github.com/IsaacChanghau/ReLoCLNet/tree/56cb666ce516cce9acbcfce78fb4e95d81e11e54 |
DataEmbedding_wo_pos | import math
import torch
import torch.nn as nn
class PositionalEmbedding(nn.Module):
def __init__(self, d_model, max_len=5000):
super(PositionalEmbedding, self).__init__()
pe = torch.zeros(max_len, d_model).float()
pe.require_grad = False
position = torch.arange(0, max_len).float(... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | thuml/Autoformer | DataEmbedding_wo_pos | false | 16,619 | [
"MIT"
] | 263 | 6bf300d0bf3e7f3cb4d795dd8ed14ede2000a9ab | https://github.com/thuml/Autoformer/tree/6bf300d0bf3e7f3cb4d795dd8ed14ede2000a9ab |
SimpleATanModule | # 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.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._... | briancoutinho/glow | SimpleATanModule | false | 12,557 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 |
Conv2dBlock | import torch
import torch.nn.functional as F
from torch import nn
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
self.momentum = mome... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn.functional as... | cplusx/SIGN | Conv2dBlock | false | 1,740 | [
"Apache-2.0"
] | 0 | 9777fc3ddd4c6f799caeefe1e72482d5b1ecd8ae | https://github.com/cplusx/SIGN/tree/9777fc3ddd4c6f799caeefe1e72482d5b1ecd8ae |
Discriminator | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
from sk... | Ulian7/DeepCTR | Discriminator | false | 1,184 | [
"Apache-2.0"
] | 0 | d8f519a722a4d6a4f1fe18e04af54cfd1369c9a5 | https://github.com/Ulian7/DeepCTR/tree/d8f519a722a4d6a4f1fe18e04af54cfd1369c9a5 |
WassersteinLoss | import torch
from torch import nn
class WassersteinLoss(nn.Module):
"""For WGAN."""
def forward(self, real, fake):
return real.mean() - fake.mean()
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empt... | wegroupwolves/fastai | WassersteinLoss | false | 4,519 | [
"Apache-2.0"
] | 0 | df40df403e05e132411f0f7abc7ec33c86e58bb9 | https://github.com/wegroupwolves/fastai/tree/df40df403e05e132411f0f7abc7ec33c86e58bb9 |
GeM | import torch
import torch.nn.functional as F
from torch import nn
from torch.nn.parameter import Parameter
import torch.optim
def gem(x, p=3, eps=1e-06):
return F.avg_pool2d(x.clamp(min=eps).pow(p), (x.size(-2), x.size(-1))).pow(
1.0 / p)
class GeM(nn.Module):
def __init__(self, p=3, eps=1e-06):
... | 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.functional a... | DrHB/PANDA-2nd-place-solution | GeM | false | 8,014 | [
"MIT"
] | 17 | 44ab72780f9e3594811f2a7520456de7a9e677db | https://github.com/DrHB/PANDA-2nd-place-solution/tree/44ab72780f9e3594811f2a7520456de7a9e677db |
WRNInitBlock | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import ... | earhian/imgclsmob | WRNInitBlock | false | 6,637 | [
"MIT"
] | 1 | c87c0942420876941868c016211073dec4392e4d | https://github.com/earhian/imgclsmob/tree/c87c0942420876941868c016211073dec4392e4d |
Net | import torch
from torch.nn import functional as F
class Net(torch.nn.Module):
def __init__(self, n_feature, n_hidden, n_output):
super(Net, self).__init__()
self.hidden = torch.nn.Linear(n_feature, n_hidden)
self.hidden_two = torch.nn.Linear(n_hidden, n_hidden)
self.hidden_3 = tor... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
assert_size_stride = torch._C... | SunHaozhe/modular-metalearning | Net | false | 14,446 | [
"MIT"
] | 70 | c94dd18c6d105f18667d4de7bb4c81fa538a541c | https://github.com/SunHaozhe/modular-metalearning/tree/c94dd18c6d105f18667d4de7bb4c81fa538a541c |
TwoLinearsModel | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import ... | arjunsuresh/aimet | TwoLinearsModel | false | 12,652 | [
"BSD-3-Clause"
] | 0 | f6e09cb07a91eed3a5e6b8e19e6b065303af5a39 | https://github.com/arjunsuresh/aimet/tree/f6e09cb07a91eed3a5e6b8e19e6b065303af5a39 |
DeepSVDDLoss | import torch
from functools import reduce
import torch.nn as nn
class BaseModule(nn.Module):
"""
Implements the basic module.
All other modules inherit from this one
"""
def load_w(self, checkpoint_path):
"""
Loads a checkpoint into the state_dict.
:param checkpoint_path:... | 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 functools import reduce
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | NjuHaoZhang/AutoregressModel-AE_VAD_CVPR2019 | DeepSVDDLoss | false | 8,595 | [
"MIT"
] | 12 | b9843f34ecb59f908d78ddf977ee4670e0ed6cb4 | https://github.com/NjuHaoZhang/AutoregressModel-AE_VAD_CVPR2019/tree/b9843f34ecb59f908d78ddf977ee4670e0ed6cb4 |
NonSaturatingLogisticDiscriminatorLossCutMix | import torch
from typing import Tuple
import torch.nn as nn
import torch.nn.functional as F
class NonSaturatingLogisticDiscriminatorLossCutMix(nn.Module):
"""
Implementation of the non saturating GAN loss for the discriminator network when performing cut mix augmentation.
"""
def __init__(self) ->Non... | 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... | ChristophReich1996/Multi-StyleGAN | NonSaturatingLogisticDiscriminatorLossCutMix | false | 17,103 | [
"MIT"
] | 7 | 988f2dfea85b3205126b40c61edfb28107eb3173 | https://github.com/ChristophReich1996/Multi-StyleGAN/tree/988f2dfea85b3205126b40c61edfb28107eb3173 |
ProtoNN | # 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 numpy ... | adityakusupati/EdgeML | ProtoNN | false | 3,023 | [
"MIT"
] | 0 | 65933a6fdfc38945f4311043a62e120784b2b0bf | https://github.com/adityakusupati/EdgeML/tree/65933a6fdfc38945f4311043a62e120784b2b0bf |
Attention | import torch
import torch.nn as nn
import torch.utils.data
import torch.utils.checkpoint
class Attention(nn.Module):
def __init__(self, in_size, hidden_size):
super(Attention, self).__init__()
self.hidden = nn.Linear(in_size, hidden_size)
nn.init.orthogonal_(self.hidden.weight.data)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | MarvinLvn/platalea | Attention | false | 969 | [
"Apache-2.0"
] | 0 | 31def0813c90a3259f86f7d86cb576cd66dca3fe | https://github.com/MarvinLvn/platalea/tree/31def0813c90a3259f86f7d86cb576cd66dca3fe |
Interpolator | # 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 numpy as np
import torch.nn as nn
assert_size_stride = torch._C._dynamo.g... | Global19/revolver | Interpolator | false | 13,735 | [
"BSD-2-Clause"
] | 151 | 200082798d862516de6d9aa18e863a5968127a3f | https://github.com/Global19/revolver/tree/200082798d862516de6d9aa18e863a5968127a3f |
ResnetBlockPointwise | import torch
import numpy as np
import torch.nn as nn
import torch.nn.functional as F
class EqualizedLR(nn.Module):
def __init__(self, module):
super().__init__()
self.module = module
self._make_params()
def _make_params(self):
weight = self.module.weight
height = wei... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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 numpy as np
import tor... | DveloperY0115/texture_fields | ResnetBlockPointwise | false | 13,628 | [
"MIT"
] | 78 | 28c277696e0a658ffff3496892810d5a0ef03f65 | https://github.com/DveloperY0115/texture_fields/tree/28c277696e0a658ffff3496892810d5a0ef03f65 |
GatSymAttention | import torch
import torch.nn.functional as F
import torch.nn as nn
from torch.nn import Parameter
class ConstAttention(nn.Module):
def __init__(self, **kwargs):
super(ConstAttention, self).__init__()
def forward(self, neighbor_vecs, self_vecs):
return 1
class GatAttention(ConstAttention):
... | 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.functional as F
import torch.nn as nn
from torch.nn import Parameter
assert_size_stride = torch._C._dynamo.guards.assert_siz... | AlexMinhao/NAS_GNN | GatSymAttention | false | 19 | [
"Apache-2.0"
] | 0 | 89183988a96e1d6baed910ab3843c13282f8b077 | https://github.com/AlexMinhao/NAS_GNN/tree/89183988a96e1d6baed910ab3843c13282f8b077 |
ResBlock | import torch
import torch.nn as nn
class ResBlock(nn.Module):
def __init__(self, size):
super().__init__()
self.size = size
self.layer1 = nn.Linear(self.size, self.size)
self.relu = nn.ReLU()
self.layer2 = nn.Linear(self.size, self.size)
def forward(self, x):
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | RosarioAndolina/psychXRF | ResBlock | false | 1,012 | [
"MIT"
] | 0 | e2adadbd17664d7f74c10304f84b3751c571226e | https://github.com/RosarioAndolina/psychXRF/tree/e2adadbd17664d7f74c10304f84b3751c571226e |
ComplexConvTranspose2d | import torch
import torch.nn as nn
class ComplexConvTranspose2d(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size=(1, 1),
stride=(1, 1), padding=(0, 0), output_padding=(0, 0), causal=False,
complex_axis=1, groups=1):
"""
in_channels: real+imag
o... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | JamesLiao714/FullSubNet | ComplexConvTranspose2d | false | 615 | [
"MIT"
] | 0 | dad740bac35b5d7544c97740ae59101455acdc40 | https://github.com/JamesLiao714/FullSubNet/tree/dad740bac35b5d7544c97740ae59101455acdc40 |
CrossPooling | # 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... | manipopopo/C5 | CrossPooling | false | 15,993 | [
"Apache-2.0"
] | 51 | 154eb38c330e65476ddb77836948a28237f23c88 | https://github.com/manipopopo/C5/tree/154eb38c330e65476ddb77836948a28237f23c88 |
HSwish | # 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.quantization
assert_size_stride = torch._C._dynamo.gua... | dhlee347/model_compression | HSwish | false | 6,563 | [
"MIT"
] | 1 | 274b85ff56d81f0b7cf6907cbc1bd10e16cdb956 | https://github.com/dhlee347/model_compression/tree/274b85ff56d81f0b7cf6907cbc1bd10e16cdb956 |
RegressionHead | # 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 abc
import t... | mfk3138/jiant | RegressionHead | false | 4,171 | [
"MIT"
] | 0 | 6e67ff1ecb1bb98533c1019a86af4ad2c04c6a64 | https://github.com/mfk3138/jiant/tree/6e67ff1ecb1bb98533c1019a86af4ad2c04c6a64 |
ModReLU | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
from torch.nn.parameter import Parameter
assert_size_stri... | wizofe/urus-mri-recon | ModReLU | false | 4,543 | [
"MIT"
] | 0 | eab8e48dca31d2b936ce69ccc251ec5a4a10facc | https://github.com/wizofe/urus-mri-recon/tree/eab8e48dca31d2b936ce69ccc251ec5a4a10facc |
CQAttention | # 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.... | MicroTensor-ai/episodic-memory | CQAttention | false | 11,708 | [
"MIT"
] | 0 | 295a3752ab94c7a6f45355aa2c54bffbf84b574f | https://github.com/MicroTensor-ai/episodic-memory/tree/295a3752ab94c7a6f45355aa2c54bffbf84b574f |
AdditiveAttention | # 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.... | fireofearth/Trajectron-plus-plus | AdditiveAttention | false | 3,509 | [
"MIT"
] | 0 | b39df025b62a8ce466266936198baee9bfa14e89 | https://github.com/fireofearth/Trajectron-plus-plus/tree/b39df025b62a8ce466266936198baee9bfa14e89 |
LearnedPositionalEncoding | import torch
import torch.nn as nn
import torch.optim
class LearnedPositionalEncoding(nn.Module):
def __init__(self, max_position_embeddings, embedding_dim, seq_length):
super(LearnedPositionalEncoding, self).__init__()
self.position_embeddings = nn.Parameter(torch.zeros(1, seq_length, 512)
... | 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.optim
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dyna... | potpov/TransBTS | LearnedPositionalEncoding | false | 16,267 | [
"Apache-2.0"
] | 163 | 658de5f1dde17d25db54fb07adf49370cc32d7c3 | https://github.com/potpov/TransBTS/tree/658de5f1dde17d25db54fb07adf49370cc32d7c3 |
Conv2d_GN_ReLU | # 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.... | Guangyun-Xu/uois | Conv2d_GN_ReLU | false | 13,730 | [
"MIT"
] | 106 | 00069af841dd3ea9a86e6e3a89c3b7222240e6e5 | https://github.com/Guangyun-Xu/uois/tree/00069af841dd3ea9a86e6e3a89c3b7222240e6e5 |
PositionGenerator | # 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 ... | nigelnnk/MATCh-sensitivity | PositionGenerator | false | 7,336 | [
"MIT"
] | 1 | aaf2b924ac98c8c5925bbf431481724d11a102f8 | https://github.com/nigelnnk/MATCh-sensitivity/tree/aaf2b924ac98c8c5925bbf431481724d11a102f8 |
DQN_RAM | import torch
import torch.nn as nn
import torch.nn.functional as F
class DQN_RAM(nn.Module):
def __init__(self, in_features=4, num_actions=18):
"""
Initialize a deep Q-learning network for testing algorithm
in_features: number of features of input.
num_actions: number of a... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | yepw/DQN-Atari | DQN_RAM | false | 10,988 | [
"MIT"
] | 0 | 4ea9f687cbfdbc25a241e9b8f26b86d56291278b | https://github.com/yepw/DQN-Atari/tree/4ea9f687cbfdbc25a241e9b8f26b86d56291278b |
SpatialAttention | # 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_... | RuaBQ/FEAT | SpatialAttention | false | 2,782 | [
"MIT"
] | 0 | e46f56b03f8ef820d549cb385600a12bdf224de9 | https://github.com/RuaBQ/FEAT/tree/e46f56b03f8ef820d549cb385600a12bdf224de9 |
PriorDiscriminator | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim
class PriorDiscriminator(nn.Module):
"""The prior discriminator class.
This discriminate between a vector drawn from random uniform,
and the vector y obtained as output of the encoder.
It enforces y to be close to a... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import ... | ValerioB88/self-supervised-relational-reasoning | PriorDiscriminator | false | 9,686 | [
"MIT"
] | 0 | 12692b93d5c8dd3f56a31aa8b790366556e7a621 | https://github.com/ValerioB88/self-supervised-relational-reasoning/tree/12692b93d5c8dd3f56a31aa8b790366556e7a621 |
EntMaxSelectLayer | from torch.autograd import Function
import torch
import torch.nn as nn
def _make_ix_like(input, dim=0):
d = input.size(dim)
rho = torch.arange(1, d + 1, device=input.device, dtype=input.dtype)
view = [1] * input.dim()
view[0] = -1
return rho.view(view).transpose(0, dim)
def entmax15(input, dim=-... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | YotamElor/ae-smote | EntMaxSelectLayer | false | 9,639 | [
"MIT"
] | 0 | 730ccc414c3b832a72a48087e709d283e27e273b | https://github.com/YotamElor/ae-smote/tree/730ccc414c3b832a72a48087e709d283e27e273b |
SpatialLogSoftmax | # 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.utils.dat... | DuaneNielsen/keypoints | SpatialLogSoftmax | false | 8,027 | [
"MIT"
] | 42 | 302fa02966d4372ac9b5aaa3d8dc24684be0b252 | https://github.com/DuaneNielsen/keypoints/tree/302fa02966d4372ac9b5aaa3d8dc24684be0b252 |
VGG19 | import torch
import torch.nn as nn
import torch.nn.functional as F
class VGG19(nn.Module):
def __init__(self):
super(VGG19, self).__init__()
self.conv0_0 = nn.Conv2d(in_channels=3, out_channels=64,
kernel_size=3, stride=1, padding=1)
self.conv0_1 = nn.Conv2d(in_channels=64, 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._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | Hwa-Jong/VGG_in_Torch | VGG19 | false | 685 | [
"MIT"
] | 0 | 99a922070367ee9b9485c4df397f9413d11841b8 | https://github.com/Hwa-Jong/VGG_in_Torch/tree/99a922070367ee9b9485c4df397f9413d11841b8 |
BasicNN | # AOT ID: ['1_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.... | gtfierro/clipper | BasicNN | false | 10,159 | [
"Apache-2.0"
] | 0 | 88d7c238d51d5cf66d118bffca0c17edee84755e | https://github.com/gtfierro/clipper/tree/88d7c238d51d5cf66d118bffca0c17edee84755e |
AppendCLSToken | import math
import torch
from torch import Tensor
import torch.nn as nn
class BaseEmbeddingLayer(nn.Module):
def _apply_initialization(self, x: 'Tensor', d: 'int', method: 'str'
) ->None:
d_sqrt_inv = 1 / math.sqrt(d)
if method == 'uniform':
nn.init.uniform_(x, a=-d_sqrt_inv, ... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import math
from torch import Tensor
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cud... | pfnet-research/deep-table | AppendCLSToken | false | 16,237 | [
"MIT"
] | 48 | a19c0c3048484017d5f24806604c3b3470bcf550 | https://github.com/pfnet-research/deep-table/tree/a19c0c3048484017d5f24806604c3b3470bcf550 |
GreedyTop1 | import torch
from typing import Optional
import torch as pt
import torch.distributed
import torch.distributed.elastic.multiprocessing.errors
class GreedyTop1(pt.nn.Module):
"""
Implements picking the highest scoring next word with support for vocabulary selection and target factors.
"""
def forward(s... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch as pt
import torch.distributed
import torch.distributed.elastic.multiprocessing.errors
assert_size_stride = torch._C._dynamo.gu... | blchu/sockeye | GreedyTop1 | false | 1,555 | [
"Apache-2.0"
] | 0 | 28044a44ee409c9b3df1711c0b16bdebdd463b2e | https://github.com/blchu/sockeye/tree/28044a44ee409c9b3df1711c0b16bdebdd463b2e |
SamePadConvTranspose3d | # 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... | AshBT/VideoGPT | SamePadConvTranspose3d | false | 13,312 | [
"MIT"
] | 396 | a823bc734af3387129f3bd624caad3db270707f2 | https://github.com/AshBT/VideoGPT/tree/a823bc734af3387129f3bd624caad3db270707f2 |
ShapedSineModel | import torch
import torch.utils.data
class ShapedSineModel(torch.nn.Module):
def __init__(self, theta=None):
super(ShapedSineModel, self).__init__()
if theta is None:
self.freq = torch.nn.Parameter(torch.Tensor([0.1]))
else:
self.freq = torch.nn.Parameter(torch.Ten... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.utils.data
assert_size_stride = torch._C._dynamo.guards.asse... | neha191091/LearningToLearn | ShapedSineModel | false | 16,146 | [
"MIT"
] | 76 | 3619d27bb3b7a836d9423dfbdd8da82460d4fa73 | https://github.com/neha191091/LearningToLearn/tree/3619d27bb3b7a836d9423dfbdd8da82460d4fa73 |
Residual | import torch
from torch import nn
from torch.nn import functional as F
class Residual(nn.Module):
"""Unlinke other blocks, this module receives unpadded inputs."""
def __init__(self, channels, kernel_size=3):
super(Residual, self).__init__()
padding = int((kernel_size - 1) / 2)
self.p... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | RicCu/NeuralStyle | Residual | false | 5,774 | [
"MIT"
] | 1 | 97dc6aec6b2072a9a187276e047aea885566e1be | https://github.com/RicCu/NeuralStyle/tree/97dc6aec6b2072a9a187276e047aea885566e1be |
VectorQuantizeLayer_GB | import torch
from torch import nn
import torch.nn.functional as F
class VectorQuantizeLayer_GB(nn.Module):
def __init__(self, input_dim, vq_size, vq_dim, temp=(1.0, 0.1, 0.99),
groups=1, combine_groups=True, time_first=True, activation=nn.GELU(
), weight_proj_depth=1, weight_proj_factor=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 import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_st... | apoorv2904/Self-Supervised-Speech-Pretraining-and-Representation-Learning | VectorQuantizeLayer_GB | false | 9,818 | [
"MIT"
] | 0 | 6bdf02836ed31fdf7f185eddcd004770526c57c3 | https://github.com/apoorv2904/Self-Supervised-Speech-Pretraining-and-Representation-Learning/tree/6bdf02836ed31fdf7f185eddcd004770526c57c3 |
QNetwork | import torch
import torch.nn.functional as F
import torch.nn as nn
class QNetwork(nn.Module):
"""Actor (Policy) Model."""
def __init__(self, state_size, action_size, seed, fc1_units=32,
fc2_units=16):
"""Initialize parameters and build model.
Params
======
state_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
assert_... | JamesMcGuigan/udacity-deep-reinforcement-learning | QNetwork | false | 691 | [
"MIT"
] | 0 | e093db535fb12dbfb8bc2b5764133e1f52bbbccd | https://github.com/JamesMcGuigan/udacity-deep-reinforcement-learning/tree/e093db535fb12dbfb8bc2b5764133e1f52bbbccd |
ActivationQuantizer | # 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.... | XueYue404/QNN | ActivationQuantizer | false | 1,249 | [
"MIT"
] | 0 | 43cea970404156b591088d77672df58261edf1eb | https://github.com/XueYue404/QNN/tree/43cea970404156b591088d77672df58261edf1eb |
Normalize | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_... | yuri20198/neurips19-graph-protein-design | Normalize | false | 4,644 | [
"MIT"
] | 0 | 068e8cdfcbba629f996e99d3765cc2f3233f71a3 | https://github.com/yuri20198/neurips19-graph-protein-design/tree/068e8cdfcbba629f996e99d3765cc2f3233f71a3 |
ContinousRotReprDecoder | import torch
import torch.nn as nn
import torch.nn.functional as F
class ContinousRotReprDecoder(nn.Module):
def __init__(self):
super(ContinousRotReprDecoder, self).__init__()
def forward(self, module_input):
reshaped_input = module_input.view(-1, 3, 2)
b1 = F.normalize(reshaped_inp... | 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... | antic11d/human_body_prior | ContinousRotReprDecoder | false | 14,890 | [
"Xnet",
"X11"
] | 412 | ba4eaf9ee69a83a874805b764e0f984ba057ffc6 | https://github.com/antic11d/human_body_prior/tree/ba4eaf9ee69a83a874805b764e0f984ba057ffc6 |
FilterNorm | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
from torch.nn.init import calculate_gain
import torch.nn.... | rightchose/ddfnet | FilterNorm | false | 4,191 | [
"MIT"
] | 0 | 44a2f63933c1784a53f26a10c1157a164d044485 | https://github.com/rightchose/ddfnet/tree/44a2f63933c1784a53f26a10c1157a164d044485 |
SELayer | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import ... | Ren-Research/maestro | SELayer | false | 2,945 | [
"MIT"
] | 0 | b89e171d51ec910b165b9b01dd8373848a6207f7 | https://github.com/Ren-Research/maestro/tree/b89e171d51ec910b165b9b01dd8373848a6207f7 |
Block | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | CuttlefishXuan/mmsegmentation-1 | Block | false | 13,573 | [
"Apache-2.0"
] | 789 | 13771312da1a66d5cd642df6aa370affd3f5ceac | https://github.com/CuttlefishXuan/mmsegmentation-1/tree/13771312da1a66d5cd642df6aa370affd3f5ceac |
alpha | # 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
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C.... | LayerFolding/Layer-Folding | alpha | false | 17,563 | [
"BSD-3-Clause"
] | 7 | 9c010edc17b1a4a68b36a67cf00c94840d76b735 | https://github.com/LayerFolding/Layer-Folding/tree/9c010edc17b1a4a68b36a67cf00c94840d76b735 |
Sum | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
from torch import nn
f... | AmurG/SPFlow | Sum | false | 4,857 | [
"Apache-2.0"
] | 1 | ab28dd4af9ed722ace69c6b290cf0a279bbda39e | https://github.com/AmurG/SPFlow/tree/ab28dd4af9ed722ace69c6b290cf0a279bbda39e |
TransposedConvLayer | import torch
from torch import nn
import torch.nn.parallel
class TransposedConvLayer(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, stride=1,
padding=0, activation='relu', norm=None):
super(TransposedConvLayer, self).__init__()
bias = False if norm == 'BN' else Tru... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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... | DA4EVENT/home | TransposedConvLayer | false | 17,185 | [
"MIT"
] | 5 | 18cc93a795ce132e05b886aa34565a102915b1c6 | https://github.com/DA4EVENT/home/tree/18cc93a795ce132e05b886aa34565a102915b1c6 |
Minimum | # 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 as th
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.ass... | HKUST-KnowComp/DualMessagePassing | Minimum | false | 8,184 | [
"MIT"
] | 12 | d29d627be2a8c8f24b52e3db2c383e33a059aaa7 | https://github.com/HKUST-KnowComp/DualMessagePassing/tree/d29d627be2a8c8f24b52e3db2c383e33a059aaa7 |
RepeatModule | import torch
import torch.jit
import torch.onnx
import torch.nn
class RepeatModule(torch.nn.Module):
def __init__(self, repeats):
super(RepeatModule, self).__init__()
self.repeats = repeats
def forward(self, tensor):
tensor = tensor + tensor
return tensor.repeat(self.repeats)... | 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.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | YaronBenAtar/glow | RepeatModule | false | 14,642 | [
"Apache-2.0"
] | 2,838 | a13706a4239fa7eaf059c670dc573e3eb0768f86 | https://github.com/YaronBenAtar/glow/tree/a13706a4239fa7eaf059c670dc573e3eb0768f86 |
MLP_G | # 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_... | Huihui-z/CE-GZSL | MLP_G | false | 15,033 | [
"MIT"
] | 58 | 7bf5358ac4727ea1dc2dc9dec2f453b014500bd8 | https://github.com/Huihui-z/CE-GZSL/tree/7bf5358ac4727ea1dc2dc9dec2f453b014500bd8 |
MLP | import torch
class MLP(torch.nn.Module):
def __init__(self, dim, drop=0.3):
super().__init__()
self.fc_1 = torch.nn.Linear(dim, 80)
self.fc_2 = torch.nn.Linear(80, 10)
self.fc_3 = torch.nn.Linear(10, 1)
self.act = torch.nn.ReLU()
self.dropout = torch.nn.Dropout(p=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
assert_size_stride = torch._C... | Blidge/tgn-caw-main | MLP | false | 4,920 | [
"Apache-2.0"
] | 1 | 7a58f22bc7d9f1e2f6e9cbb1a60a18aed81071ee | https://github.com/Blidge/tgn-caw-main/tree/7a58f22bc7d9f1e2f6e9cbb1a60a18aed81071ee |
LinearModel | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import ... | Guydada/MIND-Recommender-System-Ptoject-Pytorch-TF-IDF--Deep-Learning | LinearModel | false | 5,247 | [
"MIT"
] | 1 | 1f42db2f5bc29d6bafbd3261407b41ab1a6eae95 | https://github.com/Guydada/MIND-Recommender-System-Ptoject-Pytorch-TF-IDF--Deep-Learning/tree/1f42db2f5bc29d6bafbd3261407b41ab1a6eae95 |
BiInteractionPooling | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.utils.data
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C.... | Holldean/pytorch-models | BiInteractionPooling | false | 2,342 | [
"MIT"
] | 0 | 9509d0d462b1a98164b266d49ada199071a855ac | https://github.com/Holldean/pytorch-models/tree/9509d0d462b1a98164b266d49ada199071a855ac |
Hard_Distillation_Loss | import torch
import torch.nn as nn
import torch.nn
class Hard_Distillation_Loss(nn.Module):
def __init__(self):
super(Hard_Distillation_Loss, self).__init__()
self.CE_teacher = nn.CrossEntropyLoss()
self.CE_student = nn.CrossEntropyLoss()
def forward(self, teacher_y, student_y, y):
... | 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
... | ManojKesani/Transformer-Implementations | Hard_Distillation_Loss | false | 793 | [
"MIT"
] | 0 | faca89d44523da80073790d53e53b4e80bde736f | https://github.com/ManojKesani/Transformer-Implementations/tree/faca89d44523da80073790d53e53b4e80bde736f |
TimeVarFIRFilter | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.utils.data
import torch.nn as torch_nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = tor... | Ninushkat/Impact-Synth-Hardware | TimeVarFIRFilter | false | 14,091 | [
"MIT"
] | 55 | 37a2ecfec51b052b39d1ad0d4676f09d5f00e3c2 | https://github.com/Ninushkat/Impact-Synth-Hardware/tree/37a2ecfec51b052b39d1ad0d4676f09d5f00e3c2 |
HLCriterion | import torch
import torch.nn.functional as F
from torch.nn.modules.loss import _Loss
from torch.optim.lr_scheduler import *
class Criterion(_Loss):
def __init__(self, alpha=1.0, name='criterion'):
super().__init__()
"""Alpha is used to weight each loss term
"""
self.alpha = alpha
... | 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.... | johnson7788/mt-dnn | HLCriterion | false | 3,898 | [
"MIT"
] | 0 | 26e5c4a5bfdbf1a1dd1c903e606db1c070568237 | https://github.com/johnson7788/mt-dnn/tree/26e5c4a5bfdbf1a1dd1c903e606db1c070568237 |
Decoder4_2 | import torch
import torch.nn as nn
class Decoder4_2(nn.Module):
def __init__(self, model=None, fixed=False):
super(Decoder4_2, self).__init__()
self.fixed = fixed
self.conv42 = nn.Conv2d(512, 512, 3, 1, 0)
self.conv41 = nn.Conv2d(512, 256, 3, 1, 0)
self.conv34 = nn.Conv2d(... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | MingSun-Tse/pytorch-AdaIN | Decoder4_2 | false | 2,719 | [
"MIT"
] | 0 | 02ae320345232983c754ea233613aedc21e4d348 | https://github.com/MingSun-Tse/pytorch-AdaIN/tree/02ae320345232983c754ea233613aedc21e4d348 |
APLoss_dist | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | zhangxue123/deep-image-retrieval | APLoss_dist | false | 13,178 | [
"BSD-3-Clause"
] | 0 | ac188856fa5a034aed3f7ed3fb617d580da44462 | https://github.com/zhangxue123/deep-image-retrieval/tree/ac188856fa5a034aed3f7ed3fb617d580da44462 |
AconC | import torch
import torch.nn as nn
class AconC(nn.Module):
""" ACON activation (activate or not).
AconC: (p1*x-p2*x) * sigmoid(beta*(p1*x-p2*x)) + p2*x, beta is a learnable parameter
according to "Activate or Not: Learning Customized Activation" <https://arxiv.org/pdf/2009.04759.pdf>.
"""
def __i... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | HarryPham0123/FPT_data_centric_competition | AconC | false | 5,266 | [
"Apache-2.0"
] | 1 | 3fa1e0ac48fdae2649b639229d9a74f75e461878 | https://github.com/HarryPham0123/FPT_data_centric_competition/tree/3fa1e0ac48fdae2649b639229d9a74f75e461878 |
MnistFeatureExtractor | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import ... | wiatrak2/BScThesis | MnistFeatureExtractor | false | 4,537 | [
"MIT"
] | 0 | e5dd012fd9052e7088d8464b409dc055dbfcf840 | https://github.com/wiatrak2/BScThesis/tree/e5dd012fd9052e7088d8464b409dc055dbfcf840 |
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... | AndresPMD/semantic_adaptive_margin | EncoderImageWeightNormPrecomp | false | 7,673 | [
"Apache-2.0"
] | 12 | 1e8bf2f1836498c48df030cb0a967b72b52e8460 | https://github.com/AndresPMD/semantic_adaptive_margin/tree/1e8bf2f1836498c48df030cb0a967b72b52e8460 |
SoftTargetCrossEntropy | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
from typing import *
f... | SuHuynh/leaf-disease-classification-kaggle | SoftTargetCrossEntropy | false | 9,484 | [
"MIT"
] | 0 | b1c15881de5a20e590a69f6b2fbb476b003bc077 | https://github.com/SuHuynh/leaf-disease-classification-kaggle/tree/b1c15881de5a20e590a69f6b2fbb476b003bc077 |
PCK | import torch
import torch.nn as nn
import torch.nn.functional
class BaseMetric(nn.Module):
def forward(self, y_pr, points_gt, gt_mask=None):
"""
Base forward method for metric evaluation
Args:
y_pr: 3D prediction of joints, tensor of shape (BATCH_SIZExN_JOINTSx3)
p... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
import torch.nn.functional
assert_size_stride = torch._C.... | miracleyoo/lifting_events_to_3d_hpe | PCK | false | 10,600 | [
"Apache-2.0"
] | 0 | dfe734ee055900d6ab90c064bf82db7672830ac7 | https://github.com/miracleyoo/lifting_events_to_3d_hpe/tree/dfe734ee055900d6ab90c064bf82db7672830ac7 |
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 n... | dqawami/openvino_training_extensions | GateAddNorm | false | 15,215 | [
"Apache-2.0"
] | 256 | dddda1dfd651eaae2d59cecda84275b1b03bd0ad | https://github.com/dqawami/openvino_training_extensions/tree/dddda1dfd651eaae2d59cecda84275b1b03bd0ad |
ResNetBlock | # 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... | tmralmeida/VGAN | ResNetBlock | false | 4,449 | [
"MIT"
] | 0 | 103d2e7ac0b84b08ff3c3a40e0ccb16390b1e008 | https://github.com/tmralmeida/VGAN/tree/103d2e7ac0b84b08ff3c3a40e0ccb16390b1e008 |
Generator | import torch
import torch.nn as nn
import torch.cuda
class Generator(nn.Module):
def __init__(self, hidden_size: 'int', tgt_vocab_size: 'int'):
self.vocab_size = tgt_vocab_size
super(Generator, self).__init__()
self.linear_hidden = nn.Linear(hidden_size, tgt_vocab_size)
self.lsm =... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | ZNLP/ATSum | Generator | false | 14,718 | [
"BSD-3-Clause"
] | 73 | 02e92489ebfa4652a4f3354c578f3a64c34ff64b | https://github.com/ZNLP/ATSum/tree/02e92489ebfa4652a4f3354c578f3a64c34ff64b |
Signal2SH | import torch
import numpy as np
import torch.nn as nn
from scipy import special as sci
def cart2sph(x, y, z):
"""
cart2sph(x, y, z) -> theta, phi, r
Computes the corresponding spherical coordinate of the given input parameters :attr:`x`, :attr:`y` and :attr:`x`.
Args:
x (Number): x position
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import numpy as np
import torch.nn as nn
from scipy import special as sci
assert... | SimonKoppers/DELIMIT | Signal2SH | false | 17,979 | [
"MIT"
] | 7 | d778a567bbec1beef2395ead60aa1e30086bb07c | https://github.com/SimonKoppers/DELIMIT/tree/d778a567bbec1beef2395ead60aa1e30086bb07c |
ResizeModule | import torch
class ResizeModule(torch.nn.Module):
def __init__(self):
super(ResizeModule, self).__init__()
def forward(self, x):
return torch.nn.functional.interpolate(x, size=(3, 4))
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... | mirecta/nncase | ResizeModule | false | 4,181 | [
"Apache-2.0"
] | 0 | d2efa59677a26f4259b3b6a5b6ec05ea16d4e40c | https://github.com/mirecta/nncase/tree/d2efa59677a26f4259b3b6a5b6ec05ea16d4e40c |
DynamicModel | import torch
import torch.nn as nn
import torch.nn.functional as F
class L2Norm(nn.Module):
def forward(self, x):
if len(x.size()) > 1:
return x / x.norm(p=2, dim=1, keepdim=True)
else:
return x / x.norm(p=2)
class NonLinearModel(nn.Module):
def __init__(self, input... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | ycsun2017/simple_transfer | DynamicModel | false | 4,612 | [
"Apache-2.0"
] | 0 | b807f7a9d818c5586c101f616d190fe9968fabbd | https://github.com/ycsun2017/simple_transfer/tree/b807f7a9d818c5586c101f616d190fe9968fabbd |
Decoder3 | import torch
import torch.nn as nn
class Decoder3(nn.Module):
def __init__(self, model=None, fixed=False):
super(Decoder3, self).__init__()
self.fixed = fixed
self.conv31 = nn.Conv2d(256, 128, 3, 1, 0)
self.conv22 = nn.Conv2d(128, 128, 3, 1, 0)
self.conv21 = nn.Conv2d(128,... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | MingSun-Tse/Collaborative-Distillation | Decoder3 | false | 14,030 | [
"MIT"
] | 172 | 915712674af82ff91d926d922c14988cce0430f3 | https://github.com/MingSun-Tse/Collaborative-Distillation/tree/915712674af82ff91d926d922c14988cce0430f3 |
RefineDoublePendulumModel | # 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 numpy ... | BoyuanChen/neural-state-variables | RefineDoublePendulumModel | false | 7,871 | [
"MIT"
] | 17 | 10483d93ac8c006f3786c434fb57d70d9ab465ec | https://github.com/BoyuanChen/neural-state-variables/tree/10483d93ac8c006f3786c434fb57d70d9ab465ec |
CoordConv | import torch
import torch.nn as nn
class AddCoords(nn.Module):
"""
Source: https://github.com/mkocabas/CoordConv-pytorch/blob/master/CoordConv.py
"""
def __init__(self, with_r=False):
super().__init__()
self.with_r = with_r
def forward(self, input_tensor):
"""
Arg... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | justinjohn0306/CIPS-3D | CoordConv | false | 7,001 | [
"MIT"
] | 1 | 69a910a7841846419a6b5e03182c8cf061a82584 | https://github.com/justinjohn0306/CIPS-3D/tree/69a910a7841846419a6b5e03182c8cf061a82584 |
PrimaryCapsLayer | # 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 ... | bentrevett/capsules | PrimaryCapsLayer | false | 3,208 | [
"MIT"
] | 0 | 239273de25c607d7a7504e8c6900772fddd15cd3 | https://github.com/bentrevett/capsules/tree/239273de25c607d7a7504e8c6900772fddd15cd3 |
FocalLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
... | Vermeille/Torchelie | FocalLoss | false | 14,550 | [
"MIT"
] | 117 | 43957d83238372ae6436aac90127865c2040b76c | https://github.com/Vermeille/Torchelie/tree/43957d83238372ae6436aac90127865c2040b76c |
IAdd | import torch
class IAdd(torch.nn.Module):
def __init__(self):
super(IAdd, self).__init__()
def forward(self, x, y):
x += y
return x
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
@triton.jit
def triton_poi_fused_add_0(in_ptr0, in_ptr1, out_ptr1, xnumel,... | NVIDIA-AI-IOT-private/torch2trt | IAdd | false | 10,523 | [
"MIT"
] | 0 | 953d60039e0c81e90eea467c3df2e6e3f7040242 | https://github.com/NVIDIA-AI-IOT-private/torch2trt/tree/953d60039e0c81e90eea467c3df2e6e3f7040242 |
Network | import torch
import torch.nn as nn
import torch.nn.functional as F
class Network(nn.Module):
def __init__(self):
super().__init__()
self.conv1 = nn.Conv2d(3, 6, 5)
self.pool = nn.MaxPool2d(2, 2)
self.conv2 = nn.Conv2d(6, 16, 5)
self.fc1 = nn.Linear(16 * 10 * 10, 120)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | ibrahimalmakky/py4ai | Network | false | 10,210 | [
"MIT"
] | 0 | 224f54086523314ff9c7133680f119c62f6ea249 | https://github.com/ibrahimalmakky/py4ai/tree/224f54086523314ff9c7133680f119c62f6ea249 |
Unit1D | import torch
import torch.nn as nn
import torch.nn.functional as F
class Unit1D(nn.Module):
def __init__(self, in_channels, output_channels, kernel_shape=1, stride
=1, padding='same', activation_fn=F.relu, use_bias=True):
super(Unit1D, self).__init__()
self.conv1d = nn.Conv1d(in_channels,... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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 ... | TencentYoutuResearch/ActionDetection-AFSD | Unit1D | false | 14,463 | [
"BSD-3-Clause"
] | 112 | ed86a0df91e58baa7d78c796ed29cff82b1f3fa6 | https://github.com/TencentYoutuResearch/ActionDetection-AFSD/tree/ed86a0df91e58baa7d78c796ed29cff82b1f3fa6 |
Fp32LayerNorm | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.data
import torch.onnx.operators
import torch.optim
import torch.optim.lr_scheduler
class Fp32LayerNorm(nn.LayerNorm):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def forward(self, input)... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
import torch.utils.data
import torch.onnx.operators
impor... | CUMLSec/stateformer | Fp32LayerNorm | false | 7,899 | [
"MIT"
] | 41 | 87cb3c906c43fcff42b2ca820eb6e7fd918d0a1c | https://github.com/CUMLSec/stateformer/tree/87cb3c906c43fcff42b2ca820eb6e7fd918d0a1c |
Norm | import torch
import torch.nn as nn
class Norm(nn.Module):
def __init__(self, d_model, eps=1e-06):
super().__init__()
self.size = d_model
self.alpha = nn.Parameter(torch.ones(self.size))
self.bias = nn.Parameter(torch.zeros(self.size))
self.eps = eps
def forward(self, ... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_... | CS-savvy/Transformer-for-Parkinsons-disease | Norm | false | 2,077 | [
"MIT"
] | 0 | 42ef54071092f4aab74c8b9ec82c52e944806a5b | https://github.com/CS-savvy/Transformer-for-Parkinsons-disease/tree/42ef54071092f4aab74c8b9ec82c52e944806a5b |
BitEstimator | import torch
import torch.nn as nn
import torch.nn.functional as F
class Bitparm(nn.Module):
"""
save params
"""
def __init__(self, channel, final=False):
super(Bitparm, self).__init__()
self.final = final
self.h = nn.Parameter(torch.nn.init.normal_(torch.empty(channel).
... | 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
import torch.nn as nn
import torch.nn.functional as F
assert_s... | LXie502/point_based_pcgc | BitEstimator | false | 2,490 | [
"MIT"
] | 0 | 9c4b577d35276c8674b568efc0b9d2473bb00a70 | https://github.com/LXie502/point_based_pcgc/tree/9c4b577d35276c8674b568efc0b9d2473bb00a70 |
CnnViewModel | # 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_... | bbrighttaer/DCCA_demo | CnnViewModel | false | 3,186 | [
"MIT"
] | 0 | c5410f2e163c6538899bf8f5f9afe031a517408f | https://github.com/bbrighttaer/DCCA_demo/tree/c5410f2e163c6538899bf8f5f9afe031a517408f |
PositionwiseFeedForward | import torch
import torch.utils.data
import torch.nn as nn
import torch.nn.functional as F
import torch.distributions
class PositionwiseFeedForward(nn.Module):
""" A two-feed-forward-layer module """
def __init__(self, d_in, d_hid, dropout=0.1):
super().__init__()
self.w_1 = nn.Linear(d_in, 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.triton_helpers import libdevice
import torch.utils.... | Yinghao-Li/GuiGen | PositionwiseFeedForward | false | 18,153 | [
"MIT"
] | 10 | 22ababcd8cacae0adcc4ee74b514b188dc5084f3 | https://github.com/Yinghao-Li/GuiGen/tree/22ababcd8cacae0adcc4ee74b514b188dc5084f3 |
ProteinResNetPooler | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
im... | StephanHeijl/tape | ProteinResNetPooler | false | 4,747 | [
"BSD-3-Clause"
] | 0 | ec631ca53217686605477cf31af4fb8846ff660f | https://github.com/StephanHeijl/tape/tree/ec631ca53217686605477cf31af4fb8846ff660f |
ELU | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert... | jiwidi/lightning-tutorials | ELU | false | 15,695 | [
"Apache-2.0"
] | 114 | 70ba437447f345d4d6ba089d5b30fd1da2cbc04b | https://github.com/jiwidi/lightning-tutorials/tree/70ba437447f345d4d6ba089d5b30fd1da2cbc04b |
Critic | # 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 collections import OrderedDict
assert_size_stride = t... | kurohi/deepreinforcement-udacity | Critic | false | 3,870 | [
"MIT"
] | 0 | ea8bfcce9a36ca41aa0d7595326b915a494ed5f2 | https://github.com/kurohi/deepreinforcement-udacity/tree/ea8bfcce9a36ca41aa0d7595326b915a494ed5f2 |
ToRGB | # 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
import torch.utils.data
import torch
from torch import nn
import tor... | guyii54/Contrastive-I2I | ToRGB | false | 6,775 | [
"BSD-3-Clause"
] | 1 | e73daa0f9d3770c2280a304c39678d5b22440647 | https://github.com/guyii54/Contrastive-I2I/tree/e73daa0f9d3770c2280a304c39678d5b22440647 |
RSoftmax | # 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
... | ALISCIFP/mmpose | RSoftmax | false | 2,046 | [
"Apache-2.0"
] | 0 | 2433e3dbcc44baa2253e2a7c748ba0216937933e | https://github.com/ALISCIFP/mmpose/tree/2433e3dbcc44baa2253e2a7c748ba0216937933e |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.