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 |
|---|---|---|---|---|---|---|---|---|---|---|
PolicyNet | import torch
import torch.nn as nn
import torch.nn.functional as F
class PolicyNet(nn.Module):
def __init__(self, state_dim, actions_dim, hidden_dim=64):
super(PolicyNet, self).__init__()
self.input_layer = nn.Linear(state_dim, hidden_dim)
self.hidden = nn.Linear(hidden_dim, actions_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
import torch.nn as nn
assert_... | johntiger1/vaal_querying | PolicyNet | false | 6,981 | [
"BSD-2-Clause"
] | 1 | c20da3b0b5ca9f25334523f831d0ba8a11f710ca | https://github.com/johntiger1/vaal_querying/tree/c20da3b0b5ca9f25334523f831d0ba8a11f710ca |
mlp | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | KwanHoo/coding-playgroung | mlp | false | 2,487 | [
"MIT"
] | 0 | 443c0ccd2ca8fb7b031a87837a4e6f8d0be2560d | https://github.com/KwanHoo/coding-playgroung/tree/443c0ccd2ca8fb7b031a87837a4e6f8d0be2560d |
make_dense | # 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_... | BJTU-MIMO/Channel_estimation_MRDN | make_dense | false | 127 | [
"MIT"
] | 0 | f41972998a5403c901bc3e5d68d4acd05e9a7f6c | https://github.com/BJTU-MIMO/Channel_estimation_MRDN/tree/f41972998a5403c901bc3e5d68d4acd05e9a7f6c |
BinaryLoss | # 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 func... | puzzledsky/mmsegmentation-lesion | BinaryLoss | false | 10,656 | [
"Apache-2.0"
] | 0 | 522efceab6735dfec13acf6f45dc6bfdb35cfd60 | https://github.com/puzzledsky/mmsegmentation-lesion/tree/522efceab6735dfec13acf6f45dc6bfdb35cfd60 |
SigmaL1SmoothLoss | # 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... | bene401/Practical-Deep-Learning-for-Coders-2.0 | SigmaL1SmoothLoss | false | 3,225 | [
"MIT"
] | 0 | c648afc6113cfca2f16c50cc13d197be0306ff98 | https://github.com/bene401/Practical-Deep-Learning-for-Coders-2.0/tree/c648afc6113cfca2f16c50cc13d197be0306ff98 |
CosineAttention | # 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 | CosineAttention | false | 8,723 | [
"MIT"
] | 27 | b9e037ebd6e1d56500ffb60c6030013982c17ded | https://github.com/ROBINADC/BiGRU-CRF-with-Attention-for-NER/tree/b9e037ebd6e1d56500ffb60c6030013982c17ded |
OnnxGeneralLinear | import torch
from torch import nn
import torch.nn.functional as F
class OnnxToTorchModule:
"""
Marker class for onnx2torch modules.
"""
pass
class OnnxGeneralLinear(nn.Linear, OnnxToTorchModule):
"""General Linear layer with functionality of ONNX GEMM node.
For additional info https://githu... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import 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... | ENOT-AutoDL/onnx2torch | OnnxGeneralLinear | false | 13,632 | [
"Apache-2.0"
] | 144 | 2391987b3349bed1670ac3c1bc9062a37323abe3 | https://github.com/ENOT-AutoDL/onnx2torch/tree/2391987b3349bed1670ac3c1bc9062a37323abe3 |
UNet | import torch
import torch.nn as nn
import torch.nn.functional as F
class DoubleConv(nn.Module):
"""
Double 3x3 conv + relu
"""
def __init__(self, in_channels, out_channels):
super(DoubleConv, self).__init__()
self.conv_1 = nn.Conv2d(in_channels, out_channels, 3)
self.conv_2 = ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import ... | Aoi-hosizora/UNet-pytorch | UNet | false | 9,244 | [
"MIT"
] | 0 | 96951d5d1fdc6c6266a11e1bd97fbf72010bc87d | https://github.com/Aoi-hosizora/UNet-pytorch/tree/96951d5d1fdc6c6266a11e1bd97fbf72010bc87d |
ElemAffineNetwork | import torch
import torch.nn as nn
class ElemAffineNetwork(nn.Module):
"""Network for parameterizing affine transformation"""
def __init__(self, input_dim):
super(ElemAffineNetwork, self).__init__()
self.input_dim = input_dim
self.fc1 = nn.Linear(input_dim, 2000)
self.relu1 = ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | chawins/adv-exp | ElemAffineNetwork | false | 6,450 | [
"MIT"
] | 1 | 5423e135c5599e4ec2bf90372916d8d05c89f285 | https://github.com/chawins/adv-exp/tree/5423e135c5599e4ec2bf90372916d8d05c89f285 |
GatedLinearUnit | # 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
from torchvision import models as models
import torch.onnx
... | krodyush/training_extensions | GatedLinearUnit | false | 10,975 | [
"Apache-2.0"
] | 0 | 542f4004dfbc6fc62a622065367ba4f85a703dd3 | https://github.com/krodyush/training_extensions/tree/542f4004dfbc6fc62a622065367ba4f85a703dd3 |
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_... | vghost2008/C-3-Framework | BasicDeconv | false | 11,094 | [
"MIT"
] | 0 | dc6f1f67e403aff4dbb60f8ed06461c843407501 | https://github.com/vghost2008/C-3-Framework/tree/dc6f1f67e403aff4dbb60f8ed06461c843407501 |
Pad_Pool2d | # 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... | Hullimulli/EEGEyeNet | Pad_Pool2d | false | 549 | [
"MIT"
] | 0 | 677a791b39800f44dc254553b16ee2f92e62c423 | https://github.com/Hullimulli/EEGEyeNet/tree/677a791b39800f44dc254553b16ee2f92e62c423 |
Upsampler | # 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
from torchvision.transforms import *
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch.... | DengZeshuai/DBPN-Pytorch | Upsampler | false | 2,563 | [
"MIT"
] | 0 | a90d241a1c4b07830c6d812ad8389d13e8cf05d1 | https://github.com/DengZeshuai/DBPN-Pytorch/tree/a90d241a1c4b07830c6d812ad8389d13e8cf05d1 |
Actor | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.data
import torch.nn.parallel
class Actor(nn.Module):
def __init__(self, state_dim, action_dim, max_action):
super(Actor, self).__init__()
self.l1 = nn.Linear(state_dim, 400)
self.l2 = nn.Linear(400, 300... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | Manojbhat09/Sane-annotation-shape-complete | Actor | false | 17,703 | [
"Apache-2.0"
] | 9 | 03b298b2c0a187be979ff31ad2a39238b72a6d78 | https://github.com/Manojbhat09/Sane-annotation-shape-complete/tree/03b298b2c0a187be979ff31ad2a39238b72a6d78 |
SSSNET | import torch
from typing import Optional
from typing import Tuple
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.parameter import Parameter
from typing import Union
class SIMPA(nn.Module):
"""The signed mixed-path aggregation model.
Args:
hop (int): Number of hops to consider.
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | SherylHYX/SSSNET_Signed_Clustering | SSSNET | false | 17,925 | [
"MIT"
] | 5 | 85736c18e86b396d64177d22b8c7f9859dfd794c | https://github.com/SherylHYX/SSSNET_Signed_Clustering/tree/85736c18e86b396d64177d22b8c7f9859dfd794c |
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... | sutkarsh/EDVR | CharbonnierLoss | false | 4,401 | [
"Apache-2.0"
] | 0 | cd9f2d46edbb00333d8ffb31aebc52cfbda4b6e3 | https://github.com/sutkarsh/EDVR/tree/cd9f2d46edbb00333d8ffb31aebc52cfbda4b6e3 |
AlterCoAttn | # 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.... | HCY123902/visdial-gnn | AlterCoAttn | false | 8,229 | [
"MIT"
] | 44 | c38090c672cdf04a4fabe139f96d944fd82cb123 | https://github.com/HCY123902/visdial-gnn/tree/c38090c672cdf04a4fabe139f96d944fd82cb123 |
SineActivation | import torch
import torch.nn as nn
def t2v(tau, f, weight_linear, bias_linear, weight_periodic, bias_periodic,
arg=None):
if arg:
v1 = f(torch.matmul(tau, weight_linear) + bias_linear, arg)
else:
v1 = f(torch.matmul(tau, weight_linear) + bias_linear)
v2 = torch.matmul(tau, weight_perio... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | sungreong/PyTimeSeries | SineActivation | false | 4,396 | [
"MIT"
] | 0 | d5321c1226fc7fb6a45fec7009843894be417594 | https://github.com/sungreong/PyTimeSeries/tree/d5321c1226fc7fb6a45fec7009843894be417594 |
D_net_gauss | # 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.... | arnaghosh/VoxNet | D_net_gauss | false | 1,482 | [
"MIT"
] | 0 | 45fe8e9ff28b02f21b8991486317ff61cfa5d553 | https://github.com/arnaghosh/VoxNet/tree/45fe8e9ff28b02f21b8991486317ff61cfa5d553 |
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... | Alibaba-MIIL/HeadSharingKD | Normalize | false | 7,663 | [
"BSD-2-Clause"
] | 15 | 8e2738bf069c7d12ec933f9b9107f267f7b6603a | https://github.com/Alibaba-MIIL/HeadSharingKD/tree/8e2738bf069c7d12ec933f9b9107f267f7b6603a |
MaskedHuberLoss | import torch
import torch.nn as nn
class MaskedHuberLoss(torch.nn.Module):
def __init__(self):
super(MaskedHuberLoss, self).__init__()
def forward(self, output, labels, mask):
lossHuber = nn.SmoothL1Loss(reduction='none')
l = lossHuber(output * mask, labels * mask)
l = l.sum(... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_str... | gabrieleangeletti/GndNet | MaskedHuberLoss | false | 6,720 | [
"MIT"
] | 1 | 323af65c9c16a725805f480ff799936b77b04d53 | https://github.com/gabrieleangeletti/GndNet/tree/323af65c9c16a725805f480ff799936b77b04d53 |
WeightedL2WithSigmaLoss | # 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 math
import numpy as np
import torch.nn as nn
import torch.utils.data
im... | LaudateCorpus1/LIGA-Stereo | WeightedL2WithSigmaLoss | false | 13,989 | [
"Apache-2.0"
] | 56 | aee3731a24a0ab1667e633e520cc89be2f135272 | https://github.com/LaudateCorpus1/LIGA-Stereo/tree/aee3731a24a0ab1667e633e520cc89be2f135272 |
BatchNormEdge | # 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_... | BrandonKates/graph-convnet-tsp | BatchNormEdge | false | 11,260 | [
"MIT"
] | 0 | f6e17e84311c23fd5cab041b7a27b4e0636c44f8 | https://github.com/BrandonKates/graph-convnet-tsp/tree/f6e17e84311c23fd5cab041b7a27b4e0636c44f8 |
Sampling | from _paritybench_helpers import _mock_config
import torch
from torch import nn
class Sampling(nn.Module):
def __init__(self, args, seq_len):
super(Sampling, self).__init__()
self.conv = nn.Conv1d(seq_len, args.att_out_channel, kernel_size=1)
def forward(self, x):
"""
:param ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_st... | ICLab4DL/AWN | Sampling | false | 1,890 | [
"MIT"
] | 0 | 48d6edd85eabd77e9bb410dc5f31f8f937c9a857 | https://github.com/ICLab4DL/AWN/tree/48d6edd85eabd77e9bb410dc5f31f8f937c9a857 |
SAB | # 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.... | ernoult/set_transformer | SAB | false | 12,358 | [
"MIT"
] | 0 | 4b380106e1f43b7eb6315624c57d4d1d38737b78 | https://github.com/ernoult/set_transformer/tree/4b380106e1f43b7eb6315624c57d4d1d38737b78 |
FC2 | import torch
import torch.nn as nn
import torch.nn.functional as F
class FC2(nn.Module):
""" Neural network definition
"""
def __init__(self, size):
super(FC2, self).__init__()
self.size = size
self.fc1 = nn.Linear(in_features=self.size ** 2, out_features=128)
self.fc2 = n... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | Thibaud-Ardoin/Dial-a-Ride | FC2 | false | 5,888 | [
"MIT"
] | 1 | 7d9b3cd904d3194dccad31fec2533e2cf58cad0c | https://github.com/Thibaud-Ardoin/Dial-a-Ride/tree/7d9b3cd904d3194dccad31fec2533e2cf58cad0c |
PSNRLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
from t... | alopezgit/kornia | PSNRLoss | false | 1,414 | [
"ECL-2.0",
"Apache-2.0"
] | 0 | 7bf47ae472012d2d6cf24463a76e8089daa65d0b | https://github.com/alopezgit/kornia/tree/7bf47ae472012d2d6cf24463a76e8089daa65d0b |
HighwayNetwork | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
import t... | Rexiome/NATSpeech | HighwayNetwork | false | 14,294 | [
"MIT"
] | 561 | 238165e8cd430531b69c484cabb032c1313ee73b | https://github.com/Rexiome/NATSpeech/tree/238165e8cd430531b69c484cabb032c1313ee73b |
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.... | LindgeW/DomainAdaption4DependencyParsing | DotProductAttention | false | 5,527 | [
"Apache-2.0"
] | 1 | 5de136a37d8fe730e4235ed95bf923763fe21ea6 | https://github.com/LindgeW/DomainAdaption4DependencyParsing/tree/5de136a37d8fe730e4235ed95bf923763fe21ea6 |
UpsamplingBlock | import torch
import torch.utils.data
import torch
import torch.nn as nn
class UpsamplingBlock(nn.Module):
def __init__(self, input_nc, output_nc, kernel, stride, pad):
"""
Single block of upsampling operation
Input:
- int input_nc : Input number of channels
- int outpu... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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... | andrewjong/Guided-pix2pix | UpsamplingBlock | false | 6,212 | [
"BSD-3-Clause"
] | 1 | 0c6a7b5fde50ad7ea4fb20a6136fc6cb6c4e5542 | https://github.com/andrewjong/Guided-pix2pix/tree/0c6a7b5fde50ad7ea4fb20a6136fc6cb6c4e5542 |
GeneralAttention | # 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.... | ROBINADC/BiGRU-CRF-with-Attention-for-NER | GeneralAttention | false | 8,707 | [
"MIT"
] | 27 | b9e037ebd6e1d56500ffb60c6030013982c17ded | https://github.com/ROBINADC/BiGRU-CRF-with-Attention-for-NER/tree/b9e037ebd6e1d56500ffb60c6030013982c17ded |
BasicBlock | import torch
from torch import nn
class BasicBlock(nn.Module):
"""Basic block"""
def __init__(self, inplanes, outplanes, kernel_size=4, stride=2,
padding=1, norm=True):
super().__init__()
self.conv = nn.Conv2d(inplanes, outplanes, kernel_size, stride, padding
)
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.triton_helpers import libdevice
from torch import n... | akanametov/CycleGAN | BasicBlock | false | 6,134 | [
"MIT"
] | 1 | a61e76134cfdda43306e326e3dbba38d8cb21163 | https://github.com/akanametov/CycleGAN/tree/a61e76134cfdda43306e326e3dbba38d8cb21163 |
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.... | czhao39/NeuralCodeSum | PositionwiseFeedForward | false | 10,021 | [
"MIT"
] | 0 | d06f8165a8af993239ec6d796bac1d378aa8be91 | https://github.com/czhao39/NeuralCodeSum/tree/d06f8165a8af993239ec6d796bac1d378aa8be91 |
HardSigmoid | import torch
import torch.nn as nn
class HardSigmoid(nn.Module):
def __init__(self):
super(HardSigmoid, self).__init__()
self.act = nn.Hardtanh()
def forward(self, x):
return (self.act(x) + 1.0) / 2.0
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
emp... | Chandrima-04/gimmebio | HardSigmoid | false | 17,077 | [
"MIT"
] | 3 | cb3e66380006d5c5c00ff70bfb87317dd252c312 | https://github.com/Chandrima-04/gimmebio/tree/cb3e66380006d5c5c00ff70bfb87317dd252c312 |
ActorNet | import torch
import numpy as np
import torch.nn as nn
import torch.nn.functional as F
class ActorNet(nn.Module):
def __init__(self, s_dim, a_dim):
super(ActorNet, self).__init__()
self.fc1 = nn.Linear(s_dim, 30)
self.fc1.weight.data.normal_(0, 0.1)
self.out = nn.Linear(30, a_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.... | CuteWans/sheep-vs-dog | ActorNet | false | 8,962 | [
"MIT"
] | 0 | 4d1542eaa22fd618976757704e584d2c62db5b21 | https://github.com/CuteWans/sheep-vs-dog/tree/4d1542eaa22fd618976757704e584d2c62db5b21 |
KeypointRCNNPredictorNoUpscale | # 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.quantization.quantize_fx
import torch.utils.d... | petoor/d2go | KeypointRCNNPredictorNoUpscale | false | 10,666 | [
"Apache-2.0"
] | 0 | d0a20d048738f447945d7c948a8d3019a110d2e8 | https://github.com/petoor/d2go/tree/d0a20d048738f447945d7c948a8d3019a110d2e8 |
InvertibleLinearFlow | import torch
from typing import Dict
from typing import Tuple
import torch.nn as nn
from torch.nn import Parameter
import torch.nn.functional as F
class Flow(nn.Module):
"""
Normalizing Flow base class
"""
_registry = dict()
def __init__(self, inverse):
super(Flow, self).__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 typing import Dict
from typing import Tuple
import torch.nn as nn
from torc... | juheeuu/flowseq | InvertibleLinearFlow | false | 12,649 | [
"Apache-2.0"
] | 0 | e6e50406656335ff7a2f9ed4bd81d7cc7d1195fb | https://github.com/juheeuu/flowseq/tree/e6e50406656335ff7a2f9ed4bd81d7cc7d1195fb |
LayerNormGRUCell | # 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
assert_... | NeuroAI-PI/AI-Grand-Challenge-2021 | LayerNormGRUCell | false | 8,591 | [
"MIT"
] | 21 | aed2c31ce90cafe15895a11fadb9d88abd0c8765 | https://github.com/NeuroAI-PI/AI-Grand-Challenge-2021/tree/aed2c31ce90cafe15895a11fadb9d88abd0c8765 |
LRN | import torch
import torch.nn as nn
import torch.utils.data
class LRN(nn.Module):
def __init__(self, local_size=1, alpha=1.0, beta=0.75, ACROSS_CHANNELS=True
):
super(LRN, self).__init__()
self.ACROSS_CHANNELS = ACROSS_CHANNELS
if ACROSS_CHANNELS:
self.average = nn.AvgP... | 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
assert_size_stride = torch._C._dy... | Richard456/Dann | LRN | false | 5,764 | [
"MIT"
] | 1 | 1971cf1a7b9ecadc17932a8ecb3f0c34609751a3 | https://github.com/Richard456/Dann/tree/1971cf1a7b9ecadc17932a8ecb3f0c34609751a3 |
SimpleClampModel | # 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.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._C._dynamo.... | andreas-hommel/glow | SimpleClampModel | false | 3,329 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e |
MlpNet | import torch
import numpy as np
import torch.nn as nn
import torch.nn.functional as F
class MlpNet(nn.Module):
"""Implements a simple fully connected mlp network."""
def __init__(self, sa_dim, n_agents, hidden_size, agent_id=0,
agent_shuffle='none'):
super(MlpNet, self).__init__()
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_... | HAXRD/PIC | MlpNet | false | 8,188 | [
"MIT"
] | 28 | 658b4dd6b01e64413d5f8f0107d9167f1bd78546 | https://github.com/HAXRD/PIC/tree/658b4dd6b01e64413d5f8f0107d9167f1bd78546 |
AlgebraicLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice
assert_size_stride = torch._... | tuantle/regression-losses-pytorch | AlgebraicLoss | false | 16,630 | [
"MIT"
] | 82 | 2893f4439ada5df239e3afd0ec7e781dd61403e9 | https://github.com/tuantle/regression-losses-pytorch/tree/2893f4439ada5df239e3afd0ec7e781dd61403e9 |
Mask | import torch
import torch.nn as nn
import torch.utils.data
class Mask(nn.Module):
def forward(self, seq, mask):
seq_mask = torch.unsqueeze(mask, 2)
seq_mask = torch.transpose(seq_mask.repeat(1, 1, seq.size()[1]), 1, 2)
return seq.where(torch.eq(seq_mask, 1), torch.zeros_like(seq))
def g... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.utils.data
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C.... | pkuyym/nni | Mask | false | 10,990 | [
"MIT"
] | 0 | fe533e3bc65ea27997e16250adb503638548d500 | https://github.com/pkuyym/nni/tree/fe533e3bc65ea27997e16250adb503638548d500 |
Simplified_Pose_Model | import torch
from collections import OrderedDict
import torch.nn as nn
def make_layers(block, no_relu_layers):
layers = []
for layer_name, v in block.items():
if 'pool' in layer_name:
layer = nn.MaxPool2d(kernel_size=v[0], stride=v[1], padding=v[2])
layers.append((layer_name, l... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from collections import Order... | Schwartz-Zha/My_Pose_Estimation | Simplified_Pose_Model | false | 11,868 | [
"MIT"
] | 0 | 0ccaccf58498b2200842c155b735e1103c28c5ba | https://github.com/Schwartz-Zha/My_Pose_Estimation/tree/0ccaccf58498b2200842c155b735e1103c28c5ba |
LogisticCumulativeLink | import torch
from torch import nn
class LogisticCumulativeLink(nn.Module):
"""
Converts a single number to the proportional odds of belonging to a class.
Parameters
----------
num_classes : int
Number of ordered classes to partition the odds into.
init_cutpoints : str (default='ordere... | 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... | EthanRosenthal/medallion | LogisticCumulativeLink | false | 13,671 | [
"MIT"
] | 74 | 063fe875f5122063e6f616512cffd9ffa4df1974 | https://github.com/EthanRosenthal/medallion/tree/063fe875f5122063e6f616512cffd9ffa4df1974 |
SpatialChannelSELayer3D | # 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 ... | Hsuxu/vnet_attention | SpatialChannelSELayer3D | false | 13,794 | [
"MIT"
] | 45 | 6958932f3974d268e93bd6443369a3f43c497ed3 | https://github.com/Hsuxu/vnet_attention/tree/6958932f3974d268e93bd6443369a3f43c497ed3 |
BertSelfOutput | # 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 ... | MikeWangWZHL/BLIP | BertSelfOutput | false | 1,888 | [
"BSD-3-Clause"
] | 0 | b82134f1892a54c8f63b0f4b51bdcb8684e1dc6d | https://github.com/MikeWangWZHL/BLIP/tree/b82134f1892a54c8f63b0f4b51bdcb8684e1dc6d |
MGRUCell | from torch.nn import Module
import math
import torch
import torch.nn.functional as F
from torch.nn import Parameter
def clip_grad(v, min, max):
v_tmp = v.expand_as(v)
v_tmp.register_hook(lambda g: g.clamp(min, max))
return v_tmp
class RNNCellBase(Module):
def __repr__(self):
s = '{name}({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.nn import Module
i... | CSLT-THU/Vivi_3.0 | MGRUCell | false | 17,039 | [
"Apache-2.0"
] | 3 | 86996d99d662cd33100755501a971c41ce30ca70 | https://github.com/CSLT-THU/Vivi_3.0/tree/86996d99d662cd33100755501a971c41ce30ca70 |
CELoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
... | Dogacel/mmfashion | CELoss | false | 11,417 | [
"Apache-2.0"
] | 0 | e49613245c8501042edd7aeeaa8fb93e5ea13238 | https://github.com/Dogacel/mmfashion/tree/e49613245c8501042edd7aeeaa8fb93e5ea13238 |
InstanceNorm2D | import torch
import torch.nn as nn
class InstanceNorm2D(nn.Module):
def __init__(self, num_channels, epsilon=1e-05, momentum=0.9, rescale=True
):
super(InstanceNorm2D, self).__init__()
self.num_channels = num_channels
self.epsilon = epsilon
self.momentum = momentum
... | 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_... | HarmanDotpy/Normalizations-in-Deep-Learning | InstanceNorm2D | false | 525 | [
"MIT"
] | 0 | 3e1899837fb3ba625f515ef1a995f3573b65456d | https://github.com/HarmanDotpy/Normalizations-in-Deep-Learning/tree/3e1899837fb3ba625f515ef1a995f3573b65456d |
GeneralizedMeanPooling | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
import... | RichardDominik/AIC21-MTMC | GeneralizedMeanPooling | false | 14,309 | [
"MIT"
] | 63 | f69f63f9c40e2dc98e98c7af1cebe3d5605307ee | https://github.com/RichardDominik/AIC21-MTMC/tree/f69f63f9c40e2dc98e98c7af1cebe3d5605307ee |
PreActResPath | from _paritybench_helpers import _mock_config
import torch
import torch.nn as nn
class PreActResPath(nn.Module):
def __init__(self, in_features, config, super_block):
super(PreActResPath, self).__init__()
self.number_layers = config['num_layers']
self.activate_dropout = True if config['ac... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | ArlindKadra/DeepLearning | PreActResPath | false | 18,258 | [
"Apache-2.0"
] | 4 | 4e9ffe39bbb8722ca658522e6b6d26c6f2291ef6 | https://github.com/ArlindKadra/DeepLearning/tree/4e9ffe39bbb8722ca658522e6b6d26c6f2291ef6 |
AsymmetricLoss | import torch
import torch.nn as nn
class AsymmetricLoss(nn.Module):
def __init__(self, gamma_neg=4, gamma_pos=1, clip=0.05, eps=1e-08,
disable_torch_grad_focal_loss=True):
super(AsymmetricLoss, self).__init__()
self.gamma_neg = gamma_neg
self.gamma_pos = gamma_pos
self.cli... | 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... | RetroCirce/Zero_Shot_Audio_Source_Separation | AsymmetricLoss | false | 14,290 | [
"MIT"
] | 66 | 16b5c2cc9f263c6d17894d433a2da31b07788f4d | https://github.com/RetroCirce/Zero_Shot_Audio_Source_Separation/tree/16b5c2cc9f263c6d17894d433a2da31b07788f4d |
ReRegualizedLinearPosNACLayer | import collections
import math
import torch
import torch.utils.data
def sparsity_error(W):
W_error = torch.min(torch.abs(W), torch.abs(1 - torch.abs(W)))
return torch.max(W_error)
class SummaryWriterNamespaceNoLoggingScope:
def __init__(self, writer):
self._writer = writer
def __enter__(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 import triton_helpers
import collections
import mat... | wlm2019/Neural-Arithmetic-Units | ReRegualizedLinearPosNACLayer | false | 16,725 | [
"MIT"
] | 147 | f9de9d004bb2dc2ee28577cd1760d0a00c185836 | https://github.com/wlm2019/Neural-Arithmetic-Units/tree/f9de9d004bb2dc2ee28577cd1760d0a00c185836 |
ConvAttentionLayer | # 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.... | PeterouZh/SemiNAS | ConvAttentionLayer | false | 17,818 | [
"Apache-2.0"
] | 5 | 39731663271b994571160d43d796b2bb93386b3b | https://github.com/PeterouZh/SemiNAS/tree/39731663271b994571160d43d796b2bb93386b3b |
SANet | import torch
import torch.nn as nn
import torch.backends.cudnn
def calc_mean_std(feat, eps=1e-05):
size = feat.size()
assert len(size) == 4
N, C = size[:2]
feat_var = feat.view(N, C, -1).var(dim=2) + eps
feat_std = feat_var.sqrt().view(N, C, 1, 1)
feat_mean = feat.view(N, C, -1).mean(dim=2).vi... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | TimandXiyu/SANet-style-transfer- | SANet | false | 5,899 | [
"MIT"
] | 1 | 91c3dd1344d1dded61aa2e79618240a49345b40e | https://github.com/TimandXiyu/SANet-style-transfer-/tree/91c3dd1344d1dded61aa2e79618240a49345b40e |
down | # 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... | brainma/ASRNet | down | false | 9,870 | [
"MIT"
] | 0 | b88edbcfbcee2cc77f7f4b2a8d139ced303a4f14 | https://github.com/brainma/ASRNet/tree/b88edbcfbcee2cc77f7f4b2a8d139ced303a4f14 |
ConcatConv2d | # 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... | Justin-Tan/ffjord | ConcatConv2d | false | 700 | [
"MIT"
] | 0 | 2caf8a4ff84933672fe0d94255d665b3dd7a6791 | https://github.com/Justin-Tan/ffjord/tree/2caf8a4ff84933672fe0d94255d665b3dd7a6791 |
MLP | from torch.nn import Module
import torch
import torch.nn as nn
from torch.nn.modules.module import Module
class MLP(Module):
"""
A Simple two layers MLP to make SGC a bit better.
"""
def __init__(self, nfeat, nhid, nclass, dp=0.2):
super(MLP, self).__init__()
self.W1 = nn.Linear(nfeat... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import 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.nn as nn
from torch.nn.modules.module i... | gear/gfnn | MLP | false | 15,417 | [
"MIT"
] | 46 | 36667861caacba921469d43917d002896e832c3f | https://github.com/gear/gfnn/tree/36667861caacba921469d43917d002896e832c3f |
PinballLoss | import torch
import torch.nn as nn
class PinballLoss(nn.Module):
""" Pinball Loss
Computes the pinball loss between y and y_hat.
Parameters
----------
y: tensor
actual values in torch tensor.
y_hat: tensor (same shape as y)
predicted values in torch tensor.
tau: float, between 0 and 1
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
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
emp... | FedericoGarza/esrnn_torch | PinballLoss | false | 11,422 | [
"MIT"
] | 0 | 9f28f38e27dc0ba12cc965e60f7e08e635c8b19d | https://github.com/FedericoGarza/esrnn_torch/tree/9f28f38e27dc0ba12cc965e60f7e08e635c8b19d |
ConvLayer | # 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.... | RandolphVI/HyperNet | ConvLayer | false | 5,757 | [
"Apache-2.0"
] | 1 | e9f376f5eb087e57360ca41cca2533c3ca967e47 | https://github.com/RandolphVI/HyperNet/tree/e9f376f5eb087e57360ca41cca2533c3ca967e47 |
G_u | # 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_... | HCShi/IONet | G_u | false | 18,362 | [
"MIT"
] | 4 | 42e3c0455a1ecb610f458e814d7310d685b2be7b | https://github.com/HCShi/IONet/tree/42e3c0455a1ecb610f458e814d7310d685b2be7b |
HighwayNetwork | # 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 ... | boldsort/craftassist | HighwayNetwork | false | 14,974 | [
"MIT"
] | 626 | 8058d115a250e30deb60d969b7b1a5fefd6e974c | https://github.com/boldsort/craftassist/tree/8058d115a250e30deb60d969b7b1a5fefd6e974c |
UpSampler | # 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... | Myyyr/segmentation | UpSampler | false | 878 | [
"MIT"
] | 0 | 6b9423e327cff1eb23599404031b7fb8e9ecf75d | https://github.com/Myyyr/segmentation/tree/6b9423e327cff1eb23599404031b7fb8e9ecf75d |
Attention | import torch
import numpy as np
class Attention(torch.nn.Module):
def __init__(self, d_model, heads):
super().__init__()
self.d_model = d_model
self.heads = heads
self.query = torch.nn.Linear(in_features=d_model, out_features=
d_model, bias=False)
self.key = to... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | santhnm2/TASO | Attention | false | 10,735 | [
"Apache-2.0"
] | 0 | f8025dda00922e4313ba6efbca6573421d95cbba | https://github.com/santhnm2/TASO/tree/f8025dda00922e4313ba6efbca6573421d95cbba |
Batch33MatVec3Mul | import torch
import torch.nn as nn
class Batch33MatVec3Mul(nn.Module):
def __init(self):
super().__init__()
def forward(self, mat, vec):
vec = vec.unsqueeze(2)
result = torch.matmul(mat, vec)
return result.squeeze(2)
def get_inputs():
return [torch.rand([4, 4, 4, 4]), 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
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | ElliotHYLee/MyPyTorchAPI | Batch33MatVec3Mul | false | 11,399 | [
"MIT"
] | 0 | edb25b724372367e96e3bd2f420c023c4efbfcd7 | https://github.com/ElliotHYLee/MyPyTorchAPI/tree/edb25b724372367e96e3bd2f420c023c4efbfcd7 |
GeneratorBlock | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import math
import ... | Aarsh2001/annotated_deep_learning_paper_implementations | GeneratorBlock | false | 4,821 | [
"MIT"
] | 1 | ff0d5c065da1a46769f5f66fddc252c178f8fa37 | https://github.com/Aarsh2001/annotated_deep_learning_paper_implementations/tree/ff0d5c065da1a46769f5f66fddc252c178f8fa37 |
RegressorNet | import torch
import numpy as np
from torch import nn
from torch import optim
from torch import relu
def weighted_mse_loss(inputs, target, sample_weight):
if sample_weight is not None:
return (sample_weight * (inputs - target) ** 2).mean()
else:
return ((inputs - target) ** 2).mean()
class Re... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import numpy as np
from torch... | SirPopiel/IWDA | RegressorNet | false | 11,887 | [
"MIT"
] | 0 | 5693b0704f1abf9f69f92fba243599c5f4056a3c | https://github.com/SirPopiel/IWDA/tree/5693b0704f1abf9f69f92fba243599c5f4056a3c |
CausualConv | import torch
from torch import nn
class CausualConv(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size=1, stride=1,
padding=1, dilation=1, bias=True, w_init_gain='linear', param=None):
super(CausualConv, self).__init__()
if padding is None:
assert kernel_siz... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import 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... | shaun95/StarGANv2-VC | CausualConv | false | 16,394 | [
"MIT"
] | 116 | ed20538971a03d699351a349a3631767333baeb7 | https://github.com/shaun95/StarGANv2-VC/tree/ed20538971a03d699351a349a3631767333baeb7 |
GroverAttention | import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from typing import *
class GroverAttention(nn.Module):
"""
Compute 'Scaled Dot Product SelfAttention
"""
def forward(self, query, key, value, mask=None, dropout=None):
"""
:param query:
:param key:
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | Changgun-Choi/huggingmolecules | GroverAttention | false | 243 | [
"Apache-2.0"
] | 0 | 6d7c5e7d0acfd3d4725eb0deaeb0413dad9cfde8 | https://github.com/Changgun-Choi/huggingmolecules/tree/6d7c5e7d0acfd3d4725eb0deaeb0413dad9cfde8 |
Dunet_2levels | # 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_... | AbdulMuqadim2001/dvae-refiner | Dunet_2levels | false | 7,700 | [
"MIT"
] | 27 | c1ff46f91b28e613a3b7b157f8fd97ddf43e6fb2 | https://github.com/AbdulMuqadim2001/dvae-refiner/tree/c1ff46f91b28e613a3b7b157f8fd97ddf43e6fb2 |
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
import torch.nn as nn
assert_... | Art31/pytorch-seq2seq | PositionwiseFeedforward | false | 8,830 | [
"MIT"
] | 0 | 24e0180902a5eadc3390c5fd95634c6c62ef3cc9 | https://github.com/Art31/pytorch-seq2seq/tree/24e0180902a5eadc3390c5fd95634c6c62ef3cc9 |
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... | ORANZINO/bouquet_server | ResBlk | false | 17,759 | [
"MIT"
] | 7 | 2ce1bb59df15297878c555dd97e0f27b5202ed02 | https://github.com/ORANZINO/bouquet_server/tree/2ce1bb59df15297878c555dd97e0f27b5202ed02 |
cheap_cnn | import torch
import torch.nn as nn
import torch.nn.functional as F
class cheap_cnn(nn.Module):
def __init__(self):
super(cheap_cnn, self).__init__()
self.cnn1 = nn.Conv2d(in_channels=3, out_channels=32, kernel_size=3)
self.cnn2 = nn.Conv2d(in_channels=32, out_channels=64, kernel_size=3)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | vaibhav117/sim2real4real | cheap_cnn | false | 4,485 | [
"MIT"
] | 0 | b1f253ef359eda0c7e3b594f89c8a35f0cf925bf | https://github.com/vaibhav117/sim2real4real/tree/b1f253ef359eda0c7e3b594f89c8a35f0cf925bf |
MultAttention | # 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.... | kage08/CAMul | MultAttention | false | 10,385 | [
"MIT"
] | 0 | 79f8a27f472943229fb087bae8e405e38e5e0b47 | https://github.com/kage08/CAMul/tree/79f8a27f472943229fb087bae8e405e38e5e0b47 |
DurationMSELoss | import torch
import torch.utils.data
from torch.optim import *
from torch.optim.lr_scheduler import *
class DurationMSELoss(torch.nn.Module):
"""Loss function module for duration predictor.
The loss value is Calculated in log domain to make it Gaussian.
"""
def __init__(self, offset=1.0, reduction=... | 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... | entn-at/efficient_tts | DurationMSELoss | false | 15,303 | [
"MIT"
] | 111 | 5e6ea55d0c9694f7e30eecb5048976088f1a3c66 | https://github.com/entn-at/efficient_tts/tree/5e6ea55d0c9694f7e30eecb5048976088f1a3c66 |
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.... | wjurayj/commonsense-rl | ScaledDotProductAttention | false | 16,712 | [
"Apache-2.0"
] | 55 | fbbe4fa4a21865095783845fce2f0c4f4346e40f | https://github.com/wjurayj/commonsense-rl/tree/fbbe4fa4a21865095783845fce2f0c4f4346e40f |
ROUGH_FILTER | import torch
import torch.nn as nn
class ROUGH_FILTER(nn.Module):
def __init__(self, user_num, embedding_size):
super(ROUGH_FILTER, self).__init__()
self.in_user_embedding = nn.Embedding(user_num, embedding_size)
def forward(self, out_user_embedding_weight):
score = torch.mm(self.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.... | GSL4Rec/GSL4Rec | ROUGH_FILTER | false | 5,228 | [
"Apache-2.0"
] | 1 | 9cf8964957a6d9962bef42bd4908b4f10ef0771c | https://github.com/GSL4Rec/GSL4Rec/tree/9cf8964957a6d9962bef42bd4908b4f10ef0771c |
GCT | import sys
import torch
import torch.nn as nn
import torch.utils.data.distributed
class GCT(nn.Module):
def __init__(self, num_channels, epsilon=1e-05, mode='l2', after_relu=False
):
super(GCT, self).__init__()
self.alpha = nn.Parameter(torch.ones(1, num_channels, 1, 1))
self.gamm... | 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.distributed
assert_size_stride = ... | Erfun76/insightface | GCT | false | 9,275 | [
"MIT"
] | 0 | 148cef36a43a055f68d2b6a475f4aa38625ad8b4 | https://github.com/Erfun76/insightface/tree/148cef36a43a055f68d2b6a475f4aa38625ad8b4 |
EncoderLayer | import math
import torch
from torch import nn
class LayerNorm(nn.Module):
def __init__(self, d_model, eps=1e-12):
super(LayerNorm, self).__init__()
self.gamma = nn.Parameter(torch.ones(d_model))
self.beta = nn.Parameter(torch.zeros(d_model))
self.eps = eps
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 import triton_helpers
from torch._inductor.runtime.... | bsgiovanini/transformer | EncoderLayer | false | 1,618 | [
"Apache-2.0"
] | 0 | e128fa862f1b3d17d7b92df169a2bbee3f08366f | https://github.com/bsgiovanini/transformer/tree/e128fa862f1b3d17d7b92df169a2bbee3f08366f |
ProjectExciteLayer | # 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_... | Nightmare4214/FracNet | ProjectExciteLayer | false | 2,703 | [
"Apache-2.0"
] | 0 | db397adb50f71387155d9d110302a5968f86f756 | https://github.com/Nightmare4214/FracNet/tree/db397adb50f71387155d9d110302a5968f86f756 |
ResBlock | import torch
from torch import nn
import torch.nn.functional as F
class LinearAndMultiply(nn.Module):
def __init__(self, input_size, output_size, use_multiply=True,
linear_block=nn.Linear):
super().__init__()
self._activation = nn.CELU()
self._linear = linear_block(input_size, out... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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... | rgreenblatt/path | ResBlock | false | 7,556 | [
"MIT"
] | 1 | 2057618ee3a6067c230c1c1c40856d2c9f5006b0 | https://github.com/rgreenblatt/path/tree/2057618ee3a6067c230c1c1c40856d2c9f5006b0 |
MultiHeadAttention | import torch
import torch.nn.functional as F
import torch.nn as nn
class ScaledDotProductAttention(nn.Module):
""" Scaled Dot-Product Attention """
def __init__(self, temperature, attn_dropout=0.1):
super().__init__()
self.temperature = temperature
self.dropout = nn.Dropout(attn_dropo... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | RogerTsai917/attention-is-all-you-need-pytorch | MultiHeadAttention | false | 2,791 | [
"MIT"
] | 0 | 64197e55d275e5c819bc786a9ff19849cdf2f6b9 | https://github.com/RogerTsai917/attention-is-all-you-need-pytorch/tree/64197e55d275e5c819bc786a9ff19849cdf2f6b9 |
RnLU | # 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 math
import torch.nn as nn
from torch.autograd.function import InplaceFunction
imp... | aparna-aketi/Low_Precision_DL | RnLU | false | 3,116 | [
"MIT"
] | 0 | 5a2489cac5da8f43dd8490a9d871f1ce17f8e7f8 | https://github.com/aparna-aketi/Low_Precision_DL/tree/5a2489cac5da8f43dd8490a9d871f1ce17f8e7f8 |
BertAttention | # 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.... | BLimmie/pytorch-pretrained-BERT | BertAttention | false | 6,672 | [
"Apache-2.0"
] | 1 | 2ac4b29641e569020ed2acc28016f481f617052b | https://github.com/BLimmie/pytorch-pretrained-BERT/tree/2ac4b29641e569020ed2acc28016f481f617052b |
SVHNConvNet | import torch
from torch import nn
import torch.nn.functional as F
class SVHNConvNet(nn.Module):
def __init__(self):
super(SVHNConvNet, self).__init__()
self.conv1 = nn.Conv2d(3, 32, 5, 1, 2)
self.conv2 = nn.Conv2d(32, 64, 5, 1, 2)
self.conv3 = nn.Conv2d(64, 128, 5, 1, 2)
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 import nn
assert_s... | Felix-Petersen/algovision | SVHNConvNet | false | 13,740 | [
"MIT"
] | 52 | b1b9596028af62de1c1d2c4e74cbd6168fc3ae3c | https://github.com/Felix-Petersen/algovision/tree/b1b9596028af62de1c1d2c4e74cbd6168fc3ae3c |
SimpleMinModule | import torch
import torch.jit
import torch.onnx
import torch.nn
class SimpleMinModule(torch.nn.Module):
def __init__(self):
super(SimpleMinModule, self).__init__()
def forward(self, a, b):
return torch.min(a + a, b + b)
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand([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
from torch._inductor.runtime import triton_helpers
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._C._dynamo.... | opti-mix/glow | SimpleMinModule | false | 7,409 | [
"Apache-2.0"
] | 1 | 4ba074df5da9822986a23a6679ab592c22660f6d | https://github.com/opti-mix/glow/tree/4ba074df5da9822986a23a6679ab592c22660f6d |
SiglogModule | import torch
import torch.nn as nn
def siglog(v):
return v.sign() * torch.log(1 + v.abs())
class SiglogModule(nn.Module):
def forward(self, v):
return siglog(v)
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
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert... | finalgruntgit/diautils | SiglogModule | false | 10,267 | [
"MIT"
] | 0 | b9d7666ed5023700db01a4295430c52721acfc25 | https://github.com/finalgruntgit/diautils/tree/b9d7666ed5023700db01a4295430c52721acfc25 |
CRF | # 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... | Syhen/vtou-ner | CRF | false | 2,874 | [
"MIT"
] | 0 | 708eb3d475fbce91949a7ca3b0bf2631c4feba62 | https://github.com/Syhen/vtou-ner/tree/708eb3d475fbce91949a7ca3b0bf2631c4feba62 |
Attention | import torch
import torch.nn as nn
import torch.nn.functional as F
class Attention(nn.Module):
"""
Applies an attention mechanism on the output features from the decoder.
.. math::
\\begin{array}{ll}
x = context*output \\\\
attn = exp(x_i) / sum_j exp(x_j) \\\\
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | woaksths/set2regex-baseline | Attention | false | 13,103 | [
"Apache-2.0"
] | 0 | be377593526ad664a727dd7152fcb186118adaa5 | https://github.com/woaksths/set2regex-baseline/tree/be377593526ad664a727dd7152fcb186118adaa5 |
FeatureWiseAffine | # 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... | Seungwoo0326/WaveGrad2-1 | FeatureWiseAffine | false | 14,391 | [
"MIT"
] | 45 | 3b202201348449b89353f28bce1596ca7939a810 | https://github.com/Seungwoo0326/WaveGrad2-1/tree/3b202201348449b89353f28bce1596ca7939a810 |
ImgAttention | # 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.... | WuJie1010/Fine-Grained-Image-Captioning | ImgAttention | false | 18,066 | [
"MIT"
] | 9 | 340bc1868634f3bf0fdd62d439fec32ee1b45407 | https://github.com/WuJie1010/Fine-Grained-Image-Captioning/tree/340bc1868634f3bf0fdd62d439fec32ee1b45407 |
VAE | import torch
import numpy as np
from abc import ABC
from abc import abstractmethod
import torch.nn.functional as F
from torch.functional import F
from torch import nn
from typing import *
from torch.nn import functional as F
def to_array_as(x, y):
if isinstance(x, torch.Tensor) and isinstance(y, np.ndarray):
... | 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... | ssimonc/NeoRL | VAE | false | 16,512 | [
"Apache-2.0"
] | 50 | 098c58c8e4c3e43e67803f6384619d3bfe7fce5d | https://github.com/ssimonc/NeoRL/tree/098c58c8e4c3e43e67803f6384619d3bfe7fce5d |
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
import numpy as np
from torch.nn.modules.loss import _Loss
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cud... | JanSellner/MONAI | DiceLoss | false | 9,171 | [
"Apache-2.0"
] | 0 | ff8fa2bae94914030abb1bc0680417fdaa74afd8 | https://github.com/JanSellner/MONAI/tree/ff8fa2bae94914030abb1bc0680417fdaa74afd8 |
LocationLayer | import torch
import torch.utils.data
from torch import nn
class LinearNorm(torch.nn.Module):
def __init__(self, in_dim, out_dim, bias=True, w_init_gain='linear'):
super(LinearNorm, self).__init__()
self.linear_layer = torch.nn.Linear(in_dim, out_dim, bias=bias)
torch.nn.init.xavier_unifor... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.utils.data
from torch import nn
assert_size_stride = torch._C._dyna... | AeroXi/Tacotron2-Mandarin | LocationLayer | false | 13,300 | [
"MIT"
] | 67 | b7bc213d1c1a9c3e2f2e11f69f586c2582010668 | https://github.com/AeroXi/Tacotron2-Mandarin/tree/b7bc213d1c1a9c3e2f2e11f69f586c2582010668 |
GCNLayer | # 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... | GRAND-Lab/MERIT | GCNLayer | false | 8,116 | [
"MIT"
] | 18 | c1cc62056254b1ea2931eef47ccde1e717ff5afe | https://github.com/GRAND-Lab/MERIT/tree/c1cc62056254b1ea2931eef47ccde1e717ff5afe |
Block | import torch
import torch.nn as nn
class Block(nn.Module):
def __init__(self, in_channels, num_filters, kernel_size, pool_size):
super(Block, self).__init__()
self.conv = nn.Conv2d(in_channels, num_filters, kernel_size=kernel_size
)
self.pool = nn.MaxPool2d(kernel_size=pool_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_... | LRVerkin/tutorials | Block | false | 2,485 | [
"MIT"
] | 0 | 365757b0dee90f63a53851e40bfad790aca3cf8d | https://github.com/LRVerkin/tutorials/tree/365757b0dee90f63a53851e40bfad790aca3cf8d |
SpacialGatingUnit | # 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... | Hadryan/nn | SpacialGatingUnit | false | 9,378 | [
"MIT"
] | 0 | b10e3dea2c7e1f6569bfdf8e1a48f8d48b5a645d | https://github.com/Hadryan/nn/tree/b10e3dea2c7e1f6569bfdf8e1a48f8d48b5a645d |
ModMBStddevLayer | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
import torch.distributed as dist
import torch.autograd as... | bladesaber/mmgeneration | ModMBStddevLayer | false | 1,576 | [
"Apache-2.0"
] | 0 | 158b49f7efd8028f231f6e9ca758ae0e20dd72ae | https://github.com/bladesaber/mmgeneration/tree/158b49f7efd8028f231f6e9ca758ae0e20dd72ae |
SppBlock | import torch
import torch.nn.functional as F
from torch import nn
class SppBlock(nn.Module):
def __init__(self, in_channels):
super(SppBlock, self).__init__()
self.pool1 = nn.MaxPool2d(kernel_size=[2, 2], stride=2)
self.pool2 = nn.MaxPool2d(kernel_size=[3, 3], stride=3)
self.pool3... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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... | JiYuanFeng/MCTrans | SppBlock | false | 13,963 | [
"Apache-2.0"
] | 84 | 9b8b5677eef584b423d5e1630680a4b667cbe823 | https://github.com/JiYuanFeng/MCTrans/tree/9b8b5677eef584b423d5e1630680a4b667cbe823 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.