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 |
|---|---|---|---|---|---|---|---|---|---|---|
IOUScore | # 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
from torch import torch
assert_size_stride = torch._C._dynamo.guards... | oskarnatan/RGBDVS-fusion | IOUScore | false | 7,428 | [
"MIT"
] | 1 | 5e560f54442d387a86e3a469107cf65859693987 | https://github.com/oskarnatan/RGBDVS-fusion/tree/5e560f54442d387a86e3a469107cf65859693987 |
SimpleReciprocalModel | import torch
import torch.jit
import torch.onnx
import torch.nn
class SimpleReciprocalModel(torch.nn.Module):
def __init__(self, inplace=False):
super(SimpleReciprocalModel, self).__init__()
self.inplace = inplace
def forward(self, tensor):
other = tensor + tensor
return othe... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | briancoutinho/glow | SimpleReciprocalModel | false | 12,575 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 |
ResidualLayer | import torch
import torch.nn as nn
class ConvLayer(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, stride, norm
='instance'):
super(ConvLayer, self).__init__()
padding_size = kernel_size // 2
self.reflection_pad = nn.ReflectionPad2d(padding_size)
sel... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | suryawanshishantanu6/Multi-Style-Transfer | ResidualLayer | false | 10,862 | [
"MIT"
] | 0 | c5c211847de676596580a8a9afda940ac76abbb1 | https://github.com/suryawanshishantanu6/Multi-Style-Transfer/tree/c5c211847de676596580a8a9afda940ac76abbb1 |
SpatialAttention | import torch
import torch.nn as nn
class SpatialAttention(nn.Module):
def __init__(self, kernel_size=7):
super(SpatialAttention, self).__init__()
assert kernel_size in (3, 7), 'kernel size must be 3 or 7'
padding = 3 if kernel_size == 7 else 1
self.conv = nn.Conv1d(2, 1, kernel_si... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | RuaBQ/FEAT | SpatialAttention | false | 2,782 | [
"MIT"
] | 0 | e46f56b03f8ef820d549cb385600a12bdf224de9 | https://github.com/RuaBQ/FEAT/tree/e46f56b03f8ef820d549cb385600a12bdf224de9 |
PAM_Module | from torch.nn import Module
import torch
from torch.nn import Conv2d
from torch.nn import Parameter
from torch.nn import Softmax
from torch.nn.parameter import Parameter
class PAM_Module(Module):
""" Position attention module"""
def __init__(self, in_dim):
super(PAM_Module, self).__init__()
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
from torch._inductor.runtime.... | bfjei2825401/siamban | PAM_Module | false | 10,404 | [
"Apache-2.0"
] | 0 | c41d58742b146dfc8960053453227c6e9fec1bac | https://github.com/bfjei2825401/siamban/tree/c41d58742b146dfc8960053453227c6e9fec1bac |
InnerProd | import torch
import torch.nn as nn
class InnerProd(nn.Module):
def __init__(self, fc_dim):
super(InnerProd, self).__init__()
self.scale = nn.Parameter(torch.ones(fc_dim))
self.bias = nn.Parameter(torch.zeros(1))
def forward(self, feat_img, feat_sound):
sound_size = feat_sound... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | TaoStarlit/Sound-of-Pixels | InnerProd | false | 11,923 | [
"MIT"
] | 0 | 06cd37a75836e22208f2e59bcc263b89938e065e | https://github.com/TaoStarlit/Sound-of-Pixels/tree/06cd37a75836e22208f2e59bcc263b89938e065e |
ReferenceActivationBinarizationModule | import torch
from torch import nn
from torchvision import models as models
import torch.nn.parallel
import torch.optim
import torch.utils.data
import torch.utils.data.distributed
import torch.onnx
def get_per_channel_scale_shape(input_shape, is_weights):
scale_shape = [(1) for _ in input_shape]
if is_weights:... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
from torchvision import models as models
import torch.nn.parallel
import torch.optim
import torch.utils.data
import tor... | JinYAnGHe/openvino_training_extensions | ReferenceActivationBinarizationModule | false | 2,715 | [
"Apache-2.0"
] | 0 | a0b4456a3c9fe6c1b7eabc9d5eb4e74d01453dee | https://github.com/JinYAnGHe/openvino_training_extensions/tree/a0b4456a3c9fe6c1b7eabc9d5eb4e74d01453dee |
LinearWeightNorm | # 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.nn.param... | Akash-Sharma-1/Training-Triplet-Networks-with-GAN | LinearWeightNorm | false | 18,435 | [
"MIT"
] | 2 | b4b1e683162908f243c4f1ba4ec9cda2314fbadc | https://github.com/Akash-Sharma-1/Training-Triplet-Networks-with-GAN/tree/b4b1e683162908f243c4f1ba4ec9cda2314fbadc |
Skew | import torch
import torch.nn as nn
import torch.quantization
import torch.onnx
import torch.nn.parallel
import torch.utils.data
import torch.fx
import torch.nn
import torch.optim
import torch.profiler
class Skew(nn.Module):
def forward(self, X):
A = X.triu(1)
return A - A.transpose(-1, -2)
d... | 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.quantization
import torch.onnx
import torch.nn.parallel
import torch.utils.data
import torch.fx
import to... | Nayef211/tutorials | Skew | false | 9,527 | [
"BSD-3-Clause"
] | 0 | faf2c476fc3be855051fbea3cce77eaf7b2a2175 | https://github.com/Nayef211/tutorials/tree/faf2c476fc3be855051fbea3cce77eaf7b2a2175 |
GatedTanh | import torch
import torch.nn as nn
class GatedTanh(nn.Module):
"""
From: https://arxiv.org/pdf/1707.07998.pdf
nonlinear_layer (f_a) : x\\in R^m => y \\in R^n
ilda{y} = tanh(Wx + b)
g = sigmoid(W'x + b')
y = ilda(y) \\circ g
input: (N, *, in_dim)
output: (N, *, out_dim)
"""
d... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as ... | VisualJoyce/ChengyuBERT | GatedTanh | false | 18,083 | [
"MIT"
] | 8 | 605db3a4b3241dd4d02baa41a68bf23b5b00b36d | https://github.com/VisualJoyce/ChengyuBERT/tree/605db3a4b3241dd4d02baa41a68bf23b5b00b36d |
JointsMSELoss | import torch
import torch.nn as nn
import torch.nn.parallel
import torch.optim
import torch.utils.data
import torch.utils.data.distributed
import torch.multiprocessing
class JointsMSELoss(nn.Module):
def __init__(self, use_target_weight):
super(JointsMSELoss, self).__init__()
self.criterion = nn.... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.nn.parallel
import torch.optim
import torch.utils.data
import torch.utils.data.distributed
import torch.m... | CHUNYUWANG/imu-human-pose-pytorch | JointsMSELoss | false | 13,425 | [
"MIT"
] | 72 | f4813336571789f46eabdfb520e7ed5b20ac04ea | https://github.com/CHUNYUWANG/imu-human-pose-pytorch/tree/f4813336571789f46eabdfb520e7ed5b20ac04ea |
FilterNorm | import torch
import torch.nn as nn
from torch.nn.init import calculate_gain
import torch.nn.parallel
class FilterNorm(nn.Module):
def __init__(self, in_channels, kernel_size, filter_type, nonlinearity=
'linear', running_std=False, running_mean=False):
assert filter_type in ('spatial', 'channel')
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
from torch.nn.init import calculate_gain
import torch.nn.... | rightchose/ddfnet | FilterNorm | false | 4,191 | [
"MIT"
] | 0 | 44a2f63933c1784a53f26a10c1157a164d044485 | https://github.com/rightchose/ddfnet/tree/44a2f63933c1784a53f26a10c1157a164d044485 |
TotalVariation | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert... | Zhang-Jack/adversarial_yolo2 | TotalVariation | false | 18,176 | [
"MIT"
] | 8 | 91c2a4793047f656482cebf0309984db823e8030 | https://github.com/Zhang-Jack/adversarial_yolo2/tree/91c2a4793047f656482cebf0309984db823e8030 |
Threshold | # 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
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_str... | Yusoi/mmdetection | Threshold | false | 9,738 | [
"Apache-2.0"
] | 0 | cbb5fb00f6e124fbb2c15e7e3438d7fa76b8850a | https://github.com/Yusoi/mmdetection/tree/cbb5fb00f6e124fbb2c15e7e3438d7fa76b8850a |
LengthPredictor | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch.nn import function... | dqawami/openvino_training_extensions | LengthPredictor | false | 15,210 | [
"Apache-2.0"
] | 256 | dddda1dfd651eaae2d59cecda84275b1b03bd0ad | https://github.com/dqawami/openvino_training_extensions/tree/dddda1dfd651eaae2d59cecda84275b1b03bd0ad |
LayerNormChannel | import torch
import torch.nn as nn
class LayerNormChannel(nn.Module):
"""
LayerNorm only for Channel Dimension.
Input: tensor in shape [B, C, H, W]
"""
def __init__(self, num_channels, eps=1e-05):
super().__init__()
self.weight = nn.Parameter(torch.ones(num_channels))
self... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_... | hyenal/tensorflow-image-models | LayerNormChannel | false | 3,637 | [
"Apache-2.0"
] | 0 | 2012be8ecc7bc23e84dc2488d3e4fe1c80dbfb2c | https://github.com/hyenal/tensorflow-image-models/tree/2012be8ecc7bc23e84dc2488d3e4fe1c80dbfb2c |
Gaussian | import torch
from torch import Tensor
import torch.utils.tensorboard
import torch.utils.data
class Gaussian(torch.nn.Module):
"""Gaussian activation"""
def forward(self, x: 'Tensor') ->Tensor:
return torch.exp(-x * x)
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 math as tl_math
import torch.utils.tensorboard
import torch.utils.data
assert_size_stride... | isayev/torchani | Gaussian | false | 12,642 | [
"MIT"
] | 0 | f8edffe384e2cb2eebe3a7e04faa01b6f5e26b37 | https://github.com/isayev/torchani/tree/f8edffe384e2cb2eebe3a7e04faa01b6f5e26b37 |
Threshold | # 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.optim
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strid... | ai-in-motion/moai | Threshold | false | 18,348 | [
"Apache-2.0"
] | 10 | e38cac046c059d2e2331ef4883bbabc5a500a5cf | https://github.com/ai-in-motion/moai/tree/e38cac046c059d2e2331ef4883bbabc5a500a5cf |
BertMultiPooler | from _paritybench_helpers import _mock_config
import torch
import torch.nn as nn
class BertMultiPooler(nn.Module):
def __init__(self, config):
super().__init__()
self.dense = nn.Linear(config.hidden_size, config.hidden_size)
self.activation = nn.Tanh()
def forward(self, hidden_states... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | doduo-anonymous/doduo-submission | BertMultiPooler | false | 10,034 | [
"Apache-2.0"
] | 0 | 34d397c14174d64e6a3026d51cc25560a4f1e29f | https://github.com/doduo-anonymous/doduo-submission/tree/34d397c14174d64e6a3026d51cc25560a4f1e29f |
BCELoss | import torch
import torch.utils.data
from torch import nn
class BCELoss(nn.Module):
def __init__(self):
super(self.__class__, self).__init__()
def forward(self, input, target):
return -torch.mean(torch.sum(target * torch.log(torch.clamp(input,
min=1e-10)) + (1 - target) * torch.l... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.utils.dat... | kejiejiang/UnsupervisedDeepLearning-Pytorch | BCELoss | false | 15,786 | [
"MIT"
] | 87 | 6ea7b7151ae62bf0130b56cc023f2be068aa87f0 | https://github.com/kejiejiang/UnsupervisedDeepLearning-Pytorch/tree/6ea7b7151ae62bf0130b56cc023f2be068aa87f0 |
WeightNet | # 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... | scenarios/dev | WeightNet | false | 4,454 | [
"Apache-2.0"
] | 0 | 9f91ebc142cea1c31231d233571ad59460ab6fba | https://github.com/scenarios/dev/tree/9f91ebc142cea1c31231d233571ad59460ab6fba |
MegatronGelu | import torch
import torch.nn
import torch.onnx
import torch.utils.checkpoint
class MegatronGelu(torch.nn.Module):
def forward(self, x):
return x * 0.5 * (torch.erf(x / 1.41421) + 1.0)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn
import torch.onnx
import torch.utils.checkpoint
assert_size_str... | TingGong1/onnxruntime | MegatronGelu | false | 5,895 | [
"MIT"
] | 1 | 435010ab6873974803591fa22262ed8b3e36e44d | https://github.com/TingGong1/onnxruntime/tree/435010ab6873974803591fa22262ed8b3e36e44d |
SoftmaxImage | # 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... | NREL/ml-combustion-pdf-models | SoftmaxImage | false | 17,729 | [
"Apache-2.0"
] | 6 | 0505b9c54ab4c1e2b7ef8ca9f59f76bfb2e3732d | https://github.com/NREL/ml-combustion-pdf-models/tree/0505b9c54ab4c1e2b7ef8ca9f59f76bfb2e3732d |
ConvReLU | import math
import torch
import torch.nn.functional as F
from torch.nn import Conv2d
from torch.nn import LeakyReLU
class PadSameConv2d(torch.nn.Module):
def __init__(self, kernel_size, stride=1):
"""
Imitates padding_mode="same" from tensorflow.
:param kernel_size: Kernelsize of the conv... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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.functional as F
from torch.nn import Conv2d
from tor... | shlomi-amitai/monorec | ConvReLU | false | 10,906 | [
"MIT"
] | 0 | 74571c6cd8d06ae4fb15cbee5a41147c54c78556 | https://github.com/shlomi-amitai/monorec/tree/74571c6cd8d06ae4fb15cbee5a41147c54c78556 |
PositionwiseFeedForward | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | Eddie-Hwang/Co-Eye_Motion_Generation | PositionwiseFeedForward | false | 5,106 | [
"MIT"
] | 1 | 8e244680115fb63bc26018cb6b53bcfbd04e9683 | https://github.com/Eddie-Hwang/Co-Eye_Motion_Generation/tree/8e244680115fb63bc26018cb6b53bcfbd04e9683 |
MultiHeadAttn | # 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.... | HKUST-KnowComp/NeuralSubIsoCnt | MultiHeadAttn | false | 8,215 | [
"MIT"
] | 28 | 7d1deef8e49af90122ea0ad099dec1de390927b6 | https://github.com/HKUST-KnowComp/NeuralSubIsoCnt/tree/7d1deef8e49af90122ea0ad099dec1de390927b6 |
Attention | import math
import torch
import torch.nn as nn
class Attention(nn.Module):
"""
Attention mechanism (Luong)
"""
def __init__(self, hidden_size, hidden_size1):
super(Attention, self).__init__()
self.W_h = nn.Linear(hidden_size + hidden_size1, hidden_size, 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
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | DeepInEvil/kgirnet | Attention | false | 395 | [
"MIT"
] | 0 | 81210907daba7671d3f3fd5814656d1557b7a2b1 | https://github.com/DeepInEvil/kgirnet/tree/81210907daba7671d3f3fd5814656d1557b7a2b1 |
EqualizedWeight | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import math
import numpy as np
from torch import nn
import torch.utils.data
import torch.nn.functional
from typing import List
import torch.... | Aarsh2001/annotated_deep_learning_paper_implementations | EqualizedWeight | false | 4,770 | [
"MIT"
] | 1 | ff0d5c065da1a46769f5f66fddc252c178f8fa37 | https://github.com/Aarsh2001/annotated_deep_learning_paper_implementations/tree/ff0d5c065da1a46769f5f66fddc252c178f8fa37 |
PositionalAttentionModule | # 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.... | rinkwitz/Thesis_Semantic_Image_Segmentation_on_Satellite_Imagery_using_UNets | PositionalAttentionModule | false | 7,559 | [
"MIT"
] | 1 | 75d3a4a536f6ef81fe0efd4f5fbba32b627a7472 | https://github.com/rinkwitz/Thesis_Semantic_Image_Segmentation_on_Satellite_Imagery_using_UNets/tree/75d3a4a536f6ef81fe0efd4f5fbba32b627a7472 |
CNN | import torch
import torch.nn as nn
import torch.fft
class CNN(nn.Module):
"""Convolutional Neural Networks."""
def __init__(self, input_size, hidden_dim, output_size):
super(CNN, self).__init__()
self.Conv1 = nn.Conv1d(in_channels=input_size, out_channels=
hidden_dim, kernel_size=... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import ... | jianzhnie/TsFormer | CNN | false | 3,731 | [
"Apache-2.0"
] | 0 | 47e362f02445ba00d5ab8db206667767e72faca7 | https://github.com/jianzhnie/TsFormer/tree/47e362f02445ba00d5ab8db206667767e72faca7 |
ContrastiveLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice
from torch import nn
assert_... | shuuchen/siamese_network | ContrastiveLoss | false | 4,327 | [
"Apache-2.0"
] | 0 | 54a952d320800c6bb5618cb40386e4c25bdde6fb | https://github.com/shuuchen/siamese_network/tree/54a952d320800c6bb5618cb40386e4c25bdde6fb |
SISDRLoss | import torch
def apply_reduction(losses, reduction='none'):
"""Apply reduction to collection of losses."""
if reduction == 'mean':
losses = losses.mean()
elif reduction == 'sum':
losses = losses.sum()
return losses
class SISDRLoss(torch.nn.Module):
"""Scale-invariant signal-to-di... | 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... | leoauri/auraloss | SISDRLoss | false | 15,909 | [
"Apache-2.0"
] | 272 | 0e3362674ae1b53aa61c6a631fb4e6970c5683c1 | https://github.com/leoauri/auraloss/tree/0e3362674ae1b53aa61c6a631fb4e6970c5683c1 |
SigmoidAbsoluteRelativeErrorLoss | import torch
from torch import nn
class SigmoidAbsoluteRelativeErrorLoss(nn.Module):
def __init__(self, epsilon=0.0001):
super().__init__()
self.epsilon = epsilon
def forward(self, pred, target):
error = (pred - target) / (target + self.epsilon)
return torch.sigmoid(torch.abs... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_... | ElectronicElephant/openpilot-reimplementation | SigmoidAbsoluteRelativeErrorLoss | false | 2,200 | [
"MIT"
] | 0 | 063a9f5c6bbbf02c03dadc59e236e8f7c253a350 | https://github.com/ElectronicElephant/openpilot-reimplementation/tree/063a9f5c6bbbf02c03dadc59e236e8f7c253a350 |
ResBlk | # 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.functional as F
assert_size_stride = torch... | fpaupier/stargan-v2 | ResBlk | false | 6,701 | [
"MIT"
] | 1 | 18d2e04ed6e6df963b84345e798d94383757aaa2 | https://github.com/fpaupier/stargan-v2/tree/18d2e04ed6e6df963b84345e798d94383757aaa2 |
Mnist_NN | import torch
import torch.nn as nn
import torch.nn.functional as F
class Mnist_NN(nn.Module):
def __init__(self):
super().__init__()
self.lin1 = nn.Linear(784, 512, bias=True)
self.lin2 = nn.Linear(512, 256, bias=True)
self.lin3 = nn.Linear(256, 10, bias=True)
def forward(sel... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | Sara-Rajaee/Deep_learning_explorations | Mnist_NN | false | 14,386 | [
"MIT"
] | 154 | d0c527f1cde61eea90bda01b073c5ac24565ebf1 | https://github.com/Sara-Rajaee/Deep_learning_explorations/tree/d0c527f1cde61eea90bda01b073c5ac24565ebf1 |
ContextGate | import torch
import torch.nn as nn
import torch.cuda
import torch.distributed
class ContextGate(nn.Module):
"""
Context gate is a decoder module that takes as input the previous word
embedding, the current decoder state and the attention state, and
produces a gate.
The gate can be used to select t... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.cuda
import torch.distributed
assert_size_str... | NaomiatLibrary/OpenNMT-kpg-release | ContextGate | false | 881 | [
"MIT"
] | 0 | 1da3468d7dad22529a77f3526abf9b373bd3dc4c | https://github.com/NaomiatLibrary/OpenNMT-kpg-release/tree/1da3468d7dad22529a77f3526abf9b373bd3dc4c |
h_swish | 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
class h_swish(nn.Module):
def __init__(self, inplace=True)... | 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... | JaminFong/dali-pytorch | h_swish | false | 8,325 | [
"Apache-2.0"
] | 41 | 7bd5d2380d210a32d24c7309da69c8d2c5db8759 | https://github.com/JaminFong/dali-pytorch/tree/7bd5d2380d210a32d24c7309da69c8d2c5db8759 |
ScoreLayer | import torch
from torch import nn
import torch.nn.functional as F
import torch.nn.parallel
import torch.optim
import torch.utils.data
import torch.utils.data.distributed
class ScoreLayer(nn.Module):
def __init__(self, k):
super(ScoreLayer, self).__init__()
self.score = nn.Conv2d(k, 1, 1, 1)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
import torch.nn.parallel
import torch.optim
import torch.ut... | Dcasadoherraez/siamese-tracking | ScoreLayer | false | 2,130 | [
"MIT"
] | 0 | ce3a2ee32fbe3e4a84a8352be22f929a8512dd25 | https://github.com/Dcasadoherraez/siamese-tracking/tree/ce3a2ee32fbe3e4a84a8352be22f929a8512dd25 |
MaxMap | import torch
import torch.nn as nn
import torch.autograd
class MaxMap(nn.Module):
"""
Compute vanilla mean on a 4D tensor. This acts as a standard PyTorch layer.
The Max is computed independantly for each batch item at each location x,y
Input should be:
(1) ... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import torch.autograd
assert_size_stride = torch._C._dynamo.guards.... | LLNL/fastcam | MaxMap | false | 8,428 | [
"BSD-3-Clause"
] | 25 | 99cefe37528014247319468cf05f54fef259d3bf | https://github.com/LLNL/fastcam/tree/99cefe37528014247319468cf05f54fef259d3bf |
Embedder | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
import torch.nn
import torch.optim
assert_size_stride = tor... | OregonWebSells/ReAgent | Embedder | false | 5,689 | [
"BSD-3-Clause"
] | 1 | 866f91785ca86db32fb67744aa063fe77791ff21 | https://github.com/OregonWebSells/ReAgent/tree/866f91785ca86db32fb67744aa063fe77791ff21 |
adaLIN | import torch
import torch.nn as nn
from torch.nn.parameter import Parameter
class adaLIN(nn.Module):
def __init__(self, num_features, eps=1e-05):
super(adaLIN, self).__init__()
self.eps = eps
self.rho = Parameter(torch.Tensor(1, num_features, 1, 1))
self.rho.data.fill_(0.9)
d... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
from torch.nn.parameter import Parameter
assert_size_stri... | Gxx-5/MyPhoto2Cartoon | adaLIN | false | 11,462 | [
"MIT"
] | 0 | aa05dfa8b7d6c507c33026a2e8b299d5779357be | https://github.com/Gxx-5/MyPhoto2Cartoon/tree/aa05dfa8b7d6c507c33026a2e8b299d5779357be |
MAB | import math
import torch
import torch.nn.functional as F
import torch.nn as nn
class MAB(nn.Module):
def __init__(self, dim_X, dim_Y, dim, num_heads=4, ln=False, p=None):
super().__init__()
self.num_heads = num_heads
self.fc_q = nn.Linear(dim_X, dim)
self.fc_k = nn.Linear(dim_Y, d... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | OpenXAIProject/dac | MAB | false | 8,647 | [
"MIT"
] | 17 | 652776e21b56dcb68839363bb077d5c5ea28d81e | https://github.com/OpenXAIProject/dac/tree/652776e21b56dcb68839363bb077d5c5ea28d81e |
DotProductAttention | # 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.... | ROBINADC/BiGRU-CRF-with-Attention-for-NER | DotProductAttention | false | 8,689 | [
"MIT"
] | 27 | b9e037ebd6e1d56500ffb60c6030013982c17ded | https://github.com/ROBINADC/BiGRU-CRF-with-Attention-for-NER/tree/b9e037ebd6e1d56500ffb60c6030013982c17ded |
depthwise_clipseg_conv | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.utils.data
assert_size_stride = torch._C._dyn... | whiteking64/lang-seg | depthwise_clipseg_conv | false | 16,707 | [
"MIT"
] | 202 | 9d063b126f1b64e38ddb20cc75fc74435bfdcbd3 | https://github.com/whiteking64/lang-seg/tree/9d063b126f1b64e38ddb20cc75fc74435bfdcbd3 |
AttLayer | # 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.... | dreaming-qin/RecBole | AttLayer | false | 12,317 | [
"MIT"
] | 0 | d6de39521484ded60c387ca604abaf86310acdbe | https://github.com/dreaming-qin/RecBole/tree/d6de39521484ded60c387ca604abaf86310acdbe |
SiQU | import torch
class SiQU(torch.nn.Module):
def __init__(self):
super().__init__()
self._activation = torch.nn.SiLU()
def forward(self, x):
return x * self._activation(x)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda
@triton.j... | RolnickLab/ocp | SiQU | false | 2,777 | [
"MIT"
] | 0 | e120c3b90203a46f5fc7626f0b5c8979e4944765 | https://github.com/RolnickLab/ocp/tree/e120c3b90203a46f5fc7626f0b5c8979e4944765 |
Decoder | # 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
import torch.hub
assert_size_stride = torch._C.... | FindingBen/demucs-copy | Decoder | false | 9,080 | [
"MIT"
] | 0 | b607e9c91b776eb03bf95a2aa9c4900c92fc7c3f | https://github.com/FindingBen/demucs-copy/tree/b607e9c91b776eb03bf95a2aa9c4900c92fc7c3f |
TSAFusion | import torch
import torch.utils.data
from torch.utils import data as data
from torch import nn as nn
from torch.nn import init as init
from torchvision.models import vgg as vgg
from torch import autograd as autograd
class TSAFusion(nn.Module):
"""Temporal Spatial Attention (TSA) fusion module.
Temporal: Calc... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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
from ... | WoojunePark/BasicSR | TSAFusion | false | 18,162 | [
"Apache-2.0"
] | 9 | e0910b022b924bb913045fc412a5470dc2242cf0 | https://github.com/WoojunePark/BasicSR/tree/e0910b022b924bb913045fc412a5470dc2242cf0 |
AttentivePoolingModule | import torch
import torch.nn as nn
class AttentivePoolingModule(nn.Module):
"""
Implementation of Attentive Pooling
"""
def __init__(self, input_dim, activation='ReLU', **kwargs):
super(AttentivePoolingModule, self).__init__()
self.W_a = nn.Linear(input_dim, input_dim)
self.W... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | gcambara/s3prl | AttentivePoolingModule | false | 15,412 | [
"MIT"
] | 856 | 33284ebde3a903ed8604d6dae85669d0174ae1d3 | https://github.com/gcambara/s3prl/tree/33284ebde3a903ed8604d6dae85669d0174ae1d3 |
SelfExpression | import torch
import torch.nn as nn
class SelfExpression(nn.Module):
def __init__(self, n):
super(SelfExpression, self).__init__()
self.Coefficient = nn.Parameter(0.0001 * torch.ones(n, n, dtype=
torch.float32), requires_grad=True)
def forward(self, x):
y = torch.matmul(se... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | ShulingTang/DSC-Net | SelfExpression | false | 9,487 | [
"MIT"
] | 0 | 2da1e0c654b045057c654cbcbb8a8c23fb832c9d | https://github.com/ShulingTang/DSC-Net/tree/2da1e0c654b045057c654cbcbb8a8c23fb832c9d |
CharbonnierCompLoss | 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... | Sardhendu/mmediting | CharbonnierCompLoss | false | 9,877 | [
"Apache-2.0"
] | 0 | 623b59ac758d856abc9fab7e845beeab61074d8f | https://github.com/Sardhendu/mmediting/tree/623b59ac758d856abc9fab7e845beeab61074d8f |
ConvMeanPool | # 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... | ChiragCD/NR-GAN | ConvMeanPool | false | 13,476 | [
"MIT"
] | 54 | fc455c6219b09bc8bf605715504b78b2bb801e48 | https://github.com/ChiragCD/NR-GAN/tree/fc455c6219b09bc8bf605715504b78b2bb801e48 |
StyledConv | # 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
from to... | ozmig77/StyleCLIP-1 | StyledConv | false | 16,226 | [
"MIT"
] | 2,732 | 57b887bba971ef86c107f4805785ce44fca3efef | https://github.com/ozmig77/StyleCLIP-1/tree/57b887bba971ef86c107f4805785ce44fca3efef |
TorchClampOptionMax | # 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
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | NVIDIA-AI-IOT-private/torch2trt | TorchClampOptionMax | false | 10,544 | [
"MIT"
] | 0 | 953d60039e0c81e90eea467c3df2e6e3f7040242 | https://github.com/NVIDIA-AI-IOT-private/torch2trt/tree/953d60039e0c81e90eea467c3df2e6e3f7040242 |
QNetwork | # 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_... | BenKang34/deep-reinforcement-learning-nanodegree | QNetwork | false | 142 | [
"MIT"
] | 0 | 17c9007f757dfb1217c869fdee51798c4a21ba92 | https://github.com/BenKang34/deep-reinforcement-learning-nanodegree/tree/17c9007f757dfb1217c869fdee51798c4a21ba92 |
Net_mish_ranger | import torch
import torch.nn.functional as F
def mish(x):
return x * torch.tanh(F.softplus(x))
class Net_mish_ranger(torch.nn.Module):
def __init__(self, n_feature, n_hidden, n_output):
super(Net_mish_ranger, self).__init__()
self.hidden1 = torch.nn.Linear(n_feature, n_hidden)
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, math as tl_math
im... | kartheikiyer/dense_basis_toolbelt | Net_mish_ranger | false | 12,660 | [
"MIT"
] | 0 | 5cae6e8f4ea6983fba3625f47413d40d6b3bc6e4 | https://github.com/kartheikiyer/dense_basis_toolbelt/tree/5cae6e8f4ea6983fba3625f47413d40d6b3bc6e4 |
CPUForgetMult | # 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 *
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_str... | LaurenSpiegel/fastai_docs | CPUForgetMult | false | 759 | [
"Apache-2.0"
] | 0 | 4fe6b62116d88dea9610548133e6cadb6b260a73 | https://github.com/LaurenSpiegel/fastai_docs/tree/4fe6b62116d88dea9610548133e6cadb6b260a73 |
MultiHead | import torch
import torch.nn as nn
class Attention(nn.Module):
def __init__(self):
super().__init__()
self.softmax = nn.Softmax(dim=-1)
def forward(self, Q, K, V, mask=None, dk=64):
w = torch.bmm(Q, K.transpose(1, 2))
if mask is not None:
assert w.size() == mask.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
from torch._inductor.runtime.... | iml1111/machine-translation | MultiHead | false | 6,885 | [
"MIT"
] | 1 | a7dd673efbe8a172c1df49e0d50482dc84008c37 | https://github.com/iml1111/machine-translation/tree/a7dd673efbe8a172c1df49e0d50482dc84008c37 |
LongCNN | # 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... | Csaba591/LHYP | LongCNN | false | 8,973 | [
"MIT"
] | 0 | d1b07381b9dc39210d338b60908acfa64c476b8e | https://github.com/Csaba591/LHYP/tree/d1b07381b9dc39210d338b60908acfa64c476b8e |
TorchMul | import torch
class TorchMul(torch.nn.Module):
def __init__(self):
super(TorchMul, self).__init__()
def forward(self, x, y):
return torch.mul(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... | Ilyabasharov/torch2trt | TorchMul | false | 2,561 | [
"MIT"
] | 0 | 76bf298b3da408509665e23e2494922b131afb10 | https://github.com/Ilyabasharov/torch2trt/tree/76bf298b3da408509665e23e2494922b131afb10 |
Sine | import torch
from torch import nn
class Sine(nn.Module):
def __init__(self, w0=30):
super().__init__()
self.w0 = w0
def forward(self, input):
return torch.sin(self.w0 * input)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_... | Fred62879/ACORN | Sine | false | 2,290 | [
"MIT"
] | 0 | 2de0bf747d595dbdc4d67311fb8f46cf47f9b4cb | https://github.com/Fred62879/ACORN/tree/2de0bf747d595dbdc4d67311fb8f46cf47f9b4cb |
RoundSTE | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | UniSerj/ai-research | RoundSTE | false | 14,547 | [
"Apache-2.0"
] | 46 | 79f0093c93408cc5dd7d3f56aafd7dc1f901421c | https://github.com/UniSerj/ai-research/tree/79f0093c93408cc5dd7d3f56aafd7dc1f901421c |
ResnetBlockPointwise | # 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... | DveloperY0115/texture_fields | ResnetBlockPointwise | false | 13,628 | [
"MIT"
] | 78 | 28c277696e0a658ffff3496892810d5a0ef03f65 | https://github.com/DveloperY0115/texture_fields/tree/28c277696e0a658ffff3496892810d5a0ef03f65 |
WeightNet | # 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... | Viditagarwal7479/Video-Swin-Transformer | WeightNet | false | 18,057 | [
"Apache-2.0"
] | 9 | 37910ef3141c7b2eef76544f9ec8bdf26ec94c7d | https://github.com/Viditagarwal7479/Video-Swin-Transformer/tree/37910ef3141c7b2eef76544f9ec8bdf26ec94c7d |
Reorg | import torch
import torch.nn as nn
class Reorg(nn.Module):
""" This layer reorganizes a tensor according to a stride.
The dimensions 2,3 will be sliced by the stride and then stacked in dimension 1. (input must have 4 dimensions)
Args:
stride (int): stride to divide the input tensor
"""
... | 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... | CuongNguyen218/ObjectDetection-OneStageDet | Reorg | false | 337 | [
"MIT"
] | 0 | 60efe8b0ee6782b2aea20a32264b2ce1fc21901f | https://github.com/CuongNguyen218/ObjectDetection-OneStageDet/tree/60efe8b0ee6782b2aea20a32264b2ce1fc21901f |
InitialConnection | import torch
from torch import nn
class InitialConnection(nn.Module):
def __init__(self, alpha=0.5):
super(InitialConnection, self).__init__()
self.alpha = alpha
def forward(self, Xs: 'list'):
assert len(Xs) >= 1
return Xs[-1] if len(Xs) == 1 else (1 - self.alpha) * Xs[-1
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_str... | ngohienduong/Deep_GCN_Benchmarking | InitialConnection | false | 16,175 | [
"MIT"
] | 70 | 3ee57a265bbfd62d8e6f3ee6e3e9062dd5a44633 | https://github.com/ngohienduong/Deep_GCN_Benchmarking/tree/3ee57a265bbfd62d8e6f3ee6e3e9062dd5a44633 |
GELU | import torch
import numpy as np
import torch.nn as nn
class GELU(nn.Module):
def forward(self, x):
cdf = 0.5 * (1.0 + torch.tanh(np.sqrt(2 / np.pi) * (x + 0.044715 *
torch.pow(x, 3))))
return x * cdf
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.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_... | yyht/Funnel_Transformer | GELU | false | 16,779 | [
"MIT"
] | 193 | 4b35a794d5e122a8054471863a52d4eac1c39dcd | https://github.com/yyht/Funnel_Transformer/tree/4b35a794d5e122a8054471863a52d4eac1c39dcd |
Tanh | import torch
import torch.nn as nn
import torch.multiprocessing
class Tanh(nn.Module):
def __init__(self, input_dim, output_dim, H):
super(Tanh, self).__init__()
self.fc1 = nn.Linear(input_dim, H, bias=False)
self.fc2 = nn.Linear(H, output_dim, bias=False)
def forward(self, x):
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as ... | suswei/RLCT | Tanh | false | 4,478 | [
"MIT"
] | 0 | e9e04ca5e64250dfbb94134ec5283286dcdc4358 | https://github.com/suswei/RLCT/tree/e9e04ca5e64250dfbb94134ec5283286dcdc4358 |
Encoder | import torch
import torch.nn as nn
import torch.nn.functional as F
class Encoder(nn.Module):
def __init__(self, out_dim=64):
super(Encoder, self).__init__()
self.conv1 = nn.Conv2d(3, 16, kernel_size=3, stride=1, padding=1)
self.conv2 = nn.Conv2d(16, 32, kernel_size=3, stride=1, 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_... | JanSoltysik/SimCLR | Encoder | false | 11,553 | [
"MIT"
] | 0 | 34ea6d17a630382b65a00aa445d82876754ee679 | https://github.com/JanSoltysik/SimCLR/tree/34ea6d17a630382b65a00aa445d82876754ee679 |
Alignment | from _paritybench_helpers import _mock_config
from torch.nn import Module
import math
import torch
import torch.nn.functional as f
import torch.nn as nn
class Module(nn.Module):
def __init__(self):
super().__init__()
self.summary = {}
def add_summary(self, name, val):
if self.trainin... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | alibaba-edu/simple-effective-text-matching-pytorch | Alignment | false | 14,798 | [
"Apache-2.0"
] | 278 | 05d572e30801b235e989c78c95dd24d5f5d35f74 | https://github.com/alibaba-edu/simple-effective-text-matching-pytorch/tree/05d572e30801b235e989c78c95dd24d5f5d35f74 |
NormConvBlock | import torch
import torch.nn as nn
import torch.nn.functional as F
class PixelNormLayer(nn.Module):
def __init__(self):
super(PixelNormLayer, self).__init__()
def forward(self, x):
return x / torch.sqrt(torch.mean(x ** 2, dim=1, keepdim=True) + 1e-08)
class WScaleLayer(nn.Module):
def... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | ChandreyeeB/Blind-Image-Deconvolution-using-Deep-Generative-Priors | NormConvBlock | false | 7,882 | [
"MIT"
] | 24 | 4198bd2d325a32ffc4e714c486540e63440ab110 | https://github.com/ChandreyeeB/Blind-Image-Deconvolution-using-Deep-Generative-Priors/tree/4198bd2d325a32ffc4e714c486540e63440ab110 |
FCNet | # 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.utils.... | ChCh1999/RTPB | FCNet | false | 17,088 | [
"MIT"
] | 8 | 1066a3bfe4fe1b41eff74fd152936880302a60a2 | https://github.com/ChCh1999/RTPB/tree/1066a3bfe4fe1b41eff74fd152936880302a60a2 |
SimpleMLP | # 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.... | Ali-ry/azureml-examples | SimpleMLP | false | 2,021 | [
"MIT"
] | 0 | 817ae89d2766dcafd70937a22cb3a80f100a2906 | https://github.com/Ali-ry/azureml-examples/tree/817ae89d2766dcafd70937a22cb3a80f100a2906 |
ExampleBackbone | import torch
import torch.nn as nn
import torch._C
import torch.serialization
class ExampleBackbone(nn.Module):
def __init__(self):
super(ExampleBackbone, self).__init__()
self.conv = nn.Conv2d(3, 3, 3)
def init_weights(self, pretrained=None):
pass
def forward(self, x):
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch._C
import torch.serialization
assert_size_str... | CarnoZhao/mmsegmentation | ExampleBackbone | false | 7,847 | [
"Apache-2.0"
] | 18 | bdaf3d93c4d33c3f0c15f95879fdd7ab78290c1c | https://github.com/CarnoZhao/mmsegmentation/tree/bdaf3d93c4d33c3f0c15f95879fdd7ab78290c1c |
shift | # 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... | amonod/udvd | shift | false | 1,428 | [
"MIT"
] | 0 | a1ccb777d205255ac68c40efb93dd3996f562c45 | https://github.com/amonod/udvd/tree/a1ccb777d205255ac68c40efb93dd3996f562c45 |
DPLSTMCell | import math
import torch
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 Optional
class LSTMLinear(nn.Linear):
"""
This function is the same as a nn.Linear layer, except that in the backward pass
the gra... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | EXAPPAI/opacus | DPLSTMCell | false | 2,195 | [
"Apache-2.0"
] | 0 | 11e188a2f03a8a08be51fdf2367cc1387879312a | https://github.com/EXAPPAI/opacus/tree/11e188a2f03a8a08be51fdf2367cc1387879312a |
BasicDeconv | import torch
import torch.nn as nn
import torch.nn.functional as F
class BasicDeconv(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, stride=1,
use_bn=False):
super(BasicDeconv, self).__init__()
self.use_bn = use_bn
self.tconv = nn.ConvTranspose2d(in_channels... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | Yuuchuin/C3_V2 | BasicDeconv | false | 6,020 | [
"MIT"
] | 1 | 92a5edbc2c2b3452c5f57e74f928591192293e81 | https://github.com/Yuuchuin/C3_V2/tree/92a5edbc2c2b3452c5f57e74f928591192293e81 |
SOSLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | lulor/project_vg | SOSLoss | false | 7,142 | [
"MIT"
] | 1 | 27b0c3b3038c5a666dde516a0a265ae8ddf2059f | https://github.com/lulor/project_vg/tree/27b0c3b3038c5a666dde516a0a265ae8ddf2059f |
TVLoss | import torch
import torch as th
import torch.utils.data
import torch
import torch.autograd
class TVLoss(th.nn.Module):
def __init__(self, strength=1.0):
super(TVLoss, self).__init__()
self.strength = strength
def forward(self, input):
self.x_diff = input[:, :, 1:, :] - input[:, :, :-... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch as th
import torch.utils.data
import torch
import torch.auto... | JCBrouwer/maua | TVLoss | false | 17,465 | [
"BSD-2-Clause"
] | 9 | 4208023020bc56dd81f6933347f9c4e7c1853318 | https://github.com/JCBrouwer/maua/tree/4208023020bc56dd81f6933347f9c4e7c1853318 |
BSS | # 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... | Capetian/FaceX-Zoo | BSS | false | 4,972 | [
"Apache-2.0"
] | 1 | 029786c40d8aba15d891d33973de25fcd7e5399a | https://github.com/Capetian/FaceX-Zoo/tree/029786c40d8aba15d891d33973de25fcd7e5399a |
Smoother | from torch.nn import Module
import torch
from torch import Tensor
from typing import Optional
import torch.nn.functional as F
from torch.nn import Dropout
from torch.nn import LayerNorm
from torch.nn import Conv1d
from torch.nn import MultiheadAttention
class Smoother(Module):
"""Convolutional Transformer Encoder... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | SolomidHero/FragmentVC-with-RAdam | Smoother | false | 17,949 | [
"MIT"
] | 6 | a0ee884155a4e8f47d8950a35258e58987f6289e | https://github.com/SolomidHero/FragmentVC-with-RAdam/tree/a0ee884155a4e8f47d8950a35258e58987f6289e |
ClipGlobalAvgPool2d | # 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.utils.data
assert_size_stride = torch._C._dynamo.guard... | RichardDominik/AIC21-MTMC | ClipGlobalAvgPool2d | false | 14,301 | [
"MIT"
] | 63 | f69f63f9c40e2dc98e98c7af1cebe3d5605307ee | https://github.com/RichardDominik/AIC21-MTMC/tree/f69f63f9c40e2dc98e98c7af1cebe3d5605307ee |
CharbonnierLoss | # 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.utils.data
impo... | IceClear/MW-GAN | CharbonnierLoss | false | 8,288 | [
"MIT"
] | 36 | acb962468c984681c4a21f7b5c14588ca8f58c00 | https://github.com/IceClear/MW-GAN/tree/acb962468c984681c4a21f7b5c14588ca8f58c00 |
MaskedWordPredictions | from _paritybench_helpers import _mock_config
import math
import torch
from torch import nn
def gelu(x):
"""Gaussian Error Linear Unitという活性化関数です。
LeLUが0でカクっと不連続なので、そこを連続になるように滑らかにした形のLeLUです。
"""
return x * 0.5 * (1.0 + torch.erf(x / math.sqrt(2.0)))
class BertLayerNorm(nn.Module):
def __init__(... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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... | kimihitosugiyama/text_analysis | MaskedWordPredictions | false | 4,249 | [
"Apache-2.0"
] | 0 | 8f51022957928c31e52af1e0fd407daca3addb40 | https://github.com/kimihitosugiyama/text_analysis/tree/8f51022957928c31e52af1e0fd407daca3addb40 |
Custom | import torch
import torch._utils
class Custom(torch.nn.Module):
def __init__(self):
super(Custom, self).__init__()
self.conv = torch.nn.Conv2d(3, 3, 1, 1)
self.conv1 = torch.nn.Conv2d(3, 3, 1, 1)
self.conv2 = torch.nn.Conv2d(3, 3, 1, 1)
self.relu = torch.nn.ReLU()
def... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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
assert_si... | ijinjay/torch2mindspore | Custom | false | 3,660 | [
"MIT"
] | 0 | e4c06bd5e8a3b25b72bf158393a66c5cd1b572d2 | https://github.com/ijinjay/torch2mindspore/tree/e4c06bd5e8a3b25b72bf158393a66c5cd1b572d2 |
DfAlphaLoss | # 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 Tens... | Rikorose/DeepFilterNet | DfAlphaLoss | false | 14,319 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 54 | afe6bfb53efae70207e18df7ed372c2cfe337fee | https://github.com/Rikorose/DeepFilterNet/tree/afe6bfb53efae70207e18df7ed372c2cfe337fee |
Gate | # 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 ... | Hunter-DDM/DeFT-naacl2021 | Gate | false | 17,404 | [
"MIT"
] | 6 | c61aeb4f63a650a0a1b71fb1b0b245cb3925009b | https://github.com/Hunter-DDM/DeFT-naacl2021/tree/c61aeb4f63a650a0a1b71fb1b0b245cb3925009b |
WeightedBCEWithLogitsLoss | # 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... | devaansh100/pytorch_connectomics | WeightedBCEWithLogitsLoss | false | 6,561 | [
"MIT"
] | 1 | b1e4b16b0480546ea806d14876208080815ed964 | https://github.com/devaansh100/pytorch_connectomics/tree/b1e4b16b0480546ea806d14876208080815ed964 |
BasicDeconv | # 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_... | vghost2008/C-3-Framework | BasicDeconv | false | 11,094 | [
"MIT"
] | 0 | dc6f1f67e403aff4dbb60f8ed06461c843407501 | https://github.com/vghost2008/C-3-Framework/tree/dc6f1f67e403aff4dbb60f8ed06461c843407501 |
LinearMaxPoolLinearModel | # 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_... | Europium248/captum | LinearMaxPoolLinearModel | false | 436 | [
"BSD-3-Clause"
] | 0 | ac02fae2651b8d68a44bcb9d03b91cbb3959f2fc | https://github.com/Europium248/captum/tree/ac02fae2651b8d68a44bcb9d03b91cbb3959f2fc |
Conv5x5 | import torch
import torch.nn as nn
class Conv5x5(nn.Module):
def __init__(self, in_channels, out_channels, use_refl=True):
super(Conv5x5, self).__init__()
if use_refl:
self.pad = nn.ReflectionPad2d(2)
else:
self.pad = nn.ZeroPad2d(2)
self.conv = nn.Conv2d(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.triton_helpers import math as tl_math
import torch.... | maxuanquang/FeatDepth | Conv5x5 | false | 4,066 | [
"MIT"
] | 0 | cc68d9f1f49b65ace8f2918af5b9d552ecd80ba4 | https://github.com/maxuanquang/FeatDepth/tree/cc68d9f1f49b65ace8f2918af5b9d552ecd80ba4 |
FeedForward | # 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... | ibraheem-moosa/protein-bvalue-prediction | FeedForward | false | 12,518 | [
"MIT"
] | 0 | 9d0607ade30d8877ea89c5f24184d3af0580f912 | https://github.com/ibraheem-moosa/protein-bvalue-prediction/tree/9d0607ade30d8877ea89c5f24184d3af0580f912 |
GCNet | import torch
import torch.nn as nn
class GCN(nn.Module):
def __init__(self, in_ft, out_ft, act, bias=True):
super(GCN, self).__init__()
self.fc = nn.Linear(in_ft, out_ft, bias=False)
self.act = nn.PReLU() if act == 'prelu' else act
if bias:
self.bias = nn.Parameter(tor... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | PetarV-/telesign | GCNet | false | 17,805 | [
"MIT"
] | 4 | 05f58162b7c5fbc3993d320fdbc4d5465dd1c71e | https://github.com/PetarV-/telesign/tree/05f58162b7c5fbc3993d320fdbc4d5465dd1c71e |
Attention | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import math
from to... | logpai/deep-loglizer- | Attention | false | 15,939 | [
"Apache-2.0"
] | 55 | 1069a1e0e9b000e1bc9b353fb01d3d451d9a6d5d | https://github.com/logpai/deep-loglizer-/tree/1069a1e0e9b000e1bc9b353fb01d3d451d9a6d5d |
KLLoss | import torch
from torch import Tensor
class KLLoss(torch.nn.KLDivLoss):
def __init__(self, batch_wise=False):
super(KLLoss, self).__init__(reduction='batchmean')
self.batch_wise = batch_wise
def forward(self, input: 'Tensor', target: 'Tensor') ->Tensor:
if self.batch_wise:
... | 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
assert_size... | Tomoya-K-0504/deepSELF | KLLoss | false | 5,898 | [
"MIT"
] | 1 | 0e5a7d0169b3e9edcb5c8d9802140a84ce5cb69a | https://github.com/Tomoya-K-0504/deepSELF/tree/0e5a7d0169b3e9edcb5c8d9802140a84ce5cb69a |
Sign | from torch.autograd import Function
import torch
import torch.nn as nn
class SignFunction(Function):
def __init__(self):
super(SignFunction, self).__init__()
@staticmethod
def forward(ctx, input, is_training=True):
if is_training:
prob = input.new(input.size()).uniform_()
... | 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.autograd import Function
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda... | MeMihir/SuperResCompression | Sign | false | 5,587 | [
"MIT"
] | 1 | c76bcf6b12d56ce3ad81ebb1b204fc0425f0e633 | https://github.com/MeMihir/SuperResCompression/tree/c76bcf6b12d56ce3ad81ebb1b204fc0425f0e633 |
TransposedConv1d | import torch
import torch.nn as nn
import torch.nn.functional as F
class TransposedConv1d(nn.Module):
def __init__(self, in_channels, output_channels, kernel_shape=3, stride
=2, padding=1, output_padding=1, activation_fn=F.relu,
use_batch_norm=False, use_bias=True):
super(TransposedConv1d... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import ... | TencentYoutuResearch/ActionDetection-AFSD | TransposedConv1d | false | 14,469 | [
"BSD-3-Clause"
] | 112 | ed86a0df91e58baa7d78c796ed29cff82b1f3fa6 | https://github.com/TencentYoutuResearch/ActionDetection-AFSD/tree/ed86a0df91e58baa7d78c796ed29cff82b1f3fa6 |
ConvertPointsFromHomogeneous | import torch
import torch.nn as nn
def convert_points_from_homogeneous(points, eps=1e-06):
"""Function that converts points from homogeneous to Euclidean space.
See :class:`~torchgeometry.ConvertPointsFromHomogeneous` for details.
Examples::
>>> input = torch.rand(2, 4, 3) # BxNx3
>>> ... | 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... | Wizaron/torchgeometry | ConvertPointsFromHomogeneous | false | 5,975 | [
"Apache-2.0"
] | 1 | 59a8d25dd811ded6a139d5c0c2442b06f43dc775 | https://github.com/Wizaron/torchgeometry/tree/59a8d25dd811ded6a139d5c0c2442b06f43dc775 |
QuantizableHSwish | import torch
import torch.nn as nn
import torch.quantization
class QuantizableHSigmoid(nn.Module):
"""Hard Sigmoid for quantization."""
def __init__(self, inplace: 'bool'=True) ->None:
"""Initialize."""
super(QuantizableHSigmoid, self).__init__()
self.relu6 = nn.ReLU6(inplace=inplace)... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import torch.quantization
assert_size_stride = torch._C._dynamo.gua... | dhlee347/model_compression | QuantizableHSwish | false | 6,570 | [
"MIT"
] | 1 | 274b85ff56d81f0b7cf6907cbc1bd10e16cdb956 | https://github.com/dhlee347/model_compression/tree/274b85ff56d81f0b7cf6907cbc1bd10e16cdb956 |
LossPredictionLoss | import torch
import torch.nn as nn
class LossPredictionLoss(nn.Module):
def __init__(self, margin=1.0):
super(LossPredictionLoss, self).__init__()
self.margin = margin
def forward(self, input, target):
input = (input - input.flip(0))[:len(input) // 2]
target = (target - targe... | 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... | saksman/deepfish_adaptation | LossPredictionLoss | false | 7,590 | [
"MIT"
] | 1 | 0413def87ec1d3cb67fa043a2fb60ef7e0d73539 | https://github.com/saksman/deepfish_adaptation/tree/0413def87ec1d3cb67fa043a2fb60ef7e0d73539 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.