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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
AgentNN | # 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 AgentNN(torch.nn.Module):
""" Simple network. """
def __init__(self, D_in, D_out):
super(AgentNN, self).__init__()
self.linear1 = torch.nn.Linear(D_in, 20)
self.h1 = torch.nn.Linear(20, 15)
self.linear2 = torch.nn.Linear(15, D_out)
self.activation = ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
assert_size_stride ... | gimait/DaDSbot | AgentNN | false | 12,423 | [
"MIT"
] | 0 | 6ee6fea2339faa9a9a2fce29c3b00def378d88d3 | https://github.com/gimait/DaDSbot/tree/6ee6fea2339faa9a9a2fce29c3b00def378d88d3 | import torch
class Model(torch.nn.Module):
""" Simple network. """
def __init__(self, D_in, D_out):
super().__init__()
self.linear1 = torch.nn.Linear(D_in, 20)
self.h1 = torch.nn.Linear(20, 15)
self.linear2 = torch.nn.Linear(15, D_out)
self.activation = torch.nn.Tanh()... |
AE_3D_small | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import torch.nn as nn
import torch.utils.data
class AE_3D_small(nn.Module):
def __init__(self, n_features=4):
super(AE_3D_small, self).__init__()
self.en1 = nn.Linear(n_features, 3)
self.de1 = nn.Linear(3, n_features)
self.tanh = nn.Tanh()
def encode(self, x):
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as ... | gitter-badger/HEPAutoencoders | AE_3D_small | false | 12,424 | [
"Apache-2.0"
] | 0 | 43010cd66fa4335a04b30b87926148e1c8d92de9 | https://github.com/gitter-badger/HEPAutoencoders/tree/43010cd66fa4335a04b30b87926148e1c8d92de9 | import torch
import torch.nn as nn
import torch.utils.data
class Model(nn.Module):
def __init__(self, n_features=4):
super().__init__()
self.en1 = nn.Linear(n_features, 3)
self.de1 = nn.Linear(3, n_features)
self.tanh = nn.Tanh()
def encode(self, x):
return self.en1(x... |
AE_3D_50 | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import torch.nn as nn
import torch.utils.data
class AE_3D_50(nn.Module):
def __init__(self, n_features=4):
super(AE_3D_50, self).__init__()
self.en1 = nn.Linear(n_features, 50)
self.en2 = nn.Linear(50, 50)
self.en3 = nn.Linear(50, 20)
self.en4 = nn.Linear(20, ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | gitter-badger/HEPAutoencoders | AE_3D_50 | false | 12,425 | [
"Apache-2.0"
] | 0 | 43010cd66fa4335a04b30b87926148e1c8d92de9 | https://github.com/gitter-badger/HEPAutoencoders/tree/43010cd66fa4335a04b30b87926148e1c8d92de9 | import torch
import torch.nn as nn
import torch.utils.data
class Model(nn.Module):
def __init__(self, n_features=4):
super().__init__()
self.en1 = nn.Linear(n_features, 50)
self.en2 = nn.Linear(50, 50)
self.en3 = nn.Linear(50, 20)
self.en4 = nn.Linear(20, 3)
self.d... |
HuEtAl | # 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.utils
import torch.utils.data
import torch.nn as nn
import torch.nn.functional as F
from torch.nn import init
class HuEtAl(nn.Module):
"""
Deep Convolutional Neural Networks for Hyperspectral Image Classification
Wei Hu, Yangyu Huang, Li Wei, Fan Zhang and Hengchao Li... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | giorgosouz/HSI-classification-using-state-of-the-art-models | HuEtAl | false | 12,426 | [
"MIT"
] | 0 | a925972ffe02c2cd1e5dde2b163e1faa854a4966 | https://github.com/giorgosouz/HSI-classification-using-state-of-the-art-models/tree/a925972ffe02c2cd1e5dde2b163e1faa854a4966 | import math
import torch
import torch.utils
import torch.utils.data
import torch.nn as nn
import torch.nn.functional as F
from torch.nn import init
class Model(nn.Module):
"""
Deep Convolutional Neural Networks for Hyperspectral Image Classification
Wei Hu, Yangyu Huang, Li Wei, Fan Zhang and Hengchao Li
... |
AE_3D_100 | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import torch.nn as nn
import torch.utils.data
class AE_3D_100(nn.Module):
def __init__(self, n_features=4):
super(AE_3D_100, self).__init__()
self.en1 = nn.Linear(n_features, 100)
self.en2 = nn.Linear(100, 100)
self.en3 = nn.Linear(100, 50)
self.en4 = nn.Linea... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as ... | gitter-badger/HEPAutoencoders | AE_3D_100 | false | 12,427 | [
"Apache-2.0"
] | 0 | 43010cd66fa4335a04b30b87926148e1c8d92de9 | https://github.com/gitter-badger/HEPAutoencoders/tree/43010cd66fa4335a04b30b87926148e1c8d92de9 | import torch
import torch.nn as nn
import torch.utils.data
class Model(nn.Module):
def __init__(self, n_features=4):
super().__init__()
self.en1 = nn.Linear(n_features, 100)
self.en2 = nn.Linear(100, 100)
self.en3 = nn.Linear(100, 50)
self.en4 = nn.Linear(50, 3)
se... |
Net | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import torch.nn as nn
import torch.nn.functional as F
class Net(nn.Module):
def __init__(self):
super(Net, self).__init__()
self.conv2 = nn.Conv2d(3, 64, 8, 2, 3)
self.conv3 = nn.Conv2d(64, 128, 6, 2, 2)
self.conv4 = nn.Conv2d(128, 256, 4, 2, 1)
self.conv5 = n... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | eric-yoo/HairNet | Net | false | 12,428 | [
"MIT"
] | 0 | 15725328709f3f0e63d122914f8e55d18c4fa1fa | https://github.com/eric-yoo/HairNet/tree/15725328709f3f0e63d122914f8e55d18c4fa1fa | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
def __init__(self):
super().__init__()
self.conv2 = nn.Conv2d(3, 64, 8, 2, 3)
self.conv3 = nn.Conv2d(64, 128, 6, 2, 2)
self.conv4 = nn.Conv2d(128, 256, 4, 2, 1)
self.conv5 = nn.Conv2... |
RMSELoss | # 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
class RMSELoss(torch.nn.Module):
def __init__(self):
super(RMSELoss, self).__init__()
def forward(self, x, y):
criterion = nn.MSELoss()
loss = torch.sqrt(criterion(x, y))
return loss
def get_inputs():
return [to... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice
import torch.utils.data
asse... | gitter-badger/HEPAutoencoders | RMSELoss | false | 12,429 | [
"Apache-2.0"
] | 0 | 43010cd66fa4335a04b30b87926148e1c8d92de9 | https://github.com/gitter-badger/HEPAutoencoders/tree/43010cd66fa4335a04b30b87926148e1c8d92de9 | import torch
import torch.nn as nn
import torch.utils.data
class Model(torch.nn.Module):
def __init__(self):
super().__init__()
def forward(self, x, y):
criterion = nn.MSELoss()
loss = torch.sqrt(criterion(x, y))
return loss
def get_inputs():
return [torch.rand([4, 4, 4... |
AuxiliaryConvolutions | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import torch.nn.functional as F
from torch import nn
import torch.optim
import torch.utils.data
class AuxiliaryConvolutions(nn.Module):
"""
Additional convolutions to produce higher-level feature maps.
"""
def __init__(self):
super(AuxiliaryConvolutions, self).__init__()
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
import t... | doduythao/ssd | AuxiliaryConvolutions | false | 12,430 | [
"MIT"
] | 0 | 170064a3edef05d3274b08ea7f622eb3238b5c5c | https://github.com/doduythao/ssd/tree/170064a3edef05d3274b08ea7f622eb3238b5c5c | import torch
import torch.nn.functional as F
from torch import nn
import torch.optim
import torch.utils.data
class Model(nn.Module):
"""
Additional convolutions to produce higher-level feature maps.
"""
def __init__(self):
super().__init__()
self.conv8_1 = nn.Conv2d(1024, 256, kernel_... |
AE_2D_v50 | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import torch.nn as nn
import torch.utils.data
class AE_2D_v50(nn.Module):
def __init__(self, n_features=4):
super(AE_2D_v50, self).__init__()
self.en1 = nn.Linear(n_features, 50)
self.en2 = nn.Linear(50, 50)
self.en3 = nn.Linear(50, 50)
self.en4 = nn.Linear(50... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | gitter-badger/HEPAutoencoders | AE_2D_v50 | false | 12,431 | [
"Apache-2.0"
] | 0 | 43010cd66fa4335a04b30b87926148e1c8d92de9 | https://github.com/gitter-badger/HEPAutoencoders/tree/43010cd66fa4335a04b30b87926148e1c8d92de9 | import torch
import torch.nn as nn
import torch.utils.data
class Model(nn.Module):
def __init__(self, n_features=4):
super().__init__()
self.en1 = nn.Linear(n_features, 50)
self.en2 = nn.Linear(50, 50)
self.en3 = nn.Linear(50, 50)
self.en4 = nn.Linear(50, 2)
self.d... |
AE_3D_200 | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import torch.nn as nn
import torch.utils.data
class AE_3D_200(nn.Module):
def __init__(self, n_features=4):
super(AE_3D_200, self).__init__()
self.en1 = nn.Linear(n_features, 200)
self.en2 = nn.Linear(200, 100)
self.en3 = nn.Linear(100, 50)
self.en4 = nn.Linea... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as ... | gitter-badger/HEPAutoencoders | AE_3D_200 | false | 12,432 | [
"Apache-2.0"
] | 0 | 43010cd66fa4335a04b30b87926148e1c8d92de9 | https://github.com/gitter-badger/HEPAutoencoders/tree/43010cd66fa4335a04b30b87926148e1c8d92de9 | import torch
import torch.nn as nn
import torch.utils.data
class Model(nn.Module):
def __init__(self, n_features=4):
super().__init__()
self.en1 = nn.Linear(n_features, 200)
self.en2 = nn.Linear(200, 100)
self.en3 = nn.Linear(100, 50)
self.en4 = nn.Linear(50, 3)
se... |
AE_3D_small_v2 | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import torch.nn as nn
import torch.utils.data
class AE_3D_small_v2(nn.Module):
def __init__(self, n_features=4):
super(AE_3D_small_v2, self).__init__()
self.en1 = nn.Linear(n_features, 8)
self.en2 = nn.Linear(8, 3)
self.de1 = nn.Linear(3, 8)
self.de2 = nn.Line... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as ... | gitter-badger/HEPAutoencoders | AE_3D_small_v2 | false | 12,433 | [
"Apache-2.0"
] | 0 | 43010cd66fa4335a04b30b87926148e1c8d92de9 | https://github.com/gitter-badger/HEPAutoencoders/tree/43010cd66fa4335a04b30b87926148e1c8d92de9 | import torch
import torch.nn as nn
import torch.utils.data
class Model(nn.Module):
def __init__(self, n_features=4):
super().__init__()
self.en1 = nn.Linear(n_features, 8)
self.en2 = nn.Linear(8, 3)
self.de1 = nn.Linear(3, 8)
self.de2 = nn.Linear(8, n_features)
sel... |
AE_3D_50cone | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import torch.nn as nn
import torch.utils.data
class AE_3D_50cone(nn.Module):
def __init__(self, n_features=4):
super(AE_3D_50cone, self).__init__()
self.en1 = nn.Linear(n_features, 50)
self.en2 = nn.Linear(50, 30)
self.en3 = nn.Linear(30, 20)
self.en4 = nn.Lin... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | gitter-badger/HEPAutoencoders | AE_3D_50cone | false | 12,434 | [
"Apache-2.0"
] | 0 | 43010cd66fa4335a04b30b87926148e1c8d92de9 | https://github.com/gitter-badger/HEPAutoencoders/tree/43010cd66fa4335a04b30b87926148e1c8d92de9 | import torch
import torch.nn as nn
import torch.utils.data
class Model(nn.Module):
def __init__(self, n_features=4):
super().__init__()
self.en1 = nn.Linear(n_features, 50)
self.en2 = nn.Linear(50, 30)
self.en3 = nn.Linear(30, 20)
self.en4 = nn.Linear(20, 3)
self.d... |
AE_2D_v3 | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import torch.nn as nn
import torch.utils.data
class AE_2D_v3(nn.Module):
def __init__(self, n_features=4):
super(AE_2D_v3, self).__init__()
self.en1 = nn.Linear(n_features, 100)
self.en2 = nn.Linear(100, 200)
self.en3 = nn.Linear(200, 100)
self.en4 = nn.Linear... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as ... | gitter-badger/HEPAutoencoders | AE_2D_v3 | false | 12,435 | [
"Apache-2.0"
] | 0 | 43010cd66fa4335a04b30b87926148e1c8d92de9 | https://github.com/gitter-badger/HEPAutoencoders/tree/43010cd66fa4335a04b30b87926148e1c8d92de9 | import torch
import torch.nn as nn
import torch.utils.data
class Model(nn.Module):
def __init__(self, n_features=4):
super().__init__()
self.en1 = nn.Linear(n_features, 100)
self.en2 = nn.Linear(100, 200)
self.en3 = nn.Linear(200, 100)
self.en4 = nn.Linear(100, 2)
... |
AE_2D_v2 | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import torch.nn as nn
import torch.utils.data
class AE_2D_v2(nn.Module):
def __init__(self, n_features=4):
super(AE_2D_v2, self).__init__()
self.en1 = nn.Linear(n_features, 50)
self.en2 = nn.Linear(50, 20)
self.en3 = nn.Linear(20, 10)
self.en4 = nn.Linear(10, ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | gitter-badger/HEPAutoencoders | AE_2D_v2 | false | 12,436 | [
"Apache-2.0"
] | 0 | 43010cd66fa4335a04b30b87926148e1c8d92de9 | https://github.com/gitter-badger/HEPAutoencoders/tree/43010cd66fa4335a04b30b87926148e1c8d92de9 | import torch
import torch.nn as nn
import torch.utils.data
class Model(nn.Module):
def __init__(self, n_features=4):
super().__init__()
self.en1 = nn.Linear(n_features, 50)
self.en2 = nn.Linear(50, 20)
self.en3 = nn.Linear(20, 10)
self.en4 = nn.Linear(10, 2)
self.d... |
AE_2D | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import torch.nn as nn
import torch.utils.data
class AE_2D(nn.Module):
def __init__(self, n_features=4):
super(AE_2D, self).__init__()
self.en1 = nn.Linear(n_features, 20)
self.en2 = nn.Linear(20, 10)
self.en3 = nn.Linear(10, 6)
self.en4 = nn.Linear(6, 2)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as ... | gitter-badger/HEPAutoencoders | AE_2D | false | 12,437 | [
"Apache-2.0"
] | 0 | 43010cd66fa4335a04b30b87926148e1c8d92de9 | https://github.com/gitter-badger/HEPAutoencoders/tree/43010cd66fa4335a04b30b87926148e1c8d92de9 | import torch
import torch.nn as nn
import torch.utils.data
class Model(nn.Module):
def __init__(self, n_features=4):
super().__init__()
self.en1 = nn.Linear(n_features, 20)
self.en2 = nn.Linear(20, 10)
self.en3 = nn.Linear(10, 6)
self.en4 = nn.Linear(6, 2)
self.de1... |
AE_2D_v100 | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import torch.nn as nn
import torch.utils.data
class AE_2D_v100(nn.Module):
def __init__(self, n_features=4):
super(AE_2D_v100, self).__init__()
self.en1 = nn.Linear(n_features, 100)
self.en2 = nn.Linear(100, 100)
self.en3 = nn.Linear(100, 100)
self.en4 = nn.Li... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as ... | gitter-badger/HEPAutoencoders | AE_2D_v100 | false | 12,438 | [
"Apache-2.0"
] | 0 | 43010cd66fa4335a04b30b87926148e1c8d92de9 | https://github.com/gitter-badger/HEPAutoencoders/tree/43010cd66fa4335a04b30b87926148e1c8d92de9 | import torch
import torch.nn as nn
import torch.utils.data
class Model(nn.Module):
def __init__(self, n_features=4):
super().__init__()
self.en1 = nn.Linear(n_features, 100)
self.en2 = nn.Linear(100, 100)
self.en3 = nn.Linear(100, 100)
self.en4 = nn.Linear(100, 2)
... |
AE_3D_50_no_last_bias | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import torch.nn as nn
import torch.utils.data
class AE_3D_50_no_last_bias(nn.Module):
def __init__(self, n_features=4):
super(AE_3D_50_no_last_bias, self).__init__()
self.en1 = nn.Linear(n_features, 50)
self.en2 = nn.Linear(50, 50)
self.en3 = nn.Linear(50, 20)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | gitter-badger/HEPAutoencoders | AE_3D_50_no_last_bias | false | 12,439 | [
"Apache-2.0"
] | 0 | 43010cd66fa4335a04b30b87926148e1c8d92de9 | https://github.com/gitter-badger/HEPAutoencoders/tree/43010cd66fa4335a04b30b87926148e1c8d92de9 | import torch
import torch.nn as nn
import torch.utils.data
class Model(nn.Module):
def __init__(self, n_features=4):
super().__init__()
self.en1 = nn.Linear(n_features, 50)
self.en2 = nn.Linear(50, 50)
self.en3 = nn.Linear(50, 20)
self.en4 = nn.Linear(20, 3)
self.d... |
AE_big_no_last_bias | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import torch.nn as nn
import torch.utils.data
class AE_big_no_last_bias(nn.Module):
def __init__(self, n_features=4):
super(AE_big_no_last_bias, self).__init__()
self.en1 = nn.Linear(n_features, 8)
self.en2 = nn.Linear(8, 6)
self.en3 = nn.Linear(6, 4)
self.en4... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | gitter-badger/HEPAutoencoders | AE_big_no_last_bias | false | 12,440 | [
"Apache-2.0"
] | 0 | 43010cd66fa4335a04b30b87926148e1c8d92de9 | https://github.com/gitter-badger/HEPAutoencoders/tree/43010cd66fa4335a04b30b87926148e1c8d92de9 | import torch
import torch.nn as nn
import torch.utils.data
class Model(nn.Module):
def __init__(self, n_features=4):
super().__init__()
self.en1 = nn.Linear(n_features, 8)
self.en2 = nn.Linear(8, 6)
self.en3 = nn.Linear(6, 4)
self.en4 = nn.Linear(4, 3)
self.de1 = n... |
GeneralizedMeanPooling | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
from torch import nn
class GeneralizedMeanPooling(nn.Module):
"""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
- At p = 1,... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice
from torch import nn
assert_... | gmt710/fast-reid | GeneralizedMeanPooling | false | 12,441 | [
"Apache-2.0"
] | 0 | 44a609280013eb6928f67c418c7212d67e40fb5d | https://github.com/gmt710/fast-reid/tree/44a609280013eb6928f67c418c7212d67e40fb5d | import torch
from torch import nn
class Model(nn.Module):
"""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
- At p = 1, one gets Average... |
AE_2D_v4 | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import torch.nn as nn
import torch.utils.data
class AE_2D_v4(nn.Module):
def __init__(self, n_features=4):
super(AE_2D_v4, self).__init__()
self.en1 = nn.Linear(n_features, 500)
self.en2 = nn.Linear(500, 200)
self.en3 = nn.Linear(200, 100)
self.en4 = nn.Linear... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as ... | gitter-badger/HEPAutoencoders | AE_2D_v4 | false | 12,442 | [
"Apache-2.0"
] | 0 | 43010cd66fa4335a04b30b87926148e1c8d92de9 | https://github.com/gitter-badger/HEPAutoencoders/tree/43010cd66fa4335a04b30b87926148e1c8d92de9 | import torch
import torch.nn as nn
import torch.utils.data
class Model(nn.Module):
def __init__(self, n_features=4):
super().__init__()
self.en1 = nn.Linear(n_features, 500)
self.en2 = nn.Linear(500, 200)
self.en3 = nn.Linear(200, 100)
self.en4 = nn.Linear(100, 2)
... |
ResBlock | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import torch.nn as nn
class Mfm(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size=3, stride=1,
padding=1, f_type=1):
super(Mfm, self).__init__()
self.out_channels = out_channels
if f_type == 1:
self.filter = nn.Conv2d(in_channels, 2 * o... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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_... | githubhjx/Deep-Learning- | ResBlock | false | 12,443 | [
"Apache-2.0"
] | 0 | 5a22fb5696d930ed334aa1cbf2b213956b1c7026 | https://github.com/githubhjx/Deep-Learning-/tree/5a22fb5696d930ed334aa1cbf2b213956b1c7026 | import torch
import torch.nn as nn
class Mfm(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size=3, stride=1,
padding=1, f_type=1):
super().__init__()
self.out_channels = out_channels
if f_type == 1:
self.filter = nn.Conv2d(in_channels, 2 * out_channe... |
TLU | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch import nn
from torch.nn import Parameter
from torch.nn.parameter import Parameter
class TLU(nn.Module):
def __init__(self, num_features):
"""max(y, tau) = max(y - tau, 0) + tau = ReLU(y - tau) + tau"""
super(TLU, self).__init__()
self.num_features = num_features
... | 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
from torch.nn import Parameter
from torch.nn.parameter import Parame... | gmt710/fast-reid | TLU | false | 12,444 | [
"Apache-2.0"
] | 0 | 44a609280013eb6928f67c418c7212d67e40fb5d | https://github.com/gmt710/fast-reid/tree/44a609280013eb6928f67c418c7212d67e40fb5d | import torch
from torch import nn
from torch.nn import Parameter
from torch.nn.parameter import Parameter
class Model(nn.Module):
def __init__(self, num_features):
"""max(y, tau) = max(y - tau, 0) + tau = ReLU(y - tau) + tau"""
super().__init__()
self.num_features = num_features
s... |
FReLU6Test | # 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 FReLU6Test(nn.Module):
"""
Test for nn.functional types
"""
def __init__(self):
super(FReLU6Test, self).__init__()
def forward(self, x):
from torch.nn import functional as F
return F.relu6(x)
def get_inputs():
return [torch.r... | 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... | goldbattle/onnx2keras | FReLU6Test | false | 12,445 | [
"MIT"
] | 0 | dcf52041299ce4216552d1132ec86eb4debd5303 | https://github.com/goldbattle/onnx2keras/tree/dcf52041299ce4216552d1132ec86eb4debd5303 | import torch
import torch.nn as nn
class Model(nn.Module):
"""
Test for nn.functional types
"""
def __init__(self):
super().__init__()
def forward(self, x):
from torch.nn import functional as F
return F.relu6(x)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
... |
AE_big | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import torch.nn as nn
import torch.utils.data
class AE_big(nn.Module):
def __init__(self, n_features=4):
super(AE_big, self).__init__()
self.en1 = nn.Linear(n_features, 8)
self.en2 = nn.Linear(8, 6)
self.en3 = nn.Linear(6, 4)
self.en4 = nn.Linear(4, 3)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as ... | gitter-badger/HEPAutoencoders | AE_big | false | 12,446 | [
"Apache-2.0"
] | 0 | 43010cd66fa4335a04b30b87926148e1c8d92de9 | https://github.com/gitter-badger/HEPAutoencoders/tree/43010cd66fa4335a04b30b87926148e1c8d92de9 | import torch
import torch.nn as nn
import torch.utils.data
class Model(nn.Module):
def __init__(self, n_features=4):
super().__init__()
self.en1 = nn.Linear(n_features, 8)
self.en2 = nn.Linear(8, 6)
self.en3 = nn.Linear(6, 4)
self.en4 = nn.Linear(4, 3)
self.de1 = n... |
Mfm | # 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 Mfm(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size=3, stride=1,
padding=1, f_type=1):
super(Mfm, self).__init__()
self.out_channels = out_channels
if f_type == 1:
self.filter = nn.Conv2d(in_channels, 2 * o... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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_... | githubhjx/Deep-Learning- | Mfm | false | 12,447 | [
"Apache-2.0"
] | 0 | 5a22fb5696d930ed334aa1cbf2b213956b1c7026 | https://github.com/githubhjx/Deep-Learning-/tree/5a22fb5696d930ed334aa1cbf2b213956b1c7026 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size=3, stride=1,
padding=1, f_type=1):
super().__init__()
self.out_channels = out_channels
if f_type == 1:
self.filter = nn.Conv2d(in_channels, 2 * out_chan... |
AE_2D_v1000 | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import torch.nn as nn
import torch.utils.data
class AE_2D_v1000(nn.Module):
def __init__(self, n_features=4):
super(AE_2D_v1000, self).__init__()
self.en1 = nn.Linear(n_features, 1000)
self.en2 = nn.Linear(1000, 400)
self.en3 = nn.Linear(400, 100)
self.en4 = 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 ... | gitter-badger/HEPAutoencoders | AE_2D_v1000 | false | 12,448 | [
"Apache-2.0"
] | 0 | 43010cd66fa4335a04b30b87926148e1c8d92de9 | https://github.com/gitter-badger/HEPAutoencoders/tree/43010cd66fa4335a04b30b87926148e1c8d92de9 | import torch
import torch.nn as nn
import torch.utils.data
class Model(nn.Module):
def __init__(self, n_features=4):
super().__init__()
self.en1 = nn.Linear(n_features, 1000)
self.en2 = nn.Linear(1000, 400)
self.en3 = nn.Linear(400, 100)
self.en4 = nn.Linear(100, 2)
... |
AE_2D_v5 | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import torch.nn as nn
import torch.utils.data
class AE_2D_v5(nn.Module):
def __init__(self, n_features=4):
super(AE_2D_v5, self).__init__()
self.en1 = nn.Linear(n_features, 200)
self.en2 = nn.Linear(200, 100)
self.en3 = nn.Linear(100, 50)
self.en4 = nn.Linear(... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as ... | gitter-badger/HEPAutoencoders | AE_2D_v5 | false | 12,449 | [
"Apache-2.0"
] | 0 | 43010cd66fa4335a04b30b87926148e1c8d92de9 | https://github.com/gitter-badger/HEPAutoencoders/tree/43010cd66fa4335a04b30b87926148e1c8d92de9 | import torch
import torch.nn as nn
import torch.utils.data
class Model(nn.Module):
def __init__(self, n_features=4):
super().__init__()
self.en1 = nn.Linear(n_features, 200)
self.en2 = nn.Linear(200, 100)
self.en3 = nn.Linear(100, 50)
self.en4 = nn.Linear(50, 2)
se... |
FLogSigmoidTest | # 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 FLogSigmoidTest(nn.Module):
"""
Test for nn.functional types
"""
def __init__(self):
super(FLogSigmoidTest, self).__init__()
def forward(self, x):
from torch.nn import functional as F
return F.logsigmoid(x)
def get_inputs():
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
import torc... | goldbattle/onnx2keras | FLogSigmoidTest | false | 12,450 | [
"MIT"
] | 0 | dcf52041299ce4216552d1132ec86eb4debd5303 | https://github.com/goldbattle/onnx2keras/tree/dcf52041299ce4216552d1132ec86eb4debd5303 | import torch
import torch.nn as nn
class Model(nn.Module):
"""
Test for nn.functional types
"""
def __init__(self):
super().__init__()
def forward(self, x):
from torch.nn import functional as F
return F.logsigmoid(x)
def get_inputs():
return [torch.rand([4, 4, 4, 4]... |
AE_big_2D_v3 | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import torch.nn as nn
import torch.utils.data
class AE_big_2D_v3(nn.Module):
def __init__(self, n_features=4):
super(AE_big_2D_v3, self).__init__()
self.en1 = nn.Linear(n_features, 8)
self.en2 = nn.Linear(8, 6)
self.en3 = nn.Linear(6, 2)
self.de1 = nn.Linear(2... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as ... | gitter-badger/HEPAutoencoders | AE_big_2D_v3 | false | 12,451 | [
"Apache-2.0"
] | 0 | 43010cd66fa4335a04b30b87926148e1c8d92de9 | https://github.com/gitter-badger/HEPAutoencoders/tree/43010cd66fa4335a04b30b87926148e1c8d92de9 | import torch
import torch.nn as nn
import torch.utils.data
class Model(nn.Module):
def __init__(self, n_features=4):
super().__init__()
self.en1 = nn.Linear(n_features, 8)
self.en2 = nn.Linear(8, 6)
self.en3 = nn.Linear(6, 2)
self.de1 = nn.Linear(2, 6)
self.de2 = n... |
FNormTest | # 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 FNormTest(nn.Module):
"""
Test for nn.functional types
"""
def __init__(self):
super(FNormTest, self).__init__()
def forward(self, x):
x = torch.norm(x, p=2, dim=[1, 2])
return x
def get_inputs():
return [torch.rand([4, 4, 4,... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_... | goldbattle/onnx2keras | FNormTest | false | 12,452 | [
"MIT"
] | 0 | dcf52041299ce4216552d1132ec86eb4debd5303 | https://github.com/goldbattle/onnx2keras/tree/dcf52041299ce4216552d1132ec86eb4debd5303 | import torch
import torch.nn as nn
class Model(nn.Module):
"""
Test for nn.functional types
"""
def __init__(self):
super().__init__()
def forward(self, x):
x = torch.norm(x, p=2, dim=[1, 2])
return x
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_ini... |
Group | # 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 Mfm(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size=3, stride=1,
padding=1, f_type=1):
super(Mfm, self).__init__()
self.out_channels = out_channels
if f_type == 1:
self.filter = nn.Conv2d(in_channels, 2 * o... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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_... | githubhjx/Deep-Learning- | Group | false | 12,453 | [
"Apache-2.0"
] | 0 | 5a22fb5696d930ed334aa1cbf2b213956b1c7026 | https://github.com/githubhjx/Deep-Learning-/tree/5a22fb5696d930ed334aa1cbf2b213956b1c7026 | import torch
import torch.nn as nn
class Mfm(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size=3, stride=1,
padding=1, f_type=1):
super().__init__()
self.out_channels = out_channels
if f_type == 1:
self.filter = nn.Conv2d(in_channels, 2 * out_channe... |
AE_big_2D_v1 | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import torch.nn as nn
import torch.utils.data
class AE_big_2D_v1(nn.Module):
def __init__(self, n_features=4):
super(AE_big_2D_v1, self).__init__()
self.en1 = nn.Linear(n_features, 8)
self.en2 = nn.Linear(8, 6)
self.en3 = nn.Linear(6, 4)
self.en4 = nn.Linear(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
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as ... | gitter-badger/HEPAutoencoders | AE_big_2D_v1 | false | 12,454 | [
"Apache-2.0"
] | 0 | 43010cd66fa4335a04b30b87926148e1c8d92de9 | https://github.com/gitter-badger/HEPAutoencoders/tree/43010cd66fa4335a04b30b87926148e1c8d92de9 | import torch
import torch.nn as nn
import torch.utils.data
class Model(nn.Module):
def __init__(self, n_features=4):
super().__init__()
self.en1 = nn.Linear(n_features, 8)
self.en2 = nn.Linear(8, 6)
self.en3 = nn.Linear(6, 4)
self.en4 = nn.Linear(4, 2)
self.de1 = n... |
LayerReLU6Test | # 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 LayerReLU6Test(nn.Module):
"""
Test for nn.layers based types
"""
def __init__(self):
super(LayerReLU6Test, self).__init__()
self.relu = nn.ReLU6()
def forward(self, x):
x = self.relu(x)
return x
def get_inputs():
ret... | 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... | goldbattle/onnx2keras | LayerReLU6Test | false | 12,455 | [
"MIT"
] | 0 | dcf52041299ce4216552d1132ec86eb4debd5303 | https://github.com/goldbattle/onnx2keras/tree/dcf52041299ce4216552d1132ec86eb4debd5303 | import torch
import torch.nn as nn
class Model(nn.Module):
"""
Test for nn.layers based types
"""
def __init__(self):
super().__init__()
self.relu = nn.ReLU6()
def forward(self, x):
x = self.relu(x)
return x
def get_inputs():
return [torch.rand([4, 4, 4, 4])... |
FSoftmaxTest | # 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 numpy as np
import torch.nn as nn
class FSoftmaxTest(nn.Module):
"""
Test for nn.functional types
"""
def __init__(self):
super(FSoftmaxTest, self).__init__()
self.dim = np.random.randint(0, 3)
def forward(self, x):
from torch.nn import functional as F... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
import numpy as np
imp... | goldbattle/onnx2keras | FSoftmaxTest | false | 12,456 | [
"MIT"
] | 0 | dcf52041299ce4216552d1132ec86eb4debd5303 | https://github.com/goldbattle/onnx2keras/tree/dcf52041299ce4216552d1132ec86eb4debd5303 | import torch
import numpy as np
import torch.nn as nn
class Model(nn.Module):
"""
Test for nn.functional types
"""
def __init__(self):
super().__init__()
self.dim = np.random.randint(0, 3)
def forward(self, x):
from torch.nn import functional as F
return F.softmax... |
LayerNorm | # 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 LayerNorm(nn.Module):
def __init__(self, num_features, eps=1e-05, affine=True):
super(LayerNorm, self).__init__()
self.num_features = num_features
self.affine = affine
self.eps = eps
if self.affine:
self.gamma = nn.Param... | 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_... | gntoni/pytorch-ddpg-naf | LayerNorm | false | 12,457 | [
"MIT"
] | 0 | d208d0c0c38a9d2d2041f1e7e95695359eba430e | https://github.com/gntoni/pytorch-ddpg-naf/tree/d208d0c0c38a9d2d2041f1e7e95695359eba430e | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, num_features, eps=1e-05, affine=True):
super().__init__()
self.num_features = num_features
self.affine = affine
self.eps = eps
if self.affine:
self.gamma = nn.Parameter(torch.Tensor(n... |
MyElementwiseModule | # 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.parallel
import torch.utils.data
import torch.onnx
import torch.fx
import torch.optim
import torch.utils.data.distributed
class MyElementwiseModule(torch.nn.Module):
def forward(self, x, y):
return x * y + y
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand... | 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.parallel
import torch.utils.data
import torch.onnx
import torch.fx
import torch.optim
import torch.utils.data.distributed
as... | goytoom/examples | MyElementwiseModule | false | 12,458 | [
"BSD-3-Clause"
] | 0 | 50b2a74dba897a1a98c8276043a3f5c6910c453a | https://github.com/goytoom/examples/tree/50b2a74dba897a1a98c8276043a3f5c6910c453a | import torch
import torch.nn.parallel
import torch.utils.data
import torch.onnx
import torch.fx
import torch.optim
import torch.utils.data.distributed
class Model(torch.nn.Module):
def forward(self, x, y):
return x * y + y
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])... |
AE_big_2D_v2 | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import torch.nn as nn
import torch.utils.data
class AE_big_2D_v2(nn.Module):
def __init__(self, n_features=4):
super(AE_big_2D_v2, self).__init__()
self.en1 = nn.Linear(n_features, 8)
self.en2 = nn.Linear(8, 6)
self.en3 = nn.Linear(6, 4)
self.en4 = nn.Linear(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
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as ... | gitter-badger/HEPAutoencoders | AE_big_2D_v2 | false | 12,459 | [
"Apache-2.0"
] | 0 | 43010cd66fa4335a04b30b87926148e1c8d92de9 | https://github.com/gitter-badger/HEPAutoencoders/tree/43010cd66fa4335a04b30b87926148e1c8d92de9 | import torch
import torch.nn as nn
import torch.utils.data
class Model(nn.Module):
def __init__(self, n_features=4):
super().__init__()
self.en1 = nn.Linear(n_features, 8)
self.en2 = nn.Linear(8, 6)
self.en3 = nn.Linear(6, 4)
self.en4 = nn.Linear(4, 3)
self.en5 = n... |
Foo | # 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.parallel
import torch.utils.data
import torch.onnx
import torch.fx
import torch.optim
import torch.utils.data.distributed
def add_lowp(a: 'torch.Tensor', b: 'torch.Tensor'):
a, b = a.float(), b.float()
c = a + b
return c.half()
def sigmoid_lowp(x: 'torch.Tensor'):
x = 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.parallel
import torch.utils.data
import torch.onnx
import torch.fx
import torch.optim
import torch.utils.data.distributed
as... | goytoom/examples | Foo | false | 12,460 | [
"BSD-3-Clause"
] | 0 | 50b2a74dba897a1a98c8276043a3f5c6910c453a | https://github.com/goytoom/examples/tree/50b2a74dba897a1a98c8276043a3f5c6910c453a | import torch
import torch.nn.parallel
import torch.utils.data
import torch.onnx
import torch.fx
import torch.optim
import torch.utils.data.distributed
def add_lowp(a: 'torch.Tensor', b: 'torch.Tensor'):
a, b = a.float(), b.float()
c = a + b
return c.half()
def sigmoid_lowp(x: 'torch.Tensor'):
x = x.... |
FTest | # 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 FTest(nn.Module):
def __init__(self):
super(FTest, self).__init__()
def forward(self, x, y):
x = x - y - 8.3
return x
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
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | goldbattle/onnx2keras | FTest | false | 12,461 | [
"MIT"
] | 0 | dcf52041299ce4216552d1132ec86eb4debd5303 | https://github.com/goldbattle/onnx2keras/tree/dcf52041299ce4216552d1132ec86eb4debd5303 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self):
super().__init__()
def forward(self, x, y):
x = x - y - 8.3
return x
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return []
|
Linear | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | from torch.nn import Module
import torch
import torch.nn.functional as F
from torch.nn.modules.module import Module
from torch.nn.parameter import Parameter
import torch.nn.modules.loss
class Linear(Module):
"""
to embedding feature
"""
def __init__(self, in_features, out_features, dropout=0.0, act=F... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch.nn import Module
i... | goodman1204/CAN-pytorch | Linear | false | 12,462 | [
"MIT"
] | 0 | 73d9486c93dd069101c750f94a0750fff0500abb | https://github.com/goodman1204/CAN-pytorch/tree/73d9486c93dd069101c750f94a0750fff0500abb | from torch.nn import Module
import torch
import torch.nn.functional as F
from torch.nn.modules.module import Module
from torch.nn.parameter import Parameter
import torch.nn.modules.loss
class Model(Module):
"""
to embedding feature
"""
def __init__(self, in_features, out_features, dropout=0.0, act=F.... |
FTanhTest | # 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 FTanhTest(nn.Module):
"""
Test for nn.functional types
"""
def __init__(self):
super(FTanhTest, self).__init__()
def forward(self, x):
from torch.nn import functional as F
return F.tanh(x)
def get_inputs():
return [torch.rand... | 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_... | goldbattle/onnx2keras | FTanhTest | false | 12,463 | [
"MIT"
] | 0 | dcf52041299ce4216552d1132ec86eb4debd5303 | https://github.com/goldbattle/onnx2keras/tree/dcf52041299ce4216552d1132ec86eb4debd5303 | import torch
import torch.nn as nn
class Model(nn.Module):
"""
Test for nn.functional types
"""
def __init__(self):
super().__init__()
def forward(self, x):
from torch.nn import functional as F
return F.tanh(x)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
d... |
FSELUTest | # 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 FSELUTest(nn.Module):
"""
Test for nn.functional types
"""
def __init__(self):
super(FSELUTest, self).__init__()
def forward(self, x):
from torch.nn import functional as F
return F.selu(x)
def get_inputs():
return [torch.rand... | 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_... | goldbattle/onnx2keras | FSELUTest | false | 12,464 | [
"MIT"
] | 0 | dcf52041299ce4216552d1132ec86eb4debd5303 | https://github.com/goldbattle/onnx2keras/tree/dcf52041299ce4216552d1132ec86eb4debd5303 | import torch
import torch.nn as nn
class Model(nn.Module):
"""
Test for nn.functional types
"""
def __init__(self):
super().__init__()
def forward(self, x):
from torch.nn import functional as F
return F.selu(x)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
d... |
HouseHolderFlow | # 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.utils.data
import torch.nn as nn
class HouseHolderFlow(nn.Module):
def forward(self, v, z):
"""
:param v: batch_size (B) x latent_size (L)
:param z: batch_size (B) x latent_size (L)
:return: z_new = z - 2* v v_T / norm(v,2) * z
"""
vvT = t... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.utils.data
import torch.nn as nn
assert_size_stride = torch._C._dyn... | gpoesia/variational-item-response-theory-public | HouseHolderFlow | false | 12,465 | [
"MIT"
] | 0 | 6a0db81068695422dddec8832ce353879c5acb82 | https://github.com/gpoesia/variational-item-response-theory-public/tree/6a0db81068695422dddec8832ce353879c5acb82 | import torch
import torch.utils.data
import torch.nn as nn
class Model(nn.Module):
def forward(self, v, z):
"""
:param v: batch_size (B) x latent_size (L)
:param z: batch_size (B) x latent_size (L)
:return: z_new = z - 2* v v_T / norm(v,2) * z
"""
vvT = torch.bmm(v... |
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, hidden_size, num_inputs, action_space):
super(Critic, self).__init__()
self.action_space = action_space
num_outputs = action_space.shape[0]
self.linear1 = nn.Linear(num_i... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | gntoni/pytorch-ddpg-naf | Critic | false | 12,466 | [
"MIT"
] | 0 | d208d0c0c38a9d2d2041f1e7e95695359eba430e | https://github.com/gntoni/pytorch-ddpg-naf/tree/d208d0c0c38a9d2d2041f1e7e95695359eba430e | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
def __init__(self, hidden_size, num_inputs, action_space):
super().__init__()
self.action_space = action_space
num_outputs = action_space.shape[0]
self.linear1 = nn.Linear(num_inputs, hidden... |
ItemInferenceNetwork | # 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.utils.data
import torch.nn as nn
class ItemInferenceNetwork(nn.Module):
def __init__(self, num_item, item_feat_dim):
super().__init__()
self.mu_lookup = nn.Embedding(num_item, item_feat_dim)
self.logvar_lookup = nn.Embedding(num_item, item_feat_dim)
def forw... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.utils.data
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C.... | gpoesia/variational-item-response-theory-public | ItemInferenceNetwork | false | 12,467 | [
"MIT"
] | 0 | 6a0db81068695422dddec8832ce353879c5acb82 | https://github.com/gpoesia/variational-item-response-theory-public/tree/6a0db81068695422dddec8832ce353879c5acb82 | import torch
import torch.utils.data
import torch.nn as nn
class Model(nn.Module):
def __init__(self, num_item, item_feat_dim):
super().__init__()
self.mu_lookup = nn.Embedding(num_item, item_feat_dim)
self.logvar_lookup = nn.Embedding(num_item, item_feat_dim)
def forward(self, item_... |
KLDivergence | # 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.optim
def kl_divergence(y, target, mask=None, reduce=True):
loss = (target * torch.log(target) - target * F.log_softmax(y, 1)).sum(1)
if mask is not None:
loss = mask * loss
if reduce:
return loss.mean()
el... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn.functi... | gsaiabhishek/AUTOMATA | KLDivergence | false | 12,468 | [
"MIT"
] | 0 | e944992a7bf3a50bc8951a303294b3a798822176 | https://github.com/gsaiabhishek/AUTOMATA/tree/e944992a7bf3a50bc8951a303294b3a798822176 | import torch
import torch.nn.functional as F
import torch.nn as nn
import torch.optim
def kl_divergence(y, target, mask=None, reduce=True):
loss = (target * torch.log(target) - target * F.log_softmax(y, 1)).sum(1)
if mask is not None:
loss = mask * loss
if reduce:
return loss.mean()
el... |
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
from torch.nn.functional import cross_entropy
import torch.nn as nn
import torch.optim
class CrossEntropy(nn.Module):
def __init__(self, reduce):
super().__init__()
self.reduce = reduce
def forward(self, y, target, mask=None, *args, **kwargs):
return cross_entropy(y, tar... | 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
... | gsaiabhishek/AUTOMATA | CrossEntropy | false | 12,469 | [
"MIT"
] | 0 | e944992a7bf3a50bc8951a303294b3a798822176 | https://github.com/gsaiabhishek/AUTOMATA/tree/e944992a7bf3a50bc8951a303294b3a798822176 | import torch
from torch.nn.functional import cross_entropy
import torch.nn as nn
import torch.optim
class Model(nn.Module):
def __init__(self, reduce):
super().__init__()
self.reduce = reduce
def forward(self, y, target, mask=None, *args, **kwargs):
return cross_entropy(y, target.det... |
Copy | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch import nn
class Copy(nn.Module):
def __init__(self, hidden_size, copy_weight=1.0):
"""Calculate copy attention"""
super().__init__()
self.Wcopy = nn.Linear(hidden_size, hidden_size)
self.copy_weight = copy_weight
def forward(self, enc_out_hs, dec_hs):
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch import n... | gusalsdmlwlq/DAMD | Copy | false | 12,470 | [
"Apache-2.0"
] | 0 | e98feaf5d9f251132e655bbc5fdb2c080cbed90e | https://github.com/gusalsdmlwlq/DAMD/tree/e98feaf5d9f251132e655bbc5fdb2c080cbed90e | import torch
from torch import nn
class Model(nn.Module):
def __init__(self, hidden_size, copy_weight=1.0):
"""Calculate copy attention"""
super().__init__()
self.Wcopy = nn.Linear(hidden_size, hidden_size)
self.copy_weight = copy_weight
def forward(self, enc_out_hs, dec_hs):... |
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 as nn
import torch.nn.functional as F
class Actor(nn.Module):
def __init__(self, hidden_size, num_inputs, action_space):
super(Actor, self).__init__()
self.action_space = action_space
num_outputs = action_space.shape[0]
self.linear1 = nn.Linear(num_inp... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | gntoni/pytorch-ddpg-naf | Actor | false | 12,471 | [
"MIT"
] | 0 | d208d0c0c38a9d2d2041f1e7e95695359eba430e | https://github.com/gntoni/pytorch-ddpg-naf/tree/d208d0c0c38a9d2d2041f1e7e95695359eba430e | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
def __init__(self, hidden_size, num_inputs, action_space):
super().__init__()
self.action_space = action_space
num_outputs = action_space.shape[0]
self.linear1 = nn.Linear(num_inputs, hidden... |
Baseline | # 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.utils
import torch.utils.data
import torch.nn as nn
import torch.nn.functional as F
from torch.nn import init
class Baseline(nn.Module):
"""
Baseline network
"""
@staticmethod
def weight_init(m):
if isinstance(m, nn.Linear):
init.kaiming_normal_(m.wei... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.utils
import tor... | dikers/DeepHyper | Baseline | false | 12,472 | [
"Apache-2.0"
] | 0 | 827a8f3077e18b71cf448a2e56e49670428b1bfd | https://github.com/dikers/DeepHyper/tree/827a8f3077e18b71cf448a2e56e49670428b1bfd | import torch
import torch.utils
import torch.utils.data
import torch.nn as nn
import torch.nn.functional as F
from torch.nn import init
class Model(nn.Module):
"""
Baseline network
"""
@staticmethod
def weight_init(m):
if isinstance(m, nn.Linear):
init.kaiming_normal_(m.weight... |
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.functional as F
from torch import nn
class Network(nn.Module):
"""Actor (Policy) Model."""
def __init__(self, state_size, action_size, seed, fc1_units=128,
fc2_units=128):
"""Initialize parameters and build model.
Params
======
state_si... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
assert_s... | gray-li/HalfRainbowDQN | Network | false | 12,473 | [
"MIT"
] | 0 | 43e2b12945c14e0e39eea3bbf56c7af785c48720 | https://github.com/gray-li/HalfRainbowDQN/tree/43e2b12945c14e0e39eea3bbf56c7af785c48720 | import torch
import torch.nn.functional as F
from torch import nn
class Model(nn.Module):
"""Actor (Policy) Model."""
def __init__(self, state_size, action_size, seed, fc1_units=128,
fc2_units=128):
"""Initialize parameters and build model.
Params
======
state_size... |
Attn | # 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
from torch import nn
class Attn(nn.Module):
def __init__(self, hidden_size):
super().__init__()
self.hidden_size = hidden_size
self.attn = nn.Linear(self.hidden_size * 2, hidden_size)
self.v = nn.Linear(hidden_size, 1, bias=False)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | gusalsdmlwlq/DAMD | Attn | false | 12,474 | [
"Apache-2.0"
] | 0 | e98feaf5d9f251132e655bbc5fdb2c080cbed90e | https://github.com/gusalsdmlwlq/DAMD/tree/e98feaf5d9f251132e655bbc5fdb2c080cbed90e | import torch
import torch.nn.functional as F
from torch import nn
class Model(nn.Module):
def __init__(self, hidden_size):
super().__init__()
self.hidden_size = hidden_size
self.attn = nn.Linear(self.hidden_size * 2, hidden_size)
self.v = nn.Linear(hidden_size, 1, bias=False)
... |
MedianPool2d | # 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.optim
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.modules.utils import _pair
from torch.nn.modules.utils import _quadruple
class MedianPool2d(nn.Module):
""" Median pool (usable as median filter when stride=1) module.
Args:
kernel_size: size of pooli... | 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.optim
import torch.nn as nn
from torch.nn.modules.utils impo... | guzor/rgdb-semantic-segmentation | MedianPool2d | false | 12,475 | [
"MIT"
] | 0 | d9f3d8f1b2cb7357f64914bb873513dd16fad6df | https://github.com/guzor/rgdb-semantic-segmentation/tree/d9f3d8f1b2cb7357f64914bb873513dd16fad6df | import torch
import torch.optim
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.modules.utils import _pair
from torch.nn.modules.utils import _quadruple
class Model(nn.Module):
""" Median pool (usable as median filter when stride=1) module.
Args:
kernel_size: size of pooling kern... |
PlanarFlow | # 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.utils.data
import torch.nn as nn
import torch.nn.functional as F
class PlanarFlow(nn.Module):
"""Planar normalizing flow [Rezende & Mohamed 2015].
Provides a tighter bound on the ELBO by giving more expressive
power to the approximate distribution, such as by introducing
cova... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
import torch.utils.data
import torch.nn as nn
assert_size_stri... | gpoesia/variational-item-response-theory-public | PlanarFlow | false | 12,476 | [
"MIT"
] | 0 | 6a0db81068695422dddec8832ce353879c5acb82 | https://github.com/gpoesia/variational-item-response-theory-public/tree/6a0db81068695422dddec8832ce353879c5acb82 | import torch
import torch.utils.data
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
"""Planar normalizing flow [Rezende & Mohamed 2015].
Provides a tighter bound on the ELBO by giving more expressive
power to the approximate distribution, such as by introducing
covarianc... |
CharbonnierLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import functools
import torch
import torch.nn as nn
from torch.nn import functional as F
def reduce_loss(loss, reduction):
"""Reduce loss as specified.
Args:
loss (Tensor): Elementwise loss tensor.
reduction (str): Options are "none", "mean" and "sum".
Returns:
Tensor: Reduced 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 libdevice
import functools
import torc... | hejm37/mmediting | CharbonnierLoss | false | 12,477 | [
"Apache-2.0"
] | 0 | d4086aaf8a36ae830f1714aad585900d24ad1156 | https://github.com/hejm37/mmediting/tree/d4086aaf8a36ae830f1714aad585900d24ad1156 | import functools
import torch
import torch.nn as nn
from torch.nn import functional as F
def reduce_loss(loss, reduction):
"""Reduce loss as specified.
Args:
loss (Tensor): Elementwise loss tensor.
reduction (str): Options are "none", "mean" and "sum".
Returns:
Tensor: Reduced lo... |
Conv2dWithConstraint | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch import nn
class Conv2dWithConstraint(nn.Conv2d):
def __init__(self, *args, max_norm=1, **kwargs):
self.max_norm = max_norm
super(Conv2dWithConstraint, self).__init__(*args, **kwargs)
def forward(self, x):
self.weight.data = torch.renorm(self.weight.data, p=2, ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch import n... | gzoumpourlis/braindecode | Conv2dWithConstraint | false | 12,478 | [
"BSD-3-Clause"
] | 0 | 6bd595a146d0854541ff02b4483c011a394fdf0a | https://github.com/gzoumpourlis/braindecode/tree/6bd595a146d0854541ff02b4483c011a394fdf0a | import torch
from torch import nn
class Model(nn.Conv2d):
def __init__(self, *args, max_norm=1, **kwargs):
self.max_norm = max_norm
super().__init__(*args, **kwargs)
def forward(self, x):
self.weight.data = torch.renorm(self.weight.data, p=2, dim=0,
maxnorm=self.max_norm)... |
MeanSquared | # 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.optim
def mean_squared(y, target, mask=None, reduce=True):
y = y.softmax(1)
loss = F.mse_loss(y, target, reduction='none').mean(1)
if mask is not None:
loss = mask * loss
if reduce:
return loss.mean()
e... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn.functi... | gsaiabhishek/AUTOMATA | MeanSquared | false | 12,479 | [
"MIT"
] | 0 | e944992a7bf3a50bc8951a303294b3a798822176 | https://github.com/gsaiabhishek/AUTOMATA/tree/e944992a7bf3a50bc8951a303294b3a798822176 | import torch
import torch.nn.functional as F
import torch.nn as nn
import torch.optim
def mean_squared(y, target, mask=None, reduce=True):
y = y.softmax(1)
loss = F.mse_loss(y, target, reduction='none').mean(1)
if mask is not None:
loss = mask * loss
if reduce:
return loss.mean()
e... |
Net | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim
class Net(nn.Module):
def __init__(self):
super(Net, self).__init__()
self.fc1 = nn.Linear(28 * 28, 64)
self.fc2 = nn.Linear(64, 24)
self.fc3 = nn.Linear(24, 10)
def forward(self, x):
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import ... | graciofilipe/deep-learning-v2-pytorch | Net | false | 12,480 | [
"MIT"
] | 0 | b1aa2189c99ecd1b79deb6c499bae9d1fa52fa19 | https://github.com/graciofilipe/deep-learning-v2-pytorch/tree/b1aa2189c99ecd1b79deb6c499bae9d1fa52fa19 | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim
class Model(nn.Module):
def __init__(self):
super().__init__()
self.fc1 = nn.Linear(28 * 28, 64)
self.fc2 = nn.Linear(64, 24)
self.fc3 = nn.Linear(24, 10)
def forward(self, x):
x = x... |
DiscShiftLoss | # 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 DiscShiftLoss(nn.Module):
"""Disc shift loss.
Args:
loss_weight (float, optional): Loss weight. Defaults to 1.0.
"""
def __init__(self, loss_weight=0.1):
super(DiscShiftLoss, self).__init__()
self.loss_weight = loss_weight
... | 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... | hejm37/mmediting | DiscShiftLoss | false | 12,481 | [
"Apache-2.0"
] | 0 | d4086aaf8a36ae830f1714aad585900d24ad1156 | https://github.com/hejm37/mmediting/tree/d4086aaf8a36ae830f1714aad585900d24ad1156 | import torch
import torch.nn as nn
class Model(nn.Module):
"""Disc shift loss.
Args:
loss_weight (float, optional): Loss weight. Defaults to 1.0.
"""
def __init__(self, loss_weight=0.1):
super().__init__()
self.loss_weight = loss_weight
def forward(self, x):
... |
TwoLayerNet | # 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.quantization
import torch.onnx
import torch.nn.parallel
import torch.optim
import torch.utils.data
import torch.utils.data.distributed
class TwoLayerNet(torch.nn.Module):
def __init__(self, D_in, H, D_out):
"""
In the constructor we instantiate two nn.Linear modules and ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.quantization
imp... | harrydrippin/tutorials | TwoLayerNet | false | 12,482 | [
"BSD-3-Clause"
] | 0 | a8def2dfd44b4b8e22c36a3e4470f37b59ebedfb | https://github.com/harrydrippin/tutorials/tree/a8def2dfd44b4b8e22c36a3e4470f37b59ebedfb | import torch
import torch.quantization
import torch.onnx
import torch.nn.parallel
import torch.optim
import torch.utils.data
import torch.utils.data.distributed
class Model(torch.nn.Module):
def __init__(self, D_in, H, D_out):
"""
In the constructor we instantiate two nn.Linear modules and assign... |
CharbonnierCompLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import functools
import torch
import torch.nn as nn
from torch.nn import functional as F
def reduce_loss(loss, reduction):
"""Reduce loss as specified.
Args:
loss (Tensor): Elementwise loss tensor.
reduction (str): Options are "none", "mean" and "sum".
Returns:
Tensor: Reduced 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 libdevice
import functools
import torc... | hejm37/mmediting | CharbonnierCompLoss | false | 12,483 | [
"Apache-2.0"
] | 0 | d4086aaf8a36ae830f1714aad585900d24ad1156 | https://github.com/hejm37/mmediting/tree/d4086aaf8a36ae830f1714aad585900d24ad1156 | import functools
import torch
import torch.nn as nn
from torch.nn import functional as F
def reduce_loss(loss, reduction):
"""Reduce loss as specified.
Args:
loss (Tensor): Elementwise loss tensor.
reduction (str): Options are "none", "mean" and "sum".
Returns:
Tensor: Reduced lo... |
SoftCrossEntropyLoss2d | # 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 SoftCrossEntropyLoss2d(nn.Module):
def __init__(self):
super(SoftCrossEntropyLoss2d, self).__init__()
def forward(self, inputs, targets):
loss = 0
inputs = -F.log_softmax(inputs, dim=1)
for index in rang... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | hainguyen15/GLNet | SoftCrossEntropyLoss2d | false | 12,484 | [
"MIT"
] | 0 | dc5d2d000a37e9415f742ed04b7e99973a068279 | https://github.com/hainguyen15/GLNet/tree/dc5d2d000a37e9415f742ed04b7e99973a068279 | 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, inputs, targets):
loss = 0
inputs = -F.log_softmax(inputs, dim=1)
for index in range(inputs.size()[0]):
loss += F.co... |
L1CompositionLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import functools
import torch
import torch.nn as nn
from torch.nn import functional as F
def reduce_loss(loss, reduction):
"""Reduce loss as specified.
Args:
loss (Tensor): Elementwise loss tensor.
reduction (str): Options are "none", "mean" and "sum".
Returns:
Tensor: Reduced 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 functools
impor... | hejm37/mmediting | L1CompositionLoss | false | 12,485 | [
"Apache-2.0"
] | 0 | d4086aaf8a36ae830f1714aad585900d24ad1156 | https://github.com/hejm37/mmediting/tree/d4086aaf8a36ae830f1714aad585900d24ad1156 | import functools
import torch
import torch.nn as nn
from torch.nn import functional as F
def reduce_loss(loss, reduction):
"""Reduce loss as specified.
Args:
loss (Tensor): Elementwise loss tensor.
reduction (str): Options are "none", "mean" and "sum".
Returns:
Tensor: Reduced lo... |
Net | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import torch.nn as nn
import torch.nn.functional as F
class Net(nn.Module):
def __init__(self, _input_size: 'int', _output_size: 'int',
_hidden_layers: 'int', _hidden_size: 'int'):
super(Net, self).__init__()
self.input = nn.Linear(_input_size, _hidden_size)
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_... | hantonelli/AprendizajePorRefuerzos | Net | false | 12,486 | [
"MIT"
] | 0 | eeffa4aa36fa5c14739206e4c4bd0a1bd76f6af1 | https://github.com/hantonelli/AprendizajePorRefuerzos/tree/eeffa4aa36fa5c14739206e4c4bd0a1bd76f6af1 | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
def __init__(self, _input_size: 'int', _output_size: 'int',
_hidden_layers: 'int', _hidden_size: 'int'):
super().__init__()
self.input = nn.Linear(_input_size, _hidden_size)
self.hidden_laye... |
PlainRefiner | # 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 PlainRefiner(nn.Module):
"""Simple refiner from Deep Image Matting.
Args:
conv_channels (int): Number of channels produced by the three main
convolutional layer.
loss_refine (dict): Config of the loss of the refiner. Default: None.
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | hejm37/mmediting | PlainRefiner | false | 12,487 | [
"Apache-2.0"
] | 0 | d4086aaf8a36ae830f1714aad585900d24ad1156 | https://github.com/hejm37/mmediting/tree/d4086aaf8a36ae830f1714aad585900d24ad1156 | import torch
import torch.nn as nn
class Model(nn.Module):
"""Simple refiner from Deep Image Matting.
Args:
conv_channels (int): Number of channels produced by the three main
convolutional layer.
loss_refine (dict): Config of the loss of the refiner. Default: None.
pretrai... |
VarianceNorm2d | # 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 VarianceNorm2d(nn.Module):
def __init__(self, num_features, bias=False):
super().__init__()
self.num_features = num_features
self.bias = bias
self.alpha = nn.Parameter(torch.zeros(num_features))
self.alpha.data.normal_(1, 0.02)
... | 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_... | henryaddison/score_sde_pytorch | VarianceNorm2d | false | 12,488 | [
"Apache-2.0"
] | 0 | be07c3a3346bf8ceadabf6a3b436db5d5c3d0252 | https://github.com/henryaddison/score_sde_pytorch/tree/be07c3a3346bf8ceadabf6a3b436db5d5c3d0252 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, num_features, bias=False):
super().__init__()
self.num_features = num_features
self.bias = bias
self.alpha = nn.Parameter(torch.zeros(num_features))
self.alpha.data.normal_(1, 0.02)
def forw... |
GRelu | # 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 GRelu(nn.Module):
"""Generic ReLU."""
def __init__(self, leak=0.0, max=float('inf'), sub=0.0):
super().__init__()
self.leak = leak
self.max = max
self.sub = sub
def forward(self, x):
"""Check... | 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... | hdmamin/ml_htools | GRelu | false | 12,489 | [
"MIT"
] | 0 | 9b8e8fbb561c4ae7c6ee282c8b5fc7876935dd50 | https://github.com/hdmamin/ml_htools/tree/9b8e8fbb561c4ae7c6ee282c8b5fc7876935dd50 | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
"""Generic ReLU."""
def __init__(self, leak=0.0, max=float('inf'), sub=0.0):
super().__init__()
self.leak = leak
self.max = max
self.sub = sub
def forward(self, x):
"""Check... |
MeanPoolConv | # 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 MeanPoolConv(nn.Module):
def __init__(self, input_dim, output_dim, kernel_size=3, biases=True):
super().__init__()
self.conv = nn.Conv2d(input_dim, output_dim, kernel_size, stride=1,
padding=kernel_size // 2, bias=biases)
def forward(self,... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | henryaddison/score_sde_pytorch | MeanPoolConv | false | 12,490 | [
"Apache-2.0"
] | 0 | be07c3a3346bf8ceadabf6a3b436db5d5c3d0252 | https://github.com/henryaddison/score_sde_pytorch/tree/be07c3a3346bf8ceadabf6a3b436db5d5c3d0252 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, input_dim, output_dim, kernel_size=3, biases=True):
super().__init__()
self.conv = nn.Conv2d(input_dim, output_dim, kernel_size, stride=1,
padding=kernel_size // 2, bias=biases)
def forward(self, inputs... |
Mnist_CNN | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.quantization
import torch.onnx
import torch.nn.parallel
import torch.optim
import torch.utils.data
import torch.utils.data.distributed
class Mnist_CNN(nn.Module):
def __init__(self):
super().__init__()
self.conv1 = nn... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import ... | harrydrippin/tutorials | Mnist_CNN | false | 12,491 | [
"BSD-3-Clause"
] | 0 | a8def2dfd44b4b8e22c36a3e4470f37b59ebedfb | https://github.com/harrydrippin/tutorials/tree/a8def2dfd44b4b8e22c36a3e4470f37b59ebedfb | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.quantization
import torch.onnx
import torch.nn.parallel
import torch.optim
import torch.utils.data
import torch.utils.data.distributed
class Model(nn.Module):
def __init__(self):
super().__init__()
self.conv1 = nn.Con... |
AttentionPool2d | # 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
from torch import nn
class AttentionPool2d(nn.Module):
def __init__(self, spacial_dim: 'int', embed_dim: 'int', num_heads:
'int', output_dim: 'int'=None):
super().__init__()
self.positional_embedding = nn.Parameter(torch.randn(spacial_dim **
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | graceduansu/CLIP | AttentionPool2d | false | 12,492 | [
"MIT"
] | 0 | 14605e2118f43312cc00bf549aec388f5ddf802b | https://github.com/graceduansu/CLIP/tree/14605e2118f43312cc00bf549aec388f5ddf802b | import torch
import torch.nn.functional as F
from torch import nn
class Model(nn.Module):
def __init__(self, spacial_dim: 'int', embed_dim: 'int', num_heads:
'int', output_dim: 'int'=None):
super().__init__()
self.positional_embedding = nn.Parameter(torch.randn(spacial_dim **
... |
QREmbeddingBag | # 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
import torch.nn.parallel
import torch.optim
import torch.utils.data
import torch.utils.data.distributed
import torch.nn.functional as F
from torch.nn.parameter import Parameter
class QREmbeddingBag(nn.Module):
"""Computes sums or means over two 'bags' of embed... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import numpy as np
import torch.nn as nn
import torch.nn.parallel
import torch.... | hekaplex/resnet_dl | QREmbeddingBag | false | 12,493 | [
"Apache-2.0"
] | 0 | fc8d4dcc0adffbe22d01d333e6cf5db955f2f011 | https://github.com/hekaplex/resnet_dl/tree/fc8d4dcc0adffbe22d01d333e6cf5db955f2f011 | import torch
import numpy as np
import torch.nn as nn
import torch.nn.parallel
import torch.optim
import torch.utils.data
import torch.utils.data.distributed
import torch.nn.functional as F
from torch.nn.parameter import Parameter
class Model(nn.Module):
"""Computes sums or means over two 'bags' of embeddings, on... |
SRCNN | # 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 logging
import torch
import torch.nn as nn
def get_root_logger(log_file=None, log_level=logging.INFO):
"""Get the root logger.
The logger will be initialized if it has not been initialized. By default a
StreamHandler will be added. If `log_file` is specified, a FileHandler will
also be added. ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | hejm37/mmediting | SRCNN | false | 12,494 | [
"Apache-2.0"
] | 0 | d4086aaf8a36ae830f1714aad585900d24ad1156 | https://github.com/hejm37/mmediting/tree/d4086aaf8a36ae830f1714aad585900d24ad1156 | import logging
import torch
import torch.nn as nn
def get_root_logger(log_file=None, log_level=logging.INFO):
"""Get the root logger.
The logger will be initialized if it has not been initialized. By default a
StreamHandler will be added. If `log_file` is specified, a FileHandler will
also be added. ... |
MLP | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch import nn
import torch.nn.functional as F
from torch.utils.data import *
class MLP(nn.Module):
def __init__(self):
super(MLP, self).__init__()
self.fc1 = nn.Linear(784, 512)
self.fc2 = nn.Linear(512, 128)
self.fc3 = nn.Linear(128, 10)
def forward(self,... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | heheda12345/nnfusion | MLP | false | 12,495 | [
"MIT"
] | 0 | 8cf153c1adae094fa891021bd6da70aeeee112ba | https://github.com/heheda12345/nnfusion/tree/8cf153c1adae094fa891021bd6da70aeeee112ba | import torch
from torch import nn
import torch.nn.functional as F
from torch.utils.data import *
class Model(nn.Module):
def __init__(self):
super().__init__()
self.fc1 = nn.Linear(784, 512)
self.fc2 = nn.Linear(512, 128)
self.fc3 = nn.Linear(128, 10)
def forward(self, x):
... |
Conv2dBlock | # 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
from torch import nn
class AdaptiveInstanceNorm2d(nn.Module):
def __init__(self, num_features, eps=1e-05, momentum=0.1):
super(AdaptiveInstanceNorm2d, self).__init__()
self.num_features = num_features
self.eps = eps
self.momentum = mome... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.functional as... | hendraet/research-GANwriting | Conv2dBlock | false | 12,496 | [
"MIT"
] | 0 | e62a16529db3037169d9b33ecba5735c99e73bc3 | https://github.com/hendraet/research-GANwriting/tree/e62a16529db3037169d9b33ecba5735c99e73bc3 | import torch
import torch.nn.functional as F
from torch import nn
class AdaptiveInstanceNorm2d(nn.Module):
def __init__(self, num_features, eps=1e-05, momentum=0.1):
super().__init__()
self.num_features = num_features
self.eps = eps
self.momentum = momentum
self.weight = N... |
MatrixConv2dResblock | # 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.autograd
class MatrixConv2dResblock(nn.Module):
def __init__(self, weight_shape, stride=1, padding=0, with_batchnorm=
False, act_func='ReLU'):
super(MatrixConv2dResblock, self).__init__()
self.conv = nn.Conv2d(weight_shape[3], weight_shape[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
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import ... | hirayamy/nngen | MatrixConv2dResblock | false | 12,497 | [
"Apache-2.0"
] | 0 | 63f72be83e4bb1a697a969fb6a14d0335ec0316f | https://github.com/hirayamy/nngen/tree/63f72be83e4bb1a697a969fb6a14d0335ec0316f | import torch
import torch.nn as nn
import torch.autograd
class Model(nn.Module):
def __init__(self, weight_shape, stride=1, padding=0, with_batchnorm=
False, act_func='ReLU'):
super().__init__()
self.conv = nn.Conv2d(weight_shape[3], weight_shape[0],
weight_shape[1], stride=st... |
ActFirstResBlock | # 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
from torch import nn
class AdaptiveInstanceNorm2d(nn.Module):
def __init__(self, num_features, eps=1e-05, momentum=0.1):
super(AdaptiveInstanceNorm2d, self).__init__()
self.num_features = num_features
self.eps = eps
self.momentum = mome... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | hendraet/research-GANwriting | ActFirstResBlock | false | 12,498 | [
"MIT"
] | 0 | e62a16529db3037169d9b33ecba5735c99e73bc3 | https://github.com/hendraet/research-GANwriting/tree/e62a16529db3037169d9b33ecba5735c99e73bc3 | import torch
import torch.nn.functional as F
from torch import nn
class AdaptiveInstanceNorm2d(nn.Module):
def __init__(self, num_features, eps=1e-05, momentum=0.1):
super().__init__()
self.num_features = num_features
self.eps = eps
self.momentum = momentum
self.weight = N... |
UpsampleConv | # 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 UpsampleConv(nn.Module):
def __init__(self, input_dim, output_dim, kernel_size=3, biases=True):
super().__init__()
self.conv = nn.Conv2d(input_dim, output_dim, kernel_size, stride=1,
padding=kernel_size // 2, bias=biases)
self.pixelshuf... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | henryaddison/score_sde_pytorch | UpsampleConv | false | 12,499 | [
"Apache-2.0"
] | 0 | be07c3a3346bf8ceadabf6a3b436db5d5c3d0252 | https://github.com/henryaddison/score_sde_pytorch/tree/be07c3a3346bf8ceadabf6a3b436db5d5c3d0252 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, input_dim, output_dim, kernel_size=3, biases=True):
super().__init__()
self.conv = nn.Conv2d(input_dim, output_dim, kernel_size, stride=1,
padding=kernel_size // 2, bias=biases)
self.pixelshuffle = n... |
InstanceNorm2dPlus | # 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 InstanceNorm2dPlus(nn.Module):
def __init__(self, num_features, bias=True):
super().__init__()
self.num_features = num_features
self.bias = bias
self.instance_norm = nn.InstanceNorm2d(num_features, affine=False,
track_running_st... | 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_... | henryaddison/score_sde_pytorch | InstanceNorm2dPlus | false | 12,500 | [
"Apache-2.0"
] | 0 | be07c3a3346bf8ceadabf6a3b436db5d5c3d0252 | https://github.com/henryaddison/score_sde_pytorch/tree/be07c3a3346bf8ceadabf6a3b436db5d5c3d0252 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, num_features, bias=True):
super().__init__()
self.num_features = num_features
self.bias = bias
self.instance_norm = nn.InstanceNorm2d(num_features, affine=False,
track_running_stats=False)
... |
MatrixAdd | # 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.autograd
class MatrixAdd(nn.Module):
def __init__(self):
super(MatrixAdd, self).__init__()
def forward(self, x, y):
z = torch.add(x, y)
return z
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])]
def g... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.autograd
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._d... | hirayamy/nngen | MatrixAdd | false | 12,501 | [
"Apache-2.0"
] | 0 | 63f72be83e4bb1a697a969fb6a14d0335ec0316f | https://github.com/hirayamy/nngen/tree/63f72be83e4bb1a697a969fb6a14d0335ec0316f | import torch
import torch.nn as nn
import torch.autograd
class Model(nn.Module):
def __init__(self):
super().__init__()
def forward(self, x, y):
z = torch.add(x, y)
return z
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])]
def get_init_inputs():
... |
MSECompositionLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import functools
import torch
import torch.nn as nn
from torch.nn import functional as F
def reduce_loss(loss, reduction):
"""Reduce loss as specified.
Args:
loss (Tensor): Elementwise loss tensor.
reduction (str): Options are "none", "mean" and "sum".
Returns:
Tensor: Reduced 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
import functools
import torch.nn as nn
from torch.nn import functional as F
assert_size_s... | hejm37/mmediting | MSECompositionLoss | false | 12,502 | [
"Apache-2.0"
] | 0 | d4086aaf8a36ae830f1714aad585900d24ad1156 | https://github.com/hejm37/mmediting/tree/d4086aaf8a36ae830f1714aad585900d24ad1156 | import functools
import torch
import torch.nn as nn
from torch.nn import functional as F
def reduce_loss(loss, reduction):
"""Reduce loss as specified.
Args:
loss (Tensor): Elementwise loss tensor.
reduction (str): Options are "none", "mean" and "sum".
Returns:
Tensor: Reduced lo... |
ConvMeanPool | # 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 ConvMeanPool(nn.Module):
def __init__(self, input_dim, output_dim, kernel_size=3, biases=True,
adjust_padding=False):
super().__init__()
if not adjust_padding:
conv = nn.Conv2d(input_dim, output_dim, kernel_size, stride=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... | henryaddison/score_sde_pytorch | ConvMeanPool | false | 12,503 | [
"Apache-2.0"
] | 0 | be07c3a3346bf8ceadabf6a3b436db5d5c3d0252 | https://github.com/henryaddison/score_sde_pytorch/tree/be07c3a3346bf8ceadabf6a3b436db5d5c3d0252 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, input_dim, output_dim, kernel_size=3, biases=True,
adjust_padding=False):
super().__init__()
if not adjust_padding:
conv = nn.Conv2d(input_dim, output_dim, kernel_size, stride=1,
padd... |
MatrixConv2dMultiResblock | # 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.autograd
class MatrixConv2dMultiResblock(nn.Module):
def __init__(self, weight_shape, stride=1, padding=0, with_batchnorm=
False, act_func='ReLU'):
super(MatrixConv2dMultiResblock, self).__init__()
self.conv1 = nn.Conv2d(weight_shape[3], wei... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import ... | hirayamy/nngen | MatrixConv2dMultiResblock | false | 12,504 | [
"Apache-2.0"
] | 0 | 63f72be83e4bb1a697a969fb6a14d0335ec0316f | https://github.com/hirayamy/nngen/tree/63f72be83e4bb1a697a969fb6a14d0335ec0316f | import torch
import torch.nn as nn
import torch.autograd
class Model(nn.Module):
def __init__(self, weight_shape, stride=1, padding=0, with_batchnorm=
False, act_func='ReLU'):
super().__init__()
self.conv1 = nn.Conv2d(weight_shape[3], weight_shape[0],
weight_shape[1], stride=s... |
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... | henryaddison/score_sde_pytorch | Conv2d | false | 12,505 | [
"Apache-2.0"
] | 0 | be07c3a3346bf8ceadabf6a3b436db5d5c3d0252 | https://github.com/henryaddison/score_sde_pytorch/tree/be07c3a3346bf8ceadabf6a3b436db5d5c3d0252 | 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... |
FPNSegHead | # 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.parallel
import torch.optim
import torch.utils.data
class FPNSegHead(nn.Module):
def __init__(self, num_in, num_mid, num_out):
super().__init__()
self.block0 = nn.Conv2d(num_in, num_mid, kernel_size=3, padding=1,
bias=False)
s... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import ... | hoangnguyen11291/Kuril-DeBlur | FPNSegHead | false | 12,506 | [
"BSD-3-Clause"
] | 0 | 7c36fc50780e3dda82eb42443d5623d34e6b02a6 | https://github.com/hoangnguyen11291/Kuril-DeBlur/tree/7c36fc50780e3dda82eb42443d5623d34e6b02a6 | import torch
import torch.nn as nn
import torch.nn.parallel
import torch.optim
import torch.utils.data
class Model(nn.Module):
def __init__(self, num_in, num_mid, num_out):
super().__init__()
self.block0 = nn.Conv2d(num_in, num_mid, kernel_size=3, padding=1,
bias=False)
self.b... |
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 ... | henryaddison/score_sde_pytorch | ResidualBlock | false | 12,507 | [
"Apache-2.0"
] | 0 | be07c3a3346bf8ceadabf6a3b436db5d5c3d0252 | https://github.com/henryaddison/score_sde_pytorch/tree/be07c3a3346bf8ceadabf6a3b436db5d5c3d0252 | 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... |
Net | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import torch.nn.functional as F
import torch.nn as nn
class Net(nn.Module):
def __init__(self):
super().__init__()
self.conv1 = nn.Conv2d(3, 16, kernel_size=3, padding=1)
self.conv2 = nn.Conv2d(16, 8, kernel_size=3, padding=1)
self.fc1 = nn.Linear(8 * 8 * 8, 32)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | hishamelreedy/Aucrobotics_QA_AutonomousInspector | Net | false | 12,508 | [
"MIT"
] | 0 | 6bad141a62827fa7a299325c69597f17b162400e | https://github.com/hishamelreedy/Aucrobotics_QA_AutonomousInspector/tree/6bad141a62827fa7a299325c69597f17b162400e | import torch
import torch.nn.functional as F
import torch.nn as nn
class Model(nn.Module):
def __init__(self):
super().__init__()
self.conv1 = nn.Conv2d(3, 16, kernel_size=3, padding=1)
self.conv2 = nn.Conv2d(16, 8, kernel_size=3, padding=1)
self.fc1 = nn.Linear(8 * 8 * 8, 32)
... |
CoordConv | # 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 AddCoords(nn.Module):
def __init__(self, with_r=False):
super().__init__()
self.with_r = with_r
def forward(self, input_tensor):
"""
Args:
input_tensor: shape(batch, channel, x_dim, y_dim)
"""
batch_size, _,... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | hoseDUDEface/AdaptiveWingLoss | CoordConv | false | 12,509 | [
"Apache-2.0"
] | 0 | 9185799d87567044f437147639c3999418529684 | https://github.com/hoseDUDEface/AdaptiveWingLoss/tree/9185799d87567044f437147639c3999418529684 | import torch
import torch.nn as nn
class AddCoords(nn.Module):
def __init__(self, with_r=False):
super().__init__()
self.with_r = with_r
def forward(self, input_tensor):
"""
Args:
input_tensor: shape(batch, channel, x_dim, y_dim)
"""
batch_size, _,... |
FC_Q | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import torch.nn as nn
import torch.nn.functional as F
class FC_Q(nn.Module):
def __init__(self, state_dim, num_actions):
super(FC_Q, self).__init__()
self.q1 = nn.Linear(state_dim, 256)
self.q2 = nn.Linear(256, 256)
self.q3 = nn.Linear(256, num_actions)
self.i... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | hotaekjoo/SQV | FC_Q | false | 12,510 | [
"MIT"
] | 0 | d725342e7fd8548ee5fa018e5ccac4542969deed | https://github.com/hotaekjoo/SQV/tree/d725342e7fd8548ee5fa018e5ccac4542969deed | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
def __init__(self, state_dim, num_actions):
super().__init__()
self.q1 = nn.Linear(state_dim, 256)
self.q2 = nn.Linear(256, 256)
self.q3 = nn.Linear(256, num_actions)
self.i1 = nn.Li... |
InstanceNormLayer | # 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 InstanceNormLayer(nn.Module):
"""Implements instance normalization layer."""
def __init__(self, epsilon=1e-08):
super().__init__()
self.eps = epsilon
def forward(self, x):
if len(x.shape) != 4:
raise ValueError(
... | 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_... | huaji0353/higan | InstanceNormLayer | false | 12,511 | [
"MIT"
] | 0 | a082dc2be8651725d38b8d48d7e1c7261740013d | https://github.com/huaji0353/higan/tree/a082dc2be8651725d38b8d48d7e1c7261740013d | import torch
import torch.nn as nn
class Model(nn.Module):
"""Implements instance normalization layer."""
def __init__(self, epsilon=1e-08):
super().__init__()
self.eps = epsilon
def forward(self, x):
if len(x.shape) != 4:
raise ValueError(
f'The input... |
AddCoords | # 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 AddCoords(nn.Module):
def __init__(self, with_r=False):
super().__init__()
self.with_r = with_r
def forward(self, input_tensor):
"""
Args:
input_tensor: shape(batch, channel, x_dim, y_dim)
"""
batch_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
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | hoseDUDEface/AdaptiveWingLoss | AddCoords | false | 12,512 | [
"Apache-2.0"
] | 0 | 9185799d87567044f437147639c3999418529684 | https://github.com/hoseDUDEface/AdaptiveWingLoss/tree/9185799d87567044f437147639c3999418529684 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, with_r=False):
super().__init__()
self.with_r = with_r
def forward(self, input_tensor):
"""
Args:
input_tensor: shape(batch, channel, x_dim, y_dim)
"""
batch_size, _, x_d... |
GE2ELoss | # 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
def calc_loss(sim_matrix):
same_idx = list(range(sim_matrix.size(0)))
pos = sim_matrix[same_idx, :, same_idx]
neg = (torch.exp(sim_matrix).sum(dim=2) + 1e-06).log_()
per_embedding_loss = -1 * (pos - neg)
loss = per_embedding_loss.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, math as tl_math
import torc... | helia95/SpeakerRecognition_tutorial | GE2ELoss | false | 12,513 | [
"MIT"
] | 0 | 5c00f9165fd260d50b74ab46e4d81d7cfd77ab8c | https://github.com/helia95/SpeakerRecognition_tutorial/tree/5c00f9165fd260d50b74ab46e4d81d7cfd77ab8c | import torch
import torch.nn.functional as F
import torch.nn as nn
def calc_loss(sim_matrix):
same_idx = list(range(sim_matrix.size(0)))
pos = sim_matrix[same_idx, :, same_idx]
neg = (torch.exp(sim_matrix).sum(dim=2) + 1e-06).log_()
per_embedding_loss = -1 * (pos - neg)
loss = per_embedding_loss.s... |
GraphConv | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.data
class GraphConv(nn.Module):
def __init__(self, input_dim, output_dim, add_self=False,
normalize_embedding=False, dropout=0.0, bias=True):
super(GraphConv, self).__init__()
self.add_self = add_self
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.utils.data
assert_size_stride = torch._C._dyn... | hujilin1229/diffpool | GraphConv | false | 12,514 | [
"MIT"
] | 0 | 5b9bd73d794b63f5ea6d48e60cba090aa6e3ce72 | https://github.com/hujilin1229/diffpool/tree/5b9bd73d794b63f5ea6d48e60cba090aa6e3ce72 | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.data
class Model(nn.Module):
def __init__(self, input_dim, output_dim, add_self=False,
normalize_embedding=False, dropout=0.0, bias=True):
super().__init__()
self.add_self = add_self
self.dropout... |
BinaryLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import torch.nn as nn
import torch.nn.functional as F
class BinaryLoss(nn.Module):
def __init__(self):
super(BinaryLoss, self).__init__()
def forward(self, pos_score, neg_score):
pos_loss = -F.log_softmax(pos_score)[:, 1]
neg_loss = -F.log_softmax(neg_score)[:, 0]
... | 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
... | huanglianghua/mdnet-light | BinaryLoss | false | 12,515 | [
"MIT"
] | 0 | 955b61b8555a49fdf2e2310aa0756c68f955212c | https://github.com/huanglianghua/mdnet-light/tree/955b61b8555a49fdf2e2310aa0756c68f955212c | 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, pos_score, neg_score):
pos_loss = -F.log_softmax(pos_score)[:, 1]
neg_loss = -F.log_softmax(neg_score)[:, 0]
loss = pos_loss.sum... |
WeightedTVLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import functools
import torch
from torch import nn as nn
from torch.nn import functional as F
from torch.nn import init as init
from torchvision.models import vgg as vgg
import torch.utils.data
from torch.utils import data as data
from torch import autograd as autograd
def reduce_loss(loss, reduction):
"""Reduce ... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
import functools
from torch import nn as nn
from torch.nn import function... | hyunobae/BasicSR | WeightedTVLoss | false | 12,516 | [
"Apache-2.0"
] | 0 | f2c2fc6cf28933658816c808f55c95fa20b16483 | https://github.com/hyunobae/BasicSR/tree/f2c2fc6cf28933658816c808f55c95fa20b16483 | import functools
import torch
from torch import nn as nn
from torch.nn import functional as F
from torch.nn import init as init
from torchvision.models import vgg as vgg
import torch.utils.data
from torch.utils import data as data
from torch import autograd as autograd
def reduce_loss(loss, reduction):
"""Reduce ... |
PARALoss | # 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 PARALoss(nn.Module):
"""
Softmax classifier for sentence-level relation extraction.
"""
def __init__(self):
"""
Args:
sentence_encoder: encoder for sentences
num_class: number of classes
... | 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... | igorvlnascimento/open-nre | PARALoss | false | 12,517 | [
"MIT"
] | 0 | a6e42ef074d62be4d3ceb571f412d5be8c0502d7 | https://github.com/igorvlnascimento/open-nre/tree/a6e42ef074d62be4d3ceb571f412d5be8c0502d7 | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
"""
Softmax classifier for sentence-level relation extraction.
"""
def __init__(self):
"""
Args:
sentence_encoder: encoder for sentences
num_class: number of classes
... |
FeedForward | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import torch.utils.data
import torch.nn as nn
from torch.nn.functional import relu
from torch.nn.functional import dropout
class FeedForward(nn.Module):
def __init__(self, input_size):
super(FeedForward, self).__init__()
self.fc1 = nn.Linear(input_size, 16)
self.fc2 = nn.Line... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.utils.data
impor... | ibraheem-moosa/protein-bvalue-prediction | FeedForward | false | 12,518 | [
"MIT"
] | 0 | 9d0607ade30d8877ea89c5f24184d3af0580f912 | https://github.com/ibraheem-moosa/protein-bvalue-prediction/tree/9d0607ade30d8877ea89c5f24184d3af0580f912 | import torch
import torch.utils.data
import torch.nn as nn
from torch.nn.functional import relu
from torch.nn.functional import dropout
class Model(nn.Module):
def __init__(self, input_size):
super().__init__()
self.fc1 = nn.Linear(input_size, 16)
self.fc2 = nn.Linear(16, 16)
self... |
SoftGate | # 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 as nn
from torch.nn import init as init
from torchvision.models import vgg as vgg
import torch.utils.data
from torch.utils import data as data
from torch import autograd as autograd
class SoftGate(nn.Module):
COEFF = 12.0
def forward(self, x):
return torch.sigmoid(x)... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn as nn
from torch.nn import init as init
from torchvision.models import vgg as vgg
import torch.utils.data
from torch.ut... | hyunobae/BasicSR | SoftGate | false | 12,519 | [
"Apache-2.0"
] | 0 | f2c2fc6cf28933658816c808f55c95fa20b16483 | https://github.com/hyunobae/BasicSR/tree/f2c2fc6cf28933658816c808f55c95fa20b16483 | import torch
from torch import nn as nn
from torch.nn import init as init
from torchvision.models import vgg as vgg
import torch.utils.data
from torch.utils import data as data
from torch import autograd as autograd
class Model(nn.Module):
COEFF = 12.0
def forward(self, x):
return torch.sigmoid(x).mu... |
ResUnit | # 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 ResUnit(nn.Module):
def __init__(self, ksize=3, wkdim=64):
super(ResUnit, self).__init__()
self.conv1 = nn.Conv2d(wkdim, wkdim, ksize, 1, int(ksize / 2))
self.active = nn.PReLU()
self.conv2 = nn.Conv2d(wkdim, wkdim, ksize, 1, int(ksize / 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
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | huang-junhong/SIRSRGAN | ResUnit | false | 12,520 | [
"Apache-2.0"
] | 0 | a774416cd45a00982141a1571cb2a8a18bb05c86 | https://github.com/huang-junhong/SIRSRGAN/tree/a774416cd45a00982141a1571cb2a8a18bb05c86 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, ksize=3, wkdim=64):
super().__init__()
self.conv1 = nn.Conv2d(wkdim, wkdim, ksize, 1, int(ksize / 2))
self.active = nn.PReLU()
self.conv2 = nn.Conv2d(wkdim, wkdim, ksize, 1, int(ksize / 2))
def forw... |
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 numpy as np
class MultiHeadAttention(torch.nn.Module):
def __init__(self, input_size, output_size, num_heads,
output_attentions=False):
super(MultiHeadAttention, self).__init__()
self.output_attentions = output_attentions
self.num_heads = num_heads
self... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cu... | igorvlnascimento/open-nre | MultiHeadAttention | false | 12,521 | [
"MIT"
] | 0 | a6e42ef074d62be4d3ceb571f412d5be8c0502d7 | https://github.com/igorvlnascimento/open-nre/tree/a6e42ef074d62be4d3ceb571f412d5be8c0502d7 | import torch
import numpy as np
class Model(torch.nn.Module):
def __init__(self, input_size, output_size, num_heads,
output_attentions=False):
super().__init__()
self.output_attentions = output_attentions
self.num_heads = num_heads
self.d_model_size = input_size
se... |
TLU | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch import nn
class TLU(nn.Module):
def __init__(self, num_features):
"""max(y, tau) = max(y - tau, 0) + tau = ReLU(y - tau) + tau"""
super(TLU, self).__init__()
self.num_features = num_features
self.tau = nn.parameter.Parameter(torch.Tensor(1, num_features, 1,... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empt... | ildoonet/pytorch-filter-response-norm | TLU | false | 12,522 | [
"MIT"
] | 0 | e6885f2b2272fa6cde0a131d3b3a0e42b8c6d579 | https://github.com/ildoonet/pytorch-filter-response-norm/tree/e6885f2b2272fa6cde0a131d3b3a0e42b8c6d579 | import torch
from torch import nn
class Model(nn.Module):
def __init__(self, num_features):
"""max(y, tau) = max(y - tau, 0) + tau = ReLU(y - tau) + tau"""
super().__init__()
self.num_features = num_features
self.tau = nn.parameter.Parameter(torch.Tensor(1, num_features, 1,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.