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 |
|---|---|---|---|---|---|---|---|---|---|---|
DeconvBlock | import torch
import torch.nn as nn
class DeconvBlock(nn.Module):
def __init__(self, in_channels, out_channels):
super(DeconvBlock, self).__init__()
self.conv = nn.ConvTranspose2d(in_channels, out_channels,
kernel_size=3, stride=2, padding=1, output_padding=0)
self.pad = nn.Ref... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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... | richardlyf/FeatDepth | DeconvBlock | false | 12,935 | [
"MIT"
] | 0 | 6739ee0ded5a91a97d6cea1aa259c64f8b520fcd | https://github.com/richardlyf/FeatDepth/tree/6739ee0ded5a91a97d6cea1aa259c64f8b520fcd |
BaselineEstimator | import torch
import torch.nn.functional as F
from torch import nn
import torch.utils.data
import torch.onnx.operators
import torch.optim
import torch.optim.lr_scheduler
class BaselineEstimator(nn.Module):
def __init__(self, input_size):
super(BaselineEstimator, self).__init__()
self.ff1 = nn.Line... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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... | StDario/fairseq-rl | BaselineEstimator | false | 9,491 | [
"BSD-3-Clause"
] | 0 | 96a0ee4db1a2d1781d565a2539c20ed392dfb608 | https://github.com/StDario/fairseq-rl/tree/96a0ee4db1a2d1781d565a2539c20ed392dfb608 |
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
from torch._inductor.runtime.... | Shimamura-Lab-SU/SGV | Discriminator | false | 2,887 | [
"MIT"
] | 0 | 8df3c314532528b8597c5dbb28bdfb23155bee82 | https://github.com/Shimamura-Lab-SU/SGV/tree/8df3c314532528b8597c5dbb28bdfb23155bee82 |
CenteredLayer | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empt... | JunoCheon/D2L | CenteredLayer | false | 2,610 | [
"MIT"
] | 0 | 9464709862e55151aec28fc637c5942738bdd72b | https://github.com/JunoCheon/D2L/tree/9464709862e55151aec28fc637c5942738bdd72b |
BboxHead | import torch
import torch.nn as nn
from itertools import product as product
class BboxHead(nn.Module):
def __init__(self, inchannels=512, num_anchors=2):
super(BboxHead, self).__init__()
self.conv1x1 = nn.Conv2d(inchannels, num_anchors * 4, kernel_size=(
1, 1), stride=1, padding=0)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
from itertools import product as product
assert_size_strid... | chennnnnnnnn/face_detection | BboxHead | false | 3,347 | [
"MIT"
] | 0 | 77d5a9098d9e1a65ac5093a23620ed5d99dc0723 | https://github.com/chennnnnnnnn/face_detection/tree/77d5a9098d9e1a65ac5093a23620ed5d99dc0723 |
PositionWiseFF | # 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.... | Oktai15/NeMo | PositionWiseFF | false | 5,681 | [
"Apache-2.0"
] | 1 | 5b6dd3850129898be47cf0d65587897ec45a5b59 | https://github.com/Oktai15/NeMo/tree/5b6dd3850129898be47cf0d65587897ec45a5b59 |
ChamferLoss | # 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
import torch.nn as nn
assert_... | AnTao97/UnsupervisedPointCloudSegmentation | ChamferLoss | false | 7,757 | [
"MIT"
] | 13 | 9bcf0bdf3b1ae62421d9202eb7c0b014d6a69c02 | https://github.com/AnTao97/UnsupervisedPointCloudSegmentation/tree/9bcf0bdf3b1ae62421d9202eb7c0b014d6a69c02 |
ClassificationCircleLoss | import torch
import torch.nn as nn
import torch.utils.data
from typing import Tuple
from torch.nn.functional import cross_entropy
from itertools import product as product
from math import sqrt as sqrt
class ClassificationCircleLoss(nn.Module):
"""Circle loss for class-level labels as described in the paper
`"... | 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
... | StevenGrove/DynamicHead | ClassificationCircleLoss | false | 14,451 | [
"Apache-2.0"
] | 69 | d62aa84e1d1c6a0c74d46258ad77b11413c10bef | https://github.com/StevenGrove/DynamicHead/tree/d62aa84e1d1c6a0c74d46258ad77b11413c10bef |
DiscreteNet | # 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 ... | lws803/pytorch-A3C | DiscreteNet | false | 10,458 | [
"MIT"
] | 0 | 944e7f42a8fa54b7d6efbe169d8a3467b20a0f7f | https://github.com/lws803/pytorch-A3C/tree/944e7f42a8fa54b7d6efbe169d8a3467b20a0f7f |
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._... | sugi-chan/project_pendragon | ContrastiveLoss | false | 16,503 | [
"MIT"
] | 56 | 267624365f25964fece1952e6dcde629bbc2ee5b | https://github.com/sugi-chan/project_pendragon/tree/267624365f25964fece1952e6dcde629bbc2ee5b |
Decoder2 | # 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.... | EndyWon/Texture-Reformer | Decoder2 | false | 8,133 | [
"MIT"
] | 11 | f84f95accb3574c7b759a7f03c0b0b4e150314b5 | https://github.com/EndyWon/Texture-Reformer/tree/f84f95accb3574c7b759a7f03c0b0b4e150314b5 |
NetModel | import torch
import torch.nn as nn
import torch.utils.data
class NetModel(nn.Module):
def __init__(self, n1, n2):
super(NetModel, self).__init__()
self.layer1 = nn.Conv2d(1, n1, kernel_size=9, stride=1, padding=4,
bias=True)
self.relu1 = nn.ReLU(inplace=True)
self.laye... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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 ... | crazywiden/SRCNN | NetModel | false | 6,491 | [
"MIT"
] | 1 | 872e495397101222f6732ee0129587b6f893aea2 | https://github.com/crazywiden/SRCNN/tree/872e495397101222f6732ee0129587b6f893aea2 |
USConv2d | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.utils
assert_size_stride = torch._C._dynamo.g... | jameslong95/FasterSeg | USConv2d | false | 6,918 | [
"MIT"
] | 1 | 872e04964ea46494a6018d9915cee5476e361c27 | https://github.com/jameslong95/FasterSeg/tree/872e04964ea46494a6018d9915cee5476e361c27 |
Perceptron | # 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 ty... | shi27feng/PDP-Solver | Perceptron | false | 12,977 | [
"MIT"
] | 0 | bf6e392f72f8a3572e0987313230943d94d53c95 | https://github.com/shi27feng/PDP-Solver/tree/bf6e392f72f8a3572e0987313230943d94d53c95 |
ScaledDotProductAttention | import torch
import torch.nn.functional as F
import torch.nn as nn
import torch.utils.checkpoint
class ScaledDotProductAttention(nn.Module):
""" Scaled Dot-Product Attention """
def __init__(self, temperature, attn_dropout=0.1):
super().__init__()
self.temperature = temperature
self.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._inductor.runtime.... | chenxiaoyu523/FEAT3D | ScaledDotProductAttention | false | 1,685 | [
"MIT"
] | 0 | ba45ba7c26628a7cc0070b010f4f33893cdac926 | https://github.com/chenxiaoyu523/FEAT3D/tree/ba45ba7c26628a7cc0070b010f4f33893cdac926 |
SelfAttentionGPT2 | import torch
from torch import nn
def mask_(matrices, maskval=0.0, mask_diagonal=True):
"""
Masks out all values in the given batch of matrices where i <= j holds,
i < j if mask_diagonal is false
In place operation
:param tns:
:return:
"""
h, w = matrices.size(-2), matrices.size(-1)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | Marcel-Busschers/former | SelfAttentionGPT2 | false | 9,334 | [
"MIT"
] | 0 | 5380fad4c0890503188e01f9b2cbd06fdb33a7af | https://github.com/Marcel-Busschers/former/tree/5380fad4c0890503188e01f9b2cbd06fdb33a7af |
BesselBasis | import math
import torch
import torch.jit
import torch.nn.functional
from torch import nn
import torch.nn
class BesselBasis(nn.Module):
r_max: 'float'
prefactor: 'float'
def __init__(self, r_max, num_basis=8, trainable=True):
"""Radial Bessel Basis, as proposed in DimeNet: https://arxiv.org/abs/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 math
import torch.jit
import torch.nn.functional
from torch import... | leoil/nequip | BesselBasis | false | 7,078 | [
"MIT"
] | 1 | 83b888797025c94b9963a508bc213a7c98da5bcb | https://github.com/leoil/nequip/tree/83b888797025c94b9963a508bc213a7c98da5bcb |
StdConv2d | import torch
import torch.nn as nn
import torch.nn.functional as F
class StdConv2d(nn.Conv2d):
def forward(self, x):
w = self.weight
v, m = torch.var_mean(w, dim=[1, 2, 3], keepdim=True, unbiased=False)
w = (w - m) / torch.sqrt(v + 1e-05)
return F.conv2d(x, w, self.bias, self.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.triton_helpers import libdevice
import torch.nn as ... | GUOSHU-COOL/TransUNet | StdConv2d | false | 2,263 | [
"Apache-2.0"
] | 0 | 6cb2c2f35eb6a571b12edbd095de5dda16c25015 | https://github.com/GUOSHU-COOL/TransUNet/tree/6cb2c2f35eb6a571b12edbd095de5dda16c25015 |
CDEFunc | # 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.... | athon-millane/NeuralCDE | CDEFunc | false | 12,127 | [
"Apache-2.0"
] | 0 | 4196890fe5bf7a69925a12ff35e86f212963be71 | https://github.com/athon-millane/NeuralCDE/tree/4196890fe5bf7a69925a12ff35e86f212963be71 |
RefModel3d | # 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.... | shuohan/pytorch-layers | RefModel3d | false | 4,368 | [
"MIT"
] | 0 | 020846fd02d501cf477552179c19ba4b5e9a0695 | https://github.com/shuohan/pytorch-layers/tree/020846fd02d501cf477552179c19ba4b5e9a0695 |
Cutout | # 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 random
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cu... | DensoITLab/TeachAugment | Cutout | false | 7,966 | [
"BSD-2-Clause"
] | 20 | 66ec099a0afab99e18531c5437182cfe17dc30c8 | https://github.com/DensoITLab/TeachAugment/tree/66ec099a0afab99e18531c5437182cfe17dc30c8 |
net_nvidia_pytorch | import torch
import torch.nn as nn
import torch.nn.functional as F
class LambdaLayer(nn.Module):
def __init__(self, lambd):
super(LambdaLayer, self).__init__()
self.lambd = lambd
def forward(self, x):
return self.lambd(x)
class net_nvidia_pytorch(nn.Module):
def __init__(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.triton_helpers import libdevice
import torch.nn as ... | YuShen0118/SAAP_Auto-driving_Platform | net_nvidia_pytorch | false | 18,170 | [
"MIT"
] | 4 | 785f899fb3b3ad92075318f9fcb69b8e09597202 | https://github.com/YuShen0118/SAAP_Auto-driving_Platform/tree/785f899fb3b3ad92075318f9fcb69b8e09597202 |
SimpleNet | import torch
import torch.nn as nn
from torch.functional import F
import torch.nn.functional as F
class SimpleNet(nn.Module):
"""
Simple Neural Net model
"""
def __init__(self):
"""
Creates layers as class attributes.
"""
super(SimpleNet, self).__init__()
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.... | avizyt/PytorchMLDLStudy | SimpleNet | false | 3,156 | [
"MIT"
] | 0 | ccb552809e7ab4438576e6d3b7cd7ca3b73235ed | https://github.com/avizyt/PytorchMLDLStudy/tree/ccb552809e7ab4438576e6d3b7cd7ca3b73235ed |
OfstMapL1Loss | import torch
import torch.nn as nn
class OfstMapL1Loss(nn.Module):
def __init__(self, eps=1e-05):
super().__init__()
self.eps = eps
def forward(self, rgb_labels, pred, gt, normalize=True, reduce=True):
wgt = (rgb_labels > 1e-08).float()
bs, n_kpts, c, h, w = pred.size()
... | 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... | ezxzeng/FFB6D | OfstMapL1Loss | false | 15,336 | [
"MIT"
] | 145 | fd0ea6471532ab1dc68f9a58b52d9a63f8fb76f2 | https://github.com/ezxzeng/FFB6D/tree/fd0ea6471532ab1dc68f9a58b52d9a63f8fb76f2 |
KL | import torch
import torch.nn as nn
import torch.nn.parallel
import torch.utils.data
import torch.utils.data.distributed
import torch.nn.functional as F
class KL(nn.Module):
"""Distilling the Knowledge in a Neural Network"""
def __init__(self, T):
super(KL, self).__init__()
self.T = T
def... | 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... | LakeAndCat/CluOReg | KL | false | 751 | [
"MIT"
] | 0 | ba50cb056061b3833050d32e532e08152bdc8de2 | https://github.com/LakeAndCat/CluOReg/tree/ba50cb056061b3833050d32e532e08152bdc8de2 |
CNN | import torch
import torch.nn as nn
import torch.nn.parallel
import torch.nn.functional as F
class CNN(nn.Module):
"""Convolutional Neural Network"""
def __init__(self):
super(CNN, self).__init__()
self.conv1 = nn.Conv2d(1, 16, 8, 4)
self.conv2 = nn.Conv2d(16, 32, 4, 4)
self.fc... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import ... | dziganto/DQN | CNN | false | 1,870 | [
"MIT"
] | 0 | 033de76a2295ddc5d9775cfd2612a9d79634547e | https://github.com/dziganto/DQN/tree/033de76a2295ddc5d9775cfd2612a9d79634547e |
Balance_Theory | # 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.... | SherylHYX/SSSNET_Signed_Clustering | Balance_Theory | false | 17,922 | [
"MIT"
] | 5 | 85736c18e86b396d64177d22b8c7f9859dfd794c | https://github.com/SherylHYX/SSSNET_Signed_Clustering/tree/85736c18e86b396d64177d22b8c7f9859dfd794c |
FCN8VGG16 | # 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 numpy as np
import tor... | IssamLaradji/looc | FCN8VGG16 | false | 17,863 | [
"Apache-2.0"
] | 9 | 50a05b9bf2d36cd8770add8cc65f9bab1ad45841 | https://github.com/IssamLaradji/looc/tree/50a05b9bf2d36cd8770add8cc65f9bab1ad45841 |
SoftDiceLoss | import torch
from torch.utils.data.sampler import *
import torch.nn as nn
import torch.nn.functional as F
class SoftDiceLoss(nn.Module):
def __init__(self, weight=None, size_average=True):
super(SoftDiceLoss, self).__init__()
def forward(self, logits, targets):
num = targets.size(0)
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch.utils.data.sampler import *
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_c... | chicm/carvana | SoftDiceLoss | false | 1,684 | [
"Apache-2.0"
] | 0 | 493a19fbb2fdab1cc1b4b95d97742684e4144229 | https://github.com/chicm/carvana/tree/493a19fbb2fdab1cc1b4b95d97742684e4144229 |
GraphConv | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
import torch.nn
import torch.autograd
assert_size_stride = ... | T0mt0mp/kaolin | GraphConv | false | 1,106 | [
"ECL-2.0",
"Apache-2.0"
] | 0 | 57d1e1478eec8df49dc7cc492f25637cec40399f | https://github.com/T0mt0mp/kaolin/tree/57d1e1478eec8df49dc7cc492f25637cec40399f |
Conv2d | import torch
import torch.nn as nn
from torch.nn import functional as F
class Conv2d(nn.Conv2d):
def __init__(self, in_channels, out_channels, kernel_size, stride=1,
padding=0, dilation=1, groups=1, bias=True):
super(Conv2d, self).__init__(in_channels, out_channels, kernel_size,
strid... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | MarcoForte/DeepInteractiveSegmentation | Conv2d | false | 14,012 | [
"MIT"
] | 95 | ddd7426ea9f36ff6a110d836b1b920a1215cbfee | https://github.com/MarcoForte/DeepInteractiveSegmentation/tree/ddd7426ea9f36ff6a110d836b1b920a1215cbfee |
SigmoidFocalClassificationLoss | import torch
import torch.nn as nn
class SigmoidFocalClassificationLoss(nn.Module):
"""
Sigmoid focal cross entropy loss.
"""
def __init__(self, gamma: 'float'=2.0, alpha: 'float'=0.25):
"""
Args:
gamma: Weighting parameter to balance loss for hard and easy examples.
... | 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... | AhmedMoamen62/OpenPCDet | SigmoidFocalClassificationLoss | false | 11,158 | [
"Apache-2.0"
] | 0 | 4d61d099819f40096f795def2c012990d03711cd | https://github.com/AhmedMoamen62/OpenPCDet/tree/4d61d099819f40096f795def2c012990d03711cd |
DSC_loss | # 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... | twni2016/OrganSegRSTN_PyTorch | DSC_loss | false | 16,635 | [
"MIT"
] | 100 | bf571320e718c8f138e04d48645e3b4dfe75801d | https://github.com/twni2016/OrganSegRSTN_PyTorch/tree/bf571320e718c8f138e04d48645e3b4dfe75801d |
BertLayerNorm | import torch
from torch import nn
class BertLayerNorm(nn.Module):
def __init__(self, hidden_size, eps=1e-12):
"""Construct a layernorm module in the TF style (epsilon inside the square root).
"""
super(BertLayerNorm, self).__init__()
self.weight = nn.Parameter(torch.ones(hidden_si... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | ArrowLuo/GRACE | BertLayerNorm | false | 7,736 | [
"Apache-2.0"
] | 17 | f27b500ba905685c03eee6d91d87adc9ef78b4d1 | https://github.com/ArrowLuo/GRACE/tree/f27b500ba905685c03eee6d91d87adc9ef78b4d1 |
L1DepthLoss | from _paritybench_helpers import _mock_config
import torch
import torch.nn as nn
class L1DepthLoss(nn.Module):
"""Custom L1 loss for depth sequences."""
def __init__(self, args):
super(L1DepthLoss, self).__init__()
self.args = args
self.word_dim = 1
def forward(self, predictions,... | 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... | wanyao1992/structural-probes | L1DepthLoss | false | 16,693 | [
"Apache-2.0"
] | 357 | 3071c93b23601d834628d79a74e46e8ab5e5a66b | https://github.com/wanyao1992/structural-probes/tree/3071c93b23601d834628d79a74e46e8ab5e5a66b |
GCN | from torch.nn import Module
import math
import torch
import torch.nn.functional as F
from torch.nn.parameter import Parameter
from torch.nn.modules.module import Module
import torch.nn as nn
class GraphConvolution(Module):
"""
Simple GCN layer, similar to https://arxiv.org/abs/1609.02907
"""
def __in... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | Anou9531/GUA | GCN | false | 7,715 | [
"MIT"
] | 20 | 354acceb69656e76fb4ee296c66ae42c18cd939f | https://github.com/Anou9531/GUA/tree/354acceb69656e76fb4ee296c66ae42c18cd939f |
OneTupleModule | # 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.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | opti-mix/glow | OneTupleModule | false | 7,386 | [
"Apache-2.0"
] | 1 | 4ba074df5da9822986a23a6679ab592c22660f6d | https://github.com/opti-mix/glow/tree/4ba074df5da9822986a23a6679ab592c22660f6d |
Discriminator | import torch
import torch.nn as nn
from torch.nn import functional as F
class Discriminator(nn.Module):
def __init__(self, latent_size, d=128):
super(Discriminator, self).__init__()
self.latent_size = latent_size
self.d = d
self.linear1 = nn.Linear(self.latent_size, self.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
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | mdiephuis/adversarial-autoencoders | Discriminator | false | 7,218 | [
"MIT"
] | 1 | a722239564362796774de21a64fd92e81dce4089 | https://github.com/mdiephuis/adversarial-autoencoders/tree/a722239564362796774de21a64fd92e81dce4089 |
SwiGLU | # 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... | robburdon/pytorch_tabular | SwiGLU | false | 16,325 | [
"MIT"
] | 560 | 9bf75f22c6e1b3033ad699713e77c283d55f3555 | https://github.com/robburdon/pytorch_tabular/tree/9bf75f22c6e1b3033ad699713e77c283d55f3555 |
EnsembleFC | import torch
import torch.nn as nn
import torch.utils.data
class EnsembleFC(nn.Module):
__constants__ = ['in_features', 'out_features']
in_features: 'int'
out_features: 'int'
ensemble_size: 'int'
weight: 'torch.Tensor'
def __init__(self, in_features: 'int', out_features: 'int',
ensemb... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.utils.data
assert_size_stride = torch._C._dyn... | L-Net-1992/DI-engine | EnsembleFC | false | 5,482 | [
"Apache-2.0"
] | 1 | 06803b4e18fa64bbed0fd1d44952242c0c063b0f | https://github.com/L-Net-1992/DI-engine/tree/06803b4e18fa64bbed0fd1d44952242c0c063b0f |
ColorJitterLayer | from torch.autograd import Function
import math
import numbers
import torch
import numpy as np
import torch.nn as nn
import torch.utils.cpp_extension
def hsv2rgb(hsv):
"""Convert a 4-d HSV tensor to the RGB counterpart.
>>> %timeit hsv2rgb_lookup(hsv)
2.37 ms ± 13.4 µs per loop (mean ± std. dev. of 7 runs... | 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.... | ParthaEth/PyTorch-StudioGAN | ColorJitterLayer | false | 1,896 | [
"MIT"
] | 0 | 16dd84415e4b7f4667cb1b1e0ef3fc04edf6b5a9 | https://github.com/ParthaEth/PyTorch-StudioGAN/tree/16dd84415e4b7f4667cb1b1e0ef3fc04edf6b5a9 |
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_... | Alpkant/CDCN | SpatialAttention | false | 8,892 | [
"MIT"
] | 0 | 4d4401824b8652a10739615e02e67148521739d2 | https://github.com/Alpkant/CDCN/tree/4d4401824b8652a10739615e02e67148521739d2 |
Learned_Aggregation_Layer | import torch
import torch.nn as nn
import torch.utils.checkpoint
class Learned_Aggregation_Layer(nn.Module):
def __init__(self, dim, num_heads=1, qkv_bias=False, qk_scale=None,
attn_drop=0.0, proj_drop=0.0):
super().__init__()
self.num_heads = num_heads
head_dim = dim // num_heads... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | mengxinpku/deit | Learned_Aggregation_Layer | false | 12,788 | [
"Apache-2.0"
] | 0 | 5b61a1ec0a4e73579f41ebdc3d34f319e5d19d14 | https://github.com/mengxinpku/deit/tree/5b61a1ec0a4e73579f41ebdc3d34f319e5d19d14 |
ContextGate | import torch
import torch.nn as nn
import torch.cuda
import torch.distributed
class ContextGate(nn.Module):
"""
Context gate is a decoder module that takes as input the previous word
embedding, the current decoder state and the attention state, and
produces a gate.
The gate can be used to select t... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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.cuda
import torch.distributed
assert_size_str... | LeeeeoLiu/OpenNMT-py | ContextGate | false | 2,566 | [
"MIT"
] | 0 | 9be3a8951e9181aabe5440e4ea98173b7e749b5c | https://github.com/LeeeeoLiu/OpenNMT-py/tree/9be3a8951e9181aabe5440e4ea98173b7e749b5c |
MedianPool2d | import torch
import torch.optim
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 pooli... | 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.optim
import torch.nn as nn
from torch.nn.modules.utils impo... | guzor/rgdb-semantic-segmentation | MedianPool2d | false | 12,475 | [
"MIT"
] | 0 | d9f3d8f1b2cb7357f64914bb873513dd16fad6df | https://github.com/guzor/rgdb-semantic-segmentation/tree/d9f3d8f1b2cb7357f64914bb873513dd16fad6df |
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
from torch.autograd import Function
import math
import torchvision.transforms.fu... | CTPLab/IID_representation_learning | ToRGB | false | 5,203 | [
"MIT"
] | 1 | b9dc13536963f9af332b039f7cc772e2f1090c62 | https://github.com/CTPLab/IID_representation_learning/tree/b9dc13536963f9af332b039f7cc772e2f1090c62 |
ResidualConnection | import torch
from torch import nn
class ResidualConnection(nn.Module):
def __init__(self, alpha=0.5):
super(ResidualConnection, self).__init__()
self.alpha = alpha
def forward(self, Xs: 'list'):
assert len(Xs) >= 1
return Xs[-1] if len(Xs) == 1 else (1 - self.alpha) * Xs[-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 import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_str... | ngohienduong/Deep_GCN_Benchmarking | ResidualConnection | false | 16,170 | [
"MIT"
] | 70 | 3ee57a265bbfd62d8e6f3ee6e3e9062dd5a44633 | https://github.com/ngohienduong/Deep_GCN_Benchmarking/tree/3ee57a265bbfd62d8e6f3ee6e3e9062dd5a44633 |
BothContextGate | import torch
import torch.nn as nn
import torch.cuda
import torch.distributed
class ContextGate(nn.Module):
"""
Context gate is a decoder module that takes as input the previous word
embedding, the current decoder state and the attention state, and
produces a gate.
The gate can be used to select t... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | BradLin0819/kg2text | BothContextGate | false | 13,419 | [
"Apache-2.0"
] | 86 | e586eb2027c0d85db9826cbe1d9e14f2d26fc93f | https://github.com/BradLin0819/kg2text/tree/e586eb2027c0d85db9826cbe1d9e14f2d26fc93f |
DenseSAGEConv | import math
import torch
import torch.nn.functional as F
from torch.nn import Parameter
import torch.utils.data
def uniform(size, tensor):
bound = 1.0 / math.sqrt(size)
if tensor is not None:
tensor.data.uniform_(-bound, bound)
class DenseSAGEConv(torch.nn.Module):
"""See :class:`torch_geometric... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import math
from torch.nn imp... | pwycl/pytorch_geometric | DenseSAGEConv | false | 10,778 | [
"MIT"
] | 0 | ef7b1add2bb5a36a3a68cae7639c42000f629cac | https://github.com/pwycl/pytorch_geometric/tree/ef7b1add2bb5a36a3a68cae7639c42000f629cac |
Softmax | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert... | DoggyLiu0116/MamboNet | Softmax | false | 5,088 | [
"MIT"
] | 1 | 3b708091422491f660c4bd5eb12b06ce3b8a5f79 | https://github.com/DoggyLiu0116/MamboNet/tree/3b708091422491f660c4bd5eb12b06ce3b8a5f79 |
Tucker | import torch
from torch import nn
from torch.nn import functional as F
class Tucker(nn.Module):
def __init__(self, input_dims, output_dim, mm_dim=1600, shared=False,
normalize=False, dropout_input=0.0, dropout_pre_lin=0.0,
dropout_output=0.0):
super(Tucker, self).__init__()
self.i... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import 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... | AndresPMD/GCN_classification | Tucker | false | 8,823 | [
"MIT"
] | 39 | b005c4256d68f1f90a7f73e7fdb3d066448de28c | https://github.com/AndresPMD/GCN_classification/tree/b005c4256d68f1f90a7f73e7fdb3d066448de28c |
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.... | sleepope/cs769-assignments | BertSelfAttention | false | 13,000 | [
"MIT"
] | 0 | 36c7a75d39507b7fe7b2b1bf1de6b8033b110da5 | https://github.com/sleepope/cs769-assignments/tree/36c7a75d39507b7fe7b2b1bf1de6b8033b110da5 |
EDCNN | import torch
import torch.nn as nn
import torch.nn.functional as F
class SobelConv2d(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size=3, stride=1,
padding=0, dilation=1, groups=1, bias=True, requires_grad=True):
assert kernel_size % 2 == 1, "SobelConv2d's kernel_size must be ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.nn.functional as F
assert_size_stride = torch... | workingcoder/EDCNN | EDCNN | false | 16,749 | [
"Apache-2.0"
] | 117 | 68305f465d2b731b60ce78bd0c95c7742d9f52d1 | https://github.com/workingcoder/EDCNN/tree/68305f465d2b731b60ce78bd0c95c7742d9f52d1 |
ParamSum | # 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
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda... | DominickZhang/NAS-FCOS | ParamSum | false | 13,586 | [
"BSD-2-Clause"
] | 187 | 1f7281478430eaed028e2cc2dfa8be226c63939b | https://github.com/DominickZhang/NAS-FCOS/tree/1f7281478430eaed028e2cc2dfa8be226c63939b |
SpeakerIntegrator | # 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.... | hwRG/FastSpeech2-Pytorch-old-man_city | SpeakerIntegrator | false | 10,183 | [
"MIT"
] | 0 | c32ee3a09bf2a53fcd17a2d0b74e8d1c93586573 | https://github.com/hwRG/FastSpeech2-Pytorch-old-man_city/tree/c32ee3a09bf2a53fcd17a2d0b74e8d1c93586573 |
FFN | import torch
import torch.nn as nn
import torch as t
class Conv(nn.Module):
"""
Convolution Module
"""
def __init__(self, in_channels, out_channels, kernel_size=1, stride=1,
padding=0, dilation=1, bias=True, w_init='linear'):
"""
:param in_channels: dimension of 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.... | kongziyue1234/mooc | FFN | false | 3,849 | [
"MIT"
] | 0 | 3b0c822dd55c1066cbc829137e6c424dcda5067e | https://github.com/kongziyue1234/mooc/tree/3b0c822dd55c1066cbc829137e6c424dcda5067e |
PartitionedTransformerEncoderLayer | # 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.... | skulick/self-attentive-parser | PartitionedTransformerEncoderLayer | false | 4,379 | [
"MIT"
] | 0 | 04a91e80cc05bcfe8f48145517f58e85f0c8ade6 | https://github.com/skulick/self-attentive-parser/tree/04a91e80cc05bcfe8f48145517f58e85f0c8ade6 |
AdaptiveReLU | import torch
from torch.nn.parameter import Parameter
class AdaptiveReLU(torch.nn.Module):
"""
Implementation of soft exponential activation.
Shape:
- Input: (N, *) where * means, any number of additional
dimensions
- Output: (N, *), same shape as the input
Parameters:
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch.nn.parameter import Parameter
assert_size_stride = torch._C._dynamo.guards.ass... | ndem0/PINA | AdaptiveReLU | false | 10,726 | [
"MIT"
] | 0 | 1812ddb8d96a9c8aeb80ce35002dbd115e7d7931 | https://github.com/ndem0/PINA/tree/1812ddb8d96a9c8aeb80ce35002dbd115e7d7931 |
NormedConv2d | import torch
from torch import nn
class NormedConv2d(nn.Conv2d):
"""Normalized Conv2d Layer.
Args:
tempeature (float, optional): Tempeature term. Default to 20.
power (int, optional): Power term. Default to 1.0.
eps (float, optional): The minimal value of divisor to
keep ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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... | HT-hlf/mmdetection_miner-2.22.0 | NormedConv2d | false | 2,319 | [
"Apache-2.0"
] | 0 | 76eb94d6547f9f95cd58f41bb5c91941e82322b9 | https://github.com/HT-hlf/mmdetection_miner-2.22.0/tree/76eb94d6547f9f95cd58f41bb5c91941e82322b9 |
DiceLoss | import torch
import torch.nn as nn
class DiceLoss(nn.Module):
def __init__(self, loss_weight=1.0):
super(DiceLoss, self).__init__()
self.loss_weight = loss_weight
def forward(self, input, target, mask, reduce=True):
batch_size = input.size(0)
input = torch.sigmoid(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
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | doem97/PSENet | DiceLoss | false | 15,192 | [
"Apache-2.0"
] | 1,213 | 4d95395658662f2223805c36dcd573d9e190ce26 | https://github.com/doem97/PSENet/tree/4d95395658662f2223805c36dcd573d9e190ce26 |
GenerativeLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
import torc... | SkywalkerAtlas/HRGAN | GenerativeLoss | false | 5,836 | [
"MIT"
] | 1 | bf6d58c1f3c6e042c7ea70319a25e3420531d552 | https://github.com/SkywalkerAtlas/HRGAN/tree/bf6d58c1f3c6e042c7ea70319a25e3420531d552 |
MeanStd | import torch
import torch.nn as nn
class MeanStd(nn.Module):
def __init__(self):
super(MeanStd, self).__init__()
def forward(self, x):
x = x.view(x.size(0), x.size(1), -1)
mean_x = torch.mean(x, dim=2)
var_x = torch.mean(x ** 2, dim=2) - mean_x * mean_x
return torch.c... | 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... | AnetaKaczynska/video-GAN | MeanStd | false | 26 | [
"BSD-3-Clause"
] | 0 | e30e54c18265c658a65b1b26b57b4f499b58bfc6 | https://github.com/AnetaKaczynska/video-GAN/tree/e30e54c18265c658a65b1b26b57b4f499b58bfc6 |
NormalDiagonalCovarianceLayer | import abc
import math
import torch
class ProbabilisticLayer(torch.nn.Module, metaclass=abc.ABCMeta):
"""Probabilistic layer to be used by the encoder/decoder of a
Variational AutoEncoder.
"""
@abc.abstractmethod
def forward(self, inputs):
"""Compute the parameters of the distribution 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.triton_helpers import libdevice, math as tl_math
im... | bolajiy/beer | NormalDiagonalCovarianceLayer | false | 14,970 | [
"MIT"
] | 46 | 6fe968c7ca4864437890aa6bd705755c2580696e | https://github.com/bolajiy/beer/tree/6fe968c7ca4864437890aa6bd705755c2580696e |
HSwish | import torch
from torch import nn
class HSwish(nn.Module):
def __init__(self):
"""
An HSwish module
:param inplace: A boolean stating if the operation is inplace
"""
super(HSwish, self).__init__()
self.relu6 = nn.ReLU6()
def forward(self, x):
"""
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empt... | UniSerj/ai-research | HSwish | false | 14,527 | [
"Apache-2.0"
] | 46 | 79f0093c93408cc5dd7d3f56aafd7dc1f901421c | https://github.com/UniSerj/ai-research/tree/79f0093c93408cc5dd7d3f56aafd7dc1f901421c |
EqualLinear | from torch.autograd import Function
import math
import torch
from torch import nn
import torch.nn.functional as F
def fused_leaky_relu(input, bias, negative_slope=0.2, scale=2 ** 0.5):
return FusedLeakyReLUFunction.apply(input, bias, negative_slope, scale)
class FusedLeakyReLUFunctionBackward(Function):
@s... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch.autograd import Function
import math
from torch import nn
assert_size... | ArashVahabpour/encoder4editing-contrastive | EqualLinear | false | 13,274 | [
"MIT"
] | 1,051 | 1b91afe1693e01a41118e1ce2451b7d14bec51f4 | https://github.com/ArashVahabpour/encoder4editing-contrastive/tree/1b91afe1693e01a41118e1ce2451b7d14bec51f4 |
Pointer | import torch
import torch.nn as nn
import torch.nn.functional as F
def mask_logits(target, mask):
mask = mask.type(torch.float32)
return target * mask + (1 - mask) * -1e+30
class Initialized_Conv1d(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size=1, stride=1,
padding=0, gro... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.nn.functional as F
assert_size_stride = torch... | dcy2018/QANA | Pointer | false | 3,506 | [
"MIT"
] | 0 | 69d1e4ff408a56317479e22ecc854c91fc0f420f | https://github.com/dcy2018/QANA/tree/69d1e4ff408a56317479e22ecc854c91fc0f420f |
make_residual_dense_ver1 | import torch
import torch.nn as nn
import torch.nn.functional as F
class make_residual_dense_ver1(nn.Module):
def __init__(self, nChannels, nChannels_, growthRate, kernel_size=3):
super(make_residual_dense_ver1, self).__init__()
self.conv = nn.Conv2d(nChannels_, growthRate, kernel_size=
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | BJTU-MIMO/Channel_estimation_MRDN | make_residual_dense_ver1 | false | 120 | [
"MIT"
] | 0 | f41972998a5403c901bc3e5d68d4acd05e9a7f6c | https://github.com/BJTU-MIMO/Channel_estimation_MRDN/tree/f41972998a5403c901bc3e5d68d4acd05e9a7f6c |
MaxPool2d | # 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
import numpy as np
import torch.nn as nn
from numbers import N... | collector-m/LiDAR-MOS | MaxPool2d | false | 15,070 | [
"MIT"
] | 268 | 7ccbb63b4ee7c40195b35dd0dddd71473fae25b1 | https://github.com/collector-m/LiDAR-MOS/tree/7ccbb63b4ee7c40195b35dd0dddd71473fae25b1 |
CustomBatchNormAutograd | # 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_... | akashrajkn/sarcastic-gradients | CustomBatchNormAutograd | false | 3,069 | [
"Apache-2.0"
] | 0 | 5a995ab7822dfd49cdc88855c631dcc8f1b0532f | https://github.com/akashrajkn/sarcastic-gradients/tree/5a995ab7822dfd49cdc88855c631dcc8f1b0532f |
AttentionGateBlock | # 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_... | HiLab-git/PyMIC | AttentionGateBlock | false | 13,813 | [
"Apache-2.0"
] | 147 | abf5c43de43668b85f4c049c95a8f1b7cf1d9f16 | https://github.com/HiLab-git/PyMIC/tree/abf5c43de43668b85f4c049c95a8f1b7cf1d9f16 |
ODEfunc | import torch
import torch.nn as nn
def norm(dim):
return nn.GroupNorm(min(32, dim), dim)
class ConcatConv2d(nn.Module):
def __init__(self, dim_in, dim_out, ksize=3, stride=1, padding=0,
dilation=1, groups=1, bias=True, transpose=False):
super(ConcatConv2d, self).__init__()
module = ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | MaricelaM/torchdiffeq | ODEfunc | false | 14,003 | [
"MIT"
] | 4,088 | 4e070fb687167e53082a91f32e102af7f4521058 | https://github.com/MaricelaM/torchdiffeq/tree/4e070fb687167e53082a91f32e102af7f4521058 |
ScaledDotProductAttention | # 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.... | dqawami/openvino_training_extensions | ScaledDotProductAttention | false | 15,214 | [
"Apache-2.0"
] | 256 | dddda1dfd651eaae2d59cecda84275b1b03bd0ad | https://github.com/dqawami/openvino_training_extensions/tree/dddda1dfd651eaae2d59cecda84275b1b03bd0ad |
AsymmetricLossOptimized | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
import torc... | Pepijnnn/MasterThesis | AsymmetricLossOptimized | false | 939 | [
"MIT"
] | 0 | 7ec831f5e55f5f181e0196fa78284e2846ce2e26 | https://github.com/Pepijnnn/MasterThesis/tree/7ec831f5e55f5f181e0196fa78284e2846ce2e26 |
convBlock | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | norveclibalikci/easyreg-mirror | convBlock | false | 10,616 | [
"Apache-2.0"
] | 0 | a16254733fe957cc4024923f8dce91412966a189 | https://github.com/norveclibalikci/easyreg-mirror/tree/a16254733fe957cc4024923f8dce91412966a189 |
FluidGravityForce | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
assert... | ucsdarclab/liquid_reconstruction | FluidGravityForce | false | 4,469 | [
"MIT"
] | 0 | 5559edbf71dba05d432d85e7dbbfe3634e650aeb | https://github.com/ucsdarclab/liquid_reconstruction/tree/5559edbf71dba05d432d85e7dbbfe3634e650aeb |
CmapPafHeadAttention | import torch
import torch.utils.data
import torch.nn
import torch.optim
class UpsampleCBR(torch.nn.Sequential):
def __init__(self, input_channels, output_channels, count=1, num_flat=0):
layers = []
for i in range(count):
if i == 0:
inch = input_channels
els... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.utils.... | KeithStoke/POSE_Test | CmapPafHeadAttention | false | 9,243 | [
"MIT"
] | 0 | 581aaf6f3d4fd50e56aa16c43913292af7d36879 | https://github.com/KeithStoke/POSE_Test/tree/581aaf6f3d4fd50e56aa16c43913292af7d36879 |
Conv2dLocal | from torch.nn import Module
import math
import torch
from torch.nn.parameter import Parameter
from torch.nn.modules.module import Module
from torch.nn.modules.utils import _pair
from torch.nn.functional import unfold
from torch.nn import Parameter
def conv2d_local(input: 'torch.Tensor', weight: 'torch.Tensor', bias=N... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import 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 math
from torch.nn.parameter import Parameter... | vluzko/keras_to_pytorch | Conv2dLocal | false | 10,946 | [
"MIT"
] | 0 | eefb3f77024b3a3b75e918b93316c12bb9338f1c | https://github.com/vluzko/keras_to_pytorch/tree/eefb3f77024b3a3b75e918b93316c12bb9338f1c |
GraphConvolution | # 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 Module
f... | cminusQAQ/graph4nlp | GraphConvolution | false | 15,044 | [
"Apache-2.0"
] | 1,269 | d980e897131f1b9d3766750c06316d94749904fa | https://github.com/cminusQAQ/graph4nlp/tree/d980e897131f1b9d3766750c06316d94749904fa |
Scale | import torch
import torch.nn as nn
class Scale(nn.Module):
def __init__(self, nchannels, bias=True, init_scale=1.0):
super().__init__()
self.nchannels = nchannels
self.weight = nn.Parameter(torch.Tensor(1, nchannels, 1, 1))
if bias:
self.bias = nn.Parameter(torch.Tenso... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | IrisDinge/YoloV3_DOTA | Scale | false | 5,358 | [
"MIT"
] | 1 | cdfe6375a2323e9ee162e50a46478d8a66529e6c | https://github.com/IrisDinge/YoloV3_DOTA/tree/cdfe6375a2323e9ee162e50a46478d8a66529e6c |
FC_A | import math
import torch
import torch.nn as nn
def quick_scale(module, name='weight'):
ScaleW.apply(module, name)
return module
class ScaleW:
"""
Constructor: name - name of attribute to be scaled
"""
def __init__(self, name):
self.name = name
def scale(self, module):
w... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | sergkuzn148/stg | FC_A | false | 16,385 | [
"MIT"
] | 96 | 84d9f53ae3665c423836a4d0176dc3b22de62b19 | https://github.com/sergkuzn148/stg/tree/84d9f53ae3665c423836a4d0176dc3b22de62b19 |
NormalDiagonalCovarianceLayer | import abc
import math
import torch
class ProbabilisticLayer(torch.nn.Module, metaclass=abc.ABCMeta):
"""Probabilistic layer to be used by the encoder/decoder of a
Variational AutoEncoder.
"""
@abc.abstractmethod
def forward(self, inputs):
"""Compute the parameters of the distribution 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.triton_helpers import libdevice, math as tl_math
im... | BUTSpeechFIT/beer | NormalDiagonalCovarianceLayer | false | 16,982 | [
"MIT"
] | 6 | 43fb9027a859db28d2f2f8709260ca2ce9501e25 | https://github.com/BUTSpeechFIT/beer/tree/43fb9027a859db28d2f2f8709260ca2ce9501e25 |
My_loss2 | # 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... | H-Liu1997/Pytorch_Pose_Estimation_Framework | My_loss2 | false | 5,241 | [
"MIT"
] | 1 | 06616b3459ff639f8486e6ea4f93922597788b2a | https://github.com/H-Liu1997/Pytorch_Pose_Estimation_Framework/tree/06616b3459ff639f8486e6ea4f93922597788b2a |
FreqEncoder | import torch
import torch.nn as nn
class FreqEncoder(nn.Module):
def __init__(self, input_dim, max_freq_log2, N_freqs, log_sampling=True,
include_input=True, periodic_fns=(torch.sin, torch.cos)):
super().__init__()
self.input_dim = input_dim
self.include_input = include_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 math as tl_math
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert... | VCAT19/torch-ngp | FreqEncoder | false | 14,528 | [
"MIT"
] | 262 | dcbfe061b30808875a80f12a10a383b51b35f121 | https://github.com/VCAT19/torch-ngp/tree/dcbfe061b30808875a80f12a10a383b51b35f121 |
LinearNet | # 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 ... | Shmuma/Run-Skeleton-Run | LinearNet | false | 14,413 | [
"MIT"
] | 92 | a953e6c524a444b6a99a54ef5b2886a57de0d185 | https://github.com/Shmuma/Run-Skeleton-Run/tree/a953e6c524a444b6a99a54ef5b2886a57de0d185 |
ResidualBlock | import torch
import torch.nn as nn
class GenericLayer(nn.Module):
def __init__(self, layer, out_channels, padding=(0, 0, 0, 0),
activation=None):
super(GenericLayer, self).__init__()
self._act = activation
self._layer = layer
self._norm = nn.InstanceNorm2d(out_channels, af... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | ThomasRanvier/cnn_style_transfer | ResidualBlock | false | 1,159 | [
"MIT"
] | 0 | 90b6c76c20263c22f4e45184d572284726ecbd7b | https://github.com/ThomasRanvier/cnn_style_transfer/tree/90b6c76c20263c22f4e45184d572284726ecbd7b |
BinaryReg | import torch
import torch.nn as nn
import torch.utils.data
class BinaryReg(nn.Module):
"""Regularization for encouraging the outputs to be binary.
"""
def __init__(self, alpha=1.0):
super().__init__()
self.alpha = alpha
def forward(self, pred):
diff = pred - 0.5
diff ... | 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
... | KeeratKG/pytorch_connectomics | BinaryReg | false | 708 | [
"MIT"
] | 0 | ba168da6f077ccfbeffcd8936df90ba413895086 | https://github.com/KeeratKG/pytorch_connectomics/tree/ba168da6f077ccfbeffcd8936df90ba413895086 |
FocalTverskyLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_... | ivadomed-profile-analysis-project/ivadomed | FocalTverskyLoss | false | 15,659 | [
"MIT"
] | 87 | 3b53e2cb2b210511943da439401e2471fd387876 | https://github.com/ivadomed-profile-analysis-project/ivadomed/tree/3b53e2cb2b210511943da439401e2471fd387876 |
Attention | import torch
from torch import nn
import torch.nn.functional as F
class Attention(nn.Module):
"""
Applies an attention mechanism on the output features from the decoder.
"""
def __init__(self, dim):
super(Attention, self).__init__()
self.dim = dim
self.linear1 = nn.Linear(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.... | gluver/video-caption.pytorch | Attention | false | 10,168 | [
"MIT"
] | 0 | 15000246980e43f71a254ab3deeb91f0957309bb | https://github.com/gluver/video-caption.pytorch/tree/15000246980e43f71a254ab3deeb91f0957309bb |
NonLocalEncoder | import torch
from torch import Tensor
from torch import nn
import torch.utils.data
from typing import Optional
from abc import ABCMeta
class _NonLocalNd(nn.Module, metaclass=ABCMeta):
"""Basic Non-local module.
This module is proposed in
"Non-local Neural Networks"
Paper reference: https://arxiv.org/... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | Dwrety/detr | NonLocalEncoder | false | 2,190 | [
"Apache-2.0"
] | 0 | b369c4c12354f18e9e66d56fcfda6fc058d6d593 | https://github.com/Dwrety/detr/tree/b369c4c12354f18e9e66d56fcfda6fc058d6d593 |
MediatorNet | # 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_... | JasonZuu/Frame-Selection | MediatorNet | false | 5,379 | [
"BSD-3-Clause"
] | 1 | 3eb6ecdbf8e5695ba53752bdd8446def9c5cfbb9 | https://github.com/JasonZuu/Frame-Selection/tree/3eb6ecdbf8e5695ba53752bdd8446def9c5cfbb9 |
L2 | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_... | AnonymousAuthors444/VEC_VAD | L2 | false | 13,267 | [
"MIT"
] | 67 | 0072bf857030e621e2f9c12689407b81e45ed603 | https://github.com/AnonymousAuthors444/VEC_VAD/tree/0072bf857030e621e2f9c12689407b81e45ed603 |
InterModalityUpdate | import torch
import torch.nn as nn
import torch.nn.functional as F
class FCNet(nn.Module):
def __init__(self, in_size, out_size, activate=None, drop=0.0):
super(FCNet, self).__init__()
self.lin = nn.Linear(in_size, out_size)
self.drop_value = drop
self.drop = nn.Dropout(drop)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | Ruiver/CTCNet | InterModalityUpdate | false | 17,913 | [
"Apache-2.0"
] | 6 | 539e55ec9fed06028379d35dfd5cd4074755ffd8 | https://github.com/Ruiver/CTCNet/tree/539e55ec9fed06028379d35dfd5cd4074755ffd8 |
LinearModel | import torch
import torch.nn as nn
class LinearModel(nn.Module):
def __init__(self, input_size, output_size, hidden_size):
super(LinearModel, self).__init__()
self.linear1 = nn.Linear(input_size, hidden_size)
self.linear2 = nn.Linear(hidden_size, hidden_size)
self.linear3 = nn.Lin... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | VVKot/mlinseconds-die-hard | LinearModel | false | 9,592 | [
"MIT"
] | 0 | dacbd448180bc992e0dab9e4b27bb594235d8c44 | https://github.com/VVKot/mlinseconds-die-hard/tree/dacbd448180bc992e0dab9e4b27bb594235d8c44 |
CIoU_loss | import torch
import numpy as np
def Interction_Union(outputs, targets):
width_o = outputs[:, 2]
width_t = targets[:, 2]
height_o = outputs[:, 3]
height_t = targets[:, 3]
x_max = torch.max(torch.stack((outputs[:, 0] + outputs[:, 2] / 2,
targets[:, 0] + targets[:, 2] / 2), 1), 1)[0]
x_m... | 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._... | debrouchovea/ReproduceGoturn | CIoU_loss | false | 3,414 | [
"MIT"
] | 0 | d60f13c781ca612cacc17536530bbee989bdfa45 | https://github.com/debrouchovea/ReproduceGoturn/tree/d60f13c781ca612cacc17536530bbee989bdfa45 |
ClassHead | import torch
from itertools import product as product
import torch.nn as nn
class ClassHead(nn.Module):
def __init__(self, inchannels=512, num_anchors=3):
super(ClassHead, self).__init__()
self.num_anchors = num_anchors
self.conv1x1 = nn.Conv2d(inchannels, self.num_anchors * 2,
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from itertools import product as product
import torch.nn as nn
assert_size_strid... | Jung-Jun-Uk/UNPG | ClassHead | false | 17,540 | [
"Apache-2.0"
] | 7 | a6f9c1731a68fc035eb8fe8198f5a5c643825a5b | https://github.com/Jung-Jun-Uk/UNPG/tree/a6f9c1731a68fc035eb8fe8198f5a5c643825a5b |
BCEBlurWithLogitsLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
import torc... | ChaokunChang/SVAS | BCEBlurWithLogitsLoss | false | 256 | [
"Apache-2.0"
] | 0 | 61af6eb39269edff8ea5147311628b3200c3a3d2 | https://github.com/ChaokunChang/SVAS/tree/61af6eb39269edff8ea5147311628b3200c3a3d2 |
Generator | import torch
import torch.nn as nn
import torch.nn.functional as F
class Generator(nn.Module):
def __init__(self, input_size, hidden_size, out_size):
super(Generator, self).__init__()
self.map1 = nn.Linear(input_size, hidden_size)
self.map2 = nn.Linear(hidden_size, hidden_size)
se... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as ... | tan-huaiyu/Network_science-and-Evolutionary_dynamics | Generator | false | 13,017 | [
"Apache-2.0"
] | 0 | 4bdaaed18c6f230213fd69a31144db8e97eb0c7b | https://github.com/tan-huaiyu/Network_science-and-Evolutionary_dynamics/tree/4bdaaed18c6f230213fd69a31144db8e97eb0c7b |
DummyModel | import torch
import torch.nn
class DummyModel(torch.nn.Module):
def __init__(self, block):
super(DummyModel, self).__init__()
self.block = block
self.conv = torch.nn.Conv2d(1, 1, 1)
def forward(self, x):
return self.conv(x)
def get_inputs():
return [torch.rand([4, 1, 64... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
... | ClashLuke/memcnn | DummyModel | false | 292 | [
"MIT"
] | 0 | 1d48132282c02506ca3d35540f819c4c9130eab4 | https://github.com/ClashLuke/memcnn/tree/1d48132282c02506ca3d35540f819c4c9130eab4 |
SoftCrossEntropy | import torch
from torch import nn
import torch.nn.functional as F
class SoftCrossEntropy(nn.Module):
def __init__(self):
super().__init__()
def forward(self, inputs, target):
log_likelihood = -F.log_softmax(inputs, dim=1)
sample_num, _class_num = target.shape
loss = torch.sum... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
from torch import nn
a... | zake7749/WSDM-Cup-2019 | SoftCrossEntropy | false | 16,792 | [
"Apache-2.0"
] | 64 | 5e9c9ae4197a5dedf6dbccc712bb2bbaae99edee | https://github.com/zake7749/WSDM-Cup-2019/tree/5e9c9ae4197a5dedf6dbccc712bb2bbaae99edee |
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.triton_helpers import libdevice
import torch.nn as ... | rortiz9/meleeml | Discriminator | false | 4,203 | [
"MIT"
] | 0 | 9be4bf53a377dfb46dbb3b51f102f1bffc0124d2 | https://github.com/rortiz9/meleeml/tree/9be4bf53a377dfb46dbb3b51f102f1bffc0124d2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.