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 |
|---|---|---|---|---|---|---|---|---|---|---|
AdaIN | import torch
import torch.optim
class AdaIN(torch.nn.Module):
def __init__(self, epsilon: 'float'=1e-05):
super(AdaIN, self).__init__()
self.epsilon = epsilon
def calc_vector_mean_std(self, x):
std = torch.sqrt(torch.var(x, dim=1) + self.epsilon)
mean = torch.mean(x, dim=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.triton_helpers import libdevice
import torch.optim
assert_size_stride = torch._C._dynamo.guards.assert_size_str... | ai-in-motion/moai | AdaIN | false | 18,311 | [
"Apache-2.0"
] | 10 | e38cac046c059d2e2331ef4883bbabc5a500a5cf | https://github.com/ai-in-motion/moai/tree/e38cac046c059d2e2331ef4883bbabc5a500a5cf |
BCEWithLogitsLossWithOHEM | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch ... | ForrestPi/semanticSegmentation | BCEWithLogitsLossWithOHEM | false | 17,341 | [
"MIT"
] | 7 | 1e5519279e2a9574f09eaf91439138b74b0f860c | https://github.com/ForrestPi/semanticSegmentation/tree/1e5519279e2a9574f09eaf91439138b74b0f860c |
Conv1dLinear | import torch
import torch.utils.data
from torch.optim import *
from torch.optim.lr_scheduler import *
class Conv1dLinear(torch.nn.Module):
"""Conv1D + Linear for Transformer block.
A variant of MultiLayeredConv1d, which replaces second conv-layer to linear.
"""
def __init__(self, in_chans, hidden_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.utils.data
from ... | entn-at/efficient_tts | Conv1dLinear | false | 15,320 | [
"MIT"
] | 111 | 5e6ea55d0c9694f7e30eecb5048976088f1a3c66 | https://github.com/entn-at/efficient_tts/tree/5e6ea55d0c9694f7e30eecb5048976088f1a3c66 |
MLPFunc | # 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... | lixinsu/RCZoo | MLPFunc | false | 15,926 | [
"MIT"
] | 166 | 37fcb7962fbd4c751c561d4a0c84173881ea8339 | https://github.com/lixinsu/RCZoo/tree/37fcb7962fbd4c751c561d4a0c84173881ea8339 |
ACGANDiscriminator | import torch
import torch.nn as nn
import torch.nn.utils as utils
import torch.nn.functional as F
from torchvision import utils
def global_pooling(input, pooling='mean'):
if pooling == 'mean':
return input.mean(3).mean(2)
elif pooling == 'sum':
return input.sum(3).sum(2)
else:
rais... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | takuhirok/rGAN | ACGANDiscriminator | false | 16,578 | [
"MIT"
] | 103 | 6f7a092de5814c662fd17224b3d48bebe7e03c2f | https://github.com/takuhirok/rGAN/tree/6f7a092de5814c662fd17224b3d48bebe7e03c2f |
_GateAddNorm | import torch
import torch.nn as nn
import torch.nn.functional as F
class _TimeDistributedInterpolation(nn.Module):
def __init__(self, output_size: 'int', batch_first: 'bool'=False,
trainable: 'bool'=False):
super().__init__()
self.output_size = output_size
self.batch_first = batch... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | Gian-Wiher/darts | _GateAddNorm | false | 5,215 | [
"Apache-2.0"
] | 1 | 0d267e08643e2e3f88163a5d955b8be75840c2f6 | https://github.com/Gian-Wiher/darts/tree/0d267e08643e2e3f88163a5d955b8be75840c2f6 |
SimulatorReward | # 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.... | seulbinHwang/DeepReinforcementLearningInAction | SimulatorReward | false | 4,312 | [
"MIT"
] | 0 | c9039fd6951c46c8902cda04580c69159d172c82 | https://github.com/seulbinHwang/DeepReinforcementLearningInAction/tree/c9039fd6951c46c8902cda04580c69159d172c82 |
CrossAttention | import torch
class CrossAttention(torch.nn.Module):
"""
Implement of Co-attention.
"""
def __init__(self):
super().__init__()
def forward(self, inputA, inputB, maskA=None, maskB=None):
"""
Input: embedding.
"""
inputA.size(0)
assert inputA.size(-1)... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | haophancs/TREQS | CrossAttention | false | 15,496 | [
"MIT"
] | 149 | 49e354ce2a08cf963ec139d99936020e0f80ced8 | https://github.com/haophancs/TREQS/tree/49e354ce2a08cf963ec139d99936020e0f80ced8 |
ActorNetwork | import torch
import torch.nn as nn
import torch.nn.functional as F
class ActorNetwork(nn.Module):
def __init__(self, input_size, hidden_size, action_size):
super(ActorNetwork, self).__init__()
self.fc1 = nn.Linear(input_size, hidden_size)
self.fc2 = nn.Linear(hidden_size, hidden_size)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | IandRover/meta-gradient_RL | ActorNetwork | false | 17,428 | [
"MIT"
] | 6 | 5d2539aceb9fa68b1849feac7d37741f9e5f83a3 | https://github.com/IandRover/meta-gradient_RL/tree/5d2539aceb9fa68b1849feac7d37741f9e5f83a3 |
Multi_Head_Attention | import torch
import torch.nn as nn
import torch.nn.functional as F
class Scaled_Dot_Product_Attention(nn.Module):
"""Scaled Dot-Product Attention """
def __init__(self):
super(Scaled_Dot_Product_Attention, self).__init__()
def forward(self, Q, K, V, scale=None):
"""
Args:
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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... | Ergtou/TextWord | Multi_Head_Attention | false | 2,192 | [
"MIT"
] | 0 | f05cc5a630fc8d05357b8a9bc0da3ec5cc255a30 | https://github.com/Ergtou/TextWord/tree/f05cc5a630fc8d05357b8a9bc0da3ec5cc255a30 |
FocalLossBinary | # 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... | Gitsamshi/nnUNet-1 | FocalLossBinary | false | 8,194 | [
"Apache-2.0"
] | 28 | 5341684211e6d91dab6ad76a7595a95addff23be | https://github.com/Gitsamshi/nnUNet-1/tree/5341684211e6d91dab6ad76a7595a95addff23be |
Encoder | # 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 import device
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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... | RasmusJuul/dtu_mlops | Encoder | false | 979 | [
"Apache-2.0"
] | 0 | 98bca082067aa7575bb8e8193991723d474f0850 | https://github.com/RasmusJuul/dtu_mlops/tree/98bca082067aa7575bb8e8193991723d474f0850 |
WeightedBCELoss | import torch
import torch.nn as nn
class WeightedBCELoss(nn.Module):
def __init__(self):
super(WeightedBCELoss, self).__init__()
self.bce = nn.BCEWithLogitsLoss(reduction='none')
def forward(self, y_pred, y_true, weights):
loss_0 = self.bce(y_pred[:, 0], y_true[:, 0])
loss_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
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
import torc... | CarlosPena00/pytorch-unet | WeightedBCELoss | false | 219 | [
"MIT"
] | 0 | 8365bace23e4b04b9c5b75cd6720807ea8cac5ab | https://github.com/CarlosPena00/pytorch-unet/tree/8365bace23e4b04b9c5b75cd6720807ea8cac5ab |
ShuffleCatAlt | # 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... | tony23545/yolact_edge | ShuffleCatAlt | false | 10,915 | [
"MIT"
] | 0 | 11840512ab46f22dce6aea37a7823110175adffa | https://github.com/tony23545/yolact_edge/tree/11840512ab46f22dce6aea37a7823110175adffa |
NotEqualConst | # 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
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda
@triton.j... | Ilyabasharov/torch2trt | NotEqualConst | false | 2,556 | [
"MIT"
] | 0 | 76bf298b3da408509665e23e2494922b131afb10 | https://github.com/Ilyabasharov/torch2trt/tree/76bf298b3da408509665e23e2494922b131afb10 |
LambdaLayer | # 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... | ZonghaiZhu/EZBM | LambdaLayer | false | 1,330 | [
"MIT"
] | 0 | b4f6fbd10598c79f144b778ef848554ac62a173a | https://github.com/ZonghaiZhu/EZBM/tree/b4f6fbd10598c79f144b778ef848554ac62a173a |
MinibatchStddev | # 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_... | deepsound-project/pggan-pytorch | MinibatchStddev | false | 15,170 | [
"MIT"
] | 115 | dab2ec79229c3800253a209304dbb1e7ac1d1219 | https://github.com/deepsound-project/pggan-pytorch/tree/dab2ec79229c3800253a209304dbb1e7ac1d1219 |
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... | Dookas/Robust-Multitask-RL | DQN | false | 13,599 | [
"MIT"
] | 106 | 7970e20cbdf91703c88edcb84568d7354e2525bc | https://github.com/Dookas/Robust-Multitask-RL/tree/7970e20cbdf91703c88edcb84568d7354e2525bc |
CharbonnierLoss | import functools
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn import init as init
from torchvision.models import vgg as vgg
from torch import autograd as autograd
def reduce_loss(loss, reduction):
"""Reduce loss as specified.
Args:
loss (Tensor): Elementwise loss 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 import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice
import functools
import torc... | cyysc1998/EDVRDarts | CharbonnierLoss | false | 6,513 | [
"MIT"
] | 1 | 201badbc8c6469b519647a8869c3782ebe1176cf | https://github.com/cyysc1998/EDVRDarts/tree/201badbc8c6469b519647a8869c3782ebe1176cf |
OrthogonalHouseholderAlternative | import math
import torch
import torch.nn as nn
class OrthogonalHouseholderAlternative(nn.Module):
def __init__(self, sz, bias=True):
super(OrthogonalHouseholderAlternative, self).__init__()
self.sz = sz
self.bias = bias
self.A = nn.Parameter(torch.empty((sz, sz)))
self.b =... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | mahkons/orthogonal | OrthogonalHouseholderAlternative | false | 3,961 | [
"MIT"
] | 0 | 19a69134ca9a01ef564eab624b8c1526291770aa | https://github.com/mahkons/orthogonal/tree/19a69134ca9a01ef564eab624b8c1526291770aa |
EqualLinearActModule | import torch
import torch.nn as nn
from copy import deepcopy
from functools import partial
from torch.nn.init import _calculate_correct_fan
import torch.utils.cpp_extension
def equalized_lr(module, name='weight', gain=2 ** 0.5, mode='fan_in',
lr_mul=1.0):
"""Equalized Learning Rate.
This trick is propose... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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 copy import deepcopy
from functools import partial
fr... | bladesaber/mmgeneration | EqualLinearActModule | false | 1,585 | [
"Apache-2.0"
] | 0 | 158b49f7efd8028f231f6e9ca758ae0e20dd72ae | https://github.com/bladesaber/mmgeneration/tree/158b49f7efd8028f231f6e9ca758ae0e20dd72ae |
MultiheadAttention | import torch
import torch.nn.functional as F
from torch import nn
import torch.utils.data
from torch.nn import Parameter
import torch.onnx.operators
import torch.optim
import torch.optim.lr_scheduler
class MultiheadAttention(nn.Module):
"""Multi-headed attention.
See "Attention Is All You Need" for more deta... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | edbltn/fairseq | MultiheadAttention | false | 12,347 | [
"BSD-3-Clause"
] | 0 | e4d25fd96f1e38190400dbbdbc77eeda71ac50a0 | https://github.com/edbltn/fairseq/tree/e4d25fd96f1e38190400dbbdbc77eeda71ac50a0 |
SimpleMulModule | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | andreas-hommel/glow | SimpleMulModule | false | 3,343 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e |
Time2Vec | # 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... | appleparan/mise.py | Time2Vec | false | 6,225 | [
"MIT"
] | 1 | a77ea51be37a739928600c66d168d69b78bc0c4b | https://github.com/appleparan/mise.py/tree/a77ea51be37a739928600c66d168d69b78bc0c4b |
WassersteinDiscriminatorLossCutMix | # 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... | ChristophReich1996/Multi-StyleGAN | WassersteinDiscriminatorLossCutMix | false | 17,102 | [
"MIT"
] | 7 | 988f2dfea85b3205126b40c61edfb28107eb3173 | https://github.com/ChristophReich1996/Multi-StyleGAN/tree/988f2dfea85b3205126b40c61edfb28107eb3173 |
Policy | # 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.... | Eunjnnn/ignite | Policy | false | 13,666 | [
"BSD-3-Clause"
] | 4,119 | 743089705b2b252aa5e2a0f310da3a8724d6711e | https://github.com/Eunjnnn/ignite/tree/743089705b2b252aa5e2a0f310da3a8724d6711e |
AdaptiveConcatPool2d | # 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
import torch.optim
assert_size_stride = torch._C._dynamo.guards.asse... | DrHB/PANDA-2nd-place-solution | AdaptiveConcatPool2d | false | 8,011 | [
"MIT"
] | 17 | 44ab72780f9e3594811f2a7520456de7a9e677db | https://github.com/DrHB/PANDA-2nd-place-solution/tree/44ab72780f9e3594811f2a7520456de7a9e677db |
SPHead | import torch
import torch.nn as nn
import torch.nn.functional as F
from inspect import isfunction
def conv1x1(in_channels, out_channels, stride=1, groups=1, bias=False):
"""
Convolution 1x1 layer.
Parameters:
----------
in_channels : int
Number of input channels.
out_channels : int
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | iofthetiger/pkuad | SPHead | false | 6,902 | [
"Apache-2.0"
] | 1 | 07496d108c614c84be028f344830becc9cac8fe5 | https://github.com/iofthetiger/pkuad/tree/07496d108c614c84be028f344830becc9cac8fe5 |
ScaleLayer | import torch
import torch.nn as nn
class ScaleLayer(nn.Module):
def __init__(self, channels, skip_dims=2):
super().__init__()
self.scale = nn.Parameter(torch.ones(channels, *([1] * skip_dims)))
def forward(self, net):
return net * self.scale
def extra_repr(self):
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
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | JGU-VC/activation-pattern-analysis | ScaleLayer | false | 589 | [
"MIT"
] | 0 | 14da42ad541ee4faf35d360a6e871fd44decd33d | https://github.com/JGU-VC/activation-pattern-analysis/tree/14da42ad541ee4faf35d360a6e871fd44decd33d |
BinaryFocalLossWithLogits | # 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... | NickleDave/kornia | BinaryFocalLossWithLogits | false | 2,675 | [
"ECL-2.0",
"Apache-2.0"
] | 0 | 5392651d0bc268da577fa0a49aa50f957289c7dd | https://github.com/NickleDave/kornia/tree/5392651d0bc268da577fa0a49aa50f957289c7dd |
TVLoss | import torch
from torch import nn
import torch.utils.data
from torchvision.transforms import *
class TVLoss(nn.Module):
def __init__(self, tv_loss_weight=1):
super(TVLoss, self).__init__()
self.tv_loss_weight = tv_loss_weight
def forward(self, x):
batch_size = x.size()[0]
h_x... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
import torch.utils.data
from torchvision.transforms import *
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | RyanMoussouni/iSeeBetter | TVLoss | false | 14,336 | [
"MIT"
] | 327 | af193ae0852f8e477fcd6875dce874eb5092a24a | https://github.com/RyanMoussouni/iSeeBetter/tree/af193ae0852f8e477fcd6875dce874eb5092a24a |
ContinuousCritic | import torch
import numpy as np
import torch.nn as nn
import torch.nn.functional as F
def hidden_init(layer):
fan_in = layer.weight.data.size()[0]
lim = 1.0 / np.sqrt(fan_in)
return -lim, lim
class ContinuousCritic(nn.Module):
"""ContinuousCritic network
:param state_size: the size of the s... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import numpy as np
import torch.nn as nn
assert_size_stride = torch._C._dynamo.g... | pjordan/rlcc | ContinuousCritic | false | 7,481 | [
"Apache-2.0"
] | 1 | e84b8b5c14680dbad2efae22756fb40606b2384a | https://github.com/pjordan/rlcc/tree/e84b8b5c14680dbad2efae22756fb40606b2384a |
UpsampleConv | import torch
import torch.nn as nn
class UpsampleConv(nn.Module):
def __init__(self, input_dim, output_dim, kernel_size=3, biases=True):
super().__init__()
self.conv = nn.Conv2d(input_dim, output_dim, kernel_size, stride=1,
padding=kernel_size // 2, bias=biases)
self.pixelshuf... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | DeepTitan/PNDM | UpsampleConv | false | 13,579 | [
"Apache-2.0"
] | 61 | 4037a4f40011c9a0d47b92303e64d47fcc7ed56a | https://github.com/DeepTitan/PNDM/tree/4037a4f40011c9a0d47b92303e64d47fcc7ed56a |
SmallBlock | # 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
from tor... | aalborov/openvino_training_extensions | SmallBlock | false | 6,049 | [
"Apache-2.0"
] | 1 | a0bb39424151a98e1ca80c4aa5c865636d401785 | https://github.com/aalborov/openvino_training_extensions/tree/a0bb39424151a98e1ca80c4aa5c865636d401785 |
Transition | import torch
import torch.nn as nn
class Transition(nn.Module):
def __init__(self, z_dim, hidden_dim):
super(Transition, self).__init__()
self.z_to_hidden = nn.Linear(z_dim, hidden_dim)
self.hidden_to_hidden = nn.Linear(hidden_dim, hidden_dim)
self.hidden_to_loc = nn.Linear(hidden... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | morimo27182/DeepKalmanFilter | Transition | false | 12,794 | [
"MIT"
] | 0 | 5d78d2e700fdc24f2a5cfa2877ecdcfc8218c8b7 | https://github.com/morimo27182/DeepKalmanFilter/tree/5d78d2e700fdc24f2a5cfa2877ecdcfc8218c8b7 |
Hill | import torch
import torch.nn as nn
class Hill(nn.Module):
def forward(self, p):
n = 2
return 1 / (1 + p ** n)
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
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | tianyu-lu/latent_ode | Hill | false | 13,031 | [
"MIT"
] | 0 | 1a9e9415eda1837ed78e50009752b90eda3ca0db | https://github.com/tianyu-lu/latent_ode/tree/1a9e9415eda1837ed78e50009752b90eda3ca0db |
Attention | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | wjurayj/commonsense-rl | Attention | false | 16,713 | [
"Apache-2.0"
] | 55 | fbbe4fa4a21865095783845fce2f0c4f4346e40f | https://github.com/wjurayj/commonsense-rl/tree/fbbe4fa4a21865095783845fce2f0c4f4346e40f |
extractNet_connected_v2 | import torch
import torch.nn as nn
import torch.nn.functional as F
class extractNet_connected_v2(nn.Module):
def __init__(self):
super(extractNet_connected_v2, self).__init__()
self.conv1 = nn.Conv2d(3, 16, 3, stride=2, padding=1)
self.conv2 = nn.Conv2d(16, 32, 3, stride=2, 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_... | MNRKhan/aps360-project | extractNet_connected_v2 | false | 17,702 | [
"MIT"
] | 3 | 1d91a4262c95cd6b5610aae16e1a30f2749a4373 | https://github.com/MNRKhan/aps360-project/tree/1d91a4262c95cd6b5610aae16e1a30f2749a4373 |
DiceLoss | import torch
import torch.nn as nn
import torch.nn.functional as F
class BinaryDiceLoss(nn.Module):
"""Dice loss of binary class
Args:
smooth: A float number to smooth loss, and avoid NaN error, default: 1
p: Denominator value: \\sum{x^p} + \\sum{y^p}, default: 2
predict: A tensor of s... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
... | aureliedj/OilseedRapeSegmentation | DiceLoss | false | 1,511 | [
"MIT"
] | 0 | 89056c3295b24354c32b6059854a3a60214c26cb | https://github.com/aureliedj/OilseedRapeSegmentation/tree/89056c3295b24354c32b6059854a3a60214c26cb |
SpanFCLayer | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
fr... | dumpmemory/Pytorch-NLU | SpanFCLayer | false | 15,277 | [
"Apache-2.0"
] | 115 | 864fb9acc7751fc51abd3d05d24b5a9a7eab7110 | https://github.com/dumpmemory/Pytorch-NLU/tree/864fb9acc7751fc51abd3d05d24b5a9a7eab7110 |
MADDPGCritic3 | # 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... | LuggiStruggi/MADDPG | MADDPGCritic3 | false | 9,298 | [
"MIT"
] | 0 | 20cbef7cf531f7573fa9cdf8742733becef1f827 | https://github.com/LuggiStruggi/MADDPG/tree/20cbef7cf531f7573fa9cdf8742733becef1f827 |
PriorDiscriminator | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import ... | neuralsyn/self-supervised-relational-reasoning | PriorDiscriminator | false | 16,164 | [
"MIT"
] | 130 | 6ecfafcf4a36c2eacef7ddd5bd1b23c28fbb14c8 | https://github.com/neuralsyn/self-supervised-relational-reasoning/tree/6ecfafcf4a36c2eacef7ddd5bd1b23c28fbb14c8 |
QuadrupletLoss | import torch
import torch.nn as nn
class QuadrupletLoss(torch.nn.Module):
"""
Quadruplet loss function.
Builds on the Triplet Loss and takes 4 data input: one anchor, one positive and two negative examples. The negative examples needs not to be matching the anchor, the positive and each other.
"""
... | 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... | VictorCallejas/FB-Similarity-Challenge | QuadrupletLoss | false | 2,932 | [
"MIT"
] | 0 | 0092071f29d5d8fab055d27a1e542e2e64e9cdab | https://github.com/VictorCallejas/FB-Similarity-Challenge/tree/0092071f29d5d8fab055d27a1e542e2e64e9cdab |
FeedForward | import torch
import torch.nn as nn
import torch.nn.functional as F
class FeedForward(nn.Module):
def __init__(self, d_model, d_ff=2048, dropout=0.1):
super().__init__()
self.linear_1 = nn.Linear(d_model, d_ff)
self.dropout = nn.Dropout(dropout)
self.linear_2 = nn.Linear(d_ff, d_mo... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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_... | and-smith/Vac-Scholar-Curb-GAN | FeedForward | false | 6,202 | [
"MIT"
] | 1 | 142bd70fdf0f1cbc4a1c20c5e58fa5b6a9dbe742 | https://github.com/and-smith/Vac-Scholar-Curb-GAN/tree/142bd70fdf0f1cbc4a1c20c5e58fa5b6a9dbe742 |
ConvPlus | # 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... | Syencil/mobile-yolov5-pruning-distillation | ConvPlus | false | 14,459 | [
"MIT"
] | 554 | 5d52454bb397ae49677b5da398e4192abc681325 | https://github.com/Syencil/mobile-yolov5-pruning-distillation/tree/5d52454bb397ae49677b5da398e4192abc681325 |
MlpBlock | import torch
from torch import nn
class MlpBlock(nn.Module):
def __init__(self, input_dim, mlp_dim=512):
super().__init__()
self.fc1 = nn.Linear(input_dim, mlp_dim)
self.gelu = nn.GELU()
self.fc2 = nn.Linear(mlp_dim, input_dim)
def forward(self, x):
return self.fc2(se... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch import n... | Nitin-Mane/External-Attention-pytorch | MlpBlock | false | 14,113 | [
"MIT"
] | 4,466 | 1ceda306c41063af11c956334747763444a4d83f | https://github.com/Nitin-Mane/External-Attention-pytorch/tree/1ceda306c41063af11c956334747763444a4d83f |
GlobalDiscriminator | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim
class GlobalDiscriminator(nn.Module):
def __init__(self, y_size, M_channels):
super().__init__()
self.c0 = nn.Conv2d(M_channels, 64, kernel_size=3)
self.c1 = nn.Conv2d(64, 32, kernel_size=3)
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
import torch.nn as nn
import ... | ValerioB88/self-supervised-relational-reasoning | GlobalDiscriminator | false | 9,690 | [
"MIT"
] | 0 | 12692b93d5c8dd3f56a31aa8b790366556e7a621 | https://github.com/ValerioB88/self-supervised-relational-reasoning/tree/12692b93d5c8dd3f56a31aa8b790366556e7a621 |
fully_connected | import torch
from torch import nn
class fully_connected(nn.Module):
def __init__(self, input_dims, hidden_dims, out_dims, bias=True, drop=True
):
super(fully_connected, self).__init__()
self.input_dims = input_dims
self.hidden_dims = hidden_dims
self.out_dims = out_dims
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_st... | cankucuksozen/COMP551--ComputerVision-with-DL | fully_connected | false | 9,845 | [
"MIT"
] | 0 | 44c4510a7163ad4bcf00ce0e9d112ae1ba59b143 | https://github.com/cankucuksozen/COMP551--ComputerVision-with-DL/tree/44c4510a7163ad4bcf00ce0e9d112ae1ba59b143 |
Rot180 | import torch
import torch.nn as nn
def rot180(input: 'torch.Tensor') ->torch.Tensor:
return torch.flip(input, [-2, -1])
class Rot180(nn.Module):
"""Rotate a tensor image or a batch of tensor images
180 degrees. Input must be a tensor of shape (C, H, W)
or a batch of tensors :math:`(*, C, H, W)`.
... | 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... | ChristophReich1996/kornia | Rot180 | false | 273 | [
"ECL-2.0",
"Apache-2.0"
] | 0 | 35f955b46e8015da1cb9faa28c6943ec2b09cc2a | https://github.com/ChristophReich1996/kornia/tree/35f955b46e8015da1cb9faa28c6943ec2b09cc2a |
GumbelMNACLayer | import collections
import torch
import torch.utils.data
def mnac(x, W, mode='prod'):
out_size, in_size = W.size()
x = x.view(x.size()[0], in_size, 1)
W = W.t().view(1, in_size, out_size)
if mode == 'prod':
return torch.prod(x * W + 1 - W, -2)
elif mode == 'exp-log':
return torch.ex... | import torch
from torch import device
import triton
import triton.language 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 collections
import torch.utils.data
asser... | wlm2019/Neural-Arithmetic-Units | GumbelMNACLayer | false | 16,719 | [
"MIT"
] | 147 | f9de9d004bb2dc2ee28577cd1760d0a00c185836 | https://github.com/wlm2019/Neural-Arithmetic-Units/tree/f9de9d004bb2dc2ee28577cd1760d0a00c185836 |
AdaIN | # 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.... | Andribi/pytorch_GAN_zoo | AdaIN | false | 4,862 | [
"BSD-3-Clause"
] | 1 | b37c7268cbd4ec7dc61ba65a3ccf11af71247597 | https://github.com/Andribi/pytorch_GAN_zoo/tree/b37c7268cbd4ec7dc61ba65a3ccf11af71247597 |
SmoothL1Loss | import torch
import torch.nn as nn
import torch.nn.functional as F
class SmoothL1Loss(nn.Module):
"""SmoothL1Loss loss.
Args:
use_target_weight (bool): Option to use weighted MSE loss.
Different joint types may have different target weights.
loss_weight (float): Weight of the loss... | 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
... | atoaiari/mmpose | SmoothL1Loss | false | 6,279 | [
"Apache-2.0"
] | 1 | 256a9117767008e8c33b4038a346aca12233e300 | https://github.com/atoaiari/mmpose/tree/256a9117767008e8c33b4038a346aca12233e300 |
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_... | Crawford-fang/ROS_pytorch_RL | QNetwork | false | 17,165 | [
"Apache-2.0"
] | 10 | 2d3476f15d51aa1f5b5ae9edc5d7f4c776e5de9f | https://github.com/Crawford-fang/ROS_pytorch_RL/tree/2d3476f15d51aa1f5b5ae9edc5d7f4c776e5de9f |
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
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | DuneeshaFernando/usad | Decoder | false | 11,388 | [
"BSD-3-Clause"
] | 0 | 22653a96deefe57013b1df57bb6dc316ef423c95 | https://github.com/DuneeshaFernando/usad/tree/22653a96deefe57013b1df57bb6dc316ef423c95 |
Encoder | import torch
from torch import nn
class Encoder(nn.Module):
def __init__(self, input_dim, hidden_dim, latent_dim):
super(Encoder, self).__init__()
self.FC_input = nn.Linear(input_dim, hidden_dim)
self.FC_mean = nn.Linear(hidden_dim, latent_dim)
self.FC_var = nn.Linear(hidden_dim, ... | import torch
from torch import device
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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... | Markussorensen/mlops_exercises | Encoder | false | 2,636 | [
"Apache-2.0"
] | 0 | 52a3198367b66bbe0a5cfdc7a9424789b03273db | https://github.com/Markussorensen/mlops_exercises/tree/52a3198367b66bbe0a5cfdc7a9424789b03273db |
BahdanauAttention | import math
import torch
import torch.nn as nn
import torch.nn.parallel
import torch.optim
import torch.utils.data
from torch.optim.lr_scheduler import *
import torch.optim.lr_scheduler
import torch.quantization
from torch.nn.parameter import Parameter
import torch.onnx
import torch.testing
class EltwiseAdd(nn.Module... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | Donfa1con/distiller | BahdanauAttention | false | 11,523 | [
"Apache-2.0"
] | 0 | 645ee41bfebc463523b228ff087e41619607d8b2 | https://github.com/Donfa1con/distiller/tree/645ee41bfebc463523b228ff087e41619607d8b2 |
PerceptionLoss | import torch
import torch.nn as nn
class PerceptionLoss(nn.Module):
def __init__(self):
super().__init__()
self.l1loss = nn.L1Loss()
def forward(self, results, targets):
loss = 0.0
for i, (ress, tars) in enumerate(zip(results, targets)):
loss += self.l1loss(ress, ... | 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... | ljrprocc/Motif-Removal | PerceptionLoss | false | 3,934 | [
"MIT"
] | 0 | 8979ca91398212248a2be61345c99bdec53ae37e | https://github.com/ljrprocc/Motif-Removal/tree/8979ca91398212248a2be61345c99bdec53ae37e |
PositionGenerator | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as ... | zhandand/MolRep | PositionGenerator | false | 4,655 | [
"MIT"
] | 0 | d81de22000f1245e1d9280af0cb329e745ce4bde | https://github.com/zhandand/MolRep/tree/d81de22000f1245e1d9280af0cb329e745ce4bde |
ResidualBlock | # 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 ... | generall/Torchlite | ResidualBlock | false | 6,743 | [
"MIT"
] | 1 | 2eb3e2a20b7619bd58b0b0fca120e2aefca0e79a | https://github.com/generall/Torchlite/tree/2eb3e2a20b7619bd58b0b0fca120e2aefca0e79a |
SuperSimpleSemSegNet | # 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.... | benkoger/kasanka | SuperSimpleSemSegNet | false | 12,146 | [
"Apache-2.0"
] | 0 | d5b1d32b7abf54845af0832da577137397089001 | https://github.com/benkoger/kasanka/tree/d5b1d32b7abf54845af0832da577137397089001 |
Fp32GroupNorm | # 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
import torch.utils.data
import torch.onnx.operators
impor... | CUMLSec/stateformer | Fp32GroupNorm | false | 7,902 | [
"MIT"
] | 41 | 87cb3c906c43fcff42b2ca820eb6e7fd918d0a1c | https://github.com/CUMLSec/stateformer/tree/87cb3c906c43fcff42b2ca820eb6e7fd918d0a1c |
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... | bielrv/open-solution-salt-identification-solution-6 | DiceLoss | false | 9,910 | [
"MIT"
] | 0 | 5993494aa2e446991c7f43e0cf1ec996620dfa80 | https://github.com/bielrv/open-solution-salt-identification-solution-6/tree/5993494aa2e446991c7f43e0cf1ec996620dfa80 |
Masked_MSE_Loss | import torch
import torch.nn as nn
def check_loss_input(im0, im1, w):
""" im0 is out and im1 is target and w is mask"""
assert list(im0.size())[2:] == list(im1.size())[2:], 'spatial dim mismatch'
if w is not None:
assert list(im0.size())[2:] == list(w.size())[2:
], 'spatial dim mismatc... | 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... | bg459/gan-ensembling-loader | Masked_MSE_Loss | false | 14,949 | [
"MIT"
] | 86 | 5ff6fae5fd5ced0a48ef2cd3dcb1d74aa1dadce8 | https://github.com/bg459/gan-ensembling-loader/tree/5ff6fae5fd5ced0a48ef2cd3dcb1d74aa1dadce8 |
Normalize | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_... | Alice1820/CMC | Normalize | false | 2,081 | [
"BSD-2-Clause"
] | 0 | 4f4354b3a33ec9c0784baefd7d1d9798e191ead5 | https://github.com/Alice1820/CMC/tree/4f4354b3a33ec9c0784baefd7d1d9798e191ead5 |
GroupNorm | # 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_... | E-Dreamer-LQ/Astronomical_Target_Detection | GroupNorm | false | 17,228 | [
"MIT"
] | 6 | 0c2d6c2e516ff1efa28d44582442123c3a03f079 | https://github.com/E-Dreamer-LQ/Astronomical_Target_Detection/tree/0c2d6c2e516ff1efa28d44582442123c3a03f079 |
MultiQueryAttention | # 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.... | STomoya/animeface | MultiQueryAttention | false | 14,371 | [
"MIT"
] | 61 | 37b3cd26097d7874559d4c152e41e5712b7a1a42 | https://github.com/STomoya/animeface/tree/37b3cd26097d7874559d4c152e41e5712b7a1a42 |
Norm | import torch
from torch import nn
class Norm(nn.Module):
def __init__(self, dim, eps=1e-06):
super().__init__()
self.size = dim
self.alpha = nn.Parameter(torch.ones(self.size))
self.bias = nn.Parameter(torch.zeros(self.size))
self.eps = eps
def forward(self, x):
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | abcdefg-dev-dd/asxdcvfg | Norm | false | 6,048 | [
"Apache-2.0"
] | 1 | 83421d4a133810968d6e04b256a9312895452941 | https://github.com/abcdefg-dev-dd/asxdcvfg/tree/83421d4a133810968d6e04b256a9312895452941 |
eca_block | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import math
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.a... | huuthieu/pytorch-yolov4-tiny | eca_block | false | 6,836 | [
"MIT"
] | 1 | fac82da75e161221af74b56242272a42cf64c17e | https://github.com/huuthieu/pytorch-yolov4-tiny/tree/fac82da75e161221af74b56242272a42cf64c17e |
CBAM_Module | # 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 typing import *
import t... | artyompal/kaggle_quick_draw | CBAM_Module | false | 3,136 | [
"Apache-2.0"
] | 0 | 227e228295479cd5e1af8dcde773f5efdacd62b8 | https://github.com/artyompal/kaggle_quick_draw/tree/227e228295479cd5e1af8dcde773f5efdacd62b8 |
Attention | import torch
from torch import nn
class Attention(nn.Module):
"""
Attention Network.
"""
def __init__(self, encoder_dim, decoder_dim, attention_dim):
"""
:param encoder_dim: feature size of encoded images
:param decoder_dim: size of decoder's RNN
:param attention_dim: ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | AshuAkshi0708/Attention_based_image_captioning | Attention | false | 8,858 | [
"Apache-2.0"
] | 0 | 33db9caa5763e687fa4f6b2b813f424d0d1fc00c | https://github.com/AshuAkshi0708/Attention_based_image_captioning/tree/33db9caa5763e687fa4f6b2b813f424d0d1fc00c |
Policy | import torch
import torch.nn as nn
class Policy(nn.Module):
def __init__(self, dim_inputs, dim_outputs):
super(Policy, self).__init__()
self.affine1 = nn.Linear(dim_inputs, 64)
self.affine2 = nn.Linear(64, 64)
self.action_mean = nn.Linear(64, dim_outputs)
self.action_mean.... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | Cranial-XIX/TRPO-and-its-variant | Policy | false | 324 | [
"MIT"
] | 0 | aa74102d013c998a666683667073c22aad8c5bce | https://github.com/Cranial-XIX/TRPO-and-its-variant/tree/aa74102d013c998a666683667073c22aad8c5bce |
TanH | import torch
import torch.nn as nn
class TanH(torch.nn.Module):
def __init__(self, a=1, max=10):
super().__init__()
self.a = a
self.max = max
def forward(self, v):
tanh = nn.Tanh()
act = tanh(self.a * v) * self.max
return act
def get_inputs():
return [to... | 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... | ElliotHYLee/MyPyTorchAPI | TanH | false | 11,389 | [
"MIT"
] | 0 | edb25b724372367e96e3bd2f420c023c4efbfcd7 | https://github.com/ElliotHYLee/MyPyTorchAPI/tree/edb25b724372367e96e3bd2f420c023c4efbfcd7 |
N_R_Align | import torch
import torch.nn as nn
class N_R_Align(torch.nn.Module):
def __init__(self, params):
super(N_R_Align, self).__init__()
self.params = params
self.cos_sim = nn.CosineSimilarity(dim=1, eps=1e-06)
def forward(self, e1, e2, n1, n2):
return self.params * torch.sigmoid(s... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
assert... | weihangzhang/EAkit | N_R_Align | false | 16,701 | [
"MIT"
] | 102 | dde8e914480cd1a3585271f70db11d567d9c2a04 | https://github.com/weihangzhang/EAkit/tree/dde8e914480cd1a3585271f70db11d567d9c2a04 |
Hidden2Discrete | import torch
import torch.nn as nn
import torch.nn.functional as F
class Hidden2Discrete(nn.Module):
def __init__(self, input_size, y_size, k_size, is_lstm=False, has_bias=True
):
super(Hidden2Discrete, self).__init__()
self.y_size = y_size
self.k_size = k_size
latent_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.... | Jupaoqq/Jupaoqq_LaRL | Hidden2Discrete | false | 684 | [
"Apache-2.0"
] | 0 | ae64adda5627987d71f2948f499daa11e9f309ad | https://github.com/Jupaoqq/Jupaoqq_LaRL/tree/ae64adda5627987d71f2948f499daa11e9f309ad |
MultiHeadSelfAttention | from torch.nn import Module
import torch
from torch.nn import Dropout
from torch.nn import Linear
def masked_softmax(vector: 'torch.Tensor', mask: 'torch.Tensor', dim: 'int'=-1
) ->torch.Tensor:
"""
``torch.nn.functional.softmax(vector)`` does not work if some elements of ``vector`` should be
masked. ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | jsonW0/StrokeOrderEmbeddings | MultiHeadSelfAttention | false | 3,786 | [
"Apache-2.0"
] | 0 | aa73b216a118de2efba1d299b96990ba9244fa3f | https://github.com/jsonW0/StrokeOrderEmbeddings/tree/aa73b216a118de2efba1d299b96990ba9244fa3f |
Attention | import math
import torch
from torch import nn
from torch.functional import F
import torch.nn.functional as F
class Attention(nn.Module):
"""
Scaled Dot-Product Attention proposed in "Attention Is All You Need"
Compute the dot products of the query with all keys, divide each by sqrt(dim),
and apply a 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.... | chentuochao/Learn_attention_and_transformer | Attention | false | 3,286 | [
"MIT"
] | 0 | 3934ea3b700c6b8c0709057700372c531f43345f | https://github.com/chentuochao/Learn_attention_and_transformer/tree/3934ea3b700c6b8c0709057700372c531f43345f |
QueryEncoder | # 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... | huyi-work/UnifiedEmbeddingModel | QueryEncoder | false | 15,561 | [
"MIT"
] | 50 | 85c8442122213d1f1b1027df0fd34f428259aaa4 | https://github.com/huyi-work/UnifiedEmbeddingModel/tree/85c8442122213d1f1b1027df0fd34f428259aaa4 |
VAE | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.data
class VAE(nn.Module):
def __init__(self, z_dim):
super().__init__()
self.z_dim = z_dim
self.fc1 = nn.Linear(784, 500)
self.fc21 = nn.Linear(500, self.z_dim)
self.fc22 = nn.Linear(500... | import torch
from torch import device
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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... | zyzisyz/torch-practice | VAE | false | 4,684 | [
"Apache-2.0"
] | 0 | 92f2b7f1a01bbabd1a2cf2a4dd9099a0eeb9cf00 | https://github.com/zyzisyz/torch-practice/tree/92f2b7f1a01bbabd1a2cf2a4dd9099a0eeb9cf00 |
GPool | # 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.... | RRemixx/DMRDenoise | GPool | false | 14,278 | [
"MIT"
] | 79 | 026d25f9eaf98fdfd85a67caeb9b49cab71148e9 | https://github.com/RRemixx/DMRDenoise/tree/026d25f9eaf98fdfd85a67caeb9b49cab71148e9 |
softmax_SR | import torch
import torch.nn as nn
import torch.nn.functional as F
class softmax_SR(nn.Module):
def __init__(self):
super().__init__()
def forward(self, x):
sr = F.softmax(x.reshape(x.size(0), x.size(1), -1), dim=2)
sr = sr.transpose(1, 2)
return sr
def get_inputs():
re... | 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
... | CILAB-MA/Machine_ToM | softmax_SR | false | 7,843 | [
"MIT"
] | 13 | 8c168ee31cc95a7f57998e8907273799533fe04f | https://github.com/CILAB-MA/Machine_ToM/tree/8c168ee31cc95a7f57998e8907273799533fe04f |
Mean | from torch.nn import Module
import torch
import torch.utils.data
class Mean(Module):
def __init__(self, dim, keep_dim=False):
super(Mean, self).__init__()
self.dim = dim
self.keep_dim = keep_dim
def forward(self, input):
return input.mean(self.dim, self.keep_dim)
def get_in... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch.nn import Module
import torch.utils.data
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = tor... | RL-WWW/ISST | Mean | false | 17,822 | [
"BSD-3-Clause"
] | 5 | 42b656686fa9660794007a0bc00a7177937410e9 | https://github.com/RL-WWW/ISST/tree/42b656686fa9660794007a0bc00a7177937410e9 |
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._inductor.runtime.... | andyqmongo/InstAParam | ResBlock | false | 18,338 | [
"MIT"
] | 3 | 00494d5367ec32b4ce90d01778cba9d4f1166833 | https://github.com/andyqmongo/InstAParam/tree/00494d5367ec32b4ce90d01778cba9d4f1166833 |
OutputTransition | import torch
import torch.nn as nn
class OutputTransition(nn.Module):
def __init__(self, out_ch):
super(OutputTransition, self).__init__()
self.up_conv = nn.Conv2d(64, out_ch, 1)
def forward(self, x):
out = self.up_conv(x)
return out
def get_inputs():
return [torch.rand... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | chenkarl/kits19 | OutputTransition | false | 12,213 | [
"MIT"
] | 0 | 7fa912320a23c6bf649566a1509aa493656b24c1 | https://github.com/chenkarl/kits19/tree/7fa912320a23c6bf649566a1509aa493656b24c1 |
ScaledDotProductAttention | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | Yottaxx/T-LSTM | ScaledDotProductAttention | false | 18,157 | [
"MIT"
] | 9 | 92618d8c3ee2418b194a2e1592512548da955b77 | https://github.com/Yottaxx/T-LSTM/tree/92618d8c3ee2418b194a2e1592512548da955b77 |
Qux | import torch
import torch.jit
import torch.onnx
import torch.nn
class Qux(torch.nn.Module):
def __init__(self, x):
super(Qux, self).__init__()
self.x = x
def forward(self, a, b):
return a - b - self.x
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])]... | 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 | Qux | false | 12,563 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 |
ATLoss | import torch
import torch.nn as nn
import torch.nn.functional as F
class ATLoss(nn.Module):
"""
Module for calculating AT Loss
:param norm_type (int): Norm to be used in calculating loss
"""
def __init__(self, norm_type=2):
super(ATLoss, self).__init__()
self.p = norm_type
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 import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
import... | NeelayS/KD_Lib | ATLoss | false | 2,679 | [
"MIT"
] | 0 | c3f8c7cef76772d14862260e61c1d1c52c58f58e | https://github.com/NeelayS/KD_Lib/tree/c3f8c7cef76772d14862260e61c1d1c52c58f58e |
GEGLU | # 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... | JaireYu/perceiver-pytorch | GEGLU | false | 2,391 | [
"MIT"
] | 0 | 23edd66a057bb0a6fc15126461b4409a522ca09e | https://github.com/JaireYu/perceiver-pytorch/tree/23edd66a057bb0a6fc15126461b4409a522ca09e |
NsSymKlCriterion | # 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.functi... | chunhuililili/mt_dnn | NsSymKlCriterion | false | 10,212 | [
"MIT"
] | 0 | 4c6efaf21724c7b8103a05e46b5b44d7b246225e | https://github.com/chunhuililili/mt_dnn/tree/4c6efaf21724c7b8103a05e46b5b44d7b246225e |
ConvTranspose2dBlock | # 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... | ast0414/semit | ConvTranspose2dBlock | false | 3,141 | [
"MIT"
] | 0 | c221222ba06f14611e3d030969cdb9f7c17ff98f | https://github.com/ast0414/semit/tree/c221222ba06f14611e3d030969cdb9f7c17ff98f |
Upsample | import torch
import torch.nn as nn
class Upsample(nn.Module):
def __init__(self, in_channels, out_channels, scale_factor=2):
super().__init__()
self.trilinear = nn.Upsample(scale_factor=scale_factor)
self.conv1 = nn.Conv3d(in_channels, out_channels, kernel_size=1)
self.bn1 = nn.In... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | BCV-Uniandes/SAMA | Upsample | false | 124 | [
"BSD-3-Clause"
] | 0 | 4c732c71486af17efed17480e363298cb65c851f | https://github.com/BCV-Uniandes/SAMA/tree/4c732c71486af17efed17480e363298cb65c851f |
LayerNorm | import torch
import torch.nn as nn
class LayerNorm(nn.Module):
def __init__(self, *args):
super().__init__()
def forward(self, activation):
if len(activation.size()) == 3:
ori_size = activation.size()
activation = activation.view(-1, activation.size(-1))
else:... | 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_... | BaiYuhaoSpiceeYJ/SEGAN_denoise | LayerNorm | false | 2,011 | [
"MIT"
] | 0 | 5bf65ae72b9f0a996ae338c53c68c4967e08cd59 | https://github.com/BaiYuhaoSpiceeYJ/SEGAN_denoise/tree/5bf65ae72b9f0a996ae338c53c68c4967e08cd59 |
SimpleSinModule | # 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.jit
import torch.onnx
import torch.nn
assert_size_stride = t... | opti-mix/glow | SimpleSinModule | false | 7,418 | [
"Apache-2.0"
] | 1 | 4ba074df5da9822986a23a6679ab592c22660f6d | https://github.com/opti-mix/glow/tree/4ba074df5da9822986a23a6679ab592c22660f6d |
FFN | import torch
from torch import nn
import torch.nn.functional as F
class FFN(nn.Module):
def __init__(self, d):
super().__init__()
self.fc_1 = nn.Linear(2 * d, 4 * d)
self.drop = nn.Dropout(0.1)
self.fc_2 = nn.Linear(4 * d, d)
def forward(self, x_1, x_2):
x = self.fc_1... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
assert_s... | VKCOM/TopicsDataset | FFN | false | 5,924 | [
"MIT"
] | 1 | 149919321ba61a8f17b22f62f60f4aedec43d72b | https://github.com/VKCOM/TopicsDataset/tree/149919321ba61a8f17b22f62f60f4aedec43d72b |
Normalize | # 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... | JJuOn/Few-shot_Class_Incremental_Learning | Normalize | false | 5,362 | [
"MIT"
] | 1 | a2178051a6fefcd73b60f5e4236116bf828a801c | https://github.com/JJuOn/Few-shot_Class_Incremental_Learning/tree/a2178051a6fefcd73b60f5e4236116bf828a801c |
hsigmoid | # 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... | Ecalose/dddd_trainer | hsigmoid | false | 13,620 | [
"Apache-2.0"
] | 80 | ef0c6b271cc2898403375f53f813481ffbf6b02c | https://github.com/Ecalose/dddd_trainer/tree/ef0c6b271cc2898403375f53f813481ffbf6b02c |
Generator | # 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.... | GeorgeKostenkov/ImageCaptioning.pytorch | Generator | false | 11,443 | [
"MIT"
] | 0 | 8f17433fdaba2f89774e45ad5a3a88b880932ee6 | https://github.com/GeorgeKostenkov/ImageCaptioning.pytorch/tree/8f17433fdaba2f89774e45ad5a3a88b880932ee6 |
group | 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_... | aryachiranjeev/Dependable-AI | group | false | 9,772 | [
"MIT"
] | 0 | 750570572c1baaa2590a89c0982e2f71b15b48b9 | https://github.com/aryachiranjeev/Dependable-AI/tree/750570572c1baaa2590a89c0982e2f71b15b48b9 |
Attention | from _paritybench_helpers import _mock_config
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import *
class Attention(nn.Module):
def __init__(self, opt):
super(Attention, self).__init__()
self.rnn_size = opt.rnn_size
self.att_hid_size = opt.att_hid... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | liuqihan/NeuralBabyTalk | Attention | false | 7,108 | [
"MIT"
] | 1 | 4a2ef428ec9f251a1eb898cc0c828a6ef1c55e69 | https://github.com/liuqihan/NeuralBabyTalk/tree/4a2ef428ec9f251a1eb898cc0c828a6ef1c55e69 |
ConvModel | # 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.... | learniotai/iotai-sensor-classifications | ConvModel | false | 3,894 | [
"Apache-2.0"
] | 0 | ba2527cb317afa30a5c495d1cddc16f7dc2936ed | https://github.com/learniotai/iotai-sensor-classifications/tree/ba2527cb317afa30a5c495d1cddc16f7dc2936ed |
SpatialGate | # 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.... | lingtengqiu/LearnableTreeFilterV2 | SpatialGate | false | 7,095 | [
"Apache-2.0"
] | 1 | 3814a5a84c0a5c33d6538749eaf5aed4827366de | https://github.com/lingtengqiu/LearnableTreeFilterV2/tree/3814a5a84c0a5c33d6538749eaf5aed4827366de |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.