entry_point stringlengths 1 65 | original_triton_code stringlengths 4.5k 619k | python_code stringlengths 208 60.9k | 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 | pytorch_code stringlengths 200 4.05k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
MobileBertSelfAttention | # 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... | from _paritybench_helpers import _mock_config
import math
import torch
from torch import nn
import torch.utils.checkpoint
class MobileBertSelfAttention(nn.Module):
def __init__(self, config):
super().__init__()
self.num_attention_heads = config.num_attention_heads
self.attention_head_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.... | Clemens123/transformers | MobileBertSelfAttention | false | 12,523 | [
"Apache-2.0"
] | 0 | 22abe7bbc587c16ec30f9d1aa549dcbeba6e9e26 | https://github.com/Clemens123/transformers/tree/22abe7bbc587c16ec30f9d1aa549dcbeba6e9e26 | from _paritybench_helpers import _mock_config
import math
import torch
from torch import nn
import torch.utils.checkpoint
class Model(nn.Module):
def __init__(self, config):
super().__init__()
self.num_attention_heads = config.num_attention_heads
self.attention_head_size = int(config.true... |
GANFeatLoss | # 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 functools
import torch
from torch import nn as nn
from torch.nn import functional as F
from torch.nn import init as init
from torchvision.models import vgg as vgg
import torch.utils.data
from torch.utils import data as data
from torch import autograd as autograd
def reduce_loss(loss, reduction):
"""Reduce ... | 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 functools
from torch import nn as nn
from torch.nn import function... | hyunobae/BasicSR | GANFeatLoss | false | 12,524 | [
"Apache-2.0"
] | 0 | f2c2fc6cf28933658816c808f55c95fa20b16483 | https://github.com/hyunobae/BasicSR/tree/f2c2fc6cf28933658816c808f55c95fa20b16483 | import functools
import torch
from torch import nn as nn
from torch.nn import functional as F
from torch.nn import init as init
from torchvision.models import vgg as vgg
import torch.utils.data
from torch.utils import data as data
from torch import autograd as autograd
def reduce_loss(loss, reduction):
"""Reduce ... |
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
import torch.nn as nn
import torch.nn.functional as F
class Net(nn.Module):
def __init__(self, n_input, n_output):
super(Net, self).__init__()
self.fc1 = nn.Linear(n_input, 20)
self.dropout1 = nn.Dropout(0.25)
self.fc2 = nn.Linear(20, 20)
self.dropout2 = nn.Dr... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | ihsgnef/duolingo-halflife-regression | Net | false | 12,525 | [
"MIT"
] | 0 | 01c7895eee0450462b5277a055d2ae1de58f1be5 | https://github.com/ihsgnef/duolingo-halflife-regression/tree/01c7895eee0450462b5277a055d2ae1de58f1be5 | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
def __init__(self, n_input, n_output):
super().__init__()
self.fc1 = nn.Linear(n_input, 20)
self.dropout1 = nn.Dropout(0.25)
self.fc2 = nn.Linear(20, 20)
self.dropout2 = nn.Dropout(0... |
Conv_Q | # 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 torch.nn as nn
import torch.nn.functional as F
class Conv_Q(nn.Module):
def __init__(self, frames, num_actions):
super(Conv_Q, self).__init__()
self.c1 = nn.Conv2d(frames, 32, kernel_size=8, stride=4)
self.c2 = nn.Conv2d(32, 64, kernel_size=4, stride=2)
self.c3... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | hotaekjoo/SQV | Conv_Q | false | 12,526 | [
"MIT"
] | 0 | d725342e7fd8548ee5fa018e5ccac4542969deed | https://github.com/hotaekjoo/SQV/tree/d725342e7fd8548ee5fa018e5ccac4542969deed | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
def __init__(self, frames, num_actions):
super().__init__()
self.c1 = nn.Conv2d(frames, 32, kernel_size=8, stride=4)
self.c2 = nn.Conv2d(32, 64, kernel_size=4, stride=2)
self.c3 = nn.Conv2d(... |
PARALossSoftmax | # 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 torch.nn as nn
import torch.nn.functional as F
class PARALossSoftmax(nn.Module):
"""
Softmax classifier for sentence-level relation extraction.
"""
def __init__(self):
"""
Args:
sentence_encoder: encoder for sentences
num_class: number of cl... | 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
... | igorvlnascimento/open-nre | PARALossSoftmax | false | 12,527 | [
"MIT"
] | 0 | a6e42ef074d62be4d3ceb571f412d5be8c0502d7 | https://github.com/igorvlnascimento/open-nre/tree/a6e42ef074d62be4d3ceb571f412d5be8c0502d7 | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
"""
Softmax classifier for sentence-level relation extraction.
"""
def __init__(self):
"""
Args:
sentence_encoder: encoder for sentences
num_class: number of classes
... |
ModulatedConv2d | # 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... | from torch.autograd import Function
import math
import torch
from torch import nn as nn
from torch.nn import functional as F
from torch.nn import init as init
from torchvision.models import vgg as vgg
import torch.utils.data
from torch.utils import data as data
from torch import autograd as autograd
def make_resample... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.autograd... | hyunobae/BasicSR | ModulatedConv2d | false | 12,528 | [
"Apache-2.0"
] | 0 | f2c2fc6cf28933658816c808f55c95fa20b16483 | https://github.com/hyunobae/BasicSR/tree/f2c2fc6cf28933658816c808f55c95fa20b16483 | from torch.autograd import Function
import math
import torch
from torch import nn as nn
from torch.nn import functional as F
from torch.nn import init as init
from torchvision.models import vgg as vgg
import torch.utils.data
from torch.utils import data as data
from torch import autograd as autograd
def make_resample... |
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... | from torch.autograd import Function
import math
import torch
from torch import nn as nn
from torch.nn import functional as F
from torch.nn import init as init
from torchvision.models import vgg as vgg
import torch.utils.data
from torch.utils import data as data
from torch import autograd as autograd
def make_resample... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch.autograd import Function
import math
from torch import nn as nn
from ... | hyunobae/BasicSR | ToRGB | false | 12,529 | [
"Apache-2.0"
] | 0 | f2c2fc6cf28933658816c808f55c95fa20b16483 | https://github.com/hyunobae/BasicSR/tree/f2c2fc6cf28933658816c808f55c95fa20b16483 | from torch.autograd import Function
import math
import torch
from torch import nn as nn
from torch.nn import functional as F
from torch.nn import init as init
from torchvision.models import vgg as vgg
import torch.utils.data
from torch.utils import data as data
from torch import autograd as autograd
def make_resample... |
ScaleNorm | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch import nn
class ScaleNorm(nn.Module):
def __init__(self, dim, eps=1e-05):
super().__init__()
self.scale = dim ** -0.5
self.eps = eps
self.g = nn.Parameter(torch.ones(1))
def forward(self, x):
norm = torch.linalg.norm(x, dim=-1, keepdim=True)
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice
from torch import nn
assert_... | imflash217/bumblebee | ScaleNorm | false | 12,530 | [
"MIT"
] | 0 | 09343d42634aa954cac867f7e426eee260b4df57 | https://github.com/imflash217/bumblebee/tree/09343d42634aa954cac867f7e426eee260b4df57 | import torch
from torch import nn
class Model(nn.Module):
def __init__(self, dim, eps=1e-05):
super().__init__()
self.scale = dim ** -0.5
self.eps = eps
self.g = nn.Parameter(torch.ones(1))
def forward(self, x):
norm = torch.linalg.norm(x, dim=-1, keepdim=True)
... |
ReluSquared | # 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 import nn
import torch.nn.functional as F
class ReluSquared(nn.Module):
def forward(self, input):
return F.relu(input) ** 2
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 import triton_helpers
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empt... | imflash217/bumblebee | ReluSquared | false | 12,531 | [
"MIT"
] | 0 | 09343d42634aa954cac867f7e426eee260b4df57 | https://github.com/imflash217/bumblebee/tree/09343d42634aa954cac867f7e426eee260b4df57 | import torch
from torch import nn
import torch.nn.functional as F
class Model(nn.Module):
def forward(self, input):
return F.relu(input) ** 2
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return []
|
gram_mse_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 torch.nn as nn
class gram_matrix(nn.Module):
def forward(self, input):
b, c, w, h = input.size()
F = input.view(b, c, h * w)
G = torch.bmm(F, F.transpose(1, 2))
G.div_(h * w)
return G
class gram_mse_loss(nn.Module):
def forward(self, input, targe... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | ipjessica/neural-style-transfer | gram_mse_loss | false | 12,532 | [
"MIT"
] | 0 | ae0fc5e1e69d5d52997e5cab69e880085e04723b | https://github.com/ipjessica/neural-style-transfer/tree/ae0fc5e1e69d5d52997e5cab69e880085e04723b | import torch
import torch.nn as nn
class gram_matrix(nn.Module):
def forward(self, input):
b, c, w, h = input.size()
F = input.view(b, c, h * w)
G = torch.bmm(F, F.transpose(1, 2))
G.div_(h * w)
return G
class Model(nn.Module):
def forward(self, input, target):
... |
ECB | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch import nn as nn
from torch.nn import functional as F
from torch.nn import init as init
from torchvision.models import vgg as vgg
import torch.utils.data
from torch.utils import data as data
from torch import autograd as autograd
class SeqConv3x3(nn.Module):
def __init__(self, seq_type, 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 import nn as nn
from torch.nn import functional as F
from torch.nn im... | hyunobae/BasicSR | ECB | false | 12,533 | [
"Apache-2.0"
] | 0 | f2c2fc6cf28933658816c808f55c95fa20b16483 | https://github.com/hyunobae/BasicSR/tree/f2c2fc6cf28933658816c808f55c95fa20b16483 | import torch
from torch import nn as nn
from torch.nn import functional as F
from torch.nn import init as init
from torchvision.models import vgg as vgg
import torch.utils.data
from torch.utils import data as data
from torch import autograd as autograd
class SeqConv3x3(nn.Module):
def __init__(self, seq_type, in... |
FullSelfAttn | # 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 torch.nn as nn
import torch.utils.data
class FullSelfAttn(nn.Module):
""" Self attention Layer"""
def __init__(self, in_dim):
super().__init__()
self.query_conv = nn.Conv2d(in_channels=in_dim, out_channels=in_dim //
2, kernel_size=1)
self.key_conv = nn.... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | ilyak93/SinGanF2 | FullSelfAttn | false | 12,534 | [
"MIT"
] | 0 | fa6b135ef4699626ce450afd02ed3b269e4ca16d | https://github.com/ilyak93/SinGanF2/tree/fa6b135ef4699626ce450afd02ed3b269e4ca16d | import torch
import torch.nn as nn
import torch.utils.data
class Model(nn.Module):
""" Self attention Layer"""
def __init__(self, in_dim):
super().__init__()
self.query_conv = nn.Conv2d(in_channels=in_dim, out_channels=in_dim //
2, kernel_size=1)
self.key_conv = nn.Conv2d(... |
gram_matrix | # 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 torch.nn as nn
class gram_matrix(nn.Module):
def forward(self, input):
b, c, w, h = input.size()
F = input.view(b, c, h * w)
G = torch.bmm(F, F.transpose(1, 2))
G.div_(h * w)
return G
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_i... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | ipjessica/neural-style-transfer | gram_matrix | false | 12,535 | [
"MIT"
] | 0 | ae0fc5e1e69d5d52997e5cab69e880085e04723b | https://github.com/ipjessica/neural-style-transfer/tree/ae0fc5e1e69d5d52997e5cab69e880085e04723b | import torch
import torch.nn as nn
class Model(nn.Module):
def forward(self, input):
b, c, w, h = input.size()
F = input.view(b, c, h * w)
G = torch.bmm(F, F.transpose(1, 2))
G.div_(h * w)
return G
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_in... |
GramMatrix | # 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 torch.nn as nn
class GramMatrix(nn.Module):
def forward(self, input):
a, b, c, d = input.size()
features = input.view(a * b, c * d)
G = torch.mm(features, features.t())
return G.div(a * b * c * d)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | invoker4zoo/pytorch_model | GramMatrix | false | 12,536 | [
"MIT"
] | 0 | b74f005ba1be5e66fafaa2745fc7d1815979e91f | https://github.com/invoker4zoo/pytorch_model/tree/b74f005ba1be5e66fafaa2745fc7d1815979e91f | import torch
import torch.nn as nn
class Model(nn.Module):
def forward(self, input):
a, b, c, d = input.size()
features = input.view(a * b, c * d)
G = torch.mm(features, features.t())
return G.div(a * b * c * d)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_i... |
ChannelWiseLayerNorm | # 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 torch.nn as nn
class ChannelWiseLayerNorm(nn.LayerNorm):
"""
Channel wise layer normalization
"""
def __init__(self, *args, **kwargs):
super(ChannelWiseLayerNorm, self).__init__(*args, **kwargs)
def forward(self, x):
"""
x: BS x N x K
"""
... | 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_... | intflow/FullSubNet | ChannelWiseLayerNorm | false | 12,537 | [
"MIT"
] | 0 | 193091acac4c747730db5ace33fd1b8870e7c735 | https://github.com/intflow/FullSubNet/tree/193091acac4c747730db5ace33fd1b8870e7c735 | import torch
import torch.nn as nn
class Model(nn.LayerNorm):
"""
Channel wise layer normalization
"""
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def forward(self, x):
"""
x: BS x N x K
"""
if x.dim() != 3:
raise Run... |
CumulativeMagSpectralNorm | # 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 torch.nn as nn
class CumulativeMagSpectralNorm(nn.Module):
def __init__(self, cumulative=False, use_mid_freq_mu=False):
"""
Args:
cumulative: 是否采用累积的方式计算 mu
use_mid_freq_mu: 仅采用中心频率的 mu 来代替全局 mu
Notes:
先算均值再累加 等同于 先累加再算均值
... | 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... | intflow/FullSubNet | CumulativeMagSpectralNorm | false | 12,538 | [
"MIT"
] | 0 | 193091acac4c747730db5ace33fd1b8870e7c735 | https://github.com/intflow/FullSubNet/tree/193091acac4c747730db5ace33fd1b8870e7c735 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, cumulative=False, use_mid_freq_mu=False):
"""
Args:
cumulative: 是否采用累积的方式计算 mu
use_mid_freq_mu: 仅采用中心频率的 mu 来代替全局 mu
Notes:
先算均值再累加 等同于 先累加再算均值
"""
super().... |
GradientReversal | # 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
class GradientReversalFunction(torch.autograd.Function):
"""
Gradient Reversal Layer from:
Unsupervised Domain Adaptation by Backpropagation (Ganin & Lempitsky, 2015)
Forward pass is the identity function.
In the backward pass,
the upstream gradients are multiplied by -lambda (i.e... | 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... | ishine/CDFSE_FastSpeech2 | GradientReversal | false | 12,539 | [
"MIT"
] | 0 | f0facd077fa3e11b2704f2e8a1d1315bd1f4f493 | https://github.com/ishine/CDFSE_FastSpeech2/tree/f0facd077fa3e11b2704f2e8a1d1315bd1f4f493 | import torch
class GradientReversalFunction(torch.autograd.Function):
"""
Gradient Reversal Layer from:
Unsupervised Domain Adaptation by Backpropagation (Ganin & Lempitsky, 2015)
Forward pass is the identity function.
In the backward pass,
the upstream gradients are multiplied by -lambda (i.e... |
ConvLeaky | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch import nn
from torch.nn import functional as F
class ConvLeaky(nn.Module):
def __init__(self, in_dim, out_dim):
super(ConvLeaky, self).__init__()
self.conv1 = nn.Conv2d(in_channels=in_dim, out_channels=out_dim,
kernel_size=3, stride=1, padding=1)
self.c... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_st... | ivan94fi/fast-sr-unet | ConvLeaky | false | 12,540 | [
"MIT"
] | 0 | 76ff5ee1ca87d8cdd06ce3ec406cfac533041d83 | https://github.com/ivan94fi/fast-sr-unet/tree/76ff5ee1ca87d8cdd06ce3ec406cfac533041d83 | import torch
from torch import nn
from torch.nn import functional as F
class Model(nn.Module):
def __init__(self, in_dim, out_dim):
super().__init__()
self.conv1 = nn.Conv2d(in_channels=in_dim, out_channels=out_dim,
kernel_size=3, stride=1, padding=1)
self.conv2 = nn.Conv2d(in... |
ConvTemporalGraphical | # 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 torch.nn as nn
class ConvTemporalGraphical(nn.Module):
"""The basic module for applying a graph convolution.
Args:
in_channels (int): Number of channels in the input sequence data
out_channels (int): Number of channels produced by the convolution
A_channels (int): ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | ishine/speech2affective_gestures | ConvTemporalGraphical | false | 12,541 | [
"MIT"
] | 0 | ea99e3edd82b8ab50a6f63cff301618762b73187 | https://github.com/ishine/speech2affective_gestures/tree/ea99e3edd82b8ab50a6f63cff301618762b73187 | import torch
import torch.nn as nn
class Model(nn.Module):
"""The basic module for applying a graph convolution.
Args:
in_channels (int): Number of channels in the input sequence data
out_channels (int): Number of channels produced by the convolution
A_channels (int): Number of channe... |
SACActorNetwork | # 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 torch.nn.functional as F
import torch.nn as nn
class SACActorNetwork(nn.Module):
def __init__(self, input_shape, output_shape, n_features, **kwargs):
super(SACActorNetwork, self).__init__()
n_input = input_shape[-1]
n_output = output_shape[0]
self._h1 = nn.Line... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | jacarvalho/mushroom-rl-benchmark | SACActorNetwork | false | 12,542 | [
"MIT"
] | 0 | 5bc2e9b1a12be33827d6edcd5c5ad49571e11275 | https://github.com/jacarvalho/mushroom-rl-benchmark/tree/5bc2e9b1a12be33827d6edcd5c5ad49571e11275 | import torch
import torch.nn.functional as F
import torch.nn as nn
class Model(nn.Module):
def __init__(self, input_shape, output_shape, n_features, **kwargs):
super().__init__()
n_input = input_shape[-1]
n_output = output_shape[0]
self._h1 = nn.Linear(n_input, n_features)
... |
A2CNetwork | # 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 torch.nn as nn
class A2CNetwork(nn.Module):
def __init__(self, input_shape, output_shape, n_features, **kwargs):
super(A2CNetwork, self).__init__()
n_input = input_shape[-1]
n_output = output_shape[0]
self._h1 = nn.Linear(n_input, n_features)
self._h2 =... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | jacarvalho/mushroom-rl-benchmark | A2CNetwork | false | 12,543 | [
"MIT"
] | 0 | 5bc2e9b1a12be33827d6edcd5c5ad49571e11275 | https://github.com/jacarvalho/mushroom-rl-benchmark/tree/5bc2e9b1a12be33827d6edcd5c5ad49571e11275 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, input_shape, output_shape, n_features, **kwargs):
super().__init__()
n_input = input_shape[-1]
n_output = output_shape[0]
self._h1 = nn.Linear(n_input, n_features)
self._h2 = nn.Linear(n_features... |
DropConnect | # 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
class DropConnect(torch.nn.Module):
def __init__(self, p):
super(DropConnect, self).__init__()
self.p = p
def forward(self, inputs):
batch_size = inputs.shape[0]
inputs.shape[2]
inputs.shape[3]
channel_size = inputs.shape[1]
keep_prob = 1 ... | import torch
from torch import device
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
assert_size_stride = torch._C._dynamo.guards.assert_si... | jack-willturner/nas-without-training | DropConnect | false | 12,544 | [
"MIT"
] | 0 | d5e915b5f391f51d902f33b1d4beedfe3b09d2e0 | https://github.com/jack-willturner/nas-without-training/tree/d5e915b5f391f51d902f33b1d4beedfe3b09d2e0 | import torch
class Model(torch.nn.Module):
def __init__(self, p):
super().__init__()
self.p = p
def forward(self, inputs):
batch_size = inputs.shape[0]
inputs.shape[2]
inputs.shape[3]
channel_size = inputs.shape[1]
keep_prob = 1 - self.p
random... |
MaxPool3x3 | # 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 torch.nn as nn
class MaxPool3x3(nn.Module):
"""3x3 max pool with no subsampling."""
def __init__(self, in_channels, out_channels, kernel_size=3, stride=1,
padding=1):
super(MaxPool3x3, self).__init__()
self.maxpool = nn.MaxPool2d(kernel_size, stride, padding)
... | 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... | jack-willturner/nas-without-training | MaxPool3x3 | false | 12,545 | [
"MIT"
] | 0 | d5e915b5f391f51d902f33b1d4beedfe3b09d2e0 | https://github.com/jack-willturner/nas-without-training/tree/d5e915b5f391f51d902f33b1d4beedfe3b09d2e0 | import torch
import torch.nn as nn
class Model(nn.Module):
"""3x3 max pool with no subsampling."""
def __init__(self, in_channels, out_channels, kernel_size=3, stride=1,
padding=1):
super().__init__()
self.maxpool = nn.MaxPool2d(kernel_size, stride, padding)
def forward(self, x):... |
SimpleAndModule | # 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 torch.jit
import torch.onnx
import torch.nn
class SimpleAndModule(torch.nn.Module):
def __init__(self):
super(SimpleAndModule, self).__init__()
def forward(self, a, b):
c = torch.logical_and(a, b)
return torch.logical_and(c, c)
def get_inputs():
return [torc... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | briancoutinho/glow | SimpleAndModule | false | 12,546 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self):
super().__init__()
def forward(self, a, b):
c = torch.logical_and(a, b)
return torch.logical_and(c, c)
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.ran... |
SACCriticNetwork | # 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 torch.nn.functional as F
import torch.nn as nn
class SACCriticNetwork(nn.Module):
def __init__(self, input_shape, output_shape, n_features, **kwargs):
super().__init__()
n_input = input_shape[-1]
n_output = output_shape[0]
self._h1 = nn.Linear(n_input, n_featur... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | jacarvalho/mushroom-rl-benchmark | SACCriticNetwork | false | 12,547 | [
"MIT"
] | 0 | 5bc2e9b1a12be33827d6edcd5c5ad49571e11275 | https://github.com/jacarvalho/mushroom-rl-benchmark/tree/5bc2e9b1a12be33827d6edcd5c5ad49571e11275 | import torch
import torch.nn.functional as F
import torch.nn as nn
class Model(nn.Module):
def __init__(self, input_shape, output_shape, n_features, **kwargs):
super().__init__()
n_input = input_shape[-1]
n_output = output_shape[0]
self._h1 = nn.Linear(n_input, n_features)
... |
MLPArchitecture | # 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 torch.nn as nn
from collections.abc import Iterable
class MLPArchitecture(nn.Module):
def __init__(self, batch_size, n_outputs, state_size):
super(MLPArchitecture, self).__init__()
if isinstance(state_size, Iterable):
assert len(state_size) == 1
state_s... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
from co... | ivallesp/RL_Banana_Collector | MLPArchitecture | false | 12,548 | [
"MIT"
] | 0 | cf09ffa9cff8015dd47592509ae482b99339a960 | https://github.com/ivallesp/RL_Banana_Collector/tree/cf09ffa9cff8015dd47592509ae482b99339a960 | import torch
import torch.nn as nn
from collections.abc import Iterable
class Model(nn.Module):
def __init__(self, batch_size, n_outputs, state_size):
super().__init__()
if isinstance(state_size, Iterable):
assert len(state_size) == 1
state_size = state_size[0]
sel... |
OneTupleModule | # 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 torch.jit
import torch.onnx
import torch.nn
class OneTupleModule(torch.nn.Module):
def __init__(self):
super(OneTupleModule, self).__init__()
def forward(self, x):
y = 2 * x
return y,
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
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | briancoutinho/glow | OneTupleModule | false | 12,549 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self):
super().__init__()
def forward(self, x):
y = 2 * x
return y,
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return []
|
SimpleACosModule | # 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 torch.jit
import torch.onnx
import torch.nn
class SimpleACosModule(torch.nn.Module):
def __init__(self):
super(SimpleACosModule, self).__init__()
def forward(self, a):
return torch.acos(a + a)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._... | briancoutinho/glow | SimpleACosModule | false | 12,550 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self):
super().__init__()
def forward(self, a):
return torch.acos(a + a)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return []
|
DetachModel | # 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 torch.jit
import torch.onnx
import torch.nn
class DetachModel(torch.nn.Module):
def __init__(self):
super(DetachModel, self).__init__()
def forward(self, a):
b = a.detach()
return b + b
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_input... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | briancoutinho/glow | DetachModel | false | 12,551 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self):
super().__init__()
def forward(self, a):
b = a.detach()
return b + b
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return []
|
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
import torch.nn as nn
import torch.nn.functional as F
class Net(nn.Module):
def __init__(self):
super(Net, self).__init__()
self.conv1 = nn.Conv2d(3, 32, kernel_size=5, padding=2)
self.conv2 = nn.Conv2d(32, 64, kernel_size=5, padding=2)
self.conv3 = nn.Conv2d(64, 64, ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | inani47/Transfer_Learning | Net | false | 12,552 | [
"BSD-2-Clause"
] | 0 | 1e28614ceaa38a8034aa45c92b8265c79e64780a | https://github.com/inani47/Transfer_Learning/tree/1e28614ceaa38a8034aa45c92b8265c79e64780a | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
def __init__(self):
super().__init__()
self.conv1 = nn.Conv2d(3, 32, kernel_size=5, padding=2)
self.conv2 = nn.Conv2d(32, 64, kernel_size=5, padding=2)
self.conv3 = nn.Conv2d(64, 64, kernel_... |
DQNFeatureNetwork | # 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 torch.nn.functional as F
import torch.nn as nn
class DQNFeatureNetwork(nn.Module):
def __init__(self, input_shape, output_shape, **kwargs):
super().__init__()
n_input = input_shape[0]
self._h1 = nn.Conv2d(n_input, 32, kernel_size=8, stride=4)
self._h2 = nn.Conv... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | jacarvalho/mushroom-rl-benchmark | DQNFeatureNetwork | false | 12,553 | [
"MIT"
] | 0 | 5bc2e9b1a12be33827d6edcd5c5ad49571e11275 | https://github.com/jacarvalho/mushroom-rl-benchmark/tree/5bc2e9b1a12be33827d6edcd5c5ad49571e11275 | import torch
import torch.nn.functional as F
import torch.nn as nn
class Model(nn.Module):
def __init__(self, input_shape, output_shape, **kwargs):
super().__init__()
n_input = input_shape[0]
self._h1 = nn.Conv2d(n_input, 32, kernel_size=8, stride=4)
self._h2 = nn.Conv2d(32, 64, k... |
SimpleBmmModule | # 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 torch.jit
import torch.onnx
import torch.nn
class SimpleBmmModule(torch.nn.Module):
def forward(self, a, b):
return (a + a).bmm(b)
def get_inputs():
return [torch.rand([4, 4, 4]), torch.rand([4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | briancoutinho/glow | SimpleBmmModule | false | 12,554 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def forward(self, a, b):
return (a + a).bmm(b)
def get_inputs():
return [torch.rand([4, 4, 4]), torch.rand([4, 4, 4])]
def get_init_inputs():
return []
|
RepeatModule | # 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 torch.jit
import torch.onnx
import torch.nn
class RepeatModule(torch.nn.Module):
def __init__(self, repeats):
super(RepeatModule, self).__init__()
self.repeats = repeats
def forward(self, tensor):
tensor = tensor + tensor
return tensor.repeat(self.repeats)... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | briancoutinho/glow | RepeatModule | false | 12,555 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self, repeats):
super().__init__()
self.repeats = repeats
def forward(self, tensor):
tensor = tensor + tensor
return tensor.repeat(self.repeats)
def get_inputs():
... |
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 torch.jit
import torch.onnx
import torch.nn
class SimpleClampModel(torch.nn.Module):
def __init__(self, min, max):
super(SimpleClampModel, self).__init__()
self.min = min
self.max = max
def forward(self, input):
return torch.clamp(input, self.min, self.max... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._C._dynamo.... | briancoutinho/glow | SimpleClampModel | false | 12,556 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self, min, max):
super().__init__()
self.min = min
self.max = max
def forward(self, input):
return torch.clamp(input, self.min, self.max)
def get_inputs():
return ... |
SimpleATanModule | # 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 torch.jit
import torch.onnx
import torch.nn
class SimpleATanModule(torch.nn.Module):
def __init__(self):
super(SimpleATanModule, self).__init__()
def forward(self, a):
return torch.atan(a + a)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._... | briancoutinho/glow | SimpleATanModule | false | 12,557 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self):
super().__init__()
def forward(self, a):
return torch.atan(a + a)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return []
|
SimpleConvTranspose2dModule | # 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 torch.nn.functional as F
import torch.jit
import torch.onnx
import torch.nn
class SimpleConvTranspose2dModule(torch.nn.Module):
def __init__(self, stride=1, padding=0, output_padding=0, dilation=1,
groups=1):
super(SimpleConvTranspose2dModule, self).__init__()
self.str... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.jit
import torch... | briancoutinho/glow | SimpleConvTranspose2dModule | false | 12,558 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.nn.functional as F
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self, stride=1, padding=0, output_padding=0, dilation=1,
groups=1):
super().__init__()
self.stride = stride
self.padding = padding
sel... |
SimpleConv2dModule | # 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 torch.nn.functional as F
import torch.jit
import torch.onnx
import torch.nn
class SimpleConv2dModule(torch.nn.Module):
def __init__(self, stride=1, padding=0, dilation=1, groups=1):
super(SimpleConv2dModule, self).__init__()
self.stride = stride
self.padding = padding
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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... | briancoutinho/glow | SimpleConv2dModule | false | 12,559 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.nn.functional as F
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self, stride=1, padding=0, dilation=1, groups=1):
super().__init__()
self.stride = stride
self.padding = padding
self.dilation = dilation
... |
SimpleASinModule | # 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 torch.jit
import torch.onnx
import torch.nn
class SimpleASinModule(torch.nn.Module):
def __init__(self):
super(SimpleASinModule, self).__init__()
def forward(self, a):
return torch.asin(a + a)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._... | briancoutinho/glow | SimpleASinModule | false | 12,560 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self):
super().__init__()
def forward(self, a):
return torch.asin(a + a)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return []
|
SimpleAvgPool1dModule | # 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 torch.nn.functional as F
import torch.jit
import torch.onnx
import torch.nn
class SimpleAvgPool1dModule(torch.nn.Module):
def __init__(self, kernel_size, stride=None, padding=0):
super(SimpleAvgPool1dModule, self).__init__()
self.kernel_size = kernel_size
self.padding ... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | briancoutinho/glow | SimpleAvgPool1dModule | false | 12,561 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.nn.functional as F
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self, kernel_size, stride=None, padding=0):
super().__init__()
self.kernel_size = kernel_size
self.padding = padding
self.stride = stride
... |
SimpleAddMmModule | # 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 torch.jit
import torch.onnx
import torch.nn
class SimpleAddMmModule(torch.nn.Module):
def __init__(self, alpha=1, beta=1):
super(SimpleAddMmModule, self).__init__()
self.alpha = alpha
self.beta = beta
def forward(self, a, b, c):
return (a + a).addmm(b, c)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._C... | briancoutinho/glow | SimpleAddMmModule | false | 12,562 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self, alpha=1, beta=1):
super().__init__()
self.alpha = alpha
self.beta = beta
def forward(self, a, b, c):
return (a + a).addmm(b, c)
def get_inputs():
return [tor... |
Qux | # 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 torch.jit
import torch.onnx
import torch.nn
class Qux(torch.nn.Module):
def __init__(self, x):
super(Qux, self).__init__()
self.x = x
def forward(self, a, b):
return a - b - self.x
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])]... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | briancoutinho/glow | Qux | false | 12,563 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self, x):
super().__init__()
self.x = x
def forward(self, a, b):
return a - b - self.x
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])]
def ... |
SimpleCosModule | # 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 torch.jit
import torch.onnx
import torch.nn
class SimpleCosModule(torch.nn.Module):
def __init__(self):
super(SimpleCosModule, self).__init__()
def forward(self, a):
return torch.cos(a + a)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = t... | briancoutinho/glow | SimpleCosModule | false | 12,564 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self):
super().__init__()
def forward(self, a):
return torch.cos(a + a)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return []
|
SimpleClampMinModel | # 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 torch.jit
import torch.onnx
import torch.nn
class SimpleClampMinModel(torch.nn.Module):
def __init__(self, min):
super(SimpleClampMinModel, self).__init__()
self.min = min
def forward(self, input):
return torch.clamp_min(input, self.min)
def get_inputs():
re... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._C._dynamo.... | briancoutinho/glow | SimpleClampMinModel | false | 12,565 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self, min):
super().__init__()
self.min = min
def forward(self, input):
return torch.clamp_min(input, self.min)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def g... |
SimpleExpModule | # 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 torch.jit
import torch.onnx
import torch.nn
class SimpleExpModule(torch.nn.Module):
def forward(self, input):
other = torch.exp(input)
return torch.exp(other)
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.jit
import torch.onnx
import torch.nn
assert_size_stride = t... | briancoutinho/glow | SimpleExpModule | false | 12,566 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def forward(self, input):
other = torch.exp(input)
return torch.exp(other)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return []
|
UNet | # 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 torch.nn as nn
import torch.nn.functional as F
class down(nn.Module):
"""
A class for creating neural network blocks containing layers:
Average Pooling --> Convlution + Leaky ReLU --> Convolution + Leaky ReLU
This is used in the UNet Class to create a UNet like NN archite... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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 ... | guilindner/Super-SloMo | UNet | false | 12,567 | [
"MIT"
] | 0 | 251200f907581b31d41ccb1abeb7504e377cf4fb | https://github.com/guilindner/Super-SloMo/tree/251200f907581b31d41ccb1abeb7504e377cf4fb | import torch
import torch.nn as nn
import torch.nn.functional as F
class down(nn.Module):
"""
A class for creating neural network blocks containing layers:
Average Pooling --> Convlution + Leaky ReLU --> Convolution + Leaky ReLU
This is used in the UNet Class to create a UNet like NN archite... |
SimpleCeilModule | # 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 torch.jit
import torch.onnx
import torch.nn
class SimpleCeilModule(torch.nn.Module):
def forward(self, a, b):
c = a + b
return torch.ceil(c)
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._... | briancoutinho/glow | SimpleCeilModule | false | 12,568 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def forward(self, a, b):
c = a + b
return torch.ceil(c)
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return []
|
SimpleAbsModule | # 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 torch.jit
import torch.onnx
import torch.nn
class SimpleAbsModule(torch.nn.Module):
def __init__(self):
super(SimpleAbsModule, self).__init__()
def forward(self, a):
return torch.abs(a + a)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = t... | briancoutinho/glow | SimpleAbsModule | false | 12,569 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self):
super().__init__()
def forward(self, a):
return torch.abs(a + a)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return []
|
SimpleCumSumModule | # 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 torch.jit
import torch.onnx
import torch.nn
class SimpleCumSumModule(torch.nn.Module):
def __init__(self, dim):
super(SimpleCumSumModule, self).__init__()
self.dim = dim
def forward(self, tensor):
return torch.cumsum(tensor, self.dim)
def get_inputs():
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.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | briancoutinho/glow | SimpleCumSumModule | false | 12,570 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self, dim):
super().__init__()
self.dim = dim
def forward(self, tensor):
return torch.cumsum(tensor, self.dim)
def get_inputs():
return [torch.rand([4, 4, 4, 4, 4])]
def... |
SimpleNotModule | # 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 torch.jit
import torch.onnx
import torch.nn
class SimpleNotModule(torch.nn.Module):
def __init__(self):
super(SimpleNotModule, self).__init__()
def forward(self, a):
b = torch.logical_not(a)
return torch.logical_not(b)
def get_inputs():
return [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
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | briancoutinho/glow | SimpleNotModule | false | 12,571 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self):
super().__init__()
def forward(self, a):
b = torch.logical_not(a)
return torch.logical_not(b)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inp... |
SimpleFloorModule | # 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 torch.jit
import torch.onnx
import torch.nn
class SimpleFloorModule(torch.nn.Module):
def forward(self, a, b):
c = a + b
return torch.floor(c)
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._... | briancoutinho/glow | SimpleFloorModule | false | 12,572 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def forward(self, a, b):
c = a + b
return torch.floor(c)
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return []
|
Foo | # 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 torch.jit
import torch.onnx
import torch.nn
class Foo(torch.nn.Module):
def __init__(self):
super(Foo, self).__init__()
self.conv1 = torch.nn.Conv2d(3, 6, 3)
self.relu = torch.nn.ReLU()
self.conv2 = torch.nn.Conv2d(6, 16, 3)
def forward(self, x):
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
import torch.jit
import torch... | briancoutinho/glow | Foo | false | 12,573 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self):
super().__init__()
self.conv1 = torch.nn.Conv2d(3, 6, 3)
self.relu = torch.nn.ReLU()
self.conv2 = torch.nn.Conv2d(6, 16, 3)
def forward(self, x):
x = self... |
SimpleGeluModule | # 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 torch.nn.functional as F
import torch.jit
import torch.onnx
import torch.nn
class SimpleGeluModule(torch.nn.Module):
def forward(self, tensor):
return F.gelu(tensor + tensor)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._... | briancoutinho/glow | SimpleGeluModule | false | 12,574 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.nn.functional as F
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def forward(self, tensor):
return F.gelu(tensor + tensor)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return []
|
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 torch.jit
import torch.onnx
import torch.nn
class SimpleReciprocalModel(torch.nn.Module):
def __init__(self, inplace=False):
super(SimpleReciprocalModel, self).__init__()
self.inplace = inplace
def forward(self, tensor):
other = tensor + tensor
return othe... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | briancoutinho/glow | SimpleReciprocalModel | false | 12,575 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self, inplace=False):
super().__init__()
self.inplace = inplace
def forward(self, tensor):
other = tensor + tensor
return other.reciprocal_() if self.inplace else torch.... |
SimpleLogSoftmaxModel | # 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 torch.nn.functional as F
import torch.jit
import torch.onnx
import torch.nn
class SimpleLogSoftmaxModel(torch.nn.Module):
def __init__(self, dimension):
super(SimpleLogSoftmaxModel, self).__init__()
self.dimension = dimension
def forward(self, tensor):
return F.lo... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.jit
impor... | briancoutinho/glow | SimpleLogSoftmaxModel | false | 12,576 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.nn.functional as F
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self, dimension):
super().__init__()
self.dimension = dimension
def forward(self, tensor):
return F.log_softmax(tensor, self.dimension)
def get... |
SimpleMatmulModule | # 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 torch.jit
import torch.onnx
import torch.nn
class SimpleMatmulModule(torch.nn.Module):
def __init__(self):
super(SimpleMatmulModule, self).__init__()
def forward(self, a, b):
return a.matmul(b + b)
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | briancoutinho/glow | SimpleMatmulModule | false | 12,577 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self):
super().__init__()
def forward(self, a, b):
return a.matmul(b + b)
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])]
def get_init_inputs():
... |
SimpleMaxModule | # 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 torch.jit
import torch.onnx
import torch.nn
class SimpleMaxModule(torch.nn.Module):
def __init__(self):
super(SimpleMaxModule, self).__init__()
def forward(self, a, b):
return torch.max(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.... | briancoutinho/glow | SimpleMaxModule | false | 12,578 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self):
super().__init__()
def forward(self, a, b):
return torch.max(a + a, b + b)
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])]
def get_init_inpu... |
SimpleReluModel | # 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 torch.nn.functional as F
import torch.jit
import torch.onnx
import torch.nn
class SimpleReluModel(torch.nn.Module):
def __init__(self, inplace=False):
super(SimpleReluModel, self).__init__()
self.inplace = inplace
def forward(self, tensor):
other = F.relu(tensor, ... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._C._dynamo.... | briancoutinho/glow | SimpleReluModel | false | 12,579 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.nn.functional as F
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self, inplace=False):
super().__init__()
self.inplace = inplace
def forward(self, tensor):
other = F.relu(tensor, inplace=self.inplace)
r... |
SimpleLinearModule | # 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 torch.nn.functional as F
import torch.jit
import torch.onnx
import torch.nn
class SimpleLinearModule(torch.nn.Module):
def __init__(self):
super(SimpleLinearModule, self).__init__()
def forward(self, input, weight, bias=None):
return F.linear(input + input, weight, 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
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._C... | briancoutinho/glow | SimpleLinearModule | false | 12,580 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.nn.functional as F
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self):
super().__init__()
def forward(self, input, weight, bias=None):
return F.linear(input + input, weight, bias)
def get_inputs():
return [torch... |
SimpleFmodModule | # 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 torch.jit
import torch.onnx
import torch.nn
class SimpleFmodModule(torch.nn.Module):
def __init__(self):
super(SimpleFmodModule, self).__init__()
def forward(self, a, b):
if b.size() == torch.Size([]):
c = a.fmod(b.item())
else:
c = a.fmod(... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._... | briancoutinho/glow | SimpleFmodModule | false | 12,581 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self):
super().__init__()
def forward(self, a, b):
if b.size() == torch.Size([]):
c = a.fmod(b.item())
else:
c = a.fmod(b)
return c.fmod(1.0)
d... |
SimpleMinModule | # 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 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.... | briancoutinho/glow | SimpleMinModule | false | 12,582 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self):
super().__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, 4, 4, 4])]
def get_init_inpu... |
SimpleReshapeModel | # 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 torch.jit
import torch.onnx
import torch.nn
class SimpleReshapeModel(torch.nn.Module):
def __init__(self, shape):
super(SimpleReshapeModel, self).__init__()
self.shape = shape
def forward(self, tensor):
combined = tensor + tensor
return combined.reshape(se... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | briancoutinho/glow | SimpleReshapeModel | false | 12,583 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self, shape):
super().__init__()
self.shape = shape
def forward(self, tensor):
combined = tensor + tensor
return combined.reshape(self.shape)
def get_inputs():
ret... |
SimpleOrModule | # 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 torch.jit
import torch.onnx
import torch.nn
class SimpleOrModule(torch.nn.Module):
def __init__(self):
super(SimpleOrModule, self).__init__()
def forward(self, a, b):
c = torch.logical_or(a, b)
return torch.logical_or(c, c)
def get_inputs():
return [torch.ra... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | briancoutinho/glow | SimpleOrModule | false | 12,584 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self):
super().__init__()
def forward(self, a, b):
c = torch.logical_or(a, b)
return torch.logical_or(c, c)
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand(... |
SimplePowModule | # 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 torch.jit
import torch.onnx
import torch.nn
class SimplePowModule(torch.nn.Module):
def __init__(self, power):
super(SimplePowModule, self).__init__()
self.power = power
def forward(self, tensor):
return torch.pow(tensor, self.power)
def get_inputs():
return... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | briancoutinho/glow | SimplePowModule | false | 12,585 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self, power):
super().__init__()
self.power = power
def forward(self, tensor):
return torch.pow(tensor, self.power)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
d... |
SimpleLogModule | # 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 torch.jit
import torch.onnx
import torch.nn
class SimpleLogModule(torch.nn.Module):
def __init__(self, *dimensions):
super(SimpleLogModule, self).__init__()
def forward(self, a):
b = torch.log(a)
return torch.log(b)
def get_inputs():
return [torch.rand([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 math as tl_math
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = t... | briancoutinho/glow | SimpleLogModule | false | 12,586 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self, *dimensions):
super().__init__()
def forward(self, a):
b = torch.log(a)
return torch.log(b)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs... |
SimpleXorModule | # 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 torch.jit
import torch.onnx
import torch.nn
class SimpleXorModule(torch.nn.Module):
def __init__(self):
super(SimpleXorModule, self).__init__()
def forward(self, a, b):
c = torch.logical_xor(a, b)
return torch.logical_xor(c, c)
def get_inputs():
return [torc... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | briancoutinho/glow | SimpleXorModule | false | 12,587 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self):
super().__init__()
def forward(self, a, b):
c = torch.logical_xor(a, b)
return torch.logical_xor(c, c)
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.ran... |
SimpleMulModule | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import torch.jit
import torch.onnx
import torch.nn
class SimpleMulModule(torch.nn.Module):
def __init__(self):
super(SimpleMulModule, self).__init__()
def forward(self, left, right):
other = left.mul(right.item() if right.size() == torch.Size([]) else
right)
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | briancoutinho/glow | SimpleMulModule | false | 12,588 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self):
super().__init__()
def forward(self, left, right):
other = left.mul(right.item() if right.size() == torch.Size([]) else
right)
return other.mul(other)
def g... |
SimpleSinModule | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import torch.jit
import torch.onnx
import torch.nn
class SimpleSinModule(torch.nn.Module):
def __init__(self):
super(SimpleSinModule, self).__init__()
def forward(self, a):
return torch.sin(a + a)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = t... | briancoutinho/glow | SimpleSinModule | false | 12,589 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self):
super().__init__()
def forward(self, a):
return torch.sin(a + a)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return []
|
SimpleStackModel | # 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 torch.jit
import torch.onnx
import torch.nn
class SimpleStackModel(torch.nn.Module):
def __init__(self, dim):
super(SimpleStackModel, self).__init__()
self.dim = dim
def forward(self, a, b):
c = b + b
return torch.stack((a, c), dim=self.dim)
def get_inpu... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | briancoutinho/glow | SimpleStackModel | false | 12,590 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self, dim):
super().__init__()
self.dim = dim
def forward(self, a, b):
c = b + b
return torch.stack((a, c), dim=self.dim)
def get_inputs():
return [torch.rand([4, ... |
SimpleSoftmaxModel | # 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 torch.nn.functional as F
import torch.jit
import torch.onnx
import torch.nn
class SimpleSoftmaxModel(torch.nn.Module):
def __init__(self, dimension):
super(SimpleSoftmaxModel, self).__init__()
self.dimension = dimension
def forward(self, tensor):
return F.softmax(... | 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.jit
impor... | briancoutinho/glow | SimpleSoftmaxModel | false | 12,591 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.nn.functional as F
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self, dimension):
super().__init__()
self.dimension = dimension
def forward(self, tensor):
return F.softmax(tensor, self.dimension)
def get_inp... |
AffineTransform | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch import nn
class AffineTransform(nn.Module):
def __init__(self, num_features):
super().__init__()
self.alpha = nn.Parameter(torch.ones(1, 1, num_features))
self.beta = nn.Parameter(torch.zeros(1, 1, num_features))
def forward(self, x):
return self.alpha... | 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... | jaketae/res-mlp | AffineTransform | false | 12,592 | [
"MIT"
] | 0 | 6c957e4fe67a2f13d9b4fd3fa36b7eddcf5323fd | https://github.com/jaketae/res-mlp/tree/6c957e4fe67a2f13d9b4fd3fa36b7eddcf5323fd | import torch
from torch import nn
class Model(nn.Module):
def __init__(self, num_features):
super().__init__()
self.alpha = nn.Parameter(torch.ones(1, 1, num_features))
self.beta = nn.Parameter(torch.zeros(1, 1, num_features))
def forward(self, x):
return self.alpha * x + sel... |
SimpleSumModule | # 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 torch.jit
import torch.onnx
import torch.nn
class SimpleSumModule(torch.nn.Module):
def __init__(self, dtype=None):
super(SimpleSumModule, self).__init__()
self.dtype = dtype
def forward(self, a):
b = a + a
return torch.sum(b, dtype=self.dtype)
def get_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
from torch._inductor.runtime import triton_helpers
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._C._dynamo.... | briancoutinho/glow | SimpleSumModule | false | 12,593 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self, dtype=None):
super().__init__()
self.dtype = dtype
def forward(self, a):
b = a + a
return torch.sum(b, dtype=self.dtype)
def get_inputs():
return [torch.rand... |
SimpleTanhModel | # 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 torch.jit
import torch.onnx
import torch.nn
class SimpleTanhModel(torch.nn.Module):
def __init__(self, inplace=False):
super(SimpleTanhModel, self).__init__()
self.inplace = inplace
def forward(self, tensor):
tensor = tensor + tensor
return tensor.tanh_() ... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._... | briancoutinho/glow | SimpleTanhModel | false | 12,594 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self, inplace=False):
super().__init__()
self.inplace = inplace
def forward(self, tensor):
tensor = tensor + tensor
return tensor.tanh_() if self.inplace else tensor.tan... |
SimpleTypeasModel | # 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 torch.jit
import torch.onnx
import torch.nn
class SimpleTypeasModel(torch.nn.Module):
def __init__(self):
super(SimpleTypeasModel, self).__init__()
def forward(self, tensor, other=None):
other = tensor if other is None else other
if tensor.dtype != torch.bool:
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | briancoutinho/glow | SimpleTypeasModel | false | 12,595 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self):
super().__init__()
def forward(self, tensor, other=None):
other = tensor if other is None else other
if tensor.dtype != torch.bool:
tensor = tensor + tensor
... |
AddAndNorm | # 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 torch.nn as nn
class AddAndNorm(nn.Module):
def __init__(self, d_model, p_drop):
super(AddAndNorm, self).__init__()
self.layer_norm = nn.LayerNorm(d_model)
self.dropout = nn.Dropout(p_drop)
def forward(self, inputs, x):
return self.layer_norm(inputs + 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_... | jaehyek/attention-is-all-you-need | AddAndNorm | false | 12,596 | [
"MIT"
] | 0 | 9b421f7c98414aeb9f397c5195e3a6a9080a4669 | https://github.com/jaehyek/attention-is-all-you-need/tree/9b421f7c98414aeb9f397c5195e3a6a9080a4669 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, d_model, p_drop):
super().__init__()
self.layer_norm = nn.LayerNorm(d_model)
self.dropout = nn.Dropout(p_drop)
def forward(self, inputs, x):
return self.layer_norm(inputs + self.dropout(x))
def ge... |
ResMLPLayer | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch import nn
from torch.nn import functional as F
class AffineTransform(nn.Module):
def __init__(self, num_features):
super().__init__()
self.alpha = nn.Parameter(torch.ones(1, 1, num_features))
self.beta = nn.Parameter(torch.zeros(1, 1, num_features))
def forwar... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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... | jaketae/res-mlp | ResMLPLayer | false | 12,597 | [
"MIT"
] | 0 | 6c957e4fe67a2f13d9b4fd3fa36b7eddcf5323fd | https://github.com/jaketae/res-mlp/tree/6c957e4fe67a2f13d9b4fd3fa36b7eddcf5323fd | import torch
from torch import nn
from torch.nn import functional as F
class AffineTransform(nn.Module):
def __init__(self, num_features):
super().__init__()
self.alpha = nn.Parameter(torch.ones(1, 1, num_features))
self.beta = nn.Parameter(torch.zeros(1, 1, num_features))
def forwar... |
TSAFusion | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch import nn as nn
from torch.nn import init as init
from torchvision.models import vgg as vgg
import torch.utils.data
from torch.utils import data as data
from torch import autograd as autograd
class TSAFusion(nn.Module):
"""Temporal Spatial Attention (TSA) fusion module.
Temporal: Calc... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn as nn
fr... | hyunobae/BasicSR | TSAFusion | false | 12,598 | [
"Apache-2.0"
] | 0 | f2c2fc6cf28933658816c808f55c95fa20b16483 | https://github.com/hyunobae/BasicSR/tree/f2c2fc6cf28933658816c808f55c95fa20b16483 | import torch
from torch import nn as nn
from torch.nn import init as init
from torchvision.models import vgg as vgg
import torch.utils.data
from torch.utils import data as data
from torch import autograd as autograd
class Model(nn.Module):
"""Temporal Spatial Attention (TSA) fusion module.
Temporal: Calculat... |
CommunicationLayer | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch import nn
class AffineTransform(nn.Module):
def __init__(self, num_features):
super().__init__()
self.alpha = nn.Parameter(torch.ones(1, 1, num_features))
self.beta = nn.Parameter(torch.zeros(1, 1, num_features))
def forward(self, x):
return self.alpha... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import 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... | jaketae/res-mlp | CommunicationLayer | false | 12,599 | [
"MIT"
] | 0 | 6c957e4fe67a2f13d9b4fd3fa36b7eddcf5323fd | https://github.com/jaketae/res-mlp/tree/6c957e4fe67a2f13d9b4fd3fa36b7eddcf5323fd | import torch
from torch import nn
class AffineTransform(nn.Module):
def __init__(self, num_features):
super().__init__()
self.alpha = nn.Parameter(torch.ones(1, 1, num_features))
self.beta = nn.Parameter(torch.zeros(1, 1, num_features))
def forward(self, x):
return self.alpha... |
FeedForward | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch import nn
from torch.nn import functional as F
class AffineTransform(nn.Module):
def __init__(self, num_features):
super().__init__()
self.alpha = nn.Parameter(torch.ones(1, 1, num_features))
self.beta = nn.Parameter(torch.zeros(1, 1, num_features))
def forwar... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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... | jaketae/res-mlp | FeedForward | false | 12,600 | [
"MIT"
] | 0 | 6c957e4fe67a2f13d9b4fd3fa36b7eddcf5323fd | https://github.com/jaketae/res-mlp/tree/6c957e4fe67a2f13d9b4fd3fa36b7eddcf5323fd | import torch
from torch import nn
from torch.nn import functional as F
class AffineTransform(nn.Module):
def __init__(self, num_features):
super().__init__()
self.alpha = nn.Parameter(torch.ones(1, 1, num_features))
self.beta = nn.Parameter(torch.zeros(1, 1, num_features))
def forwar... |
DilatedResidualLayer | # 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 torch.nn as nn
import torch.nn.functional as F
class DilatedResidualLayer(nn.Module):
def __init__(self, dilation, in_channels, out_channels):
super(DilatedResidualLayer, self).__init__()
self.conv_dilated = nn.Conv1d(in_channels, out_channels, 3, padding
=dilation... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | jeanq1/sign-segmentation | DilatedResidualLayer | false | 12,601 | [
"MIT"
] | 0 | cbf1203b06e82e75e06b96a430dab08da3a46f7b | https://github.com/jeanq1/sign-segmentation/tree/cbf1203b06e82e75e06b96a430dab08da3a46f7b | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
def __init__(self, dilation, in_channels, out_channels):
super().__init__()
self.conv_dilated = nn.Conv1d(in_channels, out_channels, 3, padding
=dilation, dilation=dilation)
self.conv_1x... |
MainClassifier | # 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 torch.nn as nn
class MainClassifier(nn.Module):
def __init__(self, channel, num_classes=100):
super(MainClassifier, self).__init__()
self.pool = nn.AdaptiveAvgPool2d(1)
self.fc = nn.Linear(channel, num_classes)
def forward(self, x):
x = self.pool(x)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | janhenriklambrechts/Task-Oriented-Feature-Distillation | MainClassifier | false | 12,602 | [
"MIT"
] | 0 | 87ab75677b02441bce045e76e96afb078e9df2ea | https://github.com/janhenriklambrechts/Task-Oriented-Feature-Distillation/tree/87ab75677b02441bce045e76e96afb078e9df2ea | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, channel, num_classes=100):
super().__init__()
self.pool = nn.AdaptiveAvgPool2d(1)
self.fc = nn.Linear(channel, num_classes)
def forward(self, x):
x = self.pool(x)
x = x.view(x.size(0), -1)
... |
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
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.data
class Net(nn.Module):
def __init__(self):
super(Net, self).__init__()
self.pool = torch.nn.MaxPool2d(kernel_size=2, stride=2, padding=0)
self.fc1 = torch.nn.Linear(3 * 16 * 16, 64)
self.fc2 ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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 ... | jcolekaplan/computer_vision | Net | false | 12,603 | [
"MIT"
] | 0 | 48d39b081a7b6b699019052eeae36ab703bb34eb | https://github.com/jcolekaplan/computer_vision/tree/48d39b081a7b6b699019052eeae36ab703bb34eb | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.data
class Model(nn.Module):
def __init__(self):
super().__init__()
self.pool = torch.nn.MaxPool2d(kernel_size=2, stride=2, padding=0)
self.fc1 = torch.nn.Linear(3 * 16 * 16, 64)
self.fc2 = torch... |
MultiHeadAttention | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import torch.nn as nn
class ScaledDotProductAttention(nn.Module):
def __init__(self, d_k):
super(ScaledDotProductAttention, self).__init__()
self.scale = d_k ** -0.5
def forward(self, q, k, v, mask):
x = torch.matmul(q, k.transpose(-2, -1))
x = x if mask is None ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | jaehyek/attention-is-all-you-need | MultiHeadAttention | false | 12,604 | [
"MIT"
] | 0 | 9b421f7c98414aeb9f397c5195e3a6a9080a4669 | https://github.com/jaehyek/attention-is-all-you-need/tree/9b421f7c98414aeb9f397c5195e3a6a9080a4669 | import torch
import torch.nn as nn
class ScaledDotProductAttention(nn.Module):
def __init__(self, d_k):
super().__init__()
self.scale = d_k ** -0.5
def forward(self, q, k, v, mask):
x = torch.matmul(q, k.transpose(-2, -1))
x = x if mask is None else x.masked_fill(mask, float(... |
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
import torch.nn as nn
import torch.nn.functional as F
class PositionwiseFeedForward(nn.Module):
"""Implements FFN equation."""
def __init__(self, d_model, d_ff, dropout=0.1):
super(PositionwiseFeedForward, self).__init__()
self.w_1 = nn.Linear(d_model, d_ff)
self.norm = 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_... | jetd1/dcp | PositionwiseFeedForward | false | 12,605 | [
"MIT"
] | 0 | 2fe7256a14bf382f1ea0a9e1df6d52ff21a99a4d | https://github.com/jetd1/dcp/tree/2fe7256a14bf382f1ea0a9e1df6d52ff21a99a4d | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
"""Implements FFN equation."""
def __init__(self, d_model, d_ff, dropout=0.1):
super().__init__()
self.w_1 = nn.Linear(d_model, d_ff)
self.norm = nn.Sequential()
self.w_2 = nn.Linear(d_f... |
Tanh | # 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 math
import torch
class Tanh(torch.nn.Tanh):
"""
Class that extends ``torch.nn.Tanh`` additionally computing the log diagonal
blocks of the Jacobian.
"""
def forward(self, inputs, grad: 'torch.Tensor'=None):
"""
Parameters
----------
inputs : ``torch.Tensor`... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
assert_size_stride = torch._C._dynamo.guards.assert_size_strid... | gndctrl2mjrtm/BNAF | Tanh | false | 12,606 | [
"MIT"
] | 0 | a8ecaa2844b5338f9091e58dd571fdc6a598e2f1 | https://github.com/gndctrl2mjrtm/BNAF/tree/a8ecaa2844b5338f9091e58dd571fdc6a598e2f1 | import math
import torch
class Model(torch.nn.Tanh):
"""
Class that extends ``torch.nn.Tanh`` additionally computing the log diagonal
blocks of the Jacobian.
"""
def forward(self, inputs, grad: 'torch.Tensor'=None):
"""
Parameters
----------
inputs : ``torch.Tensor... |
Model | # 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 torch.nn as nn
class Model(nn.Module):
def __init__(self, n_input_features):
super(Model, self).__init__()
self.linear = nn.Linear(n_input_features, 1)
def forward(self, x):
y_pred = torch.sigmoid(self.linear(x))
return y_pred
def get_inputs():
retur... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | jaykasundra2/pytorchTutorial | Model | false | 12,607 | [
"MIT"
] | 0 | 954a96797353d463cb96c66596272e180c602134 | https://github.com/jaykasundra2/pytorchTutorial/tree/954a96797353d463cb96c66596272e180c602134 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, n_input_features):
super(Model, self).__init__()
self.linear = nn.Linear(n_input_features, 1)
def forward(self, x):
y_pred = torch.sigmoid(self.linear(x))
return y_pred
def get_inputs():
retur... |
NeuralNet1 | # 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 torch.nn as nn
class NeuralNet1(nn.Module):
def __init__(self, input_size, hidden_size):
super(NeuralNet1, self).__init__()
self.linear1 = nn.Linear(input_size, hidden_size)
self.relu = nn.ReLU()
self.linear2 = nn.Linear(hidden_size, 1)
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
import torch.nn as nn
assert_... | jaykasundra2/pytorchTutorial | NeuralNet1 | false | 12,608 | [
"MIT"
] | 0 | 954a96797353d463cb96c66596272e180c602134 | https://github.com/jaykasundra2/pytorchTutorial/tree/954a96797353d463cb96c66596272e180c602134 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, input_size, hidden_size):
super().__init__()
self.linear1 = nn.Linear(input_size, hidden_size)
self.relu = nn.ReLU()
self.linear2 = nn.Linear(hidden_size, 1)
def forward(self, x):
out = self... |
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 torch.nn as nn
import torch.distributed as dist
import torch.autograd as autograd
class AllGatherLayer(autograd.Function):
"""All gather layer with backward propagation path.
Indeed, this module is to make ``dist.all_gather()`` in the backward graph.
Such kind of operation has been wi... | 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... | jiangwenj02/mmgeneration | ModMBStddevLayer | false | 12,609 | [
"Apache-2.0"
] | 0 | da9ad377ae19260467fc332ddb88f505c38a915a | https://github.com/jiangwenj02/mmgeneration/tree/da9ad377ae19260467fc332ddb88f505c38a915a | import torch
import torch.nn as nn
import torch.distributed as dist
import torch.autograd as autograd
class AllGatherLayer(autograd.Function):
"""All gather layer with backward propagation path.
Indeed, this module is to make ``dist.all_gather()`` in the backward graph.
Such kind of operation has been wi... |
MiniBatchStddevLayer | # 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 torch.nn as nn
import torch.distributed as dist
import torch.autograd as autograd
class AllGatherLayer(autograd.Function):
"""All gather layer with backward propagation path.
Indeed, this module is to make ``dist.all_gather()`` in the backward graph.
Such kind of operation has been wi... | 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... | jiangwenj02/mmgeneration | MiniBatchStddevLayer | false | 12,610 | [
"Apache-2.0"
] | 0 | da9ad377ae19260467fc332ddb88f505c38a915a | https://github.com/jiangwenj02/mmgeneration/tree/da9ad377ae19260467fc332ddb88f505c38a915a | import torch
import torch.nn as nn
import torch.distributed as dist
import torch.autograd as autograd
class AllGatherLayer(autograd.Function):
"""All gather layer with backward propagation path.
Indeed, this module is to make ``dist.all_gather()`` in the backward graph.
Such kind of operation has been wi... |
PixelNorm | # 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 torch.nn as nn
def pixel_norm(x, eps=1e-06):
"""Pixel Normalization.
This normalization is proposed in:
Progressive Growing of GANs for Improved Quality, Stability, and Variation
Args:
x (torch.Tensor): Tensor to be normalized.
eps (float, optional): Epsilon to av... | 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_... | jiangwenj02/mmgeneration | PixelNorm | false | 12,611 | [
"Apache-2.0"
] | 0 | da9ad377ae19260467fc332ddb88f505c38a915a | https://github.com/jiangwenj02/mmgeneration/tree/da9ad377ae19260467fc332ddb88f505c38a915a | import torch
import torch.nn as nn
def pixel_norm(x, eps=1e-06):
"""Pixel Normalization.
This normalization is proposed in:
Progressive Growing of GANs for Improved Quality, Stability, and Variation
Args:
x (torch.Tensor): Tensor to be normalized.
eps (float, optional): Epsilon to av... |
AuxiliaryConvolutions | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch import nn
import torch.nn.functional as F
from itertools import product as product
import torch.optim
import torch.utils.data
class AuxiliaryConvolutions(nn.Module):
"""
Additional convolutions to produce higher-level feature maps.
"""
def __init__(self):
super(Auxilia... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
from ite... | gigajet/ICDAR-2019-SROIE | AuxiliaryConvolutions | false | 12,612 | [
"MIT"
] | 0 | 62dd3ecc90600c0bdf8ceece796fc4e555d3bd16 | https://github.com/gigajet/ICDAR-2019-SROIE/tree/62dd3ecc90600c0bdf8ceece796fc4e555d3bd16 | import torch
from torch import nn
import torch.nn.functional as F
from itertools import product as product
import torch.optim
import torch.utils.data
class Model(nn.Module):
"""
Additional convolutions to produce higher-level feature maps.
"""
def __init__(self):
super().__init__()
se... |
CAM_Module | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | from torch.nn import Module
import torch
from torch.nn import Parameter
from torch.nn import Softmax
class CAM_Module(Module):
""" Channel attention module"""
def __init__(self, in_dim):
super(CAM_Module, self).__init__()
self.chanel_in = in_dim
self.gamma = Parameter(torch.zeros(1))
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | jiaxu0017/Segmentation_attention_mainfold-Pytorch | CAM_Module | false | 12,613 | [
"MIT"
] | 0 | ff42168b5e77618221dc3bc6887765aa14530e8e | https://github.com/jiaxu0017/Segmentation_attention_mainfold-Pytorch/tree/ff42168b5e77618221dc3bc6887765aa14530e8e | from torch.nn import Module
import torch
from torch.nn import Parameter
from torch.nn import Softmax
class Model(Module):
""" Channel attention module"""
def __init__(self, in_dim):
super().__init__()
self.chanel_in = in_dim
self.gamma = Parameter(torch.zeros(1))
self.softmax ... |
EqualLinearActModule | # 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 copy import deepcopy
import torch.nn as nn
from functools import partial
from torch.nn.init import _calculate_correct_fan
def equalized_lr(module, name='weight', gain=2 ** 0.5, mode='fan_in',
lr_mul=1.0):
"""Equalized Learning Rate.
This trick is proposed in:
Progressive Growing of ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from copy import deepcopy
import torch.nn as nn
from functools import partial
fr... | jiangwenj02/mmgeneration | EqualLinearActModule | false | 12,614 | [
"Apache-2.0"
] | 0 | da9ad377ae19260467fc332ddb88f505c38a915a | https://github.com/jiangwenj02/mmgeneration/tree/da9ad377ae19260467fc332ddb88f505c38a915a | import torch
from copy import deepcopy
import torch.nn as nn
from functools import partial
from torch.nn.init import _calculate_correct_fan
def equalized_lr(module, name='weight', gain=2 ** 0.5, mode='fan_in',
lr_mul=1.0):
"""Equalized Learning Rate.
This trick is proposed in:
Progressive Growing of ... |
AdaptiveInstanceNorm | # 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 torch.nn as nn
from torch.nn.init import _calculate_correct_fan
def equalized_lr(module, name='weight', gain=2 ** 0.5, mode='fan_in',
lr_mul=1.0):
"""Equalized Learning Rate.
This trick is proposed in:
Progressive Growing of GANs for Improved Quality, Stability, and Variation
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | jiangwenj02/mmgeneration | AdaptiveInstanceNorm | false | 12,615 | [
"Apache-2.0"
] | 0 | da9ad377ae19260467fc332ddb88f505c38a915a | https://github.com/jiangwenj02/mmgeneration/tree/da9ad377ae19260467fc332ddb88f505c38a915a | import torch
import torch.nn as nn
from torch.nn.init import _calculate_correct_fan
def equalized_lr(module, name='weight', gain=2 ** 0.5, mode='fan_in',
lr_mul=1.0):
"""Equalized Learning Rate.
This trick is proposed in:
Progressive Growing of GANs for Improved Quality, Stability, and Variation
... |
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
import torch.nn as nn
import torch.nn.functional as F
class Critic(nn.Module):
def __init__(self, state_dim, action_dim):
super(Critic, self).__init__()
self.l1 = nn.Linear(state_dim + action_dim, 400)
self.l2 = nn.Linear(400, 300)
self.l3 = nn.Linear(300, 1)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import ... | jinPrelude/ksp-ai | Critic | false | 12,616 | [
"MIT"
] | 0 | d8b235d1ef77afe413fbff2e859e1210330bde37 | https://github.com/jinPrelude/ksp-ai/tree/d8b235d1ef77afe413fbff2e859e1210330bde37 | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
def __init__(self, state_dim, action_dim):
super().__init__()
self.l1 = nn.Linear(state_dim + action_dim, 400)
self.l2 = nn.Linear(400, 300)
self.l3 = nn.Linear(300, 1)
self.l4 = nn.... |
LinearDeepQNetwork | # 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 torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import torch as T
class LinearDeepQNetwork(nn.Module):
def __init__(self, lr, input, n_actions):
super(LinearDeepQNetwork, self).__init__()
self.fc1 = nn.Linear(input, 128)
self.fc2 = nn.Linear(... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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 ... | joaomanojr/tecprog | LinearDeepQNetwork | false | 12,617 | [
"MIT"
] | 0 | 825ae3dd9f2ddd0bce2d410af7deae8eb5ba3d21 | https://github.com/joaomanojr/tecprog/tree/825ae3dd9f2ddd0bce2d410af7deae8eb5ba3d21 | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import torch as T
class Model(nn.Module):
def __init__(self, lr, input, n_actions):
super().__init__()
self.fc1 = nn.Linear(input, 128)
self.fc2 = nn.Linear(128, n_actions)
self.optimize... |
GCN | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | from torch.nn import Module
import math
import torch
import torch.nn as nn
from torch.nn.parameter import Parameter
from torch.nn.modules.module import Module
import torch.nn.functional as F
class GraphConvolution(Module):
"""
Simple GCN layer, similar to https://arxiv.org/abs/1609.02907
"""
def __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.... | jindl465/pygcn | GCN | false | 12,618 | [
"MIT"
] | 0 | bbbedc2278d1b1bc260e138f98cf27733995914d | https://github.com/jindl465/pygcn/tree/bbbedc2278d1b1bc260e138f98cf27733995914d | from torch.nn import Module
import math
import torch
import torch.nn as nn
from torch.nn.parameter import Parameter
from torch.nn.modules.module import Module
import torch.nn.functional as F
class GraphConvolution(Module):
"""
Simple GCN layer, similar to https://arxiv.org/abs/1609.02907
"""
def __in... |
CSNet | # 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
class CSNet(torch.nn.Module):
def __init__(self):
super(CSNet, self).__init__()
k_stride = 20
color_channel = 3
mr = 12
self.conv0 = torch.nn.Conv2d(in_channels=color_channel,
out_channels=mr, kernel_size=2 * k_stride, stride=k_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... | jiang-du/Multi-rate-VCS | CSNet | false | 12,619 | [
"MIT"
] | 0 | 18457a7e0be76cad8b78b7dee32f8f6704d2f7e0 | https://github.com/jiang-du/Multi-rate-VCS/tree/18457a7e0be76cad8b78b7dee32f8f6704d2f7e0 | import torch
class Model(torch.nn.Module):
def __init__(self):
super().__init__()
k_stride = 20
color_channel = 3
mr = 12
self.conv0 = torch.nn.Conv2d(in_channels=color_channel,
out_channels=mr, kernel_size=2 * k_stride, stride=k_stride,
padding=k_s... |
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
import torch.nn as tnn
class Net(tnn.Module):
def __init__(self):
super(Net, self).__init__()
self.conv1 = tnn.Conv2d(3, 6, 5)
self.pool = tnn.MaxPool2d(2, 2)
self.conv2 = tnn.Conv2d(6, 16, 5)
self.fc1 = tnn.Linear(16 * 5 * 5, 120)
self.fc2 = tnn.Linea... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as tnn
assert... | jittor-online-first/jittor | Net | false | 12,620 | [
"Apache-2.0"
] | 0 | 4217359f86cbcf174fab27c3b723487a8d78b729 | https://github.com/jittor-online-first/jittor/tree/4217359f86cbcf174fab27c3b723487a8d78b729 | import torch
import torch.nn as tnn
class Model(tnn.Module):
def __init__(self):
super().__init__()
self.conv1 = tnn.Conv2d(3, 6, 5)
self.pool = tnn.MaxPool2d(2, 2)
self.conv2 = tnn.Conv2d(6, 16, 5)
self.fc1 = tnn.Linear(16 * 5 * 5, 120)
self.fc2 = tnn.Linear(120, ... |
BahdanauAttention | # 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 torch.nn as nn
import torch.nn.functional as F
class BahdanauAttention(nn.Module):
""" Class performs Additive Bahdanau Attention.
Source: https://arxiv.org/pdf/1409.0473.pdf
"""
def __init__(self, num_features, hidden_dim, output_dim=1):
super(BahdanauAttention,... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | joao-d-oliveira/CV-Image_Captioning | BahdanauAttention | false | 12,621 | [
"MIT"
] | 0 | 76186c326e4fc44a60da401f4ec71176cba42e87 | https://github.com/joao-d-oliveira/CV-Image_Captioning/tree/76186c326e4fc44a60da401f4ec71176cba42e87 | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
""" Class performs Additive Bahdanau Attention.
Source: https://arxiv.org/pdf/1409.0473.pdf
"""
def __init__(self, num_features, hidden_dim, output_dim=1):
super().__init__()
self.num_... |
RegressionModel | # 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 torch.nn as nn
class RegressionModel(nn.Module):
def __init__(self, num_features_in, num_anchors=1, feature_size=256):
super(RegressionModel, self).__init__()
self.conv1 = nn.Conv2d(num_features_in, feature_size, kernel_size=3,
padding=1)
self.act1 = nn.ReL... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | fmrdev/ctracker | RegressionModel | false | 12,622 | [
"Apache-2.0"
] | 0 | 6f5a88d569d0132a9f844cd1e55e60032d32bcba | https://github.com/fmrdev/ctracker/tree/6f5a88d569d0132a9f844cd1e55e60032d32bcba | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, num_features_in, num_anchors=1, feature_size=256):
super().__init__()
self.conv1 = nn.Conv2d(num_features_in, feature_size, kernel_size=3,
padding=1)
self.act1 = nn.ReLU()
self.conv2 = nn.Con... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.