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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
Downsample | # 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 Downsample(nn.Module):
def __init__(self, in_ch=None, out_ch=None, with_conv=False, fir=False,
fir_kernel=(1, 3, 3, 1)):
super().__init__()
out_ch = out_ch if out_ch else in_ch
if not fir:
if with... | 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... | chen-hao-chao/dlsm | Downsample | false | 3,273 | [
"Apache-2.0"
] | 0 | aea88aa7e59a02fe44f25f4de9d6f2eaf044093b | https://github.com/chen-hao-chao/dlsm/tree/aea88aa7e59a02fe44f25f4de9d6f2eaf044093b | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
def __init__(self, in_ch=None, out_ch=None, with_conv=False, fir=False,
fir_kernel=(1, 3, 3, 1)):
super().__init__()
out_ch = out_ch if out_ch else in_ch
if not fir:
if with_conv... |
ModelClassifier | # 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
class ModelClassifier(nn.Module):
"""
This class creates new classifier to update the pre-trained Neural Network.
"""
def __init__(self, in_features, hidden_features, hidden_features2,
out_features=102, drop_prob=0.25):
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | carlosmertens/Flowers-Classifier | ModelClassifier | false | 3,274 | [
"MIT"
] | 0 | d454348e3f6eba4e0c176f5e8e05c8a4f6fe9ba2 | https://github.com/carlosmertens/Flowers-Classifier/tree/d454348e3f6eba4e0c176f5e8e05c8a4f6fe9ba2 | import torch
from torch import nn
import torch.nn.functional as F
class Model(nn.Module):
"""
This class creates new classifier to update the pre-trained Neural Network.
"""
def __init__(self, in_features, hidden_features, hidden_features2,
out_features=102, drop_prob=0.25):
"""
... |
AddReadout | # 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 AddReadout(nn.Module):
def __init__(self, start_index=1):
super(AddReadout, self).__init__()
self.start_index = start_index
def forward(self, x):
if self.start_index == 2:
readout = (x[:, 0] + x[:, 1]) / 2
else:
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | blguweb/Tap-Tap-computer | AddReadout | false | 3,275 | [
"MIT"
] | 0 | 4e2007b5a31e6d5f902b1e3ca58206870331ef07 | https://github.com/blguweb/Tap-Tap-computer/tree/4e2007b5a31e6d5f902b1e3ca58206870331ef07 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, start_index=1):
super().__init__()
self.start_index = start_index
def forward(self, x):
if self.start_index == 2:
readout = (x[:, 0] + x[:, 1]) / 2
else:
readout = x[:, 0]
... |
Network | # 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 Network(nn.Module):
def __init__(self):
super().__init__()
self.hidden1 = nn.Linear(4, 1)
self.hidden2 = nn.Linear(1, 16)
self.output = nn.Linear(16, 1)
def forward(self, x):
x = F.relu(self.hidd... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | chathurawidanage/cylon | Network | false | 3,276 | [
"Apache-2.0"
] | 0 | ac61b7a50880138fe67de21adee208016a94979a | https://github.com/chathurawidanage/cylon/tree/ac61b7a50880138fe67de21adee208016a94979a | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
def __init__(self):
super().__init__()
self.hidden1 = nn.Linear(4, 1)
self.hidden2 = nn.Linear(1, 16)
self.output = nn.Linear(16, 1)
def forward(self, x):
x = F.relu(self.hidden... |
SimpleGate | # 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.cuda
import torch.distributed
class SimpleGate(torch.nn.Module):
def __init__(self, dim):
super(SimpleGate, self).__init__()
self.gate = torch.nn.Linear(2 * dim, dim, bias=True)
self.sig = torch.nn.Sigmoid()
def forward(self, in1, in2):
z = self.sig(... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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.cuda
import torch.distributed
assert_size_stride = torch._C._dynamo... | chardmeier/OpenNMT-py | SimpleGate | false | 3,277 | [
"MIT"
] | 0 | 8ef64d10c507418102af42551c0f335270cb5b51 | https://github.com/chardmeier/OpenNMT-py/tree/8ef64d10c507418102af42551c0f335270cb5b51 | import torch
import torch.cuda
import torch.distributed
class Model(torch.nn.Module):
def __init__(self, dim):
super().__init__()
self.gate = torch.nn.Linear(2 * dim, dim, bias=True)
self.sig = torch.nn.Sigmoid()
def forward(self, in1, in2):
z = self.sig(self.gate(torch.cat((... |
EALSTM | # 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 typing import Tuple
import torch.nn as nn
class EALSTM(nn.Module):
"""Implementation of the Entity-Aware-LSTM (EA-LSTM)
TODO: Include paper ref and latex equations
Parameters
----------
input_size_dyn : int
Number of dynamic features, which are those, passed to the LSTM... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | bernharl/CamelsML | EALSTM | false | 3,278 | [
"Apache-2.0"
] | 0 | 4ec3ea231ba6ed8c9db68f0aa61aba8da32652b8 | https://github.com/bernharl/CamelsML/tree/4ec3ea231ba6ed8c9db68f0aa61aba8da32652b8 | import torch
from typing import Tuple
import torch.nn as nn
class Model(nn.Module):
"""Implementation of the Entity-Aware-LSTM (EA-LSTM)
TODO: Include paper ref and latex equations
Parameters
----------
input_size_dyn : int
Number of dynamic features, which are those, passed to the LSTM ... |
GeneralizedMeanPoolingFpn | # 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 abc import ABC
from torch import nn
class GeneralizedMeanPoolingFpn(nn.Module, ABC):
"""Applies a 2D power-average adaptive pooling over an input signal composed of
several input planes.
The function computed is: :math:`f(X) = pow(sum(pow(X, p)), 1/p)`
- At p = infinity, one gets... | 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 abc import ABC
from tor... | catcodee/cluster-contrast-reid | GeneralizedMeanPoolingFpn | false | 3,279 | [
"MIT"
] | 0 | f6359990a4326375f23c3fd654df3fc6dcc9c579 | https://github.com/catcodee/cluster-contrast-reid/tree/f6359990a4326375f23c3fd654df3fc6dcc9c579 | import torch
from abc import ABC
from torch import nn
class Model(nn.Module, ABC):
"""Applies a 2D power-average adaptive pooling over an input signal composed of
several input planes.
The function computed is: :math:`f(X) = pow(sum(pow(X, p)), 1/p)`
- At p = infinity, one gets Max Pooling
... |
HeatmapLoss | # 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.utils.data
import torch.nn.parallel
import torch.optim
import torch.utils.data.distributed
import torch.multiprocessing
class HeatmapLoss(nn.Module):
def __init__(self):
super().__init__()
def forward(self, pred, gt, mask):
assert pred.size() =... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.utils.data
import torch.nn.parallel
import torch.optim
import torch.utils.data.distributed
import torch.m... | chaowentao/DEKRv2 | HeatmapLoss | false | 3,280 | [
"MIT"
] | 0 | e092c3eb10766b099a8a9681dc26f9eb781ec070 | https://github.com/chaowentao/DEKRv2/tree/e092c3eb10766b099a8a9681dc26f9eb781ec070 | import torch
import torch.nn as nn
import torch.utils.data
import torch.nn.parallel
import torch.optim
import torch.utils.data.distributed
import torch.multiprocessing
class Model(nn.Module):
def __init__(self):
super().__init__()
def forward(self, pred, gt, mask):
assert pred.size() == gt.s... |
Linear_QNet | # 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 Linear_QNet(nn.Module):
def __init__(self, input_size, hidden_size_1, hidden_size_2, output_size):
super().__init__()
self.linear1 = nn.Linear(input_size, hidden_size_1)
self.leakyrelu = nn.LeakyReLU()
self.linear2 = nn.Linear(hidden_size_1... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | cheapmouse94/Machine-Learning-tank1990-python | Linear_QNet | false | 3,281 | [
"MIT"
] | 0 | 8b75983289c7bc0831827561cec12d4ad2addee2 | https://github.com/cheapmouse94/Machine-Learning-tank1990-python/tree/8b75983289c7bc0831827561cec12d4ad2addee2 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, input_size, hidden_size_1, hidden_size_2, output_size):
super().__init__()
self.linear1 = nn.Linear(input_size, hidden_size_1)
self.leakyrelu = nn.LeakyReLU()
self.linear2 = nn.Linear(hidden_size_1, hidd... |
Actor | # 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
class Actor(torch.nn.Module):
"""Defines custom model
Inherits from torch.nn.Module
"""
def __init__(self, dim_input, dim_output):
super(Actor, self).__init__()
self._dim_input = dim_input
self._dim_output = dim_output
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
assert_size_stride = torch._C... | cheng-xie/dpgfddagger | Actor | false | 3,282 | [
"MIT"
] | 0 | 5264d5b9e0ab76fc9620da63bcfd78b25dadcbec | https://github.com/cheng-xie/dpgfddagger/tree/5264d5b9e0ab76fc9620da63bcfd78b25dadcbec | import torch
import torch.nn.functional as F
class Model(torch.nn.Module):
"""Defines custom model
Inherits from torch.nn.Module
"""
def __init__(self, dim_input, dim_output):
super().__init__()
self._dim_input = dim_input
self._dim_output = dim_output
SIZE_H1 = 50
... |
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, dim_input, dim_output):
super(Critic, self).__init__()
self._dim_input = dim_input
self._dim_output = dim_output
H_LAYER1 = 50
H_LAYER2 = 20
self.linear1 ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | cheng-xie/dpgfddagger | Critic | false | 3,283 | [
"MIT"
] | 0 | 5264d5b9e0ab76fc9620da63bcfd78b25dadcbec | https://github.com/cheng-xie/dpgfddagger/tree/5264d5b9e0ab76fc9620da63bcfd78b25dadcbec | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
def __init__(self, dim_input, dim_output):
super().__init__()
self._dim_input = dim_input
self._dim_output = dim_output
H_LAYER1 = 50
H_LAYER2 = 20
self.linear1 = nn.Linear(s... |
NeuralNetMultiplePositionalArgumentsMultiOutputsWithDependency | # 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
import torch.onnx
class NeuralNetMultiplePositionalArgumentsMultiOutputsWithDependency(torch.
nn.Module):
def __init__(self, input_size, hidden_size, num_classes):
super(NeuralNetMultiplePositionalArgumentsMultiOutputsWithDependency,
self).__init__()
s... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | carefreekk/onnxruntime | NeuralNetMultiplePositionalArgumentsMultiOutputsWithDependency | false | 3,284 | [
"MIT"
] | 0 | 484e9de55c109dadbeb552cd6ede21bbdd63b830 | https://github.com/carefreekk/onnxruntime/tree/484e9de55c109dadbeb552cd6ede21bbdd63b830 | import torch
import torch.nn
import torch.onnx
class Model(torch.
nn.Module):
def __init__(self, input_size, hidden_size, num_classes):
super().__init__()
self.fc1 = torch.nn.Linear(input_size, hidden_size)
self.softmax = torch.nn.Softmax(dim=1)
self.fc2 = torch.nn.Linear(hidd... |
ResidualBlock | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import torch.nn as nn
from functools import partial
def ncsn_conv3x3(in_planes, out_planes, stride=1, bias=True, dilation=1,
init_scale=1.0, padding=1):
"""3x3 convolution with PyTorch initialization. Same as NCSNv1/NCSNv2."""
init_scale = 1e-10 if init_scale == 0 else init_scale
conv = 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.triton_helpers import libdevice
import torch.nn as ... | chen-hao-chao/dlsm | ResidualBlock | false | 3,285 | [
"Apache-2.0"
] | 0 | aea88aa7e59a02fe44f25f4de9d6f2eaf044093b | https://github.com/chen-hao-chao/dlsm/tree/aea88aa7e59a02fe44f25f4de9d6f2eaf044093b | import torch
import torch.nn as nn
from functools import partial
def ncsn_conv3x3(in_planes, out_planes, stride=1, bias=True, dilation=1,
init_scale=1.0, padding=1):
"""3x3 convolution with PyTorch initialization. Same as NCSNv1/NCSNv2."""
init_scale = 1e-10 if init_scale == 0 else init_scale
conv = n... |
Attention | # 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
from torch import nn
from torch.functional import F
import torch.nn.functional as F
class Attention(nn.Module):
"""
Scaled Dot-Product Attention proposed in "Attention Is All You Need"
Compute the dot products of the query with all keys, divide each by sqrt(dim),
and apply a s... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | chentuochao/Learn_attention_and_transformer | Attention | false | 3,286 | [
"MIT"
] | 0 | 3934ea3b700c6b8c0709057700372c531f43345f | https://github.com/chentuochao/Learn_attention_and_transformer/tree/3934ea3b700c6b8c0709057700372c531f43345f | import math
import torch
from torch import nn
from torch.functional import F
import torch.nn.functional as F
class Model(nn.Module):
"""
Scaled Dot-Product Attention proposed in "Attention Is All You Need"
Compute the dot products of the query with all keys, divide each by sqrt(dim),
and apply a softm... |
LateralBlock | # 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 LateralBlock(nn.Module):
def __init__(self, c_planes, p_planes, out_planes):
super(LateralBlock, self).__init__()
self.lateral = nn.Conv2d(c_planes, p_planes, kernel_size=1, padding
=0, stride=1)
self.top... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | chicm/detect | LateralBlock | false | 3,287 | [
"Apache-2.0"
] | 0 | c1b611344d102fd7e94d94c678a44339e18ddd21 | https://github.com/chicm/detect/tree/c1b611344d102fd7e94d94c678a44339e18ddd21 | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
def __init__(self, c_planes, p_planes, out_planes):
super().__init__()
self.lateral = nn.Conv2d(c_planes, p_planes, kernel_size=1, padding
=0, stride=1)
self.top = nn.Conv2d(p_planes, ou... |
AvgPool | # 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.utils.data
import torch.nn.functional as F
import torch.utils
import torch.cuda
class AvgPool(nn.Module):
def __init__(self, in_channels, reduction, save_device=torch.device('cpu')
):
super(AvgPool, self).__init__()
self.save_device = save_de... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
import torch.utils.data
import torch.utils
import torch.cuda
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | chomin/BayesNAS | AvgPool | false | 3,288 | [
"Apache-2.0"
] | 0 | 7b1d991d1e10213fa999eab513d1e12fe4bb571b | https://github.com/chomin/BayesNAS/tree/7b1d991d1e10213fa999eab513d1e12fe4bb571b | import torch
from torch import nn
import torch.utils.data
import torch.nn.functional as F
import torch.utils
import torch.cuda
class Model(nn.Module):
def __init__(self, in_channels, reduction, save_device=torch.device('cpu')
):
super().__init__()
self.save_device = save_device
se... |
Conv2d | # 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 torch
import numpy as np
import torch.nn as nn
import torch.nn.functional as F
def _setup_kernel(k):
k = np.asarray(k, dtype=np.float32)
if k.ndim == 1:
k = np.outer(k, k)
k /= np.sum(k)
assert k.ndim == 2
assert k.shape[0] == k.shape[1]
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
from torch.autograd import Function
import numpy as np
import torch.nn as nn
imp... | chen-hao-chao/dlsm | Conv2d | false | 3,289 | [
"Apache-2.0"
] | 0 | aea88aa7e59a02fe44f25f4de9d6f2eaf044093b | https://github.com/chen-hao-chao/dlsm/tree/aea88aa7e59a02fe44f25f4de9d6f2eaf044093b | from torch.autograd import Function
import torch
import numpy as np
import torch.nn as nn
import torch.nn.functional as F
def _setup_kernel(k):
k = np.asarray(k, dtype=np.float32)
if k.ndim == 1:
k = np.outer(k, k)
k /= np.sum(k)
assert k.ndim == 2
assert k.shape[0] == k.shape[1]
retur... |
MiniBatchAverageLayer | # 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.fft
class MiniBatchAverageLayer(nn.Module):
"""Minibatch stat concatenation layer. Implementation is from https://github.com/shanexn/pytorch-pggan."""
def __init__(self, offset=1e-08):
super().__init__()
self.offset = offset
def forward(sel... | 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.fft
assert_size_stride = torch._C._dynamo.gu... | catherine-qian/image2reverb | MiniBatchAverageLayer | false | 3,290 | [
"MIT"
] | 0 | 0fbcb35d6252dc8652cf98af0e64371cb81967e4 | https://github.com/catherine-qian/image2reverb/tree/0fbcb35d6252dc8652cf98af0e64371cb81967e4 | import torch
import torch.nn as nn
import torch.fft
class Model(nn.Module):
"""Minibatch stat concatenation layer. Implementation is from https://github.com/shanexn/pytorch-pggan."""
def __init__(self, offset=1e-08):
super().__init__()
self.offset = offset
def forward(self, x):
s... |
InnerProductDecoder | # 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 InnerProductDecoder(nn.Module):
"""
Description of InnerProductDecoder
Inheritance:
nn.Module:
"""
def __init__(self, activation=torch.sigmoid, dropout=0.1):
super(InnerProductDecoder, self).__init__()
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | ciortanmadalina/graph-sc-package | InnerProductDecoder | false | 3,291 | [
"MIT"
] | 0 | df920f0acfa7b596a4d677df011e8ece51136949 | https://github.com/ciortanmadalina/graph-sc-package/tree/df920f0acfa7b596a4d677df011e8ece51136949 | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
"""
Description of InnerProductDecoder
Inheritance:
nn.Module:
"""
def __init__(self, activation=torch.sigmoid, dropout=0.1):
super().__init__()
self.dropout = dropout
self... |
WeightedFeatureFusion | # 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 WeightedFeatureFusion(nn.Module):
def __init__(self, layers, weight=False):
super(WeightedFeatureFusion, self).__init__()
self.layers = layers
self.weight = weight
self.n = len(layers) + 1
if weight:
self.w = nn.Paramete... | 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... | cititude/Media-and-Cognition-Homework | WeightedFeatureFusion | false | 3,292 | [
"MIT"
] | 0 | dabaaef6d8ec115171e7115731c5f76b518d9bde | https://github.com/cititude/Media-and-Cognition-Homework/tree/dabaaef6d8ec115171e7115731c5f76b518d9bde | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, layers, weight=False):
super().__init__()
self.layers = layers
self.weight = weight
self.n = len(layers) + 1
if weight:
self.w = nn.Parameter(torch.zeros(self.n), requires_grad=True)
... |
MaxPool | # 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.utils.data
import torch.nn.functional as F
import torch.utils
import torch.cuda
class MaxPool(nn.Module):
def __init__(self, in_channels, reduction, save_device=torch.device('cpu')
):
super(MaxPool, self).__init__()
self.save_device = save_de... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
import torch.utils.data
import torch.utils
import torch.cuda
assert_... | chomin/BayesNAS | MaxPool | false | 3,293 | [
"Apache-2.0"
] | 0 | 7b1d991d1e10213fa999eab513d1e12fe4bb571b | https://github.com/chomin/BayesNAS/tree/7b1d991d1e10213fa999eab513d1e12fe4bb571b | import torch
from torch import nn
import torch.utils.data
import torch.nn.functional as F
import torch.utils
import torch.cuda
class Model(nn.Module):
def __init__(self, in_channels, reduction, save_device=torch.device('cpu')
):
super().__init__()
self.save_device = save_device
se... |
StochasticGate | # 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 torchvision.transforms.functional as F
import torch.nn as nn
import torch.nn.functional as F
class StochasticGate(nn.Module):
"""Stochastically merges features from two levels
with varying size of the receptive field
"""
def __init__(self):
super(StochasticGate, self).__i... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | candacelax/1-stage-wseg | StochasticGate | false | 3,294 | [
"Apache-2.0"
] | 0 | 7a24791a3a78454e6611399ba55a808491551543 | https://github.com/candacelax/1-stage-wseg/tree/7a24791a3a78454e6611399ba55a808491551543 | import torch
import torchvision.transforms.functional as F
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
"""Stochastically merges features from two levels
with varying size of the receptive field
"""
def __init__(self):
super().__init__()
self._mask_dr... |
HingeLoss | # 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 HingeLoss(nn.Module):
"""Hinge loss function module for multi-label classification"""
def __init__(self, margin=1.0, power=2, cost_weighted=False):
"""
Args:
margin (float, optional): margin for the hinge los... | 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... | cjhsieh/pecos | HingeLoss | false | 3,295 | [
"Apache-2.0",
"BSD-3-Clause"
] | 0 | 22e88ee544d5a5e891a1d23a578881fdf26dfcf7 | https://github.com/cjhsieh/pecos/tree/22e88ee544d5a5e891a1d23a578881fdf26dfcf7 | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
"""Hinge loss function module for multi-label classification"""
def __init__(self, margin=1.0, power=2, cost_weighted=False):
"""
Args:
margin (float, optional): margin for the hinge loss. D... |
FCLayer | # 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 Tensor
import torch.nn as nn
class FCLayer(nn.Module):
def __init__(self, input_dim: 'int', output_dim: 'int', dropout_rate:
'float'=0.0, use_activation: 'bool'=True) ->None:
super(FCLayer, self).__init__()
self.use_activation = use_activation
self.d... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as ... | cjber/georelations | FCLayer | false | 3,296 | [
"MIT"
] | 0 | fe97e62a950b556c88be6e43fc67a55a16a65938 | https://github.com/cjber/georelations/tree/fe97e62a950b556c88be6e43fc67a55a16a65938 | import torch
from torch import Tensor
import torch.nn as nn
class Model(nn.Module):
def __init__(self, input_dim: 'int', output_dim: 'int', dropout_rate:
'float'=0.0, use_activation: 'bool'=True) ->None:
super().__init__()
self.use_activation = use_activation
self.dropout = nn.Dro... |
GeneralizedMeanPoolingList | # 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 abc import ABC
from torch import nn
class GeneralizedMeanPoolingList(nn.Module, ABC):
"""Applies a 2D power-average adaptive pooling over an input signal composed of
several input planes.
The function computed is: :math:`f(X) = pow(sum(pow(X, p)), 1/p)`
- At p = infinity, one get... | 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 abc import ABC
from torch import nn
assert_size_stride = torch._C._dynamo.guards.ass... | catcodee/cluster-contrast-reid | GeneralizedMeanPoolingList | false | 3,297 | [
"MIT"
] | 0 | f6359990a4326375f23c3fd654df3fc6dcc9c579 | https://github.com/catcodee/cluster-contrast-reid/tree/f6359990a4326375f23c3fd654df3fc6dcc9c579 | import torch
from abc import ABC
from torch import nn
class Model(nn.Module, ABC):
"""Applies a 2D power-average adaptive pooling over an input signal composed of
several input planes.
The function computed is: :math:`f(X) = pow(sum(pow(X, p)), 1/p)`
- At p = infinity, one gets Max Pooling
... |
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.functional as F
import torch.nn as nn
class Model(nn.Module):
"""
An example pytorch model for classifying iris flower
"""
def __init__(self, input_dim=4, output_dim=3):
super(Model, self).__init__()
self.layer1 = nn.Linear(input_dim, 50)
self.laye... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | clam004/docker-pytorch-api | Model | false | 3,298 | [
"MIT"
] | 0 | 2ba390ea581c774e8bdfa1ad434b42181376430f | https://github.com/clam004/docker-pytorch-api/tree/2ba390ea581c774e8bdfa1ad434b42181376430f | import torch
import torch.nn.functional as F
import torch.nn as nn
class Model(nn.Module):
"""
An example pytorch model for classifying iris flower
"""
def __init__(self, input_dim=4, output_dim=3):
super(Model, self).__init__()
self.layer1 = nn.Linear(input_dim, 50)
self.laye... |
FCDiscriminator | # 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 FCDiscriminator(nn.Module):
def __init__(self, num_classes, ndf=64):
super().__init__()
self.conv1 = nn.Conv2d(num_classes, ndf, kernel_size=4, stride=2,
padding=1)
self.conv2 = nn.Conv2d(ndf, ndf * 2, kernel_size=4, stride=2, padding=1... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | ciampluca/unsupervised_counting | FCDiscriminator | false | 3,299 | [
"MIT"
] | 0 | 4445d48f68da75359643bcf3003e90ef61d817e3 | https://github.com/ciampluca/unsupervised_counting/tree/4445d48f68da75359643bcf3003e90ef61d817e3 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, num_classes, ndf=64):
super().__init__()
self.conv1 = nn.Conv2d(num_classes, ndf, kernel_size=4, stride=2,
padding=1)
self.conv2 = nn.Conv2d(ndf, ndf * 2, kernel_size=4, stride=2, padding=1
... |
TransformerLinearXMCHead | # 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 numpy as np
import torch.nn as nn
class TransformerLinearXMCHead(nn.Module):
"""XMC head for Transformers
Containing label weight embeddings and label bias embeddings
"""
def __init__(self, hidden_size, num_labels):
super().__init__()
self.label_pad = num_labels
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import numpy as np
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dyna... | cjhsieh/pecos | TransformerLinearXMCHead | false | 3,300 | [
"Apache-2.0",
"BSD-3-Clause"
] | 0 | 22e88ee544d5a5e891a1d23a578881fdf26dfcf7 | https://github.com/cjhsieh/pecos/tree/22e88ee544d5a5e891a1d23a578881fdf26dfcf7 | import torch
import numpy as np
import torch.nn as nn
class Model(nn.Module):
"""XMC head for Transformers
Containing label weight embeddings and label bias embeddings
"""
def __init__(self, hidden_size, num_labels):
super().__init__()
self.label_pad = num_labels
self.num_lab... |
InitialSpanEncoder | # 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 Tensor
from torch.nn.modules.transformer import TransformerEncoderLayer
class InitialSpanEncoder(TransformerEncoderLayer):
"""
The initial layer for the Segmental Transformer Encoder. Representations of
the source sequence attend over all unmasked positions in the sequence
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | cmdowney88/XLSLM | InitialSpanEncoder | false | 3,301 | [
"MIT"
] | 0 | 7fe266bd0f0ad8a79a30052a18104b974d1c32e8 | https://github.com/cmdowney88/XLSLM/tree/7fe266bd0f0ad8a79a30052a18104b974d1c32e8 | import torch
from torch import Tensor
from torch.nn.modules.transformer import TransformerEncoderLayer
class Model(TransformerEncoderLayer):
"""
The initial layer for the Segmental Transformer Encoder. Representations of
the source sequence attend over all unmasked positions in the sequence
The encod... |
SegmentalTransformerEncoder | # 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 numpy as np
from torch import Tensor
import torch.nn as nn
from torch.nn.modules.transformer import TransformerEncoderLayer
from torch.nn.modules.transformer import _get_clones
class InitialSpanEncoder(TransformerEncoderLayer):
"""
The initial layer for the Segmental Transformer Encoder. R... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | cmdowney88/XLSLM | SegmentalTransformerEncoder | false | 3,302 | [
"MIT"
] | 0 | 7fe266bd0f0ad8a79a30052a18104b974d1c32e8 | https://github.com/cmdowney88/XLSLM/tree/7fe266bd0f0ad8a79a30052a18104b974d1c32e8 | import torch
import numpy as np
from torch import Tensor
import torch.nn as nn
from torch.nn.modules.transformer import TransformerEncoderLayer
from torch.nn.modules.transformer import _get_clones
class InitialSpanEncoder(TransformerEncoderLayer):
"""
The initial layer for the Segmental Transformer Encoder. R... |
Encoder | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import torch.nn as nn
import torch.nn.functional as F
class Encoder(nn.Module):
def __init__(self, out_dim=64):
super(Encoder, self).__init__()
self.conv1 = nn.Conv2d(3, 16, kernel_size=3, stride=1, padding=1)
self.conv2 = nn.Conv2d(16, 32, kernel_size=3, stride=1, padding=1)... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | cloughurd/SimCLR | Encoder | false | 3,303 | [
"MIT"
] | 0 | 79029b6cb422aa16c939bcc550ca4acd495c2651 | https://github.com/cloughurd/SimCLR/tree/79029b6cb422aa16c939bcc550ca4acd495c2651 | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
def __init__(self, out_dim=64):
super().__init__()
self.conv1 = nn.Conv2d(3, 16, kernel_size=3, stride=1, padding=1)
self.conv2 = nn.Conv2d(16, 32, kernel_size=3, stride=1, padding=1)
self.c... |
VarifocalLoss | # 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.nn as nn
import torch.utils.data.distributed
def reduce_loss(loss, reduction):
"""Reduce loss as specified.
Args:
loss (Tensor): Elementwise loss tensor.
reduction (str): Options are "none", "mean" and "sum".
Return:
Tenso... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
import torc... | cocopambag/insightface | VarifocalLoss | false | 3,304 | [
"MIT"
] | 0 | c33102e4844520cda6c2b3df63278aed935e2f4e | https://github.com/cocopambag/insightface/tree/c33102e4844520cda6c2b3df63278aed935e2f4e | import torch
import torch.nn.functional as F
import torch.nn as nn
import torch.utils.data.distributed
def reduce_loss(loss, reduction):
"""Reduce loss as specified.
Args:
loss (Tensor): Elementwise loss tensor.
reduction (str): Options are "none", "mean" and "sum".
Return:
Tenso... |
CReLU_IN | # 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 CReLU_IN(nn.Module):
def __init__(self, channels):
super(CReLU_IN, self).__init__()
self.bn = nn.InstanceNorm2d(channels * 2, eps=1e-05, momentum=0.1,
affine=True)
def forward(self, x):
cat = torch.c... | 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_... | cnzeki/PSENet | CReLU_IN | false | 3,305 | [
"Apache-2.0"
] | 0 | c7e0785404e12866171e9da678736abae9cdb8cb | https://github.com/cnzeki/PSENet/tree/c7e0785404e12866171e9da678736abae9cdb8cb | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
def __init__(self, channels):
super().__init__()
self.bn = nn.InstanceNorm2d(channels * 2, eps=1e-05, momentum=0.1,
affine=True)
def forward(self, x):
cat = torch.cat((x, -x), 1)
... |
CReLU | # 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 CReLU(nn.Module):
def __init__(self):
super(CReLU, self).__init__()
def forward(self, x):
return torch.cat((F.leaky_relu(x, 0.01, inplace=True), F.leaky_relu
(-x, 0.01, inplace=True)), 1)
def get_inputs():... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | cnzeki/PSENet | CReLU | false | 3,306 | [
"Apache-2.0"
] | 0 | c7e0785404e12866171e9da678736abae9cdb8cb | https://github.com/cnzeki/PSENet/tree/c7e0785404e12866171e9da678736abae9cdb8cb | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
def __init__(self):
super().__init__()
def forward(self, x):
return torch.cat((F.leaky_relu(x, 0.01, inplace=True), F.leaky_relu
(-x, 0.01, inplace=True)), 1)
def get_inputs():
return... |
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
import torch.utils.data.distributed
class MultiheadAttention(nn.Module):
"""A warpper for torch.nn.MultiheadAttention.
This module implements MultiheadAttention with residual connection,
and positional encoding used in DETR is also passed as input.
Args:
em... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | cocopambag/insightface | MultiheadAttention | false | 3,307 | [
"MIT"
] | 0 | c33102e4844520cda6c2b3df63278aed935e2f4e | https://github.com/cocopambag/insightface/tree/c33102e4844520cda6c2b3df63278aed935e2f4e | import torch
import torch.nn as nn
import torch.utils.data.distributed
class Model(nn.Module):
"""A warpper for torch.nn.MultiheadAttention.
This module implements MultiheadAttention with residual connection,
and positional encoding used in DETR is also passed as input.
Args:
embed_dims (int... |
BasicBlockIn | # 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 import InstanceNorm2d
class BasicBlockIn(nn.Module):
expansion = 1
def __init__(self, inplanes, planes, stride=1, downsample=None):
super(BasicBlockIn, self).__init__()
self.conv1 = nn.Conv2d(inplanes, planes, kernel_size=3, stride=
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | cnzeki/PSENet | BasicBlockIn | false | 3,308 | [
"Apache-2.0"
] | 0 | c7e0785404e12866171e9da678736abae9cdb8cb | https://github.com/cnzeki/PSENet/tree/c7e0785404e12866171e9da678736abae9cdb8cb | import torch
import torch.nn as nn
from torch.nn import InstanceNorm2d
class Model(nn.Module):
expansion = 1
def __init__(self, inplanes, planes, stride=1, downsample=None):
super().__init__()
self.conv1 = nn.Conv2d(inplanes, planes, kernel_size=3, stride=
stride, padding=1, bias=... |
SLMLexicon | # 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 Tensor
from typing import Tuple
import torch.nn as nn
class SLMLexicon(nn.Module):
"""
The optional "Lexicon" or "Memory" component of the Segmental Language
Model. Decodes context/position encodings to logits over a segmental
vocabulary, as well as a mixture proportion ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | cmdowney88/XLSLM | SLMLexicon | false | 3,309 | [
"MIT"
] | 0 | 7fe266bd0f0ad8a79a30052a18104b974d1c32e8 | https://github.com/cmdowney88/XLSLM/tree/7fe266bd0f0ad8a79a30052a18104b974d1c32e8 | import torch
from torch import Tensor
from typing import Tuple
import torch.nn as nn
class Model(nn.Module):
"""
The optional "Lexicon" or "Memory" component of the Segmental Language
Model. Decodes context/position encodings to logits over a segmental
vocabulary, as well as a mixture proportion for c... |
CrossEntropy | # 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 CrossEntropy(nn.Module):
def __init__(self, is_weight=False, weight=[]):
super(CrossEntropy, self).__init__()
self.is_weight = is_weight
self.weight = weight
def forward(self, input, target, batchsize=2):
... | 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
... | coolservices/rock-fracture-identification | CrossEntropy | false | 3,310 | [
"Apache-2.0"
] | 0 | 3e7349be7e76dc87800c630f53f8d1ad5673d28b | https://github.com/coolservices/rock-fracture-identification/tree/3e7349be7e76dc87800c630f53f8d1ad5673d28b | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
def __init__(self, is_weight=False, weight=[]):
super().__init__()
self.is_weight = is_weight
self.weight = weight
def forward(self, input, target, batchsize=2):
target = torch.argmax(t... |
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._... | andreas-hommel/glow | SimpleACosModule | false | 3,311 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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 []
|
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... | andreas-hommel/glow | SimpleAbsModule | false | 3,312 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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 []
|
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... | andreas-hommel/glow | OneTupleModule | false | 3,313 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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 []
|
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._... | andreas-hommel/glow | SimpleASinModule | false | 3,314 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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 []
|
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... | andreas-hommel/glow | RepeatModule | false | 3,315 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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():
... |
MLP | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import torch.nn as nn
from collections import OrderedDict
class MLP(nn.Module):
def __init__(self, input_dims, n_hiddens, n_class):
super(MLP, self).__init__()
assert isinstance(input_dims, int), 'Please provide int for input_dims'
self.input_dims = input_dims
current... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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... | coreylammie/pytorch-playground | MLP | false | 3,316 | [
"MIT"
] | 0 | ff7dd3a6c40481326120895065e120b4fefa1c9e | https://github.com/coreylammie/pytorch-playground/tree/ff7dd3a6c40481326120895065e120b4fefa1c9e | import torch
import torch.nn as nn
from collections import OrderedDict
class Model(nn.Module):
def __init__(self, input_dims, n_hiddens, n_class):
super().__init__()
assert isinstance(input_dims, int), 'Please provide int for input_dims'
self.input_dims = input_dims
current_dims =... |
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... | andreas-hommel/glow | SimpleAvgPool1dModule | false | 3,317 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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
... |
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._... | andreas-hommel/glow | SimpleATanModule | false | 3,318 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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 []
|
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... | andreas-hommel/glow | SimpleCumSumModule | false | 3,319 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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... |
SimpleAvgPool2dModule | # 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 SimpleAvgPool2dModule(torch.nn.Module):
def __init__(self, kernel_size, stride=None, padding=0):
super(SimpleAvgPool2dModule, 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... | andreas-hommel/glow | SimpleAvgPool2dModule | false | 3,320 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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
... |
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._... | andreas-hommel/glow | SimpleCeilModule | false | 3,321 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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 []
|
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... | andreas-hommel/glow | SimpleAndModule | false | 3,322 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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... |
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._... | andreas-hommel/glow | SimpleFmodModule | false | 3,323 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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... |
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.... | andreas-hommel/glow | SimpleClampMinModel | false | 3,324 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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... |
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... | andreas-hommel/glow | SimpleConvTranspose2dModule | false | 3,325 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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... |
SubsequentSpanEncoder | # 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 Tensor
from torch.nn.modules.transformer import TransformerEncoderLayer
class SubsequentSpanEncoder(TransformerEncoderLayer):
"""
The subsequent layers for the Segmental Transformer Encoder. The encoded
representations from previous layers attend over all unmasked positions ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | cmdowney88/XLSLM | SubsequentSpanEncoder | false | 3,326 | [
"MIT"
] | 0 | 7fe266bd0f0ad8a79a30052a18104b974d1c32e8 | https://github.com/cmdowney88/XLSLM/tree/7fe266bd0f0ad8a79a30052a18104b974d1c32e8 | import torch
from torch import Tensor
from torch.nn.modules.transformer import TransformerEncoderLayer
class Model(TransformerEncoderLayer):
"""
The subsequent layers for the Segmental Transformer Encoder. The encoded
representations from previous layers attend over all unmasked positions of
the origi... |
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... | andreas-hommel/glow | SimpleBmmModule | false | 3,327 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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 []
|
SPPblock | # 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 SPPblock(nn.Module):
def __init__(self, in_channels):
super(SPPblock, self).__init__()
self.pool1 = nn.MaxPool2d(kernel_size=[2, 2], stride=2)
self.pool2 = nn.MaxPool2d(kernel_size=[3, 3], stride=3)
self.pool... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | coolservices/rock-fracture-identification | SPPblock | false | 3,328 | [
"Apache-2.0"
] | 0 | 3e7349be7e76dc87800c630f53f8d1ad5673d28b | https://github.com/coolservices/rock-fracture-identification/tree/3e7349be7e76dc87800c630f53f8d1ad5673d28b | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
def __init__(self, in_channels):
super().__init__()
self.pool1 = nn.MaxPool2d(kernel_size=[2, 2], stride=2)
self.pool2 = nn.MaxPool2d(kernel_size=[3, 3], stride=3)
self.pool3 = nn.MaxPool2d(... |
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.... | andreas-hommel/glow | SimpleClampModel | false | 3,329 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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 ... |
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... | andreas-hommel/glow | SimpleCosModule | false | 3,330 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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 []
|
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... | andreas-hommel/glow | SimpleLogModule | false | 3,331 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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... |
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... | andreas-hommel/glow | SimpleConv2dModule | false | 3,332 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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
... |
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._... | andreas-hommel/glow | SimpleGeluModule | false | 3,333 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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 []
|
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... | andreas-hommel/glow | SimpleExpModule | false | 3,334 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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 []
|
PositionalEncoding | # 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 math
import torch
import torch.nn as nn
class PositionalEncoding(nn.Module):
"""Implement the PE function."""
def __init__(self, d_model, max_len=10000):
super(PositionalEncoding, self).__init__()
pe = torch.zeros(max_len, d_model)
position = torch.arange(0, max_len).unsqueeze(... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import math
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guar... | cmiras/BSL-segmentation | PositionalEncoding | false | 3,335 | [
"MIT"
] | 0 | 35a66d6c758dcf4734adb0ebc5a40ea7238d7a1d | https://github.com/cmiras/BSL-segmentation/tree/35a66d6c758dcf4734adb0ebc5a40ea7238d7a1d | import math
import torch
import torch.nn as nn
class Model(nn.Module):
"""Implement the PE function."""
def __init__(self, d_model, max_len=10000):
super().__init__()
pe = torch.zeros(max_len, d_model)
position = torch.arange(0, max_len).unsqueeze(1)
div_term = torch.exp(torch... |
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... | andreas-hommel/glow | Foo | false | 3,336 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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... |
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... | andreas-hommel/glow | SimpleAddMmModule | false | 3,337 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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... |
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.... | andreas-hommel/glow | SimpleMaxModule | false | 3,338 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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... |
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... | andreas-hommel/glow | SimpleMatmulModule | false | 3,339 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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():
... |
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... | andreas-hommel/glow | SimpleLogSoftmaxModel | false | 3,340 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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... |
SimpleModule | # 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 SimpleModule(torch.nn.Module):
def __init__(self):
super(SimpleModule, self).__init__()
def forward(self, x):
y = x + x
y = y + 2
return y
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | andreas-hommel/glow | SimpleModule | false | 3,341 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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 = x + x
y = y + 2
return y
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
retur... |
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.... | andreas-hommel/glow | SimpleMinModule | false | 3,342 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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... |
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... | andreas-hommel/glow | SimpleMulModule | false | 3,343 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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... |
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... | andreas-hommel/glow | SimpleSoftmaxModel | false | 3,344 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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... |
SimpleNormModule | # 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 SimpleNormModule(torch.nn.Module):
def __init__(self, *args, **kwargs):
super(SimpleNormModule, self).__init__()
self.args = args
self.kwargs = kwargs
def forward(self, tensor):
return torch.norm(tensor, *s... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice
import torch.jit
import torc... | andreas-hommel/glow | SimpleNormModule | false | 3,345 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | import torch
import torch.jit
import torch.onnx
import torch.nn
class Model(torch.nn.Module):
def __init__(self, *args, **kwargs):
super().__init__()
self.args = args
self.kwargs = kwargs
def forward(self, tensor):
return torch.norm(tensor, *self.args, **self.kwargs)
def ge... |
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... | andreas-hommel/glow | SimpleOrModule | false | 3,346 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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(... |
BboxHead | # 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 itertools import product as product
class BboxHead(nn.Module):
def __init__(self, inchannels=512, num_anchors=2):
super(BboxHead, self).__init__()
self.conv1x1 = nn.Conv2d(inchannels, num_anchors * 4, kernel_size=(
1, 1), stride=1, padding=0)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
from itertools import product as product
assert_size_strid... | chennnnnnnnn/face_detection | BboxHead | false | 3,347 | [
"MIT"
] | 0 | 77d5a9098d9e1a65ac5093a23620ed5d99dc0723 | https://github.com/chennnnnnnnn/face_detection/tree/77d5a9098d9e1a65ac5093a23620ed5d99dc0723 | import torch
import torch.nn as nn
from itertools import product as product
class Model(nn.Module):
def __init__(self, inchannels=512, num_anchors=2):
super().__init__()
self.conv1x1 = nn.Conv2d(inchannels, num_anchors * 4, kernel_size=(
1, 1), stride=1, padding=0)
def forward(se... |
ClassHead | # 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 itertools import product as product
class ClassHead(nn.Module):
def __init__(self, inchannels=512, num_anchors=2):
super(ClassHead, self).__init__()
self.num_anchors = num_anchors
self.conv1x1 = nn.Conv2d(inchannels, self.num_anchors * 2,
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
from itertools import product as product
assert_size_strid... | chennnnnnnnn/face_detection | ClassHead | false | 3,348 | [
"MIT"
] | 0 | 77d5a9098d9e1a65ac5093a23620ed5d99dc0723 | https://github.com/chennnnnnnnn/face_detection/tree/77d5a9098d9e1a65ac5093a23620ed5d99dc0723 | import torch
import torch.nn as nn
from itertools import product as product
class Model(nn.Module):
def __init__(self, inchannels=512, num_anchors=2):
super().__init__()
self.num_anchors = num_anchors
self.conv1x1 = nn.Conv2d(inchannels, self.num_anchors * 2,
kernel_size=(1, 1... |
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... | andreas-hommel/glow | SimpleNotModule | false | 3,349 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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... |
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... | andreas-hommel/glow | SimpleReshapeModel | false | 3,350 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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... |
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.... | andreas-hommel/glow | SimpleReluModel | false | 3,351 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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... |
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... | andreas-hommel/glow | SimplePowModule | false | 3,352 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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... |
OutputBlock | # 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 OutputBlock(torch.nn.Module):
"""Flatten output channels using 1x1x1 convolutions"""
def __init__(self, ks, channels_in, channels_out):
super(OutputBlock, self).__init__()
self.convflat = torch.nn.Conv3d(in_channels=channels_in,
out_channels=channels_out, kernel... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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
reinterpret_tens... | conlain-k/RLN_elasticity | OutputBlock | false | 3,353 | [
"MIT"
] | 0 | d8574c83d62f675960a7f8b86ddb553e9a7b1ca7 | https://github.com/conlain-k/RLN_elasticity/tree/d8574c83d62f675960a7f8b86ddb553e9a7b1ca7 | import torch
class Model(torch.nn.Module):
"""Flatten output channels using 1x1x1 convolutions"""
def __init__(self, ks, channels_in, channels_out):
super().__init__()
self.convflat = torch.nn.Conv3d(in_channels=channels_in,
out_channels=channels_out, kernel_size=1, stride=1)
... |
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.... | andreas-hommel/glow | SimpleSumModule | false | 3,354 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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... |
LandmarkHead | # 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 itertools import product as product
class LandmarkHead(nn.Module):
def __init__(self, inchannels=512, num_anchors=2):
super(LandmarkHead, self).__init__()
self.conv1x1 = nn.Conv2d(inchannels, num_anchors * 10, kernel_size=
(1, 1), stride=1, padd... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
from itertools import product as product
assert_size_strid... | chennnnnnnnn/face_detection | LandmarkHead | false | 3,355 | [
"MIT"
] | 0 | 77d5a9098d9e1a65ac5093a23620ed5d99dc0723 | https://github.com/chennnnnnnnn/face_detection/tree/77d5a9098d9e1a65ac5093a23620ed5d99dc0723 | import torch
import torch.nn as nn
from itertools import product as product
class Model(nn.Module):
def __init__(self, inchannels=512, num_anchors=2):
super().__init__()
self.conv1x1 = nn.Conv2d(inchannels, num_anchors * 10, kernel_size=
(1, 1), stride=1, padding=0)
def forward(s... |
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... | andreas-hommel/glow | Qux | false | 3,356 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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 ... |
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._... | andreas-hommel/glow | SimpleTanhModel | false | 3,357 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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... |
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... | andreas-hommel/glow | SimpleSinModule | false | 3,358 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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 []
|
CircPad | # 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
class CircPad(torch.nn.Module):
def __init__(self, pad_size):
super(CircPad, self).__init__()
if type(pad_size) == tuple:
self.padding = pad_size
else:
self.padding = tuple(pad_size for i in range(6))
def forward(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
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda
@triton.j... | conlain-k/RLN_elasticity | CircPad | false | 3,359 | [
"MIT"
] | 0 | d8574c83d62f675960a7f8b86ddb553e9a7b1ca7 | https://github.com/conlain-k/RLN_elasticity/tree/d8574c83d62f675960a7f8b86ddb553e9a7b1ca7 | import torch
import torch.nn.functional as F
class Model(torch.nn.Module):
def __init__(self, pad_size):
super().__init__()
if type(pad_size) == tuple:
self.padding = pad_size
else:
self.padding = tuple(pad_size for i in range(6))
def forward(self, x):
... |
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... | andreas-hommel/glow | SimpleReciprocalModel | false | 3,360 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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.... |
SqueezeExcitation | # 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 Tensor
from torch import nn
from torch.nn import functional as F
from torchvision.models.mobilenetv2 import _make_divisible
class SqueezeExcitation(nn.Module):
def __init__(self, input_channels: 'int', squeeze_factor: 'int'=4):
super().__init__()
squeeze_channels = ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import Tensor
from... | connernam/lightweight-human-pose-estimation.pytorch | SqueezeExcitation | false | 3,361 | [
"Apache-2.0"
] | 0 | ea30c43dce0d9439345e014e00a5cf7ef34db9e1 | https://github.com/connernam/lightweight-human-pose-estimation.pytorch/tree/ea30c43dce0d9439345e014e00a5cf7ef34db9e1 | import torch
from torch import Tensor
from torch import nn
from torch.nn import functional as F
from torchvision.models.mobilenetv2 import _make_divisible
class Model(nn.Module):
def __init__(self, input_channels: 'int', squeeze_factor: 'int'=4):
super().__init__()
squeeze_channels = _make_divisi... |
Conv | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import torch.nn as nn
class Conv(nn.Module):
def __init__(self, input_size, output_size, kernel_size, pad_type):
super(Conv, self).__init__()
padding = (kernel_size - 1, 0) if pad_type == 'left' else (
kernel_size // 2, (kernel_size - 1) // 2)
self.pad = nn.Consta... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | crazyofapple/bert | Conv | false | 3,362 | [
"Apache-2.0"
] | 0 | 09f6afffc064687f7ac85d847f082e1c8d1f3ffa | https://github.com/crazyofapple/bert/tree/09f6afffc064687f7ac85d847f082e1c8d1f3ffa | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, input_size, output_size, kernel_size, pad_type):
super().__init__()
padding = (kernel_size - 1, 0) if pad_type == 'left' else (
kernel_size // 2, (kernel_size - 1) // 2)
self.pad = nn.ConstantPad1d(p... |
ResidualBlock | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import torch.nn.functional as F
import torch.nn as nn
class ResidualBlock(nn.Module):
def __init__(self, channels):
super(ResidualBlock, self).__init__()
self.channels = channels
self.conv1 = nn.Conv2d(channels, channels, kernel_size=3, padding=1)
self.conv2 = 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_... | crisnyoung/awesome-DeepLearning | ResidualBlock | false | 3,363 | [
"Apache-2.0"
] | 0 | 0f4d0e8cc6f6c662c9a058d4af7610bf1d2a947d | https://github.com/crisnyoung/awesome-DeepLearning/tree/0f4d0e8cc6f6c662c9a058d4af7610bf1d2a947d | import torch
import torch.nn.functional as F
import torch.nn as nn
class Model(nn.Module):
def __init__(self, channels):
super().__init__()
self.channels = channels
self.conv1 = nn.Conv2d(channels, channels, kernel_size=3, padding=1)
self.conv2 = nn.Conv2d(channels, channels, kern... |
L1Loss | # 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 L1Loss(torch.nn.Module):
def __init__(self):
super(L1Loss, self).__init__()
self.loss = torch.nn.L1Loss(reduction='mean')
def forward(self, cleaned_images, images):
return self.loss(cleaned_images, images)
def get_inputs():
return [torch.rand([4, 4, 4, 4]), t... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
assert_size_stride = t... | cviaai/MARL-NIR | L1Loss | false | 3,364 | [
"MIT"
] | 0 | f90f2353b03023546110c08ab1a24cf8edafb5fb | https://github.com/cviaai/MARL-NIR/tree/f90f2353b03023546110c08ab1a24cf8edafb5fb | import torch
class Model(torch.nn.Module):
def __init__(self):
super().__init__()
self.loss = torch.nn.L1Loss(reduction='mean')
def forward(self, cleaned_images, images):
return self.loss(cleaned_images, images)
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand([4,... |
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... | andreas-hommel/glow | SimpleXorModule | false | 3,365 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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... |
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... | andreas-hommel/glow | SimpleTypeasModel | false | 3,366 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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
... |
VGG16 | # 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 numpy as np
import torchvision.transforms.functional as F
import torch.nn as nn
import torch.nn.functional as F
class Normalize:
def __init__(self, mean=(0.485, 0.456, 0.406), std=(0.229, 0.224, 0.225)):
self.mean = mean
self.std = std
def undo(self, imgarr):
proc... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import numpy as np
import tor... | candacelax/1-stage-wseg | VGG16 | false | 3,367 | [
"Apache-2.0"
] | 0 | 7a24791a3a78454e6611399ba55a808491551543 | https://github.com/candacelax/1-stage-wseg/tree/7a24791a3a78454e6611399ba55a808491551543 | import torch
import numpy as np
import torchvision.transforms.functional as F
import torch.nn as nn
import torch.nn.functional as F
class Normalize:
def __init__(self, mean=(0.485, 0.456, 0.406), std=(0.229, 0.224, 0.225)):
self.mean = mean
self.std = std
def undo(self, imgarr):
proc... |
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... | andreas-hommel/glow | SimpleStackModel | false | 3,368 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e | 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, ... |
ResidualBlock | # 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 ResidualBlock(nn.Module):
def __init__(self, in_channels, out_channels):
super().__init__()
self.in_channels, self.out_channels = in_channels, out_channels
self.blocks = nn.Identity()
self.shortcut = nn.Identity()
def forward(self, x):... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
@triton.jit
def triton_poi_fused_add_0(in_ptr0, out_... | d222nguy/gcn_research | ResidualBlock | false | 3,369 | [
"MIT"
] | 0 | 83ced4f7d9f7840e48900e62c1eabec0444c5fa2 | https://github.com/d222nguy/gcn_research/tree/83ced4f7d9f7840e48900e62c1eabec0444c5fa2 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, in_channels, out_channels):
super().__init__()
self.in_channels, self.out_channels = in_channels, out_channels
self.blocks = nn.Identity()
self.shortcut = nn.Identity()
def forward(self, x):
... |
TaylorNet | # 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 math
import torch
import torch.nn as nn
class TaylorNet(nn.Module):
"""Applies a non-linear multiplicative transformation to the incoming data,
in order to generate output features that can be quadratic and linear in the
input features:
:math:`y = (x W_2^T) * (x W_1^T) + x W_1^T + b`
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import math
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.a... | dalessioluca/TaylorNet | TaylorNet | false | 3,370 | [
"MIT"
] | 0 | 342bc0d9ee5dd81b7fe3baf9e457b56ef1df5879 | https://github.com/dalessioluca/TaylorNet/tree/342bc0d9ee5dd81b7fe3baf9e457b56ef1df5879 | import math
import torch
import torch.nn as nn
class Model(nn.Module):
"""Applies a non-linear multiplicative transformation to the incoming data,
in order to generate output features that can be quadratic and linear in the
input features:
:math:`y = (x W_2^T) * (x W_1^T) + x W_1^T + b`
Not... |
Res | # 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.distributions
class Res(nn.Module):
def __init__(self, H):
super().__init__()
self.u1 = nn.Linear(H, H)
self.u2 = nn.Linear(H, H)
self.v1 = nn.Linear(H, H)
self.v2 = nn.Linear(H, H)
self.w = nn.Linear(H, H)
def fo... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
import t... | da03/torch_struct | Res | false | 3,371 | [
"MIT"
] | 0 | 08713b61b0cfe8438e52e82e07c88cf094feb73a | https://github.com/da03/torch_struct/tree/08713b61b0cfe8438e52e82e07c88cf094feb73a | import torch
from torch import nn
import torch.distributions
class Model(nn.Module):
def __init__(self, H):
super().__init__()
self.u1 = nn.Linear(H, H)
self.u2 = nn.Linear(H, H)
self.v1 = nn.Linear(H, H)
self.v2 = nn.Linear(H, H)
self.w = nn.Linear(H, H)
def ... |
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
import torch.nn.functional as F
from torch.nn.parameter import Parameter
from torch.nn.modules.module import Module
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.... | d222nguy/gcn_research | GCN | false | 3,372 | [
"MIT"
] | 0 | 83ced4f7d9f7840e48900e62c1eabec0444c5fa2 | https://github.com/d222nguy/gcn_research/tree/83ced4f7d9f7840e48900e62c1eabec0444c5fa2 | from torch.nn import Module
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.parameter import Parameter
from torch.nn.modules.module import Module
class GraphConvolution(Module):
"""
Simple GCN layer, similar to https://arxiv.org/abs/1609.02907
"""
def __in... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.