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 |
|---|---|---|---|---|---|---|---|---|---|---|
ConvLayer | from _paritybench_helpers import _mock_config
import torch
import torch.nn.functional as F
import torch.nn as nn
class ConvLayer(nn.Module):
"""Conv layer for qa output"""
def __init__(self, config):
"""
Args:
config (ModelArguments): ModelArguments
"""
super().__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._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | Amber-Chaeeunk/Open-Domain-Question-Answering | ConvLayer | false | 18,266 | [
"MIT"
] | 5 | 725e369a4409c54bf11bcfb9db53865d8fc1f935 | https://github.com/Amber-Chaeeunk/Open-Domain-Question-Answering/tree/725e369a4409c54bf11bcfb9db53865d8fc1f935 |
BinaryFocalLossWithLogits | import torch
import torch.nn as nn
def binary_focal_loss_with_logits(input: 'torch.Tensor', target:
'torch.Tensor', alpha: 'float'=0.25, gamma: 'float'=2.0, reduction:
'str'='none', eps: 'float'=1e-08) ->torch.Tensor:
"""Function that computes Binary Focal loss.
.. math::
\\text{FL}(p_t) = -... | 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... | adi1999/kornia | BinaryFocalLossWithLogits | false | 12,058 | [
"ECL-2.0",
"Apache-2.0"
] | 0 | bb476a36e2725d687d1879b5a0d877c1ba860c25 | https://github.com/adi1999/kornia/tree/bb476a36e2725d687d1879b5a0d877c1ba860c25 |
AsymLoss | import torch
import numpy as np
import torch.nn as nn
def sum_tensor(inp, axes, keepdim=False):
axes = np.unique(axes).astype(int)
if keepdim:
for ax in axes:
inp = inp.sum(int(ax), keepdim=True)
else:
for ax in sorted(axes, reverse=True):
inp = inp.sum(int(ax))
... | 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
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dyna... | DoggyLiu0116/MamboNet | AsymLoss | false | 5,073 | [
"MIT"
] | 1 | 3b708091422491f660c4bd5eb12b06ce3b8a5f79 | https://github.com/DoggyLiu0116/MamboNet/tree/3b708091422491f660c4bd5eb12b06ce3b8a5f79 |
resblock | import torch
import torch.nn as nn
class mfm(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size=3, stride=1,
padding=1, type=1):
super(mfm, self).__init__()
self.out_channels = out_channels
if type == 1:
self.filter = nn.Conv2d(in_channels, 2 * out_c... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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_... | BradyFU/DVG-Face | resblock | false | 7,818 | [
"MIT"
] | 33 | 16d51fe7da6e4a52d144e938afb3072eb8e4e8de | https://github.com/BradyFU/DVG-Face/tree/16d51fe7da6e4a52d144e938afb3072eb8e4e8de |
MedianPool2d | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.modules.utils import _pair
from torch.nn.modules.utils import _quadruple
class MedianPool2d(nn.Module):
""" Median pool (usable as median filter when stride=1) module.
Args:
kernel_size: size of pooling kernel, int ... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
from torch.nn.modules.utils import _pair
from torch... | PJ-Steeman/2020_Masterproef | MedianPool2d | false | 5,704 | [
"MIT"
] | 1 | 5bd77b4039a897d328fafe9a0b70dc8e593e2899 | https://github.com/PJ-Steeman/2020_Masterproef/tree/5bd77b4039a897d328fafe9a0b70dc8e593e2899 |
RMSELoss | # 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... | Pandinosaurus/Depth-Estimation-Segmentation | RMSELoss | false | 17,793 | [
"MIT"
] | 4 | 2eea883c96bf106774ea94464fc16c6baea86a95 | https://github.com/Pandinosaurus/Depth-Estimation-Segmentation/tree/2eea883c96bf106774ea94464fc16c6baea86a95 |
CrossEntropyLoss | import torch
import torch.nn.functional as F
import torch.nn as nn
import torch._C
import torch.serialization
def reduce_loss(loss, reduction):
"""Reduce loss as specified.
Args:
loss (Tensor): Elementwise loss tensor.
reduction (str): Options are "none", "mean" and "sum".
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.functi... | CVIU-CSU/M2MRF-Lesion-Segmentation | CrossEntropyLoss | false | 17,063 | [
"Apache-2.0"
] | 10 | 13af87927f4cdeca70e35d570edd1aec43b387b6 | https://github.com/CVIU-CSU/M2MRF-Lesion-Segmentation/tree/13af87927f4cdeca70e35d570edd1aec43b387b6 |
ASPP | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
assert_s... | L-Net-1992/towhee | ASPP | false | 14,022 | [
"Apache-2.0"
] | 365 | 471de97bf9c5443efaf3b62fd440b3ebdb6d5903 | https://github.com/L-Net-1992/towhee/tree/471de97bf9c5443efaf3b62fd440b3ebdb6d5903 |
AvgPoolPadding | # 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... | sunqcc/Pytorch-HW-CIFAR10 | AvgPoolPadding | false | 4,394 | [
"MIT"
] | 0 | 33a55a5a832474083820b65c46f809ac98f8b109 | https://github.com/sunqcc/Pytorch-HW-CIFAR10/tree/33a55a5a832474083820b65c46f809ac98f8b109 |
DiceLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
emp... | tfmoraes/deep_heart_torch | DiceLoss | false | 10,844 | [
"MIT"
] | 0 | 4168ce01d600e69baf82c752a3e57af86861b6ea | https://github.com/tfmoraes/deep_heart_torch/tree/4168ce01d600e69baf82c752a3e57af86861b6ea |
WeightNormConv2d | # 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 ... | AntixK/Neural-Blocks | WeightNormConv2d | false | 17,016 | [
"MIT"
] | 3 | 018a44bbb703fc848234b95a3e604576bd9df88f | https://github.com/AntixK/Neural-Blocks/tree/018a44bbb703fc848234b95a3e604576bd9df88f |
UpBlock | import torch
import torch.nn as nn
import torch.nn.functional as F
class UpBlock(nn.Module):
""" Encoder - From pyramid bottom to op
"""
def __init__(self, in_channels, out_channels, sz=1):
super(UpBlock, self).__init__()
self.c1 = nn.Conv3d(in_channels, out_channels, kernel_size=3,
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | cwood1967/Seg3D | UpBlock | false | 6,508 | [
"Apache-2.0"
] | 1 | dd3ae11fbd89fcfb98d3c00089515a336f2a24e9 | https://github.com/cwood1967/Seg3D/tree/dd3ae11fbd89fcfb98d3c00089515a336f2a24e9 |
SELayer | import torch
import torch.nn as nn
import torch.nn.parallel
import torch.optim
import torch.utils.data
import torch.utils.data.distributed
import torchvision.transforms.functional as F
import torch.nn.functional as F
from collections import OrderedDict
import torch.utils
def make_divisible(v, divisor=8, min_value=1):... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import ... | Ren-Research/maestro | SELayer | false | 2,945 | [
"MIT"
] | 0 | b89e171d51ec910b165b9b01dd8373848a6207f7 | https://github.com/Ren-Research/maestro/tree/b89e171d51ec910b165b9b01dd8373848a6207f7 |
DPSLTMAdapter | import math
import torch
from torch import Tensor
import torch.nn as nn
import torch.utils.data
import torch.utils.data.distributed
import torch.nn.parallel
from typing import Tuple
from typing import List
from typing import Optional
from typing import Dict
from typing import Union
from torch.nn.modules.module import _... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import math
from to... | madhavajay/opacus | DPSLTMAdapter | false | 10,494 | [
"Apache-2.0"
] | 0 | 7ae098764b4cf2388c66e263dd8d56bca0a290d0 | https://github.com/madhavajay/opacus/tree/7ae098764b4cf2388c66e263dd8d56bca0a290d0 |
Autoencoder | import torch
from torch import nn
class Autoencoder(nn.Module):
def __init__(self, input_dim, output_dim, n_hid, n_bottleneck):
super(Autoencoder, self).__init__()
self.fc1 = nn.Linear(input_dim, n_hid)
self.fc2 = nn.Linear(n_hid, n_bottleneck)
self.fc3 = nn.Linear(n_bottleneck, 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._inductor.runtime import triton_helpers
from torch import nn
assert_s... | JavierAntoran/tiger-costume | Autoencoder | false | 17,458 | [
"MIT"
] | 10 | 975661dfab2c435281f74c6be86529b16881ebcb | https://github.com/JavierAntoran/tiger-costume/tree/975661dfab2c435281f74c6be86529b16881ebcb |
GatAttention | import torch
import torch.nn.functional as F
import torch.nn as nn
from torch.nn import Parameter
class ConstAttention(nn.Module):
def __init__(self, **kwargs):
super(ConstAttention, self).__init__()
def forward(self, neighbor_vecs, self_vecs):
return 1
class GatAttention(ConstAttention):
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
from torch.nn import Parameter
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = to... | AlexMinhao/NAS_GNN | GatAttention | false | 17 | [
"Apache-2.0"
] | 0 | 89183988a96e1d6baed910ab3843c13282f8b077 | https://github.com/AlexMinhao/NAS_GNN/tree/89183988a96e1d6baed910ab3843c13282f8b077 |
MAPELoss | # 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
... | pmq20/gde | MAPELoss | false | 16,258 | [
"MIT"
] | 131 | fa4d4dacbcf00727bef76c4a641c72b94d5f8126 | https://github.com/pmq20/gde/tree/fa4d4dacbcf00727bef76c4a641c72b94d5f8126 |
EncoderLayer | import math
import torch
import torch.nn as nn
import torch.nn.functional as F
class ScaledDotProductAttention(nn.Module):
def __init__(self):
super(ScaledDotProductAttention, self).__init__()
def forward(self, query, key, value, mask=None):
_1, _2, query_sequence_length, _3 = query.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.... | SeungoneKim/Transformer_implementation | EncoderLayer | false | 1,097 | [
"Apache-2.0"
] | 0 | a52bf552eb645fc9bfb812cc26842fc147d6c008 | https://github.com/SeungoneKim/Transformer_implementation/tree/a52bf552eb645fc9bfb812cc26842fc147d6c008 |
h_sigmoid | import torch
import torch.nn as nn
class h_sigmoid(nn.Module):
def __init__(self, inplace=True):
super(h_sigmoid, self).__init__()
self.relu = nn.ReLU6(inplace=inplace)
def forward(self, x):
return self.relu(x + 3) / 6
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def g... | 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... | CYHYCY/voice-classification | h_sigmoid | false | 17,074 | [
"Apache-2.0"
] | 8 | a6f62e2f1c39b08323da3632411f4ba6b04d5f37 | https://github.com/CYHYCY/voice-classification/tree/a6f62e2f1c39b08323da3632411f4ba6b04d5f37 |
MLP_FiLM | import torch
import torch.nn as nn
class FiLMNetwork(nn.Module):
def __init__(self, in_sz, out_sz):
super(FiLMNetwork, self).__init__()
self.f = nn.Linear(in_sz, out_sz)
self.h = nn.Linear(in_sz, out_sz)
def forward(self, inputs, features):
gamma = self.f(inputs).unsqueeze(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 ... | bblinn2017/IM-NET-pytorch | MLP_FiLM | false | 3,185 | [
"MIT"
] | 0 | 82ff646aaf2f93ae1560debb40fe05f1420ff655 | https://github.com/bblinn2017/IM-NET-pytorch/tree/82ff646aaf2f93ae1560debb40fe05f1420ff655 |
BatchSpectralPenalizationLoss | import torch
import torch.nn as nn
import torch.utils.data
class BatchSpectralPenalizationLoss(nn.Module):
"""Batch spectral penalization loss from `Transferability vs. Discriminability: Batch
Spectral Penalization for Adversarial Domain Adaptation (ICML 2019)
<http://ise.thss.tsinghua.edu.cn/~mlong/doc/b... | 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.... | neka-nat/Transfer-Learning-Library | BatchSpectralPenalizationLoss | false | 16,137 | [
"MIT"
] | 1,474 | a3b27b0d7562fa90a02e914140b37ab438469e6c | https://github.com/neka-nat/Transfer-Learning-Library/tree/a3b27b0d7562fa90a02e914140b37ab438469e6c |
ResBlock | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
import t... | HubBucket-Team/annotated_deep_learning_paper_implementations | ResBlock | false | 5,312 | [
"MIT"
] | 1 | 4a9716b01e336c57739dfdbdd90648276b53c433 | https://github.com/HubBucket-Team/annotated_deep_learning_paper_implementations/tree/4a9716b01e336c57739dfdbdd90648276b53c433 |
GCN | # 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.functional as F
import torch.nn.parallel
as... | EllisHui/outOfRailWay | GCN | false | 433 | [
"BSD-2-Clause"
] | 0 | e3bf9aaa18879bee5536740d55006c872f06278f | https://github.com/EllisHui/outOfRailWay/tree/e3bf9aaa18879bee5536740d55006c872f06278f |
STFullyConnected | # 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.... | EXYNOS-999/DrugEx | STFullyConnected | false | 5,181 | [
"MIT"
] | 1 | f75a90fbc0b9863d594fbff6afecb0f866c076d6 | https://github.com/EXYNOS-999/DrugEx/tree/f75a90fbc0b9863d594fbff6afecb0f866c076d6 |
Accuracy | import torch
from torch.nn import *
from torch.optim import *
from torch.optim.lr_scheduler import *
class Accuracy(torch.nn.Module):
def __init__(self, reduction='mean', nlabels=5):
super().__init__()
self.reduction = reduction
self.nlabels = nlabels
def forward(self, input, target)... | 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 import *
from torch.optim import *
from torch.optim.lr_scheduler import *
a... | UNIST-LIM-Lab/NeuBoots | Accuracy | false | 2,914 | [
"MIT"
] | 0 | 196adf9e1ece2abc145f69966504bac2676e5b5e | https://github.com/UNIST-LIM-Lab/NeuBoots/tree/196adf9e1ece2abc145f69966504bac2676e5b5e |
MultiHeadAttn | import torch
import torch.nn as nn
import torch.nn.functional as F
class MultiHeadAttn(nn.Module):
def __init__(self, n_head, d_model, d_head, dropout, dropatt=0,
pre_lnorm=False):
super(MultiHeadAttn, self).__init__()
self.n_head = n_head
self.d_model = d_model
self.d_hea... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | HKUST-KnowComp/NeuralSubIsoCnt | MultiHeadAttn | false | 8,215 | [
"MIT"
] | 28 | 7d1deef8e49af90122ea0ad099dec1de390927b6 | https://github.com/HKUST-KnowComp/NeuralSubIsoCnt/tree/7d1deef8e49af90122ea0ad099dec1de390927b6 |
DurationPredictorLoss | import torch
import torch.multiprocessing
import torch.nn
import torch.optim
import torch.distributed
class DurationPredictorLoss(torch.nn.Module):
"""Loss function module for duration predictor.
The loss value is Calculated in log domain to make it Gaussian.
"""
def __init__(self, offset=1.0, reduct... | 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.multiproc... | Cardroid/Muskits | DurationPredictorLoss | false | 8,958 | [
"Apache-2.0"
] | 0 | 91708bb243bc671e48893a734aee710c356e4bd8 | https://github.com/Cardroid/Muskits/tree/91708bb243bc671e48893a734aee710c356e4bd8 |
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
from torch import nn
assert_s... | JiehuaYang/DLCA | SpatialAttention | false | 17,483 | [
"MIT"
] | 5 | 9f06fe171f6b66e88767a8a9e2246a56373dfe12 | https://github.com/JiehuaYang/DLCA/tree/9f06fe171f6b66e88767a8a9e2246a56373dfe12 |
LayerNorm | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | yoshipon/spl2021_neural-fca | LayerNorm | false | 11,082 | [
"MIT"
] | 0 | a316026667dd6bd888547c8348cab8cd3d88e84c | https://github.com/yoshipon/spl2021_neural-fca/tree/a316026667dd6bd888547c8348cab8cd3d88e84c |
CNN_2 | # 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.... | IbrahimEl-Shal/CatDogClassifier | CNN_2 | false | 9,184 | [
"MIT"
] | 0 | aa6e73b679a181593f8297726da94b70d3b51407 | https://github.com/IbrahimEl-Shal/CatDogClassifier/tree/aa6e73b679a181593f8297726da94b70d3b51407 |
SmoothJaccardLoss | import torch
from torch.nn import functional as F
from torch.nn.modules.loss import _Loss
class SmoothJaccardLoss(_Loss):
def __init__(self, smooth=100):
super(SmoothJaccardLoss, self).__init__()
self.smooth = smooth
def forward(self, output, target):
output = F.sigmoid(output)
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch.nn.modules.loss import _Loss
assert_size_stride = torch._C._dynamo.guards.asse... | BloodAxe/segmentation-networks-benchmark | SmoothJaccardLoss | false | 7,870 | [
"MIT"
] | 34 | 2e3feb560102230be9369ab442b4a59cc86dff61 | https://github.com/BloodAxe/segmentation-networks-benchmark/tree/2e3feb560102230be9369ab442b4a59cc86dff61 |
L2Norm | # 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_... | CK-er/mmdet | L2Norm | false | 2,056 | [
"Apache-2.0"
] | 0 | 9bea4068efbcf7bf739dbe41917a68d525c29868 | https://github.com/CK-er/mmdet/tree/9bea4068efbcf7bf739dbe41917a68d525c29868 |
SpatialSoftmax | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.parameter import Parameter
class SpatialSoftmax(nn.Module):
def __init__(self, temperature=1, device='cpu'):
super(SpatialSoftmax, self).__init__()
if temperature:
self.temperature = Parameter(torch.ones(... | 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
... | ozcell/ENet-SAD_Pytorch | SpatialSoftmax | false | 16,209 | [
"MIT"
] | 53 | aaa79b5e96316e1bf24d3c2147ee622d4f17bc24 | https://github.com/ozcell/ENet-SAD_Pytorch/tree/aaa79b5e96316e1bf24d3c2147ee622d4f17bc24 |
ChannelAttention_avg | import torch
from torch import nn
class ChannelAttention_avg(nn.Module):
def __init__(self, in_planes, ratio=8):
super(ChannelAttention_avg, self).__init__()
self.avg_pool = nn.AdaptiveAvgPool2d(1)
self.fc1 = nn.Conv2d(in_planes, ratio, 1, bias=False)
self.relu1 = nn.ReLU()
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
assert_s... | HT-hlf/mmdetection_miner-2.22.0 | ChannelAttention_avg | false | 2,318 | [
"Apache-2.0"
] | 0 | 76eb94d6547f9f95cd58f41bb5c91941e82322b9 | https://github.com/HT-hlf/mmdetection_miner-2.22.0/tree/76eb94d6547f9f95cd58f41bb5c91941e82322b9 |
NormedConv2d | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch import n... | CVPR2022-911/PPH | NormedConv2d | false | 8,986 | [
"Apache-2.0"
] | 0 | f066933525aaeef412b8d166ef167f00170b5428 | https://github.com/CVPR2022-911/PPH/tree/f066933525aaeef412b8d166ef167f00170b5428 |
Downsample | # 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... | DeepTitan/PNDM | Downsample | false | 13,921 | [
"Apache-2.0"
] | 61 | 4037a4f40011c9a0d47b92303e64d47fcc7ed56a | https://github.com/DeepTitan/PNDM/tree/4037a4f40011c9a0d47b92303e64d47fcc7ed56a |
QNetwork | import torch
import torch.nn.functional as F
import torch.nn as nn
class QNetwork(nn.Module):
def __init__(self, state_size, action_size, hidden_layer1=64,
hidden_layer2=64):
super(QNetwork, self).__init__()
self.fc1 = nn.Linear(state_size, hidden_layer1)
self.fc2 = nn.Linear(hidd... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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_... | pardi/DRL_navigation | QNetwork | false | 10,615 | [
"Apache-2.0"
] | 0 | 4b66edf696c34a53686c02ff91264f5d6b32dc02 | https://github.com/pardi/DRL_navigation/tree/4b66edf696c34a53686c02ff91264f5d6b32dc02 |
Mul | import torch
class Mul(torch.nn.Module):
def __init__(self):
super(Mul, self).__init__()
def forward(self, x, y):
return x * y
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda
@triton.j... | PogChamper/torch2trt | Mul | false | 14,197 | [
"MIT"
] | 3,363 | 43b12627ec0de4d212efb6d02b07570205085ccc | https://github.com/PogChamper/torch2trt/tree/43b12627ec0de4d212efb6d02b07570205085ccc |
normrelu | import torch
import torch.nn as nn
import torch.nn.functional as F
class normrelu(nn.Module):
def __init__(self):
super(normrelu, self).__init__()
def forward(self, x):
dim = 1
x = F.relu(x) / torch.max(x, dim, keepdim=True)[0]
return x
def get_inputs():
return [torch.r... | 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... | ishine/RPN_KWS | normrelu | false | 15,642 | [
"MIT"
] | 53 | b54d4010a701a6ec0a9ddf3ab6177a4be6dd6af5 | https://github.com/ishine/RPN_KWS/tree/b54d4010a701a6ec0a9ddf3ab6177a4be6dd6af5 |
Aggregator | import torch
import torch.nn as nn
import torch.nn.functional as F
class Aggregator(nn.Module):
def __init__(self, hidden_dim, num_node):
super(Aggregator, self).__init__()
self.W_q = nn.Linear(hidden_dim, hidden_dim)
self.W_k = nn.Linear(hidden_dim, hidden_dim)
self.fc = nn.Linea... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | FANTASTPATR/STST | Aggregator | false | 465 | [
"Apache-2.0"
] | 0 | 8f969fcfe31f9555b19e783fb14eecf72def4122 | https://github.com/FANTASTPATR/STST/tree/8f969fcfe31f9555b19e783fb14eecf72def4122 |
Scaler | # 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 import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_str... | YangXuanyue/Neural-Unaligned-Phoneme-Sequence-Prediction | Scaler | false | 18,143 | [
"BSD-3-Clause"
] | 5 | 91ef1c95478367f5b421da125f07660cfc9bed98 | https://github.com/YangXuanyue/Neural-Unaligned-Phoneme-Sequence-Prediction/tree/91ef1c95478367f5b421da125f07660cfc9bed98 |
TorchMod | # 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
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_c... | NVIDIA-AI-IOT-private/torch2trt | TorchMod | false | 10,536 | [
"MIT"
] | 0 | 953d60039e0c81e90eea467c3df2e6e3f7040242 | https://github.com/NVIDIA-AI-IOT-private/torch2trt/tree/953d60039e0c81e90eea467c3df2e6e3f7040242 |
h_swish | import torch
import torch.nn as nn
import torch.nn.functional as F
class h_swish(nn.Module):
def __init__(self, inplace=True):
super(h_swish, self).__init__()
self.inplace = inplace
def forward(self, x):
out = F.relu6(x + 3.0, self.inplace) / 6.0
return out * x
def get_inpu... | 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... | dx9527/MobileNetV3-pytorch | h_swish | false | 15,279 | [
"MIT"
] | 291 | 7812dbcedd5db4e3bbfc21122b82205848f742cf | https://github.com/dx9527/MobileNetV3-pytorch/tree/7812dbcedd5db4e3bbfc21122b82205848f742cf |
MaskedCrossEntropyCriterion | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
from torch.nn.modules.... | ArkanDH/Team5-Inverse-Cooking-Stuff | MaskedCrossEntropyCriterion | false | 1,983 | [
"MIT"
] | 0 | ec224918b25fb7a04aa09995e4d11804448df7dd | https://github.com/ArkanDH/Team5-Inverse-Cooking-Stuff/tree/ec224918b25fb7a04aa09995e4d11804448df7dd |
ResARModule | # 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 torch.nn.utils.spectral_norm import spectral_norm
ass... | BaiYuhaoSpiceeYJ/SEGAN_denoise | ResARModule | false | 2,025 | [
"MIT"
] | 0 | 5bf65ae72b9f0a996ae338c53c68c4967e08cd59 | https://github.com/BaiYuhaoSpiceeYJ/SEGAN_denoise/tree/5bf65ae72b9f0a996ae338c53c68c4967e08cd59 |
GHMR | # 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... | CK-er/mmdet | GHMR | false | 2,094 | [
"Apache-2.0"
] | 0 | 9bea4068efbcf7bf739dbe41917a68d525c29868 | https://github.com/CK-er/mmdet/tree/9bea4068efbcf7bf739dbe41917a68d525c29868 |
CoreNetwork | # 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_... | bennzo/DT-RAM-PyTorch | CoreNetwork | false | 1,533 | [
"MIT"
] | 0 | b364662ab7650ffd26cf129673752521e004b13a | https://github.com/bennzo/DT-RAM-PyTorch/tree/b364662ab7650ffd26cf129673752521e004b13a |
GeM | # 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.functional a... | rskmoi/landmark-retrieval-2020-with-pytorch | GeM | false | 7,577 | [
"MIT"
] | 1 | 41917b1f588b5ad396cb1095867a0f042c611675 | https://github.com/rskmoi/landmark-retrieval-2020-with-pytorch/tree/41917b1f588b5ad396cb1095867a0f042c611675 |
VGG16 | # 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... | loserbbb/1-stage-wseg | VGG16 | false | 15,992 | [
"Apache-2.0"
] | 364 | f1579be241986c1e19420bfbf6711b6c2208d99a | https://github.com/loserbbb/1-stage-wseg/tree/f1579be241986c1e19420bfbf6711b6c2208d99a |
Conv2d | # 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.nn import Module
import math
from torch.nn.modules.utils import _pair... | ddayzzz/mmdetection | Conv2d | false | 1,810 | [
"Apache-2.0"
] | 0 | b9940c56cc19b3dda7468a5fd858b9683e93a486 | https://github.com/ddayzzz/mmdetection/tree/b9940c56cc19b3dda7468a5fd858b9683e93a486 |
NeuralNetwork | # 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 ... | escribano89/bananas-dqn | NeuralNetwork | false | 10,048 | [
"MIT"
] | 0 | 53497ab99bd7d78a1d8b9b387b4fd056be3a4564 | https://github.com/escribano89/bananas-dqn/tree/53497ab99bd7d78a1d8b9b387b4fd056be3a4564 |
ELU | import torch
class Activation(torch.nn.Module):
def __init__(self) ->None:
super().__init__()
def forward(self, inputs: 'torch.Tensor') ->torch.Tensor:
raise NotImplementedError
class ELU(Activation):
def forward(self, inputs: 'torch.Tensor') ->torch.Tensor:
return torch.nn.fu... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_c... | altescy/xtorch | ELU | false | 9,709 | [
"MIT"
] | 0 | bcbbbe645f4d62c211af5b3555c526cc60792c32 | https://github.com/altescy/xtorch/tree/bcbbbe645f4d62c211af5b3555c526cc60792c32 |
SelfAttn | import torch
from torch import nn
from torch.nn import functional as F
class SelfAttn(nn.Module):
"""
self-attention with learnable parameters
"""
def __init__(self, dhid):
super().__init__()
self.scorer = nn.Linear(dhid, 1)
def forward(self, inp):
scores = F.softmax(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.... | caisarl76/alfred | SelfAttn | false | 12,208 | [
"MIT"
] | 0 | b73bdc1651e14c02440938b639fa3c7f3ab3d321 | https://github.com/caisarl76/alfred/tree/b73bdc1651e14c02440938b639fa3c7f3ab3d321 |
SimpleACosModule | import torch
import torch.jit
import torch.onnx
import torch.nn
class SimpleACosModule(torch.nn.Module):
def __init__(self):
super(SimpleACosModule, self).__init__()
def forward(self, a):
return torch.acos(a + a)
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.triton_helpers import libdevice
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._... | YaronBenAtar/glow | SimpleACosModule | false | 14,639 | [
"Apache-2.0"
] | 2,838 | a13706a4239fa7eaf059c670dc573e3eb0768f86 | https://github.com/YaronBenAtar/glow/tree/a13706a4239fa7eaf059c670dc573e3eb0768f86 |
CNN | import torch
import torch.nn as nn
import torch.nn.functional as F
class CNN(nn.Module):
def __init__(self, input_size=50, hidden_size=256, dropout=0,
kernel_size=3, padding=1, activation_function=F.relu):
"""
Args:
input_size: dimention of input embedding
kernel_s... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import ... | WinterSoHot/OpenNRE | CNN | false | 14,587 | [
"MIT"
] | 3,284 | bc58d8fff2a2f42a5349c184f16ab7a8c50ae32b | https://github.com/WinterSoHot/OpenNRE/tree/bc58d8fff2a2f42a5349c184f16ab7a8c50ae32b |
CharbonnierLoss | import functools
import torch
import torch.nn as nn
from torch.nn import functional as F
def reduce_loss(loss, reduction):
"""Reduce loss as specified.
Args:
loss (Tensor): Elementwise loss tensor.
reduction (str): Options are "none", "mean" and "sum".
Returns:
Tensor: Reduced lo... | 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 functools
import torc... | hejm37/mmediting | CharbonnierLoss | false | 12,477 | [
"Apache-2.0"
] | 0 | d4086aaf8a36ae830f1714aad585900d24ad1156 | https://github.com/hejm37/mmediting/tree/d4086aaf8a36ae830f1714aad585900d24ad1156 |
LxmertCrossAttentionLayer | # 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.... | ashutoshbsathe/SmBop | LxmertCrossAttentionLayer | false | 9,801 | [
"MIT"
] | 0 | ce5f67ec070df55b84d7f3617659011732020c96 | https://github.com/ashutoshbsathe/SmBop/tree/ce5f67ec070df55b84d7f3617659011732020c96 |
Critic | import torch
import numpy as np
import torch.nn.functional as F
from torch import nn
def hidden_init(layer):
fan_in = layer.weight.data.size()[0]
lim = 1.0 / np.sqrt(fan_in)
return -lim, lim
class Critic(nn.Module):
"""Critic (Value) Model."""
def __init__(self, state_size, action_size, seed, f... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import numpy as np
from torch... | tjkemp/ubik-agent | Critic | false | 4,434 | [
"MIT"
] | 0 | 34e4dd0d6319b8f5c5dba0cd9e087490720b723b | https://github.com/tjkemp/ubik-agent/tree/34e4dd0d6319b8f5c5dba0cd9e087490720b723b |
NeuralNetMultiplePositionalArgumentsMultiOutputsWithDependency | # 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.... | TingGong1/onnxruntime | NeuralNetMultiplePositionalArgumentsMultiOutputsWithDependency | false | 5,904 | [
"MIT"
] | 1 | 435010ab6873974803591fa22262ed8b3e36e44d | https://github.com/TingGong1/onnxruntime/tree/435010ab6873974803591fa22262ed8b3e36e44d |
CQAttention | import torch
import torch.nn.parallel
import torch.nn as nn
import torch.utils.data
import torch.backends.cudnn
def mask_logits(inputs, mask, mask_value=-1e+30):
mask = mask.type(torch.float32)
return inputs + (1.0 - mask) * mask_value
class Conv1D(nn.Module):
def __init__(self, in_dim, out_dim, kernel... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | EGO4D/episodic-memory | CQAttention | false | 8,095 | [
"MIT"
] | 27 | 2a3464882cd4f665c358c1b05a6397339e33c2e1 | https://github.com/EGO4D/episodic-memory/tree/2a3464882cd4f665c358c1b05a6397339e33c2e1 |
MultiHeadAttention | # 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.... | CyberZHG/torch-multi-head-attention | MultiHeadAttention | false | 13,556 | [
"MIT"
] | 93 | 66f6ae801a6d2aea8994ef00af06fdfc67ec2026 | https://github.com/CyberZHG/torch-multi-head-attention/tree/66f6ae801a6d2aea8994ef00af06fdfc67ec2026 |
CenConv3d | import torch
import torch.nn as nn
import torch.nn.functional as F
class CenConv3d(nn.Module):
"""Conv2d layer with Weight Centralization.
The args is exactly same as torch.nn.Conv2d. It's suggested to set bias=False when
using CenConv2d with MABN.
"""
def __init__(self, in_planes, out_planes, ke... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | Hsuxu/vnet_attention | CenConv3d | false | 13,792 | [
"MIT"
] | 45 | 6958932f3974d268e93bd6443369a3f43c497ed3 | https://github.com/Hsuxu/vnet_attention/tree/6958932f3974d268e93bd6443369a3f43c497ed3 |
TOP1_max | # 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
... | Ethan-Yys/GRU4REC-pytorch-master | TOP1_max | false | 2,202 | [
"Apache-2.0"
] | 0 | 175ccb851f881d3506680c459491e76f50aa9898 | https://github.com/Ethan-Yys/GRU4REC-pytorch-master/tree/175ccb851f881d3506680c459491e76f50aa9898 |
SorensenDiceLoss | import torch
import torch.nn as nn
from torch.autograd import Variable
def assert_(condition, message='', exception_type=AssertionError):
"""Like assert, but with arbitrary exception types."""
if not condition:
raise exception_type(message)
def flatten_samples(tensor_or_variable):
"""
Flatte... | 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... | dearkafka/inferno | SorensenDiceLoss | false | 1,819 | [
"Apache-2.0"
] | 0 | e9e3b863fd1fc97cf94d08ac6b4f8df7665f996a | https://github.com/dearkafka/inferno/tree/e9e3b863fd1fc97cf94d08ac6b4f8df7665f996a |
MaxPoolStride1 | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import torch.nn.parallel
import torch.optim
import torch.utils.data... | Alin1102/Yolov3_Dartnet2Caffe | MaxPoolStride1 | false | 7,641 | [
"MIT"
] | 21 | b4284b080f53c1ac73c1930b1b1c4e07dcd97559 | https://github.com/Alin1102/Yolov3_Dartnet2Caffe/tree/b4284b080f53c1ac73c1930b1b1c4e07dcd97559 |
RotaryEmbedding | import torch
from typing import *
class RotaryEmbedding(torch.nn.Module):
"""`Rotary Position Embedding <https://arxiv.org/abs/2104.09864v2>
Args:
rotary_dim (int): rotary dimension
"""
def __init__(self, rotary_dim: 'int'):
super().__init__()
self.rotary_dim = rotary_dim
... | 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
from typing import *
assert_size_stride = torch._C._dynamo.gua... | OpenBMB/ModelCenter | RotaryEmbedding | false | 17,758 | [
"Apache-2.0"
] | 4 | 28073f24a67f6c0beb4fd5e2cd13284f9de2284a | https://github.com/OpenBMB/ModelCenter/tree/28073f24a67f6c0beb4fd5e2cd13284f9de2284a |
LayerNorm | import torch
import torch.nn as nn
class LayerNorm(nn.Module):
def __init__(self, d_hid, eps=1e-06):
super(LayerNorm, self).__init__()
self.gamma = nn.Parameter(torch.ones(d_hid))
self.beta = nn.Parameter(torch.zeros(d_hid))
self.eps = eps
def forward(self, x):
mean =... | 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_... | Lhx94As/PHO-LID | LayerNorm | false | 5,523 | [
"MIT"
] | 1 | 44843b25b977dd6e0b77b520dbe3f2ff1ea633cd | https://github.com/Lhx94As/PHO-LID/tree/44843b25b977dd6e0b77b520dbe3f2ff1ea633cd |
SigmoidFocalLossStar | import torch
import torch.nn as nn
from torch.nn import functional as F
def sigmoid_focal_loss_star(inputs: 'torch.Tensor', targets: 'torch.Tensor',
alpha: 'float'=-1, gamma: 'float'=1, reduction: 'str'='none'
) ->torch.Tensor:
"""
FL* described in RetinaNet paper Appendix: https://arxiv.org/abs/1708.... | 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... | botkop/lark | SigmoidFocalLossStar | false | 1,575 | [
"Apache-2.0"
] | 0 | edb2defdb514213fc121418578b0d9006a55f3a0 | https://github.com/botkop/lark/tree/edb2defdb514213fc121418578b0d9006a55f3a0 |
L2Loss | # 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
import... | riokt/video-paragraph | L2Loss | false | 4,185 | [
"MIT"
] | 0 | 2da3298819e73809af495457db2cf1dfffad712f | https://github.com/riokt/video-paragraph/tree/2da3298819e73809af495457db2cf1dfffad712f |
ScModel | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
import torc... | jfnavarro/stereoscope | ScModel | false | 3,715 | [
"MIT"
] | 0 | 0a64db45291c3a9b72abdf13183614a10f3dac40 | https://github.com/jfnavarro/stereoscope/tree/0a64db45291c3a9b72abdf13183614a10f3dac40 |
CRF | import torch
from torch import nn
class CRF(nn.Module):
def __init__(self, num_nodes, iteration=10):
"""Initialize the CRF module
Args:
num_nodes: int, number of nodes/patches within the fully CRF
iteration: int, number of mean field iterations, e.g. 10
"""
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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... | mingrui/NCRF | CRF | false | 16,105 | [
"Apache-2.0"
] | 734 | d3dcb50739a9eb8621d42ea98b7d0496afe430ca | https://github.com/mingrui/NCRF/tree/d3dcb50739a9eb8621d42ea98b7d0496afe430ca |
gaussian_downsample | import math
import torch
import torch.nn as nn
class gaussian_downsample(nn.Module):
"""
Downsampling module with Gaussian filtering
"""
def __init__(self, kernel_size, sigma, stride, pad=False):
super(gaussian_downsample, self).__init__()
self.gauss = nn.Conv2d(3, 3, kernel_size, str... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import math
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.a... | Xmaster6y/wgenpatex | gaussian_downsample | false | 18,131 | [
"MIT"
] | 8 | 08079dc131cc2e9c74ee4f9e16cf9b58667f2b07 | https://github.com/Xmaster6y/wgenpatex/tree/08079dc131cc2e9c74ee4f9e16cf9b58667f2b07 |
BinaryLogisticRegressionLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
from torch import nn a... | HypnosXC/mmaction2 | BinaryLogisticRegressionLoss | false | 13,821 | [
"Apache-2.0"
] | 549 | a26d5f981449445a5e22a0a60d8b285e06c3dd6e | https://github.com/HypnosXC/mmaction2/tree/a26d5f981449445a5e22a0a60d8b285e06c3dd6e |
DeterministicCriticNet | # 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
from torch... | G-Flor/deeprl | DeterministicCriticNet | false | 5,176 | [
"Apache-2.0"
] | 1 | aeae2c5d585e5853dc638968b1f090eb60abd351 | https://github.com/G-Flor/deeprl/tree/aeae2c5d585e5853dc638968b1f090eb60abd351 |
AttentionPooling | # 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.... | xdong73S/Match_LSTM_v2.0 | AttentionPooling | false | 4,576 | [
"MIT"
] | 0 | dfb8cfbc2a5dafc6655eecf151a7dbcf808cd729 | https://github.com/xdong73S/Match_LSTM_v2.0/tree/dfb8cfbc2a5dafc6655eecf151a7dbcf808cd729 |
NormedLinear | # 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 ... | Bin-ze/Food_detection | NormedLinear | false | 17,004 | [
"Apache-2.0"
] | 4 | 1c1a067f12644f2b0289e49aec4637d580722f70 | https://github.com/Bin-ze/Food_detection/tree/1c1a067f12644f2b0289e49aec4637d580722f70 |
LocalDiscrepancy | import torch
import torch.nn as nn
import torch.backends.cudnn
import torch.utils
import torch.distributed
class LocalDiscrepancy(nn.Module):
def __init__(self, in_channels=19, padding_mode='replicate', neighbor=8,
l_type='l1'):
"""
depth-wise conv to calculate the mean of neighbor
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | BIT-DA/RIPU | LocalDiscrepancy | false | 16,980 | [
"MIT"
] | 9 | 125edf112c9ded1e7497aedb2a092331824df100 | https://github.com/BIT-DA/RIPU/tree/125edf112c9ded1e7497aedb2a092331824df100 |
FiLMLayer | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
from torch im... | xh-liu-tech/CIPS-3D | FiLMLayer | false | 11,103 | [
"MIT"
] | 0 | 8910dfcf19bb86aab2287d652ae4e3666806b511 | https://github.com/xh-liu-tech/CIPS-3D/tree/8910dfcf19bb86aab2287d652ae4e3666806b511 |
Convolution | import torch
import torch.nn as nn
class Convolution(nn.Module):
def __init__(self, c_in, c_out):
super().__init__()
self.conv = nn.Conv2d(c_in, c_out, 3, stride=1, padding=1)
self.relu = nn.ReLU(True)
def forward(self, x):
return self.relu(self.conv(x))
def get_inputs():
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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_... | Baymine/Dassl | Convolution | false | 11,242 | [
"MIT"
] | 0 | 0836fb1f08393e2204326618e783d796741f657e | https://github.com/Baymine/Dassl/tree/0836fb1f08393e2204326618e783d796741f657e |
MinMaxNorm | import torch
import torch.nn as nn
class MinMaxNorm(nn.Module):
def __init__(self, min, max, a=0, b=1):
super(MinMaxNorm, self).__init__()
self.min, self.max = min, max
self.a, self.b = a, b
def forward(self, x):
return self.a + (x - self.min) * (self.b - self.a) / (self.max ... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | yhgon/speedyspeech | MinMaxNorm | false | 13,134 | [
"BSD-3-Clause"
] | 0 | 574c6a94091431f313e2aae8e154b8c80e6908ce | https://github.com/yhgon/speedyspeech/tree/574c6a94091431f313e2aae8e154b8c80e6908ce |
L2Part | import torch
import torch.nn as nn
import torch.nn.parallel
import torch.optim
import torch.utils.data
from itertools import chain as chain
from collections import OrderedDict
import torch.hub
class concatLayer(nn.Module):
def __init__(self, in_channels, out_channels_perSub, i, j, appendix):
super(concat... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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.u... | EddieMG/LateTemporalModeling3DCNN | L2Part | false | 2,363 | [
"MIT"
] | 0 | 94c87dc1d31d09bc310d0e735a2e55453976cb0d | https://github.com/EddieMG/LateTemporalModeling3DCNN/tree/94c87dc1d31d09bc310d0e735a2e55453976cb0d |
Resv1Block | # 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 it... | XiangLiK/cv_course | Resv1Block | false | 18,124 | [
"MIT"
] | 8 | da7c2318fd4128bbdab96db26ddbb2524f37d0a0 | https://github.com/XiangLiK/cv_course/tree/da7c2318fd4128bbdab96db26ddbb2524f37d0a0 |
SeperableConv | import torch
import torch.nn as nn
import torch.nn.functional as F
def _get_padding(kernel_size, stride, dilation):
padding = (stride - 1 + dilation * (kernel_size - 1)) // 2
return padding
class SeperableConv(nn.Module):
def __init__(self, inp, outp, k=3, stride=1, dilation=1):
super(Seperable... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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_... | HabilBhagat/MiniProject---Sem_6 | SeperableConv | false | 11,469 | [
"Apache-2.0"
] | 0 | bbc329a4844921cc04be58f704057bb70ad9dfe2 | https://github.com/HabilBhagat/MiniProject---Sem_6/tree/bbc329a4844921cc04be58f704057bb70ad9dfe2 |
ScaledDotProductAttention | import torch
import numpy as np
from torch import nn
from torch.nn import init
class ScaledDotProductAttention(nn.Module):
"""
Scaled dot-product attention
"""
def __init__(self, d_model, d_k, d_v, h, dropout=0.1):
"""
:param d_model: Output dimensionality of the model
:param ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | rushirajsherlocked/External-Attention-pytorch | ScaledDotProductAttention | false | 4,226 | [
"MIT"
] | 0 | 7d6814b2d90909adf81c62f3f8a89e30a59d6481 | https://github.com/rushirajsherlocked/External-Attention-pytorch/tree/7d6814b2d90909adf81c62f3f8a89e30a59d6481 |
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... | 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.nn.functional as F
class Policy(nn.Module):
def __init__(self):
super(Policy, self).__init__()
self.affine1 = nn.Linear(4, 128)
self.action_head = nn.Linear(128, 2)
self.value_head = nn.Linear(128, 1)
self.saved_actions = []
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | nosyndicate/PyTorchRL | Policy | false | 16,221 | [
"MIT"
] | 48 | c4fb69ffebaa7f56b4210388f9eea7d42ca853e4 | https://github.com/nosyndicate/PyTorchRL/tree/c4fb69ffebaa7f56b4210388f9eea7d42ca853e4 |
NormalizationLayer | # 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.utils.data
assert_size_stride = torch._C._dynamo.guards.assert_siz... | huynhtruc0309/tirg | NormalizationLayer | false | 6,839 | [
"Apache-2.0"
] | 1 | 14ac6dcb41624729a6f4144a7c9e7899074f0eec | https://github.com/huynhtruc0309/tirg/tree/14ac6dcb41624729a6f4144a7c9e7899074f0eec |
_CAEAD | import torch
import torch.nn as nn
import torch.nn.functional as F
class _CAEAD(nn.Module):
def __init__(self, input_size):
super(_CAEAD, self).__init__()
self.en_1 = nn.Conv1d(1, 64, 3, padding=1)
self.pool1 = nn.MaxPool1d(2, 2)
self.en_2 = nn.Conv1d(64, 32, 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
import torch.nn as nn
assert_... | Pheobe-Sun/anomaly-detection-challenge-2020 | _CAEAD | false | 5,753 | [
"MIT"
] | 1 | 71e34350023023a17338b7931da70af035b2454c | https://github.com/Pheobe-Sun/anomaly-detection-challenge-2020/tree/71e34350023023a17338b7931da70af035b2454c |
Net | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | EKami/EzeeML | Net | false | 8,069 | [
"MIT"
] | 35 | 21753a0ede7cc1dc675a2dcd09b6306cea2cad56 | https://github.com/EKami/EzeeML/tree/21753a0ede7cc1dc675a2dcd09b6306cea2cad56 |
ExtractTensorPatches | # 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 typing import Optional
from typing import Tuple
import torch.nn as nn
import torch.nn.functional as F
from typing import Union
from tor... | justanhduc/kornia | ExtractTensorPatches | false | 15,757 | [
"ECL-2.0",
"Apache-2.0"
] | 51 | c14081292dfb2491fad50ba10e27491cad8cb3e3 | https://github.com/justanhduc/kornia/tree/c14081292dfb2491fad50ba10e27491cad8cb3e3 |
SeparableConv2d_same | import torch
import torch.nn as nn
import torch.nn.functional as F
def fixed_padding(inputs, kernel_size, dilation):
kernel_size_effective = kernel_size + (kernel_size - 1) * (dilation - 1)
pad_total = kernel_size_effective - 1
pad_beg = pad_total // 2
pad_end = pad_total - pad_beg
padded_inputs =... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | lutbook/pytorch-segmentation-pipeline | SeparableConv2d_same | false | 10,587 | [
"MIT"
] | 0 | eb29d1bf240c158c64d81177e9be93cd958c0026 | https://github.com/lutbook/pytorch-segmentation-pipeline/tree/eb29d1bf240c158c64d81177e9be93cd958c0026 |
MedianPool2d | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.modules.utils import _pair
from torch.nn.modules.utils import _quadruple
import torch.optim
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.nn as nn
from torch.nn.modules.utils import _pair
from torch... | jammer345/3DGNN_pytorch | MedianPool2d | false | 15,670 | [
"MIT"
] | 231 | 34a5b3890f23e03fa6cc316c79498eeaea635664 | https://github.com/jammer345/3DGNN_pytorch/tree/34a5b3890f23e03fa6cc316c79498eeaea635664 |
MaskedL1 | # 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
... | vegetablejuiceftw/soft-pointer-networks | MaskedL1 | false | 11,080 | [
"MIT"
] | 0 | 9705d9688b6b69db3948172771df4c367165c948 | https://github.com/vegetablejuiceftw/soft-pointer-networks/tree/9705d9688b6b69db3948172771df4c367165c948 |
FocalLoss | import torch
from torch import nn
class FocalLoss(nn.Module):
def __init__(self, alpha=0.5, gamma=1.0):
super().__init__()
self.alpha = alpha
self.gamma = gamma
def forward(self, inputs, targets, **kwargs):
CEloss = nn.CrossEntropyLoss(reduction='none')(inputs, targets)
... | 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... | gurucharanmk/Fruits-360_Image_Classification | FocalLoss | false | 10,129 | [
"MIT"
] | 0 | 9d26bba972ed3eca762ff225b33bd70e82edc7f0 | https://github.com/gurucharanmk/Fruits-360_Image_Classification/tree/9d26bba972ed3eca762ff225b33bd70e82edc7f0 |
MeanModule | # 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... | finalgruntgit/diautils | MeanModule | false | 10,268 | [
"MIT"
] | 0 | b9d7666ed5023700db01a4295430c52721acfc25 | https://github.com/finalgruntgit/diautils/tree/b9d7666ed5023700db01a4295430c52721acfc25 |
Flatten | # 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
from torch.autograd import *
from itertools import product as product
from math import sqrt as sqrt
assert_size_stride ... | Aristochi/Dangerous_driving_behavior_detection | Flatten | false | 13,268 | [
"MIT"
] | 96 | 596d0544c3ed8cbfbc322cc4cd7859a9ef539810 | https://github.com/Aristochi/Dangerous_driving_behavior_detection/tree/596d0544c3ed8cbfbc322cc4cd7859a9ef539810 |
Shift | import torch
import torch.nn as nn
class Shift(nn.Module):
def __init__(self, amount, inplace=False):
super(Shift, self).__init__()
self.amount = amount
self.inplace = inplace
def extra_repr(self):
return 'amount={}'.format(self.amount)
def forward(self, x):
if s... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | CPJKU/kagglebirds2020 | Shift | false | 17,043 | [
"MIT"
] | 4 | f86b459389b1d0b0af96ebc9252ffc8496c272e8 | https://github.com/CPJKU/kagglebirds2020/tree/f86b459389b1d0b0af96ebc9252ffc8496c272e8 |
DQN | # 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... | wotmd5731/pseudo_random_gen | DQN | false | 4,547 | [
"MIT"
] | 0 | f79810cd5ac79afe0a73dee73aa21bd8c01aeb9b | https://github.com/wotmd5731/pseudo_random_gen/tree/f79810cd5ac79afe0a73dee73aa21bd8c01aeb9b |
NonBlurryLoss | # 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... | GuYuanjie/DeepFusionPrior | NonBlurryLoss | false | 5,221 | [
"MIT"
] | 1 | a7126e073ed8c49b6a9a662492b64aaeee56cc01 | https://github.com/GuYuanjie/DeepFusionPrior/tree/a7126e073ed8c49b6a9a662492b64aaeee56cc01 |
TotalVariation | import torch
import torch.nn as nn
def total_variation(img: 'torch.Tensor') ->torch.Tensor:
"""Function that computes Total Variation according to [1].
Args:
img (torch.Tensor): the input image with shape :math:`(N, C, H, W)` or :math:`(C, H, W)`.
Return:
torch.Tensor: a scalar with the ... | 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... | NickleDave/kornia | TotalVariation | false | 2,684 | [
"ECL-2.0",
"Apache-2.0"
] | 0 | 5392651d0bc268da577fa0a49aa50f957289c7dd | https://github.com/NickleDave/kornia/tree/5392651d0bc268da577fa0a49aa50f957289c7dd |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.