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 |
|---|---|---|---|---|---|---|---|---|---|---|
DummyLayer | # 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
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda
@triton.j... | RICE-EIC/Early-Bird-GCN | DummyLayer | false | 964 | [
"Apache-2.0"
] | 0 | 25a80b23f2ecfc46ffe00b1cf0e06052b32aad0f | https://github.com/RICE-EIC/Early-Bird-GCN/tree/25a80b23f2ecfc46ffe00b1cf0e06052b32aad0f |
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 import triton_helpers
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
@... | akulaarora/pre-training | GELU | false | 14,779 | [
"Apache-2.0"
] | 107 | 312ae1ec1ec279da557543184fc064dade76dbbd | https://github.com/akulaarora/pre-training/tree/312ae1ec1ec279da557543184fc064dade76dbbd |
Actor | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | Gregory-Eales/Proximal-Policy-Optimization | Actor | false | 7,623 | [
"Apache-2.0"
] | 1 | 134f930bd1436c34e79af9344fe70f75e11c8a30 | https://github.com/Gregory-Eales/Proximal-Policy-Optimization/tree/134f930bd1436c34e79af9344fe70f75e11c8a30 |
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
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as ... | BradyFU/DVG-Face | convblock | false | 7,824 | [
"MIT"
] | 33 | 16d51fe7da6e4a52d144e938afb3072eb8e4e8de | https://github.com/BradyFU/DVG-Face/tree/16d51fe7da6e4a52d144e938afb3072eb8e4e8de |
GCN | from torch.nn import Module
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.modules.module import Module
from torch.nn.parameter import Parameter
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.... | NightmareNyx/pygcn | GCN | false | 2,705 | [
"MIT"
] | 0 | 3972f167ce7fcc41cb21284d75816dfd9a15f7ef | https://github.com/NightmareNyx/pygcn/tree/3972f167ce7fcc41cb21284d75816dfd9a15f7ef |
MaxPool2dLayer | import torch
import torch.nn as nn
import torch.nn.functional as F
class MaxPool2dLayer(nn.Module):
def forward(self, tensor, kernel_size=(3, 3), stride=(1, 1), padding=0,
ceil_mode=False):
return F.max_pool2d(tensor, kernel_size, stride=stride, padding=
padding, ceil_mode=ceil_mode)
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
emp... | fuzhanrahmanian/lucent | MaxPool2dLayer | false | 15,380 | [
"Apache-2.0"
] | 449 | 13b24c3c37784185275da73c7a11095b2ae809c5 | https://github.com/fuzhanrahmanian/lucent/tree/13b24c3c37784185275da73c7a11095b2ae809c5 |
RobustLogisticRegression | import torch
import numpy as np
from torch import nn
from torch.utils.data import DataLoader
from torchvision import transforms
from sklearn.preprocessing import StandardScaler
from sklearn import metrics
from torch.utils.data import Dataset
def compute_auc(labels, scores, pos_label=1):
fpr, tpr, _thresholds = me... | 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 numpy as np
from torch import nn
from torch.utils.data import DataLoader
from torchvision import transforms
from sklearn.preprocessin... | vitskvara/shape-guided-anomaly-detection | RobustLogisticRegression | false | 4,732 | [
"MIT"
] | 0 | 6685b2e0b97968a6d0f478d2920486da107b277f | https://github.com/vitskvara/shape-guided-anomaly-detection/tree/6685b2e0b97968a6d0f478d2920486da107b277f |
GlobalAttention | import torch
import torch.nn as nn
import torch.cuda
def aeq(base, *rest):
""" Assert the first arg equals to each of the rest."""
for a in rest[:]:
assert a == base, 'base(' + str(base
) + ") doesn't equals to each of " + str(rest)
class Bottle(nn.Module):
def forward(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.... | AngusGLChen/qg | GlobalAttention | false | 4,880 | [
"MIT"
] | 1 | 3ebc5b94348a4c313829a6c71705fbc9dadd8181 | https://github.com/AngusGLChen/qg/tree/3ebc5b94348a4c313829a6c71705fbc9dadd8181 |
Value | import torch
from torch import nn
from torch.nn import functional as F
class Value(nn.Module):
def __init__(self, state_size, fcs1_units=400, fc2_units=300):
super(Value, self).__init__()
self.conv1 = nn.Conv2d(1, 20, 5, 1)
self.conv2 = nn.Conv2d(20, 50, 5, 1)
self.fc1 = nn.Linear... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
assert_s... | zwc662/disentangling-vae | Value | false | 11,085 | [
"MIT"
] | 0 | 7eeace2a30f8034e222be6a906f53748b3b2bb6e | https://github.com/zwc662/disentangling-vae/tree/7eeace2a30f8034e222be6a906f53748b3b2bb6e |
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 libdevice, math as tl_math
import torc... | AutuanLiu/PyTorch-ML | FocalLoss | false | 16,962 | [
"MIT"
] | 9 | 884c7723843d9ffb4da09d95eb97886b2cc38f28 | https://github.com/AutuanLiu/PyTorch-ML/tree/884c7723843d9ffb4da09d95eb97886b2cc38f28 |
KLDLoss | import torch
import torch.nn as nn
import torch.utils.data
class KLDLoss(nn.Module):
def forward(self, mu, logvar):
return -0.5 * torch.sum(1 + logvar - mu.pow(2) - logvar.exp())
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._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
... | izhorvath/MetGAN | KLDLoss | false | 10,236 | [
"BSD-3-Clause"
] | 0 | aca85fb3306d2515a65c8d525cd78e1147ba7e1b | https://github.com/izhorvath/MetGAN/tree/aca85fb3306d2515a65c8d525cd78e1147ba7e1b |
CausalConv1d | # 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... | marc-moreaux/pytorch_text_generator | CausalConv1d | false | 10,452 | [
"MIT"
] | 0 | 99dd11c67d89f8a09faa28b7032fcc66f90672c0 | https://github.com/marc-moreaux/pytorch_text_generator/tree/99dd11c67d89f8a09faa28b7032fcc66f90672c0 |
IoULoss | # 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... | BCV-Uniandes/DMS | IoULoss | false | 13,350 | [
"MIT"
] | 66 | 9fa3a3a2ef5980dd17e21b73234a4cd0b3d00e16 | https://github.com/BCV-Uniandes/DMS/tree/9fa3a3a2ef5980dd17e21b73234a4cd0b3d00e16 |
MLP | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cu... | MohammadAminAlamalhoda/EEG-Classification | MLP | false | 9,317 | [
"MIT"
] | 0 | dcaf452ba48bc5fcf9a777f73f81bdec9b21592e | https://github.com/MohammadAminAlamalhoda/EEG-Classification/tree/dcaf452ba48bc5fcf9a777f73f81bdec9b21592e |
GlobalAvgPool1d | # 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.nn.parallel
import torch.optim
import torch.utils.data
from abc import abstractmethod
assert_size_stride ... | HarshCasper/nni | GlobalAvgPool1d | false | 5,269 | [
"MIT"
] | 1 | 291bbbba9f296382015a77b2c88eb5db5b44bf94 | https://github.com/HarshCasper/nni/tree/291bbbba9f296382015a77b2c88eb5db5b44bf94 |
OutputBlock | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
reinterpret_tens... | conlain-k/RLN_elasticity | OutputBlock | false | 3,353 | [
"MIT"
] | 0 | d8574c83d62f675960a7f8b86ddb553e9a7b1ca7 | https://github.com/conlain-k/RLN_elasticity/tree/d8574c83d62f675960a7f8b86ddb553e9a7b1ca7 |
TransformerEncoderLayer | import torch
import torch.nn as nn
class TransformerEncoderLayer(nn.Module):
def __init__(self, d_model, nhead, dim_feedforward=512, dropout=0.1):
super().__init__()
self.self_attn = nn.MultiheadAttention(d_model, nhead, dropout=dropout)
self.linear1 = nn.Linear(d_model, dim_feedforward)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | Nial4/Gaze_HybirdModel | TransformerEncoderLayer | false | 5,695 | [
"MIT"
] | 1 | e738179408a45c380ec7de289c84bbd3965ae924 | https://github.com/Nial4/Gaze_HybirdModel/tree/e738179408a45c380ec7de289c84bbd3965ae924 |
MSELoss | import functools
import torch
import torch.nn.functional as F
import torch.nn as nn
def reduce_loss(loss, reduction):
"""Reduce loss as specified.
Args:
loss (Tensor): Elementwise loss tensor.
reduction (str): Options are "none", "mean" and "sum".
Return:
Tensor: Reduced loss 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 import triton_helpers
import functools
import torch.nn.functional as F
import torch.nn as nn
assert_size_stride... | CityU-AIM-Group/HTD | MSELoss | false | 17,111 | [
"MIT"
] | 5 | 0be9fd844118c275abc6053b3cbd5ffb589e62ee | https://github.com/CityU-AIM-Group/HTD/tree/0be9fd844118c275abc6053b3cbd5ffb589e62ee |
TTKernel | # 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 import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empt... | AndresOtero/TensorDecompositionMachineLearning | TTKernel | false | 16,905 | [
"MIT"
] | 3 | 455f16b405ec9d031999b0ebf9c5a68d3c20b233 | https://github.com/AndresOtero/TensorDecompositionMachineLearning/tree/455f16b405ec9d031999b0ebf9c5a68d3c20b233 |
Conv | import torch
import torch.nn as nn
class Conv(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size=3, dilation=1,
causal=True):
super(Conv, self).__init__()
self.causal = causal
if self.causal:
self.padding = dilation * (kernel_size - 1)
else:
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | gorinars/VQ-VAE-Speech | Conv | false | 6,755 | [
"MIT"
] | 1 | 60398f03eb129195bce402a423ace8cca8995f3c | https://github.com/gorinars/VQ-VAE-Speech/tree/60398f03eb129195bce402a423ace8cca8995f3c |
NonnegativeLinear | # 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... | GlenHGHUANG/STRODE | NonnegativeLinear | false | 8,155 | [
"MIT"
] | 11 | 91565275dffd4f08738c8a0e5b6c9ad89344623e | https://github.com/GlenHGHUANG/STRODE/tree/91565275dffd4f08738c8a0e5b6c9ad89344623e |
decoder3 | import torch
import torch.nn as nn
class decoder3(nn.Module):
def __init__(self):
super(decoder3, self).__init__()
self.reflecPad7 = nn.ReflectionPad2d((1, 1, 1, 1))
self.conv7 = nn.Conv2d(256, 128, 3, 1, 0)
self.relu7 = nn.ReLU(inplace=True)
self.unpool = nn.UpsamplingNea... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | SofiaValdiviesov/LinearStyleTransfer | decoder3 | false | 9,660 | [
"BSD-2-Clause"
] | 0 | 6837c6a9be16bb5981fa0744e5d23f61d08e6940 | https://github.com/SofiaValdiviesov/LinearStyleTransfer/tree/6837c6a9be16bb5981fa0744e5d23f61d08e6940 |
DecoderLayer | import torch
import torch.nn.functional as F
import torch.nn as nn
class ScaledDotProductAttention(nn.Module):
""" Scaled Dot-Product Attention """
def __init__(self, temperature, attn_dropout=0.1):
super().__init__()
self.temperature = temperature
self.dropout = nn.Dropout(attn_dropo... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | RogerTsai917/attention-is-all-you-need-pytorch | DecoderLayer | false | 2,795 | [
"MIT"
] | 0 | 64197e55d275e5c819bc786a9ff19849cdf2f6b9 | https://github.com/RogerTsai917/attention-is-all-you-need-pytorch/tree/64197e55d275e5c819bc786a9ff19849cdf2f6b9 |
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.... | ChrisGeishauser/ConvLab-2 | ScaledDotProductAttention | false | 2,222 | [
"Apache-2.0"
] | 0 | 8f55d033c6e2453fdc092c4f504be3973a55e7ea | https://github.com/ChrisGeishauser/ConvLab-2/tree/8f55d033c6e2453fdc092c4f504be3973a55e7ea |
BatchLinear | import re
import torch
import warnings
from torch import nn
from collections import OrderedDict
class MetaModule(nn.Module):
"""
Base class for PyTorch meta-learning modules. These modules accept an
additional argument `params` in their `forward` method.
Notes
-----
Objects inherited from `Me... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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 re
import warnings
from torch import nn
from collections import OrderedDi... | Timothy102/light-field-networks | BatchLinear | false | 14,507 | [
"MIT"
] | 95 | 0d2d6099ea1df4332b173fab47e5606d579b4293 | https://github.com/Timothy102/light-field-networks/tree/0d2d6099ea1df4332b173fab47e5606d579b4293 |
MiniBatchAverageLayer | # 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.fft
assert_size_stride = torch._C._dynamo.gu... | catherine-qian/image2reverb | MiniBatchAverageLayer | false | 3,290 | [
"MIT"
] | 0 | 0fbcb35d6252dc8652cf98af0e64371cb81967e4 | https://github.com/catherine-qian/image2reverb/tree/0fbcb35d6252dc8652cf98af0e64371cb81967e4 |
Value | import torch
import torch.nn as nn
class Value(nn.Module):
def __init__(self, num_inputs):
super(Value, self).__init__()
self.affine1 = nn.Linear(num_inputs, 64)
self.affine2 = nn.Linear(64, 64)
self.value_head = nn.Linear(64, 1)
self.value_head.weight.data.mul_(0.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.triton_helpers import libdevice
import torch.nn as ... | zwc662/Safe_GAIL | Value | false | 13,182 | [
"MIT"
] | 0 | 536dd73c91d277b418ef04efdd42aa6c87fdad33 | https://github.com/zwc662/Safe_GAIL/tree/536dd73c91d277b418ef04efdd42aa6c87fdad33 |
CNNEncoder | # 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_... | OwenLeng/Early-Detection-of-Fake-News-on-Social-Media-Through-Propagation-Path-Classification-with-pytorch- | CNNEncoder | false | 8,612 | [
"MIT"
] | 38 | 39f8b7508240ebf58a3cdcf69fbb838a4239e0e5 | https://github.com/OwenLeng/Early-Detection-of-Fake-News-on-Social-Media-Through-Propagation-Path-Classification-with-pytorch-/tree/39f8b7508240ebf58a3cdcf69fbb838a4239e0e5 |
BaLayerNorm | # 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 as th
import torch.nn as nn
from torch.nn import Parameter
assert_... | denizetkar/lstms.pth | BaLayerNorm | false | 15,168 | [
"Apache-2.0"
] | 130 | c1d6af1e106e17c51604ae8acdb5114828adff19 | https://github.com/denizetkar/lstms.pth/tree/c1d6af1e106e17c51604ae8acdb5114828adff19 |
LinearPool | import torch
import torch.nn as nn
class LinearPool(nn.Module):
def __init__(self):
super(LinearPool, self).__init__()
def forward(self, feat_map):
"""
Arguments:
feat_map(Tensor): tensor with shape (N, C, H, W)
return(Tensor): tensor with shape (N, C, 1, 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
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | C3-ASV-Team/torchxrayvision | LinearPool | false | 4,919 | [
"Apache-2.0"
] | 1 | 7e53f0606986562f17a1ffd9f31d006756eff78d | https://github.com/C3-ASV-Team/torchxrayvision/tree/7e53f0606986562f17a1ffd9f31d006756eff78d |
SequentialAllocation | # 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.... | pjordan/dmch | SequentialAllocation | false | 4,122 | [
"Apache-2.0"
] | 0 | 84e04ddb0679007b15acfdc275e0e3f51e50d9f2 | https://github.com/pjordan/dmch/tree/84e04ddb0679007b15acfdc275e0e3f51e50d9f2 |
MAPELoss | import torch
import torch.nn as nn
class MAPELoss(nn.Module):
def forward(self, estimation: 'torch.Tensor', target: 'torch.Tensor'):
AER = torch.abs((target - estimation) / (target + 1e-10))
MAPE = AER.mean() * 100
return MAPE
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torc... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
... | pmq20/gde | MAPELoss | false | 16,258 | [
"MIT"
] | 131 | fa4d4dacbcf00727bef76c4a641c72b94d5f8126 | https://github.com/pmq20/gde/tree/fa4d4dacbcf00727bef76c4a641c72b94d5f8126 |
EqualConv2dSame | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import math
from torch import nn
assert_size_stride = torch._C._dynamo.guards.as... | Dolorousrtur/style-people | EqualConv2dSame | false | 8,020 | [
"MIT"
] | 15 | c48b12b245cc50f8230c0654dffe40016f2a69f1 | https://github.com/Dolorousrtur/style-people/tree/c48b12b245cc50f8230c0654dffe40016f2a69f1 |
MLP | # 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... | TheSecret3003/crf_parser | MLP | false | 2,897 | [
"MIT"
] | 0 | 34682ca8729d376b5582a3117e650b524fbcb355 | https://github.com/TheSecret3003/crf_parser/tree/34682ca8729d376b5582a3117e650b524fbcb355 |
conv_block | import torch
import torch.nn as nn
class conv_block(nn.Module):
def __init__(self, init_shape):
super(conv_block, self).__init__()
self.conv0 = nn.Conv2d(in_channels=init_shape[0], out_channels=
init_shape[1], kernel_size=init_shape[2])
self.relu = nn.ELU()
nn.init.kai... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | ShaharLutatiPersonal/hyperhypernetworks | conv_block | false | 2,827 | [
"MIT"
] | 0 | 16e2595d89ad0533c9d5a2c62870fb90f1b1dc42 | https://github.com/ShaharLutatiPersonal/hyperhypernetworks/tree/16e2595d89ad0533c9d5a2c62870fb90f1b1dc42 |
CMVN | # 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.onnx
assert_size_stride = torch._C._dynamo.guards.assert_size_stri... | entn-at/Online-Speech-Recognition | CMVN | false | 15,300 | [
"Apache-2.0"
] | 201 | 75680cef38c57d0ac60f5e23c90d24bb3046e4e7 | https://github.com/entn-at/Online-Speech-Recognition/tree/75680cef38c57d0ac60f5e23c90d24bb3046e4e7 |
FullyConnected2 | # 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... | Felix2048/SSM-VLN | FullyConnected2 | false | 8,111 | [
"MIT"
] | 27 | 25b9f98566d6e29d30e09aa8f96257f5935642d6 | https://github.com/Felix2048/SSM-VLN/tree/25b9f98566d6e29d30e09aa8f96257f5935642d6 |
squeeze | # 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... | lingzenan/invertible-resnet | squeeze | false | 7,091 | [
"MIT"
] | 1 | 57b1c0de51a885aed074b77628f3b0c85c548e70 | https://github.com/lingzenan/invertible-resnet/tree/57b1c0de51a885aed074b77628f3b0c85c548e70 |
ScaledDotProductAttention | import torch
import torch.nn.functional as F
import torch.nn as nn
class ScaledDotProductAttention(nn.Module):
""" Scaled Dot-Product Attention """
def __init__(self, temperature, attn_dropout=0.1):
super().__init__()
self.temperature = temperature
self.dropout = nn.Dropout(attn_dropo... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | AlbertiPot/attention-is-all-you-need-pytorch | ScaledDotProductAttention | false | 21 | [
"MIT"
] | 0 | c5ec40907db281b85b3bd7a5dd8016940291add0 | https://github.com/AlbertiPot/attention-is-all-you-need-pytorch/tree/c5ec40907db281b85b3bd7a5dd8016940291add0 |
Actor | import torch
import torch.nn as nn
import torch.nn.functional as F
class Actor(nn.Module):
def __init__(self, n_obs, action_dim, hidden_size, init_w=0.003):
super(Actor, self).__init__()
self.linear1 = nn.Linear(n_obs, hidden_size)
self.linear2 = nn.Linear(hidden_size, hidden_size)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | JohnJim0816/rl-tutorials | Actor | false | 8,373 | [
"MIT"
] | 16 | e99daea815da85f9f25dff2d01b030249a203d22 | https://github.com/JohnJim0816/rl-tutorials/tree/e99daea815da85f9f25dff2d01b030249a203d22 |
ScaledDotProductAttention | import math
import torch
from torch.nn import functional as F
from torch import nn
from torchvision import models as models
import torch.onnx
import torch.nn
class ScaledDotProductAttention(nn.Module):
def __init__(self, dropout_ratio=0):
super().__init__()
self.dropout = nn.Dropout(dropout_ratio... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | ygnn123/training_extensions | ScaledDotProductAttention | false | 4,687 | [
"Apache-2.0"
] | 0 | c3aeba9359b0d4e0ef9c054de777d3ec081a9892 | https://github.com/ygnn123/training_extensions/tree/c3aeba9359b0d4e0ef9c054de777d3ec081a9892 |
RSELayer | import torch
import torch.nn as nn
import torch.nn.functional as F
def hard_sigmoid(x, slope=0.1666667, offset=0.5):
return torch.clamp(slope * x + offset, 0.0, 1.0)
class SEModule(nn.Module):
def __init__(self, in_channels, reduction=4, name=''):
super(SEModule, self).__init__()
self.avg_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
import torch.nn as nn
import ... | verages/PaddleOCR2Pytorch | RSELayer | false | 4,667 | [
"Apache-2.0"
] | 0 | 201f0d5d6007f49620c49af7d222c3b220eb3e70 | https://github.com/verages/PaddleOCR2Pytorch/tree/201f0d5d6007f49620c49af7d222c3b220eb3e70 |
AttentionModule | # 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.... | das-projects/deepOCR | AttentionModule | false | 6,533 | [
"Apache-2.0"
] | 1 | ffc6db691605b7b4837da9619ab6e918fa1c18de | https://github.com/das-projects/deepOCR/tree/ffc6db691605b7b4837da9619ab6e918fa1c18de |
ExpLayer | # 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.cuda
import torch.nn as nn
assert_size_stride = torch._C._dy... | XD7479/Robust-Instance-Segmentation-through-Reasoning-about-Multi-Object-Occlusion | ExpLayer | false | 9,594 | [
"MIT"
] | 0 | 593622afbd83981b4c42940d39770ddf9c1b566c | https://github.com/XD7479/Robust-Instance-Segmentation-through-Reasoning-about-Multi-Object-Occlusion/tree/593622afbd83981b4c42940d39770ddf9c1b566c |
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
... | delldu/EQFace | FocalLoss | false | 6,543 | [
"MIT"
] | 1 | a088e80709c1e31a57e302cabfa85ab96f2c0aa5 | https://github.com/delldu/EQFace/tree/a088e80709c1e31a57e302cabfa85ab96f2c0aa5 |
ConvBlock | import torch
import torch.nn as nn
class ConvBlock(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, stride):
super(ConvBlock, self).__init__()
self.conv = nn.Conv2d(in_channels, out_channels, kernel_size,
stride, padding=1)
self.lr = nn.LeakyReLU()
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... | gle-bellier/DuelingNetwork | ConvBlock | false | 6,744 | [
"MIT"
] | 1 | 8909fe1ba6aee08b6249cb6ca3287752039c6410 | https://github.com/gle-bellier/DuelingNetwork/tree/8909fe1ba6aee08b6249cb6ca3287752039c6410 |
Policy | import torch
import torch.nn as nn
import torch.utils
from copy import deepcopy
import torch.nn.parallel
import torch.optim
class Policy(nn.Module):
def __init__(self, max_nodes, search_space):
super(Policy, self).__init__()
self.max_nodes = max_nodes
self.search_space = deepcopy(search_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
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
... | megvii-model/AngleNAS | Policy | false | 16,028 | [
"MIT"
] | 53 | c4cb189f04450db43e2014e178aa8a20ef5b316e | https://github.com/megvii-model/AngleNAS/tree/c4cb189f04450db43e2014e178aa8a20ef5b316e |
ConvShuffle | # 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
assert_size_stride = torch._C._dynamo.guards.assert_size_st... | GerbenBeintema/deepSI | ConvShuffle | false | 8,187 | [
"BSD-3-Clause"
] | 12 | 580711210398064bb7f01e41d08b7a248a88b35b | https://github.com/GerbenBeintema/deepSI/tree/580711210398064bb7f01e41d08b7a248a88b35b |
BasicBlock | import torch
import torch.nn as nn
import torch.utils.data
def conv1x1(in_planes, out_planes, stride=1):
"""1x1 convolution"""
return nn.Conv2d(in_planes, out_planes, kernel_size=1, stride=stride,
bias=False)
def conv3x3(in_planes, out_planes, stride=1, groups=1, dilation=1):
"""3x3 convolution ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | SebyakinAndrei/MichiGAN | BasicBlock | false | 1,050 | [
"MIT"
] | 0 | 6584c9a106b33096f38e8f5b11d0320f7065fd26 | https://github.com/SebyakinAndrei/MichiGAN/tree/6584c9a106b33096f38e8f5b11d0320f7065fd26 |
FRN | import torch
import torch.nn as nn
class FRN(nn.Module):
def __init__(self, num_features, eps=1e-05):
super(FRN, self).__init__()
self.tau = nn.Parameter(torch.zeros(1, num_features, 1, 1))
self.gamma = nn.Parameter(torch.ones(1, num_features, 1, 1))
self.beta = nn.Parameter(torch... | 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... | UdonDa/StarGAN-v2-pytorch-nonofficial | FRN | false | 18,028 | [
"MIT"
] | 9 | 219df6b7fd4bd533686e2093ee914a337914ca9b | https://github.com/UdonDa/StarGAN-v2-pytorch-nonofficial/tree/219df6b7fd4bd533686e2093ee914a337914ca9b |
EncoderImagePrecomp | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import numpy as np
... | sungjune-p/SCAN | EncoderImagePrecomp | false | 10,827 | [
"Apache-2.0"
] | 0 | a3013944a05b48e952141fa295a8132d25da2e97 | https://github.com/sungjune-p/SCAN/tree/a3013944a05b48e952141fa295a8132d25da2e97 |
ParallelDilatedConv | import torch
import torch.nn as nn
class ParallelDilatedConv(nn.Module):
def __init__(self, inplanes, planes):
super(ParallelDilatedConv, self).__init__()
self.dilated_conv_1 = nn.Conv2d(inplanes, planes, kernel_size=3,
stride=1, padding=1, dilation=1)
self.dilated_conv_2 = nn... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as ... | dcrmg/Efficient-Segmentation-Networks | ParallelDilatedConv | false | 3,441 | [
"MIT"
] | 0 | e2f2d90d69e4e9af464678b0f02bc754c28f643d | https://github.com/dcrmg/Efficient-Segmentation-Networks/tree/e2f2d90d69e4e9af464678b0f02bc754c28f643d |
leaky_hardtanh | # 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... | nikolasmorshuis/gadolinium_prediction | leaky_hardtanh | false | 7,349 | [
"Apache-2.0"
] | 1 | 7d6640df5b62ce578a947d3a9b9c701c3d1ccd79 | https://github.com/nikolasmorshuis/gadolinium_prediction/tree/7d6640df5b62ce578a947d3a9b9c701c3d1ccd79 |
DiceLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empt... | SohamMazumder/Federated_Segmentation | DiceLoss | false | 5,829 | [
"MIT"
] | 1 | d4eb681441003ba20f8b251a42a811c8c436f04e | https://github.com/SohamMazumder/Federated_Segmentation/tree/d4eb681441003ba20f8b251a42a811c8c436f04e |
AvgPoolPadding | import torch
import torch.nn as nn
import torch.nn.functional as F
class AvgPoolPadding(nn.Module):
def __init__(self, num_filters, channels_in, stride):
super(AvgPoolPadding, self).__init__()
self.identity = nn.AvgPool2d(stride, stride=stride)
self.num_zeros = num_filters - channels_in
... | 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... | sunqcc/Pytorch-HW-CIFAR10 | AvgPoolPadding | false | 4,394 | [
"MIT"
] | 0 | 33a55a5a832474083820b65c46f809ac98f8b109 | https://github.com/sunqcc/Pytorch-HW-CIFAR10/tree/33a55a5a832474083820b65c46f809ac98f8b109 |
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.triton_helpers import libdevice
import torch.nn as ... | AnweshCR7/convNeXt | Block | false | 8,868 | [
"MIT"
] | 0 | 5400dd0f7c793f497057f5548b49e3969a540504 | https://github.com/AnweshCR7/convNeXt/tree/5400dd0f7c793f497057f5548b49e3969a540504 |
BasicBlock | # 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.... | JunLi-Galios/GPM | BasicBlock | false | 2,446 | [
"MIT"
] | 0 | 9ea62c52ec5ae09de185fa66b1262e31c90d82a6 | https://github.com/JunLi-Galios/GPM/tree/9ea62c52ec5ae09de185fa66b1262e31c90d82a6 |
SoftGate | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn as nn
from torch.nn import init as init
from torchvision.models import vgg as vgg
import torch.utils.data
from torch.ut... | Lotayou/BasicSR | SoftGate | false | 2,646 | [
"Apache-2.0",
"MIT"
] | 0 | 6cf9a706dd680d54f7dc26e87318ff79f76c0dbf | https://github.com/Lotayou/BasicSR/tree/6cf9a706dd680d54f7dc26e87318ff79f76c0dbf |
BarlowTwinLoss | # 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.... | jianzhnie/self_supervised | BarlowTwinLoss | false | 6,950 | [
"Apache-2.0"
] | 1 | d1e0f31ab032150ab0ad007c1e19773135a5fb79 | https://github.com/jianzhnie/self_supervised/tree/d1e0f31ab032150ab0ad007c1e19773135a5fb79 |
TransformerEncoderLayer | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.nn.parallel
import torch.utils.data
import torch.distributions
class TransformerEncoderLayer(nn.Module):
def __init__(self, embed_dim, num_heads, hidden_size, dropout=0.0,
attention_dropout=0.0, activation_dropout=0.0):
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | IA3005/NLP_ens | TransformerEncoderLayer | false | 11,607 | [
"MIT"
] | 0 | 794ebbff46d5e6d5476f29b577b40bbb52991246 | https://github.com/IA3005/NLP_ens/tree/794ebbff46d5e6d5476f29b577b40bbb52991246 |
PositionWiseFeedForward | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import math
import ... | Kyumin-Park/Protein-Chemical-Releativity-BERT | PositionWiseFeedForward | false | 1,894 | [
"MIT"
] | 0 | 6a339f4e640d99199f38a00769f5872c2a53ac55 | https://github.com/Kyumin-Park/Protein-Chemical-Releativity-BERT/tree/6a339f4e640d99199f38a00769f5872c2a53ac55 |
UnpoolingAsConvolution | import torch
import torch.nn as nn
def get_incoming_shape(incoming):
size = incoming.size()
return [size[0], size[1], size[2], size[3]]
def interleave(tensors, axis):
old_shape = get_incoming_shape(tensors[0])[1:]
new_shape = [-1] + old_shape
new_shape[axis] *= len(tensors)
stacked = torch.s... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | karoly-hars/DE_hybrid_CNN | UnpoolingAsConvolution | false | 12,664 | [
"BSD-3-Clause"
] | 0 | d74ba4291d6db335151d5262ab96e8e3806a7587 | https://github.com/karoly-hars/DE_hybrid_CNN/tree/d74ba4291d6db335151d5262ab96e8e3806a7587 |
InputProjectionA | # 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.nn.parallel
import torch.utils.data
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty... | PhillipHuang2017/ext_portrait_segmentation | InputProjectionA | false | 951 | [
"MIT"
] | 0 | 6d0cec0a953dacbc94a01ea8b719feb687b7c029 | https://github.com/PhillipHuang2017/ext_portrait_segmentation/tree/6d0cec0a953dacbc94a01ea8b719feb687b7c029 |
InvertibleLinearFlow | import torch
import numpy as np
import torch.nn as nn
from typing import Tuple
class Flow(nn.Module):
def __init__(self):
super(Flow, self).__init__()
def forward(self, *inputs, **kwargs) ->Tuple[torch.Tensor, torch.Tensor]:
"""
Args:
*inputs: input [batch, *input_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
import numpy as np
import torch.nn as nn
from typing import Tuple
assert_size_st... | Tiamat-Tech/VAENAR-TTS | InvertibleLinearFlow | false | 14,493 | [
"MIT"
] | 62 | 69b6b5be1ab5168cfd3c6ab902075638e76a3b8d | https://github.com/Tiamat-Tech/VAENAR-TTS/tree/69b6b5be1ab5168cfd3c6ab902075638e76a3b8d |
LearnedPositionalEmbedding | import torch
import torch.utils.data
from torch import nn
def create_position_ids_from_input_ids(input_ids, padding_idx):
""" Replace non-padding symbols with their position numbers. Position numbers begin at
padding_idx+1. Padding symbols are ignored. This is modified from fairseq's
`utils.make_positions... | 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
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._... | awslabs/gap-text2sql | LearnedPositionalEmbedding | false | 14,935 | [
"Apache-2.0"
] | 75 | 83af3f08a6c108f7cbacb8125e2a7ec9255c81b0 | https://github.com/awslabs/gap-text2sql/tree/83af3f08a6c108f7cbacb8125e2a7ec9255c81b0 |
ResBlock | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.utils.data
impor... | ZhibingLai/MSFN | ResBlock | false | 2,989 | [
"Apache-2.0"
] | 0 | eb650c351edf27270bc32b50b60842a9fe40308e | https://github.com/ZhibingLai/MSFN/tree/eb650c351edf27270bc32b50b60842a9fe40308e |
SSIM | import torch
import torch.nn as nn
class SSIM(nn.Module):
"""Layer to compute the SSIM loss between a pair of images
"""
def __init__(self):
super(SSIM, self).__init__()
self.mu_x_pool = nn.AvgPool2d(3, 1)
self.mu_y_pool = nn.AvgPool2d(3, 1)
self.sig_x_pool = nn.AvgPool2d(... | 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
... | minjabenho/image2pcl | SSIM | false | 7,242 | [
"Apache-2.0"
] | 1 | 7e696ee48edae30814d32f32e605ad6cf8bf702c | https://github.com/minjabenho/image2pcl/tree/7e696ee48edae30814d32f32e605ad6cf8bf702c |
Q | import torch
import torch.nn as nn
class P(nn.Module):
"""
to solve min(P) = ||I-PQ||^2 + γ||P-R||^2
this is a least square problem
how to solve?
P* = (gamma*R + I*Q) / (Q*Q + gamma)
"""
def __init__(self):
super().__init__()
def forward(self, I, Q, R, gamma):... | 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... | AndersonYong/URetinex-Net-Retinex-based-Deep-Unfolding-Network-for-Low-light-Image-Enhancem | Q | false | 8,928 | [
"MIT"
] | 0 | 9d837b8df9c761defb1eca390b3a60aa4a6fbb1a | https://github.com/AndersonYong/URetinex-Net-Retinex-based-Deep-Unfolding-Network-for-Low-light-Image-Enhancem/tree/9d837b8df9c761defb1eca390b3a60aa4a6fbb1a |
ConvReLUNorm | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | Malkovsky/NeMo | ConvReLUNorm | false | 2,605 | [
"Apache-2.0"
] | 0 | 8cf9aad8ecba36f1bd7b096cf274c2bc8ac695c3 | https://github.com/Malkovsky/NeMo/tree/8cf9aad8ecba36f1bd7b096cf274c2bc8ac695c3 |
BiInteractionPooling | import torch
import torch.nn as nn
from sklearn.metrics import *
class BiInteractionPooling(nn.Module):
"""Bi-Interaction Layer used in Neural FM,compress the
pairwise element-wise product of features into one single vector.
Input shape
- A 3D tensor with shape:``(batch_size,field_size,embeddi... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
from sklearn.metrics import *
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = tor... | chenkkkk/DeepCTR-PyTorch | BiInteractionPooling | false | 6,505 | [
"Apache-2.0"
] | 1 | a10a3ace4ad79171e7fb182407b3e4d22bf753e7 | https://github.com/chenkkkk/DeepCTR-PyTorch/tree/a10a3ace4ad79171e7fb182407b3e4d22bf753e7 |
QuickGELU | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
import torch.distributed.nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch.... | NYU-DICE-Lab/open_clip | QuickGELU | false | 864 | [
"MIT"
] | 0 | fd71804b503135fb1c7cc8de3a0d6599741c8ed9 | https://github.com/NYU-DICE-Lab/open_clip/tree/fd71804b503135fb1c7cc8de3a0d6599741c8ed9 |
MultiHead | import math
import torch
from torch import Tensor
from torch.nn import Linear
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)
def kaiming_uniform... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | CFF-Dream/pytorch_geometric | MultiHead | false | 2,045 | [
"MIT"
] | 0 | 7c19ad74957409ee9e07314ce81524b3113b9c84 | https://github.com/CFF-Dream/pytorch_geometric/tree/7c19ad74957409ee9e07314ce81524b3113b9c84 |
Decoder | import torch
import torch.nn as nn
class Decoder(nn.Module):
def __init__(self, sampling_rate=16000.0):
super(Decoder, self).__init__()
self.sampling_rate = sampling_rate
self.upsa1 = torch.nn.Upsample(int(sampling_rate / 2))
self.conv3 = torch.nn.Conv1d(128, 64, 3, padding=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.... | Koukyosyumei/Zatsuon | Decoder | false | 2,461 | [
"Apache-2.0"
] | 0 | d7f520a282cf00bfd19d2dec300701c21403cba1 | https://github.com/Koukyosyumei/Zatsuon/tree/d7f520a282cf00bfd19d2dec300701c21403cba1 |
IA_gate | import torch
import torch.nn as nn
class IA_gate(nn.Module):
def __init__(self, in_dim, out_dim):
super(IA_gate, self).__init__()
self.IA = nn.Linear(in_dim, out_dim)
def forward(self, x, IA_head):
a = self.IA(IA_head)
a = 1.0 + torch.tanh(a)
a = a.unsqueeze(-1).unsqu... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | yoxu515/CFBI | IA_gate | false | 16,766 | [
"BSD-3-Clause"
] | 312 | 0bab1e3c9fc3e3ba0629f716d60221e8f8d9d586 | https://github.com/yoxu515/CFBI/tree/0bab1e3c9fc3e3ba0629f716d60221e8f8d9d586 |
mlp | import torch
import torch.nn as nn
import torch.nn.functional as F
class mlp(nn.Module):
def __init__(self):
super(mlp, self).__init__()
self.fc1 = nn.Linear(28 * 28, 512)
self.fc2 = nn.Linear(512, 256)
self.fc3 = nn.Linear(256, 10)
def forward(self, x):
x = x.view(-1... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | KwanHoo/coding-playgroung | mlp | false | 2,487 | [
"MIT"
] | 0 | 443c0ccd2ca8fb7b031a87837a4e6f8d0be2560d | https://github.com/KwanHoo/coding-playgroung/tree/443c0ccd2ca8fb7b031a87837a4e6f8d0be2560d |
CBOW | import torch
import torch.nn as nn
class CBOW(nn.Module):
def __init__(self, input_size, hidden_size):
super().__init__()
self.fc1 = nn.Linear(input_size, hidden_size)
self.fc2 = nn.Linear(hidden_size, input_size)
def forward(self, x):
x = sum([*x]).float()
x = self.f... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | danny-1k/autocomplete_hist | CBOW | false | 1,780 | [
"BSD-2-Clause"
] | 0 | 0a553ea59e08f2ddca60a1f35e9cf14d43370100 | https://github.com/danny-1k/autocomplete_hist/tree/0a553ea59e08f2ddca60a1f35e9cf14d43370100 |
MulScalarNegative | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
from torch.quantization import QuantStub
from torch.quantization import DeQuantStub
assert_size_stride = torch._C._dyn... | cli99/tvm | MulScalarNegative | false | 6,454 | [
"Apache-2.0"
] | 1 | 6c6e873a1325a32418108daad6e38f3df8c37660 | https://github.com/cli99/tvm/tree/6c6e873a1325a32418108daad6e38f3df8c37660 |
FPN | # 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 math import sqrt as sqrt
from itertools import produc... | KaiOtter/pytorch_DSOD_variants | FPN | false | 5,428 | [
"MIT"
] | 1 | f29088b13b24f24e2cf20e9a2dc800cd6dbde145 | https://github.com/KaiOtter/pytorch_DSOD_variants/tree/f29088b13b24f24e2cf20e9a2dc800cd6dbde145 |
GaussianFocalLoss | # 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 functools
impor... | CityU-AIM-Group/HTD | GaussianFocalLoss | false | 17,121 | [
"MIT"
] | 5 | 0be9fd844118c275abc6053b3cbd5ffb589e62ee | https://github.com/CityU-AIM-Group/HTD/tree/0be9fd844118c275abc6053b3cbd5ffb589e62ee |
ChebConv | import torch
import torch.nn as nn
import torch.nn.init as init
class ChebConv(nn.Module):
"""
The ChebNet convolution operation.
:param in_c: int, number of input dim
:param out_c: int, number of output dim
:param K: int, the order of Chebyshev Polynomial,切比雪夫展开多少阶
"""
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 ... | V-cyberpunk-01/GNN | ChebConv | false | 5,942 | [
"MIT"
] | 1 | 25a6b24f4d8fad626af33f98e189b221c50406cd | https://github.com/V-cyberpunk-01/GNN/tree/25a6b24f4d8fad626af33f98e189b221c50406cd |
BinConv2d | # 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 itertools import product as product
from torch import nn
import torch.optim... | ninfueng/a-PyTorch-Tutorial-to-Object-Detection | BinConv2d | false | 10,638 | [
"MIT"
] | 0 | fc7544720a7e939f5a56f4f7214e4965b7775f77 | https://github.com/ninfueng/a-PyTorch-Tutorial-to-Object-Detection/tree/fc7544720a7e939f5a56f4f7214e4965b7775f77 |
RecurrentNeuralNetwork | # 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.... | JThissen/machine_learning | RecurrentNeuralNetwork | false | 598 | [
"MIT"
] | 0 | 82e2b003fb25111dc2d9ac1c1b2fd637e9f4fdbc | https://github.com/JThissen/machine_learning/tree/82e2b003fb25111dc2d9ac1c1b2fd637e9f4fdbc |
MaskedLinear | import torch
import torch.cuda
from torch.nn.functional import *
class MaskedLinear(torch.nn.Linear):
def forward(self, x, mask):
out = super().forward(x)
if mask.is_floating_point():
out = out * mask
else:
out = out * mask.type_as(out)
return out
def get... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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.cuda
from torch.nn.functional import *
assert_size_stride = torch._... | bratao/DeepSpeed | MaskedLinear | false | 6,355 | [
"MIT"
] | 1 | c50d8955e942e5e26cf81835d59ec3f20ef8540d | https://github.com/bratao/DeepSpeed/tree/c50d8955e942e5e26cf81835d59ec3f20ef8540d |
GAT | # 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.... | EagleW/PaperRobot-Incremental-Draft-Generation-of-Scientific-Ideas | GAT | false | 14,106 | [
"MIT"
] | 453 | a338abf3974ba9ce916ae846835063a42b9e6689 | https://github.com/EagleW/PaperRobot-Incremental-Draft-Generation-of-Scientific-Ideas/tree/a338abf3974ba9ce916ae846835063a42b9e6689 |
ConstantODE | # 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
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda
@triton.j... | navaro1/parking_prediction | ConstantODE | false | 12,891 | [
"MIT"
] | 0 | c532a2f75155abc9c0d4be9c955eabe368591932 | https://github.com/navaro1/parking_prediction/tree/c532a2f75155abc9c0d4be9c955eabe368591932 |
AttentionPool2d | import torch
import torch.nn.functional as F
from torch import nn
class AttentionPool2d(nn.Module):
def __init__(self, spacial_dim: 'int', embed_dim: 'int', num_heads:
'int', output_dim: 'int'=None):
super().__init__()
self.positional_embedding = nn.Parameter(torch.randn(spacial_dim **
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | Jinsu-L/KELIP | AttentionPool2d | false | 5,418 | [
"Apache-2.0"
] | 1 | d3261cbb9ba3c3ad474dd560a5add8b69ed78477 | https://github.com/Jinsu-L/KELIP/tree/d3261cbb9ba3c3ad474dd560a5add8b69ed78477 |
PEG | # 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
assert_size_stride = torch._C._dynamo.guards.assert_size_st... | onlyrico/vit-pytorch | PEG | false | 7,371 | [
"MIT"
] | 1 | e52ac4195550faa9c3372533d325bf649f7354ad | https://github.com/onlyrico/vit-pytorch/tree/e52ac4195550faa9c3372533d325bf649f7354ad |
AnswerModule | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.nn.init as init
assert_size_stride = torch._C... | kirubarajan/Dynamic-Memory-Network-Plus | AnswerModule | false | 12,674 | [
"Apache-2.0"
] | 0 | 0613287ef5a959c7b260afcea2c31afcfb0ea189 | https://github.com/kirubarajan/Dynamic-Memory-Network-Plus/tree/0613287ef5a959c7b260afcea2c31afcfb0ea189 |
BoundaryDiscriminator | import torch
import torch.nn as nn
class BoundaryDiscriminator(nn.Module):
def __init__(self):
super(BoundaryDiscriminator, self).__init__()
filter_num_list = [64, 128, 256, 512, 1]
self.conv1 = nn.Conv2d(1, filter_num_list[0], kernel_size=4, stride
=2, padding=2, bias=False)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | EmmaW8/BEAL | BoundaryDiscriminator | false | 13,682 | [
"MIT"
] | 95 | 945cad38a354605b8bca5bc01ae1b65848d605e1 | https://github.com/EmmaW8/BEAL/tree/945cad38a354605b8bca5bc01ae1b65848d605e1 |
BERTEmbedding2 | import torch
import torch.nn as nn
from itertools import chain as chain
import torch.utils.data
import torch.hub
import torch.nn.parallel
import torch.optim
class LearnedPositionalEmbedding2(nn.Module):
def __init__(self, d_model, max_len=512):
super().__init__()
pe = torch.zeros(max_len, d_model... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
from itertools import chain as chain
import torch.utils.data
import torch.hub
import torch.nn.parallel
import torch.op... | byeongjokim/LateTemporalModeling3DCNN_for_sign | BERTEmbedding2 | false | 1,625 | [
"MIT"
] | 0 | e3a802fcf91dc3930aea782464ee34d9b747d3ab | https://github.com/byeongjokim/LateTemporalModeling3DCNN_for_sign/tree/e3a802fcf91dc3930aea782464ee34d9b747d3ab |
FC | import torch
import torch.nn
import torch.utils.checkpoint
import torch.utils.data
import torch.optim
import torch.distributed
import torch.multiprocessing
class FC(torch.nn.Module):
def __init__(self, in_features, out_features, act=torch.nn.ReLU(inplace
=True)):
super().__init__()
self.l... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn
import torch.... | AndrejOrsula/O-CNN | FC | false | 9,038 | [
"MIT"
] | 0 | e17290a206c3fe23d80873fb21d7243f71e2e9df | https://github.com/AndrejOrsula/O-CNN/tree/e17290a206c3fe23d80873fb21d7243f71e2e9df |
DotProdAttention | # 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.... | Tzu-An/ml_seq2seq_attn | DotProdAttention | false | 2,901 | [
"Apache-2.0"
] | 0 | 1f29b1156c5e66e2bb5255c6d214c70162c91528 | https://github.com/Tzu-An/ml_seq2seq_attn/tree/1f29b1156c5e66e2bb5255c6d214c70162c91528 |
binary_last_fc | from torch.autograd import Function
import torch
import torch.nn as nn
import torch.nn.functional as F
class XNOR_BinaryQuantize(Function):
@staticmethod
def forward(ctx, input):
ctx.save_for_backward(input)
out = torch.sign(input)
return out
@staticmethod
def backward(ctx, g... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch.autograd... | RuiLin0212/BATMANN | binary_last_fc | false | 17,870 | [
"MIT"
] | 6 | 5c5cc3334090fc0442bfd2ffdd41bdcab88cbea2 | https://github.com/RuiLin0212/BATMANN/tree/5c5cc3334090fc0442bfd2ffdd41bdcab88cbea2 |
ClassifierHead | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.utils.data
import torchvision.transforms.functional as F
import tor... | dumpmemory/NonDeepNetworks | ClassifierHead | false | 15,261 | [
"BSD-3-Clause"
] | 307 | 5513bf588f4e64c99583440507232675c2e21e34 | https://github.com/dumpmemory/NonDeepNetworks/tree/5513bf588f4e64c99583440507232675c2e21e34 |
NPairLoss | import torch
class NPairLoss(torch.nn.Module):
def __init__(self, l2=0.05):
"""
Basic N-Pair Loss as proposed in 'Improved Deep Metric Learning with Multi-class N-pair Loss Objective'
Args:
l2: float, weighting parameter for weight penality due to embeddings not being normaliz... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
assert_size_s... | bm2-lab/MDML | NPairLoss | false | 1,586 | [
"MIT"
] | 0 | 222fb22b2ee53dd3c1a6f2e99a88f71e9635e3a0 | https://github.com/bm2-lab/MDML/tree/222fb22b2ee53dd3c1a6f2e99a88f71e9635e3a0 |
LayerNormChannel | import torch
from torch import nn
class LayerNormChannel(nn.Module):
"""LayerNorm only for channel dimension."""
def __init__(self, num_channels, eps=1e-05):
super().__init__()
self.weight = nn.Parameter(torch.ones(num_channels))
self.bias = nn.Parameter(torch.zeros(num_channels))
... | 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... | Jack-Hu-2001/UniverseNet | LayerNormChannel | false | 13,867 | [
"Apache-2.0"
] | 314 | 03e7b8442286f951c65fe730ec86b9441005ac1b | https://github.com/Jack-Hu-2001/UniverseNet/tree/03e7b8442286f951c65fe730ec86b9441005ac1b |
Attention | import torch
import torch.nn as nn
class Encoder(nn.Module):
def __init__(self, dim, dim_embed):
super(Encoder, self).__init__()
self.embed = nn.Conv1d(dim, dim_embed, 1)
return
def forward(self, input):
input_2 = input.permute(0, 2, 1)
out = self.embed(input_2)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as ... | jomavera/DRL_HFV | Attention | false | 15,735 | [
"MIT"
] | 114 | 043e32805ec79fd35281b864659c194d7b89f5bc | https://github.com/jomavera/DRL_HFV/tree/043e32805ec79fd35281b864659c194d7b89f5bc |
AttentionSet | import torch
import torch.nn as nn
import torch.nn.functional as F
class Attention(nn.Module):
def __init__(self, mode_dims, expand_dims, center_use_offset, att_type,
bn, nat, name='Real'):
super(Attention, self).__init__()
self.center_use_offset = center_use_offset
self.bn = bn
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | marcos0318/query2box | AttentionSet | false | 16,019 | [
"MIT"
] | 140 | cc8b47e21a5addf17ee5a3c68412b638ef3956f3 | https://github.com/marcos0318/query2box/tree/cc8b47e21a5addf17ee5a3c68412b638ef3956f3 |
SinkhornKnopp | import torch
import torch.distributed as dist
class SinkhornKnopp(torch.nn.Module):
def __init__(self, num_iters: 'int'=3, epsilon: 'float'=0.05,
world_size: 'int'=1):
"""Approximates optimal transport using the Sinkhorn-Knopp algorithm.
A simple iterative method to approach the double 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
from torch._inductor.runtime.triton_helpers import math as tl_math
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_str... | TranNhiem/solo-learn | SinkhornKnopp | false | 1,170 | [
"MIT"
] | 0 | 7539732b68d153087d09a26a23e1edfdc49bc086 | https://github.com/TranNhiem/solo-learn/tree/7539732b68d153087d09a26a23e1edfdc49bc086 |
BasicModel | import torch
import torch.nn as nn
import torch.nn.functional as F
class BasicModel(nn.Module):
def __init__(self):
super().__init__()
def forward(self, input):
input = 1 - F.relu(1 - input)
return input
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs(... | 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... | Europium248/captum | BasicModel | false | 421 | [
"BSD-3-Clause"
] | 0 | ac02fae2651b8d68a44bcb9d03b91cbb3959f2fc | https://github.com/Europium248/captum/tree/ac02fae2651b8d68a44bcb9d03b91cbb3959f2fc |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.