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 |
|---|---|---|---|---|---|---|---|---|---|---|
DirichletPolicySingleLayer | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import numpy as np
import tor... | wessle/costaware | DirichletPolicySingleLayer | false | 11,004 | [
"MIT"
] | 0 | 151502308411528eaa703d353d138fc809e59d8e | https://github.com/wessle/costaware/tree/151502308411528eaa703d353d138fc809e59d8e |
MultiHeadedAttention | import math
import torch
import torch.nn as nn
import torch.nn.functional as F
class MultiHeadedAttention(nn.Module):
def __init__(self, num_head, d_model, dropout=0.1):
super(MultiHeadedAttention, self).__init__()
assert d_model % num_head == 0
self.d_k = d_model // num_head
self... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | iamxpy/pointer_summarizer | MultiHeadedAttention | false | 6,855 | [
"Apache-2.0"
] | 1 | ebeb2ad32a45162c0da14dac0b6241b0b0d00fa0 | https://github.com/iamxpy/pointer_summarizer/tree/ebeb2ad32a45162c0da14dac0b6241b0b0d00fa0 |
TanhDeepLiftModel | import torch
import torch.nn as nn
class TanhDeepLiftModel(nn.Module):
"""
Same as the ReLUDeepLiftModel, but with activations
that can have negative outputs
"""
def __init__(self):
super().__init__()
self.tanh1 = nn.Tanh()
self.tanh2 = nn.Tanh()
def forward(s... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_... | Europium248/captum | TanhDeepLiftModel | false | 426 | [
"BSD-3-Clause"
] | 0 | ac02fae2651b8d68a44bcb9d03b91cbb3959f2fc | https://github.com/Europium248/captum/tree/ac02fae2651b8d68a44bcb9d03b91cbb3959f2fc |
Critic | # 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.... | JieFeng-cse/power-system-rl | Critic | false | 9,186 | [
"MIT"
] | 0 | 8295d14da83a40c755b8e6a14785c53a238f9a64 | https://github.com/JieFeng-cse/power-system-rl/tree/8295d14da83a40c755b8e6a14785c53a238f9a64 |
ClassWisePool | # 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 sys
from torch.autograd import Function
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_st... | nishanthta/wsl | ClassWisePool | false | 7,346 | [
"MIT"
] | 1 | 5fda3b909a314b7f88ffa9ab27a6a142de6b0159 | https://github.com/nishanthta/wsl/tree/5fda3b909a314b7f88ffa9ab27a6a142de6b0159 |
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.... | daiki-kimura/commonsense-rl | Attention | false | 12,248 | [
"Apache-2.0"
] | 0 | 5513926957b6501ce9cfa46f77f8f2c1c4892fa5 | https://github.com/daiki-kimura/commonsense-rl/tree/5513926957b6501ce9cfa46f77f8f2c1c4892fa5 |
CombineFeatures | import torch
import torch.nn as nn
class CombineFeatures(nn.Module):
""" Returns layer to be used by PairDrift. """
def __init__(self, in_dim, out_dim, zero_init=False):
super(CombineFeatures, self).__init__()
self.single = nn.Linear(in_dim, out_dim)
self.pair = nn.Linear(in_dim, 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
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | AustenLamacraft/QuaRL | CombineFeatures | false | 7,741 | [
"MIT"
] | 13 | 1764f0ccd0ba90d44e799b6ac908df76be14a52e | https://github.com/AustenLamacraft/QuaRL/tree/1764f0ccd0ba90d44e799b6ac908df76be14a52e |
GCN | import torch
from torch import nn
import torch.nn.functional as F
import torch.nn.parallel
class Conv2D(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, padding=
'same', stride=1, dilation=1, groups=1):
super(Conv2D, self).__init__()
assert type(kernel_size) in [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 import nn
import torch.nn.functional as F
import torch.nn.parallel
as... | Tanveer81/BoxVOS | GCN | false | 17,984 | [
"BSD-2-Clause"
] | 4 | c30aa319f18f3fbee2a25e0ed25cb006a4598300 | https://github.com/Tanveer81/BoxVOS/tree/c30aa319f18f3fbee2a25e0ed25cb006a4598300 |
BlendConv2d | # 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... | musyoku/ffjord | BlendConv2d | false | 7,298 | [
"MIT"
] | 1 | 9e431e122e59fa9a71f3f301dec8fdd3db51e0ce | https://github.com/musyoku/ffjord/tree/9e431e122e59fa9a71f3f301dec8fdd3db51e0ce |
MegatronBertOutput | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
import torch.utils.checkpoint
assert_size_stride = torch._C... | Clemens123/transformers | MegatronBertOutput | false | 11,813 | [
"Apache-2.0"
] | 0 | 22abe7bbc587c16ec30f9d1aa549dcbeba6e9e26 | https://github.com/Clemens123/transformers/tree/22abe7bbc587c16ec30f9d1aa549dcbeba6e9e26 |
CoSirenModule | import math
import torch
class CoSirenModule(torch.nn.Module):
def __init__(self, in_features, out_features, weight_multiplier=1.0):
super(CoSirenModule, self).__init__()
self.linear = torch.nn.Linear(in_features, out_features // 2)
init_bounds = math.sqrt(24 / in_features) * weight_multi... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 math
a... | qway/nerfmeshes | CoSirenModule | false | 16,303 | [
"MIT"
] | 113 | d983dcbbcfec1337c9f2040969213c6d1ea0c39e | https://github.com/qway/nerfmeshes/tree/d983dcbbcfec1337c9f2040969213c6d1ea0c39e |
TreeNode_De | # 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_... | KaiQiangSong/joint_parse_summ | TreeNode_De | false | 8,802 | [
"BSD-3-Clause"
] | 29 | 5d4a40d9a681bc8b06c847643d810846f3867216 | https://github.com/KaiQiangSong/joint_parse_summ/tree/5d4a40d9a681bc8b06c847643d810846f3867216 |
Whitening2d | import torch
import torch.nn as nn
from torch.cuda.amp import custom_fwd
from torch.nn.functional import conv2d
class Whitening2d(nn.Module):
def __init__(self, output_dim: 'int', eps: 'float'=0.0):
"""Layer that computes hard whitening for W-MSE using the Cholesky decomposition.
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
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | TranNhiem/MVAR_SSL | Whitening2d | false | 5,916 | [
"MIT"
] | 1 | 339964db4d40f06a92866675ff99ef67cd968cca | https://github.com/TranNhiem/MVAR_SSL/tree/339964db4d40f06a92866675ff99ef67cd968cca |
Mish | import torch
import torch.nn as nn
import torch.nn.functional as F
class Mish(nn.Module):
def forward(self, x):
return x.mul_(F.softplus(x).tanh())
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
import torch.nn as nn
assert_size_stride = torch._C._dynamo.gu... | heymesut/SJTU_microe | Mish | false | 6,802 | [
"BSD-3-Clause"
] | 1 | 7a862d03b4d8fe4c8608173a16082f44001f3f13 | https://github.com/heymesut/SJTU_microe/tree/7a862d03b4d8fe4c8608173a16082f44001f3f13 |
MeanPoolConv | import torch
import torch.nn as nn
class MeanPoolConv(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)
def forward(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
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | henryaddison/score_sde_pytorch | MeanPoolConv | false | 12,490 | [
"Apache-2.0"
] | 0 | be07c3a3346bf8ceadabf6a3b436db5d5c3d0252 | https://github.com/henryaddison/score_sde_pytorch/tree/be07c3a3346bf8ceadabf6a3b436db5d5c3d0252 |
FusedUpsample | import torch
from torch import nn
from torch.nn import functional as F
from math import sqrt
class FusedUpsample(nn.Module):
def __init__(self, in_channel, out_channel, kernel_size, padding=0):
super().__init__()
weight = torch.randn(in_channel, out_channel, kernel_size, kernel_size)
bias... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import 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 math import sqrt
assert_size_stride = torch._C._dynamo... | celdeldel/style_conditionnal_gan | FusedUpsample | false | 1,656 | [
"MIT"
] | 0 | 3a4623560af1e12d46e2f9ffa9726c29df9d5680 | https://github.com/celdeldel/style_conditionnal_gan/tree/3a4623560af1e12d46e2f9ffa9726c29df9d5680 |
Linear | # 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 ... | untitled-ai/self_supervised | Linear | false | 16,644 | [
"MIT"
] | 370 | 6d14ca0402ecc13feda9b3a9fdc056fd1ac24473 | https://github.com/untitled-ai/self_supervised/tree/6d14ca0402ecc13feda9b3a9fdc056fd1ac24473 |
MultiheadAttentionWrapper | import torch
import torch.nn.functional as F
import torch.nn as nn
from torch.nn.utils import weight_norm
from torch.optim.lr_scheduler import *
def linear(x):
return x
def activation(func_a):
"""Activation function wrapper
"""
try:
f = eval(func_a)
except:
f = linear
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.functional as F
import torch.nn as nn
from torch.nn.utils import weight_norm
from torch.optim.lr_scheduler import *
assert_s... | johnson7788/mt-dnn | MultiheadAttentionWrapper | false | 3,906 | [
"MIT"
] | 0 | 26e5c4a5bfdbf1a1dd1c903e606db1c070568237 | https://github.com/johnson7788/mt-dnn/tree/26e5c4a5bfdbf1a1dd1c903e606db1c070568237 |
MlpWithAttention | # 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
import torch.... | Malta-Lab/IUPE | MlpWithAttention | false | 8,600 | [
"MIT"
] | 10 | 44ddf119917538f02bb69509fec7a8314eed419f | https://github.com/Malta-Lab/IUPE/tree/44ddf119917538f02bb69509fec7a8314eed419f |
L2Norm | import torch
import torch.nn as nn
class L2Norm(nn.Module):
def __init__(self, n_dims, scale=20.0, eps=1e-10):
super(L2Norm, self).__init__()
self.n_dims = n_dims
self.weight = nn.Parameter(torch.Tensor(self.n_dims))
self.eps = eps
self.scale = scale
def forward(self,... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_... | AlphaLFC/mmdetection | L2Norm | false | 4,841 | [
"Apache-2.0"
] | 1 | 45619c5b8aca0ca3e6ddc211210a8946c94694d8 | https://github.com/AlphaLFC/mmdetection/tree/45619c5b8aca0ca3e6ddc211210a8946c94694d8 |
SPPNet | import math
import torch
import torch.nn.functional as F
import torch.nn as nn
def spatial_pyramid_pool(previous_conv, num_sample, previous_conv_size,
out_pool_size):
"""
previous_conv: a tensor vector of previous convolution layer
num_sample: an int number of image in the batch
previous_conv_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.... | maj34/Deep-Learning-Papers | SPPNet | false | 13,081 | [
"MIT"
] | 0 | 2672d3426b3f4342f7d81cd5ae029f2485594b4c | https://github.com/maj34/Deep-Learning-Papers/tree/2672d3426b3f4342f7d81cd5ae029f2485594b4c |
TransformerGPTEncoderLayer | import math
import torch
import torch.nn as nn
import torch.cuda
import torch.distributed
def gelu(x):
return 0.5 * x * (1 + torch.tanh(math.sqrt(2 / math.pi) * (x + 0.044715 *
torch.pow(x, 3))))
def generate_relative_positions_matrix(length, max_relative_positions,
cache=False):
"""Generate the... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | fangleai/encoder-agnostic-adaptation | TransformerGPTEncoderLayer | false | 15,378 | [
"MIT"
] | 70 | d917e654152df202dd35bba49c409c3ecd24eaf7 | https://github.com/fangleai/encoder-agnostic-adaptation/tree/d917e654152df202dd35bba49c409c3ecd24eaf7 |
SimpleReciprocalModel | # 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 | SimpleReciprocalModel | false | 3,360 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e |
ShuffleConv | import torch
from torch import nn
class ShuffleConv(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, padding=
'same', upscale_factor=2, padding_mode='zeros'):
super(ShuffleConv, self).__init__()
self.upscale_factor = upscale_factor
self.conv = nn.Conv2d(in_ch... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_st... | GerbenBeintema/deepSI | ShuffleConv | false | 8,174 | [
"BSD-3-Clause"
] | 12 | 580711210398064bb7f01e41d08b7a248a88b35b | https://github.com/GerbenBeintema/deepSI/tree/580711210398064bb7f01e41d08b7a248a88b35b |
KLDivLossWithLogits | # 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... | lizhenbang56/END-TO-END-TEMPORAL-FEATURE-AGGREGATION-FOR-SIAMESE-TRACKERS | KLDivLossWithLogits | false | 12,731 | [
"MIT"
] | 0 | 132b2e28b7f66c6ba0719774e9abd9b6515dd7e2 | https://github.com/lizhenbang56/END-TO-END-TEMPORAL-FEATURE-AGGREGATION-FOR-SIAMESE-TRACKERS/tree/132b2e28b7f66c6ba0719774e9abd9b6515dd7e2 |
Clamp | # 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.utils.data
assert_size_stride = torch._C._dynamo.guards... | sbuschjaeger/Pysembles | Clamp | false | 4,284 | [
"MIT"
] | 0 | 7e69b0975a7d4373242c7026ade6c5fdbad4fe67 | https://github.com/sbuschjaeger/Pysembles/tree/7e69b0975a7d4373242c7026ade6c5fdbad4fe67 |
Swish | import torch
import torch.utils.data
from torch import nn
import torch.jit
def swish_func(x, beta=1.0):
"""
"Swish: a Self-Gated Activation Function"
Searching for Activation Functions (https://arxiv.org/abs/1710.05941)
If beta=1 applies the Sigmoid Linear Unit (SiLU) function element-wise
If... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.utils.data
from torch import nn
import torch.jit
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_... | BlueAmulet/BasicSR | Swish | false | 7,822 | [
"Apache-2.0"
] | 12 | 7040913d8659a05af4c2428feb71c260efbf1e9c | https://github.com/BlueAmulet/BasicSR/tree/7040913d8659a05af4c2428feb71c260efbf1e9c |
PtModel | import torch
import torch.nn as nn
class PtModel(nn.Module):
def __init__(self, n_features, n_labels, softmax=False, dropout=False):
super().__init__()
self.dense1 = nn.Linear(n_features, 20)
self.dense2 = nn.Linear(20, n_labels)
self.dropout = nn.Dropout(0.5) if dropout else lamb... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | sugatoray/alibi-detect | PtModel | false | 16,507 | [
"Apache-2.0"
] | 1,227 | 66d7873c248c0be1a1d836e6fe1ef59351b802d9 | https://github.com/sugatoray/alibi-detect/tree/66d7873c248c0be1a1d836e6fe1ef59351b802d9 |
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.triton_helpers import libdevice
import torch.nn.fun... | junyuchen245/TransMorph_Transformer_for_Medical_Image_Registration | ResBlock | false | 15,777 | [
"MIT"
] | 82 | dfa24a47a564a000aa9b4eea95a6e83a24568359 | https://github.com/junyuchen245/TransMorph_Transformer_for_Medical_Image_Registration/tree/dfa24a47a564a000aa9b4eea95a6e83a24568359 |
WordAVGModel | # 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... | HanielF/siRNA-Predict-and-RSC-Test-System | WordAVGModel | false | 515 | [
"Apache-2.0"
] | 0 | 59c41558e0c579ee03168ee860490770ecb0a7a3 | https://github.com/HanielF/siRNA-Predict-and-RSC-Test-System/tree/59c41558e0c579ee03168ee860490770ecb0a7a3 |
cSE | # 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_... | mattroz/yatopi | cSE | false | 3,990 | [
"MIT"
] | 0 | 278bac6f3d2f13916ae9d43309b9f38b608426bd | https://github.com/mattroz/yatopi/tree/278bac6f3d2f13916ae9d43309b9f38b608426bd |
QueryAttentionAggregator | import torch
import numpy as np
import torch.utils.data
from torch import nn
import torch
from torch.nn import functional as F
class QueryAttentionAggregator(nn.Module):
def __init__(self, input_dim):
super(QueryAttentionAggregator, self).__init__()
self.query = nn.Linear(input_dim, input_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.... | Arnaud15/CS236_Deep_Generative_Processes | QueryAttentionAggregator | false | 16,940 | [
"MIT"
] | 6 | 179c995c4f596c19441c5e844f2ed07d954324e3 | https://github.com/Arnaud15/CS236_Deep_Generative_Processes/tree/179c995c4f596c19441c5e844f2ed07d954324e3 |
FLogSigmoidTest | import torch
import torch.nn as nn
class FLogSigmoidTest(nn.Module):
"""
Test for nn.functional types
"""
def __init__(self):
super(FLogSigmoidTest, self).__init__()
def forward(self, x):
from torch.nn import functional as F
return F.logsigmoid(x)
def get_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
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
import torc... | goldbattle/onnx2keras | FLogSigmoidTest | false | 12,450 | [
"MIT"
] | 0 | dcf52041299ce4216552d1132ec86eb4debd5303 | https://github.com/goldbattle/onnx2keras/tree/dcf52041299ce4216552d1132ec86eb4debd5303 |
Mutan | # 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... | JoannaLXY/block.bootstrap.pytorch | Mutan | false | 11,759 | [
"BSD-3-Clause"
] | 0 | 42c3e7616b704e05c6ff2376ff68b5b18044fe77 | https://github.com/JoannaLXY/block.bootstrap.pytorch/tree/42c3e7616b704e05c6ff2376ff68b5b18044fe77 |
LDEPooling | import torch
import torch.nn
class LDEPooling(torch.nn.Module):
"""A novel learnable dictionary encoding layer according to [Weicheng Cai, etc., "A NOVEL LEARNABLE
DICTIONARY ENCODING LAYER FOR END-TO-END LANGUAGE IDENTIFICATION", icassp, 2018]"""
def __init__(self, input_dim, c_num=64):
super(L... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn
assert... | fancyliumeng/asv-subtools | LDEPooling | false | 6,681 | [
"Apache-2.0"
] | 1 | 56a13484472e7ae6eb00d762c00d57e581e78eb4 | https://github.com/fancyliumeng/asv-subtools/tree/56a13484472e7ae6eb00d762c00d57e581e78eb4 |
ResidualUnit | # 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... | YingqiLiulll/scrips_for_SR | ResidualUnit | false | 1,284 | [
"MIT"
] | 0 | 04fa6fdaf157e913d3e2521cd80315a10a2ccedc | https://github.com/YingqiLiulll/scrips_for_SR/tree/04fa6fdaf157e913d3e2521cd80315a10a2ccedc |
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.... | krodyush/training_extensions | PositionwiseFeedForward | false | 10,981 | [
"Apache-2.0"
] | 0 | 542f4004dfbc6fc62a622065367ba4f85a703dd3 | https://github.com/krodyush/training_extensions/tree/542f4004dfbc6fc62a622065367ba4f85a703dd3 |
IdentityMessage | import torch
import torch.utils.data
class IdentityMessage(torch.nn.Module):
def __init__(self, raw_msg_dim: 'int', memory_dim: 'int', time_dim: 'int'):
super(IdentityMessage, self).__init__()
self.out_channels = raw_msg_dim + 2 * memory_dim + time_dim
def forward(self, z_src, z_dst, raw_msg... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.utils.data
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_... | beneisner/pytorch_geometric | IdentityMessage | false | 6,317 | [
"MIT"
] | 1 | 53d44a96bd2de2753b1ab1d7153c026c92606a81 | https://github.com/beneisner/pytorch_geometric/tree/53d44a96bd2de2753b1ab1d7153c026c92606a81 |
ToRGB | # 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 ... | uthree/gan-image-generator2 | ToRGB | false | 4,649 | [
"MIT"
] | 0 | 63a9f458f1f78fe13311157a219a5637a59afee4 | https://github.com/uthree/gan-image-generator2/tree/63a9f458f1f78fe13311157a219a5637a59afee4 |
ComplexConv2d | from torch.nn import Module
import torch
from torch.nn import Conv2d
class ComplexConv2d(Module):
def __init__(self, in_channels, out_channels, kernel_size=3, stride=1,
padding=0, dilation=1, groups=1, bias=True):
super(ComplexConv2d, self).__init__()
self.conv_r = Conv2d(in_channels, 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.nn import Module
from torch.nn import Conv2d
assert_size_stride = tor... | drydenwiebe/complexPyTorch | ComplexConv2d | false | 12,323 | [
"MIT"
] | 0 | cea88ba7ee5692dfa1b40f0ba609ef14160d5073 | https://github.com/drydenwiebe/complexPyTorch/tree/cea88ba7ee5692dfa1b40f0ba609ef14160d5073 |
ReconstructionLayer | import torch
import torch.nn as nn
class ReconstructionLayer(nn.Module):
def __init__(self, ratio, input_channel, output_channel):
super(ReconstructionLayer, self).__init__()
self.deconv_features = nn.ConvTranspose1d(input_channel,
output_channel, ratio, stride=ratio)
def forward... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | LXie502/point_based_pcgc | ReconstructionLayer | false | 2,492 | [
"MIT"
] | 0 | 9c4b577d35276c8674b568efc0b9d2473bb00a70 | https://github.com/LXie502/point_based_pcgc/tree/9c4b577d35276c8674b568efc0b9d2473bb00a70 |
SelfAttention | # 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.... | jiyfeng/transformer-text-tasks | SelfAttention | false | 3,757 | [
"MIT"
] | 0 | b06349ca759bc8084a5880a425153dfdd7b91a98 | https://github.com/jiyfeng/transformer-text-tasks/tree/b06349ca759bc8084a5880a425153dfdd7b91a98 |
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.... | muberraozmen/MrMP | ScaledDotProductAttention | false | 4,041 | [
"MIT"
] | 0 | da6bcccbad85a682c848ff4aa1121c773d779e57 | https://github.com/muberraozmen/MrMP/tree/da6bcccbad85a682c848ff4aa1121c773d779e57 |
F_fully_connected | # 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 ... | zimmerrol/FrEIA | F_fully_connected | false | 4,668 | [
"MIT"
] | 0 | 73d01ab8c90e0deb5e242d66405bd168db06dc19 | https://github.com/zimmerrol/FrEIA/tree/73d01ab8c90e0deb5e242d66405bd168db06dc19 |
MatchModule | import torch
import torch.nn as nn
import torch.nn.functional as F
class MatchModule(nn.Module):
"""
Computing the match representation for Match LSTM.
:param hidden_size: Size of hidden vectors.
:param dropout_rate: Dropout rate of the projection layer. Defaults to 0.
Examples:
>>> impo... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | ThuYShao/MatchZoo-py | MatchModule | false | 11,982 | [
"Apache-2.0"
] | 0 | dd8ff1328af58d3d14aacd1a7d56d79bbf847c15 | https://github.com/ThuYShao/MatchZoo-py/tree/dd8ff1328af58d3d14aacd1a7d56d79bbf847c15 |
OhemCELoss2D | # 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 math
import tor... | dani3l125/TDNet | OhemCELoss2D | false | 15,115 | [
"MIT"
] | 195 | 3f8b5378fcc7f97c26b3760ddaf3d4402cf477d1 | https://github.com/dani3l125/TDNet/tree/3f8b5378fcc7f97c26b3760ddaf3d4402cf477d1 |
MLP | import torch
def choose_nonlinearity(name):
nl = None
if name == 'tanh':
nl = torch.tanh
elif name == 'relu':
nl = torch.relu
elif name == 'sigmoid':
nl = torch.sigmoid
elif name == 'softplus':
nl = torch.nn.functional.softplus
elif name == 'selu':
nl = ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | tailintalent/hamiltonian-nn | MLP | false | 16,553 | [
"Apache-2.0"
] | 293 | 1f6dd2d58ab84977a30584f0d1dd7f8b234e4049 | https://github.com/tailintalent/hamiltonian-nn/tree/1f6dd2d58ab84977a30584f0d1dd7f8b234e4049 |
Fire | import torch
from torch import nn
class Fire(nn.Module):
def __init__(self, inplanes, squeeze_planes, expand1x1_planes,
expand3x3_planes):
super(Fire, self).__init__()
self.inplanes = inplanes
self.squeeze = nn.Conv2d(inplanes, squeeze_planes, kernel_size=1)
self.squeeze_a... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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... | GerardWalsh/DeepLabv3FineTuning | Fire | false | 11,548 | [
"MIT"
] | 0 | 149d4b33a7dc94c56361f559ca67cb0fcf9ae9d5 | https://github.com/GerardWalsh/DeepLabv3FineTuning/tree/149d4b33a7dc94c56361f559ca67cb0fcf9ae9d5 |
Linear_dynamics | import torch
import torch.utils.data
from torch import nn
class Linear_dynamics(nn.Module):
def __init__(self, device='cpu'):
super(Linear_dynamics, self).__init__()
self.time = nn.Parameter(torch.ones(1) * 0.7)
self.device = device
self
def forward(self, x, v):
retur... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.utils.data
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._... | alanpaivaa/egnn | Linear_dynamics | false | 14,789 | [
"MIT"
] | 142 | e9ca6c0c3e1d30a7598efbd66034121b4af8dccc | https://github.com/alanpaivaa/egnn/tree/e9ca6c0c3e1d30a7598efbd66034121b4af8dccc |
GCN2 | import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from scipy.sparse import *
def dropout(x, drop_prob, shared_axes=[], training=False):
"""
Apply dropout to input tensor.
Parameters
----------
input_tensor: ``torch.FloatTensor``
A tensor of shape ``(batch_size,... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import math
import torch.nn a... | Ononoki-Yotsugi/IDGL | GCN2 | false | 9,512 | [
"Apache-2.0"
] | 0 | a99f840681a4ae26c2740ed9e9302d4e15a68c7f | https://github.com/Ononoki-Yotsugi/IDGL/tree/a99f840681a4ae26c2740ed9e9302d4e15a68c7f |
knn_ContrastiveLoss | import torch
import torch.nn as nn
from torch.autograd import *
import torch.nn.init
def cosine_sim(im, s):
"""Cosine similarity between all the image and sentence pairs
"""
return im.mm(s.t())
def order_sim(im, s):
"""Order embeddings similarity measure $max(0, s-im)$
"""
YmX = s.unsqueeze(... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
from to... | WuJie1010/Fine-Grained-Image-Captioning | knn_ContrastiveLoss | false | 18,071 | [
"MIT"
] | 9 | 340bc1868634f3bf0fdd62d439fec32ee1b45407 | https://github.com/WuJie1010/Fine-Grained-Image-Captioning/tree/340bc1868634f3bf0fdd62d439fec32ee1b45407 |
LearnedUpsampling1d | import torch
from torch import nn
class LearnedUpsampling1d(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, bias=True):
super().__init__()
self.conv_t = nn.ConvTranspose1d(in_channels=in_channels,
out_channels=out_channels, kernel_size=kernel_size, stride=
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import 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... | austincap/samplernn-pytorch | LearnedUpsampling1d | false | 3,140 | [
"MIT"
] | 0 | d78399b899dcc116fd20823ae9e006ad8a6df4ea | https://github.com/austincap/samplernn-pytorch/tree/d78399b899dcc116fd20823ae9e006ad8a6df4ea |
SEModule | import torch
import torch.utils.data
import torch.nn as nn
from torch import optim as optim
import torch.nn.parallel
class SEModule(nn.Module):
def __init__(self, channels, reduction):
super(SEModule, self).__init__()
self.fc1 = nn.Conv2d(channels, channels // reduction, kernel_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
import torch.utils.data
impor... | Exir-lxr/crldr-prune-pytorch | SEModule | false | 2,305 | [
"Apache-2.0"
] | 0 | adeb5e0b24ce66ff9531d4d947f72412c1b5c033 | https://github.com/Exir-lxr/crldr-prune-pytorch/tree/adeb5e0b24ce66ff9531d4d947f72412c1b5c033 |
SuperPointNet | # 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.... | albutko/vlb | SuperPointNet | false | 6,206 | [
"BSD-2-Clause"
] | 1 | 437245c0991948eeb36a277937a7e67d389041e4 | https://github.com/albutko/vlb/tree/437245c0991948eeb36a277937a7e67d389041e4 |
SimpleMLP | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.optim
... | plaveczlambert/nonlinearbubbledynamics | SimpleMLP | false | 10,673 | [
"MIT"
] | 0 | 190c5170f7ff6068badeee818c01226c55aaec97 | https://github.com/plaveczlambert/nonlinearbubbledynamics/tree/190c5170f7ff6068badeee818c01226c55aaec97 |
DeResNetBlockGroupNorm | # 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.... | TRUMANCFY/wolf | DeResNetBlockGroupNorm | false | 2,961 | [
"Apache-2.0"
] | 0 | 1a21479256e4f51885e2d2fdd449b1faa61277a6 | https://github.com/TRUMANCFY/wolf/tree/1a21479256e4f51885e2d2fdd449b1faa61277a6 |
Embeddings | import math
import torch
import torch.nn as nn
class Embeddings(nn.Module):
def __init__(self, d_model, vocab):
super(Embeddings, self).__init__()
self.lut = nn.Embedding(vocab, d_model)
self.d_model = d_model
def forward(self, x):
newx = x.long()
embeddingMat = self.... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | CallMeSp/My_flowQA | Embeddings | false | 190 | [
"Apache-2.0"
] | 0 | 87d82551f614b089771b22a1992e2be41a2995b3 | https://github.com/CallMeSp/My_flowQA/tree/87d82551f614b089771b22a1992e2be41a2995b3 |
CategoricalSampler | # 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... | daunfamily/VRP_MHA | CategoricalSampler | false | 12,299 | [
"MIT"
] | 0 | 9c23d181d11dbbacac01299c6e8931b8e266b9b4 | https://github.com/daunfamily/VRP_MHA/tree/9c23d181d11dbbacac01299c6e8931b8e266b9b4 |
PPMConcat | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch._C
import torch.serialization
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strid... | CarnoZhao/mmsegmentation | PPMConcat | false | 7,851 | [
"Apache-2.0"
] | 18 | bdaf3d93c4d33c3f0c15f95879fdd7ab78290c1c | https://github.com/CarnoZhao/mmsegmentation/tree/bdaf3d93c4d33c3f0c15f95879fdd7ab78290c1c |
SinkhornKnopp | # 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
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_str... | TranNhiem/solo-learn | SinkhornKnopp | false | 1,170 | [
"MIT"
] | 0 | 7539732b68d153087d09a26a23e1edfdc49bc086 | https://github.com/TranNhiem/solo-learn/tree/7539732b68d153087d09a26a23e1edfdc49bc086 |
TernaryTanh | # 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... | SohamMazumder/Federated_Segmentation | TernaryTanh | false | 5,828 | [
"MIT"
] | 1 | d4eb681441003ba20f8b251a42a811c8c436f04e | https://github.com/SohamMazumder/Federated_Segmentation/tree/d4eb681441003ba20f8b251a42a811c8c436f04e |
SEModule | import torch
import torch.nn as nn
import torch.nn.parallel
class FastGlobalAvgPool2d(nn.Module):
def __init__(self, flatten=False):
super(FastGlobalAvgPool2d, self).__init__()
self.flatten = flatten
def forward(self, x):
if self.flatten:
in_size = x.size()
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 torch.nn as nn
import ... | HotaekHan/detr_pytorch | SEModule | false | 553 | [
"MIT"
] | 0 | 730e02db0ac8910ef782234a3990587771ad67f9 | https://github.com/HotaekHan/detr_pytorch/tree/730e02db0ac8910ef782234a3990587771ad67f9 |
CecaModule | import math
import torch
import torch.nn.functional as F
import torch.nn as nn
class CecaModule(nn.Module):
"""Constructs a circular ECA module.
ECA module where the conv uses circular padding rather than zero padding.
Unlike the spatial dimension, the channels do not have inherent ordering nor
local... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | infomon/meta_nas | CecaModule | false | 6,887 | [
"Apache-2.0"
] | 1 | b81b7de86d26ae1ec0d6646b4277f3c918e5e35d | https://github.com/infomon/meta_nas/tree/b81b7de86d26ae1ec0d6646b4277f3c918e5e35d |
BertSelfOutput | from _paritybench_helpers import _mock_config
import torch
from torch import nn
import torch.onnx
class BertLayerNorm(nn.Module):
def __init__(self, hidden_size, eps=1e-12):
"""Construct a layernorm module in the TF style (epsilon inside the square root).
"""
super(BertLayerNorm, self... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch import n... | xerothermic/examples | BertSelfOutput | false | 11,043 | [
"MIT"
] | 0 | d9d0ad02bac27fc483079d27c86b54145e45f81b | https://github.com/xerothermic/examples/tree/d9d0ad02bac27fc483079d27c86b54145e45f81b |
ClassificationModel | import torch
import torch.nn as nn
class ClassificationModel(nn.Module):
def __init__(self, num_features_in, num_anchors=9, num_classes=80,
prior=0.01, feature_size=256):
super(ClassificationModel, self).__init__()
self.num_classes = num_classes
self.num_anchors = num_anchors
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | alexrusciano/nms_free_retinanet | ClassificationModel | false | 9,746 | [
"Apache-2.0"
] | 0 | 3461a86e9dea71a756b92a434c62798bbf86b52d | https://github.com/alexrusciano/nms_free_retinanet/tree/3461a86e9dea71a756b92a434c62798bbf86b52d |
WassersteinGANLossDiscriminator | # 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/Mode_Collapse | WassersteinGANLossDiscriminator | false | 7,905 | [
"MIT"
] | 14 | 937ee8bf96510fbf4070fc7e14b78276ab036b8c | https://github.com/ChristophReich1996/Mode_Collapse/tree/937ee8bf96510fbf4070fc7e14b78276ab036b8c |
GELU | import torch
import torch.nn.functional as F
import torch.utils.model_zoo
import torch.nn.parallel
import torch.optim
import torch.utils.data
import torch.utils.data.distributed
class GELU(torch.nn.Module):
def forward(self, x):
return F.gelu(x)
def get_inputs():
return [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
from torch._inductor.runtime.triton_helpers import libdevice
import torch.utils.model_zoo
import torch.nn.parallel
import torch.optim
import... | HelenR6/imagenet-r | GELU | false | 13,758 | [
"MIT"
] | 155 | 0bf04f2bf5d60d1098fc9a78f4e8c042e434eb69 | https://github.com/HelenR6/imagenet-r/tree/0bf04f2bf5d60d1098fc9a78f4e8c042e434eb69 |
PredictFC | # 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... | DistinctVision/conditional-lane-detection | PredictFC | false | 11,350 | [
"Apache-2.0"
] | 0 | b118a40738188facf63ec7cd0bb0422fdf562b77 | https://github.com/DistinctVision/conditional-lane-detection/tree/b118a40738188facf63ec7cd0bb0422fdf562b77 |
GANLossGenerator | # 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... | ChristophReich1996/Mode_Collapse | GANLossGenerator | false | 7,910 | [
"MIT"
] | 14 | 937ee8bf96510fbf4070fc7e14b78276ab036b8c | https://github.com/ChristophReich1996/Mode_Collapse/tree/937ee8bf96510fbf4070fc7e14b78276ab036b8c |
Net | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | Rui-Chun/CNN-with-Numpy | Net | false | 11,821 | [
"MIT"
] | 0 | 0bc73040c7ada2581d2db3d6e4b2396fa98a4bde | https://github.com/Rui-Chun/CNN-with-Numpy/tree/0bc73040c7ada2581d2db3d6e4b2396fa98a4bde |
ContrastiveLoss | import torch
from torch import nn
from torch.nn import functional as F
from torch.utils.data import *
from torch.distributions import *
import torch.nn.parallel
import torch.optim
import torch.utils.data
import torch.utils.data.distributed
class ContrastiveLoss(nn.Module):
"""
Contrastive loss
Takes embed... | 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
from to... | cgsas/LOB | ContrastiveLoss | false | 15,012 | [
"MIT"
] | 97 | 4175912194c2a066b2d7df038a376484b57ed76c | https://github.com/cgsas/LOB/tree/4175912194c2a066b2d7df038a376484b57ed76c |
ModConst | import torch
class ModConst(torch.nn.Module):
def __init__(self):
super(ModConst, self).__init__()
def forward(self, x):
return x % 2.0
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_c... | PogChamper/torch2trt | ModConst | false | 14,198 | [
"MIT"
] | 3,363 | 43b12627ec0de4d212efb6d02b07570205085ccc | https://github.com/PogChamper/torch2trt/tree/43b12627ec0de4d212efb6d02b07570205085ccc |
ColorJitterLayer | from torch.autograd import Function
import math
import numbers
import torch
import numpy as np
import torch.nn as nn
import torch.utils.cpp_extension
def hsv2rgb(hsv):
"""Convert a 4-d HSV tensor to the RGB counterpart.
>>> %timeit hsv2rgb_lookup(hsv)
2.37 ms ± 13.4 µs per loop (mean ± std. dev. of 7 runs... | 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.... | yingnengd/MyGAN | ColorJitterLayer | false | 4,745 | [
"MIT"
] | 0 | 6e4abbe165c8f3b1e1b69d5d01177712761a3a1c | https://github.com/yingnengd/MyGAN/tree/6e4abbe165c8f3b1e1b69d5d01177712761a3a1c |
Sine | # 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
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_... | Fred62879/ACORN | Sine | false | 2,290 | [
"MIT"
] | 0 | 2de0bf747d595dbdc4d67311fb8f46cf47f9b4cb | https://github.com/Fred62879/ACORN/tree/2de0bf747d595dbdc4d67311fb8f46cf47f9b4cb |
MultiSoftmaxCrossEntropyLoss | import torch
import numpy as np
import torch as th
import torch.nn as nn
import torch.utils.data.distributed
class MultiSoftmaxCrossEntropyLoss(nn.Module):
def __init__(self, class_weight=None, label_smoothing_value=0):
super(MultiSoftmaxCrossEntropyLoss, self).__init__()
self.class_weight = clas... | 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 numpy as np
imp... | microsoft/vision-longformer | MultiSoftmaxCrossEntropyLoss | false | 16,062 | [
"MIT"
] | 169 | c9ce386de3e633bb3c805368d118356fbd696487 | https://github.com/microsoft/vision-longformer/tree/c9ce386de3e633bb3c805368d118356fbd696487 |
LeNet | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.nn.parallel
import torch.optim
import torch.utils.data
import torch.utils.data.distributed
from torchvision.transforms import functional as F
from torch.nn import functional as F
class LeNet(nn.Module):
def __init__(self, num_classes... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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 ... | amazon-research/network-deconvolution-pp | LeNet | false | 18,353 | [
"Apache-2.0"
] | 6 | 99e27ecec7d27c7c4c3fb230e96005bdcbf6f2ce | https://github.com/amazon-research/network-deconvolution-pp/tree/99e27ecec7d27c7c4c3fb230e96005bdcbf6f2ce |
decoderDepth | # 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.... | Miles629/TransparentShapeRealData | decoderDepth | false | 14,275 | [
"MIT"
] | 91 | b81098a2d1882f5fd33fba6167d7258dbe02d6d2 | https://github.com/Miles629/TransparentShapeRealData/tree/b81098a2d1882f5fd33fba6167d7258dbe02d6d2 |
HistogramLayerUNET | # 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
import torch.... | GatorSense/Histological_Segmentation | HistogramLayerUNET | false | 487 | [
"MIT"
] | 0 | 12849fff3d9d58c1fe419b18dba49294db375488 | https://github.com/GatorSense/Histological_Segmentation/tree/12849fff3d9d58c1fe419b18dba49294db375488 |
TorchGloVeModel | # 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
from torch.nn.init import xavier_u... | atticusg/cs224u | TorchGloVeModel | false | 1,492 | [
"Apache-2.0"
] | 0 | 66e0f2714e246dcb8836f706ae9ff5613c51ed34 | https://github.com/atticusg/cs224u/tree/66e0f2714e246dcb8836f706ae9ff5613c51ed34 |
AEBatch | import torch
import torch.nn as nn
import torch._utils
class AEBatch(nn.Module):
def __init__(self):
super(AEBatch, self).__init__()
def forward(self, estimated_density_map, gt_num):
return torch.abs(torch.sum(estimated_density_map, dim=(1, 2, 3)) -
gt_num)
def get_inputs():
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
import torch._utils
assert_size_stride = torch._C._... | Zhaoyi-Yan/DCANet | AEBatch | false | 18,180 | [
"MIT"
] | 3 | 1d99481494f4ef3cfe5abf227fa49a51011364bf | https://github.com/Zhaoyi-Yan/DCANet/tree/1d99481494f4ef3cfe5abf227fa49a51011364bf |
CNN | import torch
import torch.nn as nn
import torch.nn.functional as F
class CNN(nn.Module):
def __init__(self):
super(CNN, self).__init__()
self.conv1 = nn.Conv2d(1, 10, kernel_size=5)
self.conv2 = nn.Conv2d(10, 20, kernel_size=5)
self.conv2_drop = nn.Dropout2d()
self.fc1 = n... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | alexandergg/Deep-Learning-with-Pytorch-and-Azure | CNN | false | 3,088 | [
"MIT"
] | 0 | 8999ce815469ecaf9fb61998372a6e7507c15943 | https://github.com/alexandergg/Deep-Learning-with-Pytorch-and-Azure/tree/8999ce815469ecaf9fb61998372a6e7507c15943 |
LeafClassifier | # 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
from ... | dips4717/ui-hier-net | LeafClassifier | false | 3,419 | [
"MIT"
] | 0 | 7c93168b6150ea00e15638504cf561eda98de5c6 | https://github.com/dips4717/ui-hier-net/tree/7c93168b6150ea00e15638504cf561eda98de5c6 |
ReverseMaskConv | import math
import torch
from torch import nn
from torch.nn.parameter import Parameter
def weights_init(init_type='gaussian'):
def init_fun(m):
classname = m.__class__.__name__
if (classname.find('Conv') == 0 or classname.find('Linear') == 0
) and hasattr(m, 'weight'):
if ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | DLwbm123/LBAM_inpainting | ReverseMaskConv | false | 17,213 | [
"MIT"
] | 7 | c809c3cedf09cda7c175e930c7834ac39d8f526f | https://github.com/DLwbm123/LBAM_inpainting/tree/c809c3cedf09cda7c175e930c7834ac39d8f526f |
ContrastiveLoss | import torch
from torchvision.transforms import functional as F
import torch.utils.data
from torch import nn
import torch.nn.functional as F
class ContrastiveLoss(nn.Module):
"""
Contrastive loss
Takes embeddings of two samples and a target label == 1 if samples are from the same class and label == 0 othe... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice
import torch.utils.data
from... | Sigma10010/nuclei_cells_det | ContrastiveLoss | false | 17,931 | [
"MIT"
] | 4 | c074175fec8938472bb4cddabd83d1d0ea78f230 | https://github.com/Sigma10010/nuclei_cells_det/tree/c074175fec8938472bb4cddabd83d1d0ea78f230 |
chroma_subsampling | import torch
import torch.nn as nn
class chroma_subsampling(nn.Module):
""" Chroma subsampling on CbCv channels
Input:
image(tensor): batch x height x width x 3
Output:
y(tensor): batch x height x width
cb(tensor): batch x height/2 x width/2
cr(tensor): batch x height/2 x 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... | foxtrotmike/DiffJPEG | chroma_subsampling | false | 12,396 | [
"MIT"
] | 0 | 7dbc44b1e921f20a213a7206a8578d6a1c8131b4 | https://github.com/foxtrotmike/DiffJPEG/tree/7dbc44b1e921f20a213a7206a8578d6a1c8131b4 |
PatchEmbedOverlap | import torch
from torch import Tensor
from torch import nn
class PatchEmbedOverlap(nn.Module):
"""Image to Patch Embedding with overlapping
"""
def __init__(self, patch_size=16, stride=16, padding=0, embed_dim=768):
super().__init__()
self.proj = nn.Conv2d(3, embed_dim, patch_size, stride... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import 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... | sithu31296/image_classification | PatchEmbedOverlap | false | 16,467 | [
"MIT"
] | 57 | 6b8cbce96100225621cee3166a73e852ba216cc3 | https://github.com/sithu31296/image_classification/tree/6b8cbce96100225621cee3166a73e852ba216cc3 |
SlicedWasserstein | import torch
class SlicedWasserstein(torch.nn.Module):
"""
Implementation of the loss used in
[Sliced Wasserstein Discrepancy for Unsupervised Domain Adaptation](https://arxiv.org/abs/1903.04064)
"""
def __init__(self, m: 'int'=128):
"""
Arguments:
m: The dimensionalit... | 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... | KevinMusgrave/pytorch-adapt | SlicedWasserstein | false | 13,961 | [
"MIT"
] | 131 | ff1491e1bfcc586afb8ee619712c8816ddf10358 | https://github.com/KevinMusgrave/pytorch-adapt/tree/ff1491e1bfcc586afb8ee619712c8816ddf10358 |
ConditionalBatchNorm2d | import torch
import torch.nn as nn
from torch.nn import Parameter
def l2normalize(v, eps=0.0001):
return v / (v.norm() + eps)
class SpectralNorm(nn.Module):
def __init__(self, module, name='weight', power_iterations=1):
super(SpectralNorm, self).__init__()
self.module = module
self.... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as ... | bhagwanalbert/BigGAN-PyTorch | ConditionalBatchNorm2d | false | 9,790 | [
"MIT"
] | 0 | 34bd6d9d04bb2e9699c27324454197dd01584d22 | https://github.com/bhagwanalbert/BigGAN-PyTorch/tree/34bd6d9d04bb2e9699c27324454197dd01584d22 |
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
import torch.nn.parallel
from torch.nn.quantized.modules import Flo... | a1004123217/pytorch-mobile | HSigmoid | false | 1,335 | [
"MIT"
] | 0 | 97974af3259a2073efbc334d57841efbd3eaadfb | https://github.com/a1004123217/pytorch-mobile/tree/97974af3259a2073efbc334d57841efbd3eaadfb |
CosAttention | import torch
import torch.nn.functional as F
import torch.nn as nn
from torch.nn import Parameter
class ConstAttention(nn.Module):
def __init__(self, **kwargs):
super(ConstAttention, self).__init__()
def forward(self, neighbor_vecs, self_vecs):
return 1
class GatAttention(ConstAttention):
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn.functional as F
import torch.nn as nn
from torch.nn import Parameter
assert_size_stride = torch._C._dynamo.guards.assert_siz... | AlexMinhao/NAS_GNN | CosAttention | false | 15 | [
"Apache-2.0"
] | 0 | 89183988a96e1d6baed910ab3843c13282f8b077 | https://github.com/AlexMinhao/NAS_GNN/tree/89183988a96e1d6baed910ab3843c13282f8b077 |
TensorRange | import torch
def tensor_max(input, dim, keepdim=False):
if isinstance(dim, int):
return torch.max(input, dim=dim, keepdim=keepdim)[0]
else:
if isinstance(dim, tuple):
dim = list(dim)
for d in dim:
input = torch.max(input, dim=d, keepdim=keepdim)[0]
retur... | 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... | Minyus/pipelinex | TensorRange | false | 14,042 | [
"Apache-2.0"
] | 188 | f35c524ec9c50751ee27d9a42d98317e16f1c544 | https://github.com/Minyus/pipelinex/tree/f35c524ec9c50751ee27d9a42d98317e16f1c544 |
DeepAutoencoder | import torch
import torch.nn as nn
import torch.nn.functional as F
class DeepAutoencoder(nn.Module):
def __init__(self, input_length, output_length=None, neuron_multiplier=
1, sigmoid=False, drop=False, drop_pct=0.3):
"""
Dense deep autoencoder.
Args:
input_l... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | mariajmolina/ML-for-S2S | DeepAutoencoder | false | 10,567 | [
"MIT"
] | 0 | 3de32e72042ba7e8b37a433579fa9c5630246d8c | https://github.com/mariajmolina/ML-for-S2S/tree/3de32e72042ba7e8b37a433579fa9c5630246d8c |
Network | import torch
import torch.nn as nn
class Network(nn.Module):
def __init__(self, input_shape, output_shape, n_features, **kwargs):
super(Network, self).__init__()
n_input = input_shape[-1]
n_output = output_shape[0]
self._h1 = nn.Linear(n_input, n_features)
self._h2 = nn.Li... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | PuzeLiu/mushroom-rl | Network | false | 14,251 | [
"MIT"
] | 344 | 99942b425e66b4ddcc26009d7105dde23841e95d | https://github.com/PuzeLiu/mushroom-rl/tree/99942b425e66b4ddcc26009d7105dde23841e95d |
dice_bce_loss | # 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.model_zoo
assert_size_stride = torch._C._dynamo.... | manuel-rdz/SGL-Retinal-Vessel-Segmentation | dice_bce_loss | false | 16,007 | [
"MIT"
] | 45 | 7897d977e77aa0b5d3acb86e0aa74c6829d67415 | https://github.com/manuel-rdz/SGL-Retinal-Vessel-Segmentation/tree/7897d977e77aa0b5d3acb86e0aa74c6829d67415 |
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 ... | anoushkt/craftassist | HighwayNetwork | false | 6,214 | [
"MIT"
] | 1 | c200af65e52e800f0f0cc540fe836b644383349d | https://github.com/anoushkt/craftassist/tree/c200af65e52e800f0f0cc540fe836b644383349d |
LabelSmoothCELoss | # 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
... | PaParaZz1/DI-engine | LabelSmoothCELoss | false | 11,848 | [
"Apache-2.0"
] | 0 | b38144117c1ebc6eb860d8637ec8866dfbcdf2de | https://github.com/PaParaZz1/DI-engine/tree/b38144117c1ebc6eb860d8637ec8866dfbcdf2de |
NeuralNetMultiplePositionalArgumentsMultiOutputsWithDependency | import torch
import torch.nn
import torch.onnx
import torch.utils.checkpoint
class NeuralNetMultiplePositionalArgumentsMultiOutputsWithDependency(torch.
nn.Module):
def __init__(self, input_size, hidden_size, num_classes):
super(NeuralNetMultiplePositionalArgumentsMultiOutputsWithDependency,
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | almiliMSFT/onnxruntime | NeuralNetMultiplePositionalArgumentsMultiOutputsWithDependency | false | 14,820 | [
"MIT"
] | 6,036 | c002dc86a364852859ca9642698fcfc5edf22c9d | https://github.com/almiliMSFT/onnxruntime/tree/c002dc86a364852859ca9642698fcfc5edf22c9d |
Discriminator | import torch
import torch.nn as nn
import torch.utils.data
class Discriminator(nn.Module):
def __init__(self, n_h):
super(Discriminator, self).__init__()
self.f_k = nn.Bilinear(n_h, n_h, 1)
for m in self.modules():
self.weights_init(m)
def weights_init(self, m):
i... | 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.... | Shen-Lab/GraphCL | Discriminator | false | 14,408 | [
"MIT"
] | 275 | 1d43f79d7f33f8133f9d4b4b8254d8aaeb09a615 | https://github.com/Shen-Lab/GraphCL/tree/1d43f79d7f33f8133f9d4b4b8254d8aaeb09a615 |
ConvSample | import torch
class ConvSample(torch.nn.Module):
def __init__(self):
super().__init__()
self.conv1 = torch.nn.Conv2d(in_channels=1, out_channels=5,
kernel_size=5, stride=2, padding=2)
self.conv2 = torch.nn.Conv2d(in_channels=5, out_channels=5,
kernel_size=3, stride=... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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... | ahgamut/torchrecord | ConvSample | false | 6,126 | [
"MIT"
] | 1 | 6ab623776d12e0ae6497c34e93d16407e0a9c9c2 | https://github.com/ahgamut/torchrecord/tree/6ab623776d12e0ae6497c34e93d16407e0a9c9c2 |
WNConv2d | import torch
import torch.nn as nn
class WNConv2d(nn.Module):
def __init__(self, in_channel, out_channel, kernel_size, stride=1,
padding=0, bias=True, activation=None):
super().__init__()
self.conv = nn.utils.weight_norm(nn.Conv2d(in_channel, out_channel,
kernel_size, stride=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.triton_helpers import libdevice
import torch.nn as ... | imatge-upc/pixelcoordEDL | WNConv2d | false | 6,873 | [
"MIT"
] | 1 | 353632feed6ac8c93758c1a2a1b7a477e7ff053c | https://github.com/imatge-upc/pixelcoordEDL/tree/353632feed6ac8c93758c1a2a1b7a477e7ff053c |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.