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
LearnableMax
# 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 LearnableMax(nn.Module): def __init__(self, out_chn): super(LearnableMax, self).__init__() self.max1 = nn.Parameter(torch.zeros(1, out_chn, 1, 1), requires_grad=True) self.max2 = nn.Parameter(torch.zeros(1, out_chn, 1, 1), 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...
RiyaoDong/HGSL
LearnableMax
false
2,764
[ "Apache-2.0" ]
0
19fa984b3bfde0e3b7acbce87dd40177cd64f9b0
https://github.com/RiyaoDong/HGSL/tree/19fa984b3bfde0e3b7acbce87dd40177cd64f9b0
cal_L2Norm
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch class cal_L2Norm(torch.nn.Module): def __init__(self): super(cal_L2Norm, self).__init__() self.eps = 1e-10 def forward(self, x): norm = torch.sqrt(torch.sum(x * x, dim=1) + self.eps) return norm def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_c...
RiyaoDong/HGSL
cal_L2Norm
false
2,765
[ "Apache-2.0" ]
0
19fa984b3bfde0e3b7acbce87dd40177cd64f9b0
https://github.com/RiyaoDong/HGSL/tree/19fa984b3bfde0e3b7acbce87dd40177cd64f9b0
Transformer
# 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 class Mlp(nn.Module): """Implementation of MLP""" def __init__(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.0): super().__init__() out_features = out_features or in_features hi...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
QLSong/cv-classify
Transformer
false
2,766
[ "Apache-2.0" ]
0
02f53d03868f299a08b5c97a266b50a7fdcd3f2b
https://github.com/QLSong/cv-classify/tree/02f53d03868f299a08b5c97a266b50a7fdcd3f2b
BatchLinear
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn from collections import OrderedDict class MetaModule(nn.Module): """ Base class for PyTorch meta-learning modules. These modules accept an additional argument `params` in their `forward` method. Notes ----- Objects inherited from `MetaModule` are fully compa...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
RisingStockPrices/multi-shape-siren
BatchLinear
false
2,767
[ "MIT" ]
0
f78d6deb94660fd11ef0caf55f88095b74d3e223
https://github.com/RisingStockPrices/multi-shape-siren/tree/f78d6deb94660fd11ef0caf55f88095b74d3e223
LearnableBias
# 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 LearnableBias(nn.Module): def __init__(self, out_chn): super(LearnableBias, self).__init__() self.bias = nn.Parameter(torch.zeros(1, out_chn, 1, 1), requires_grad=True) self.out_chn = out_chn def forward(self, x): out = x +...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
RiyaoDong/HGSL
LearnableBias
false
2,768
[ "Apache-2.0" ]
0
19fa984b3bfde0e3b7acbce87dd40177cd64f9b0
https://github.com/RiyaoDong/HGSL/tree/19fa984b3bfde0e3b7acbce87dd40177cd64f9b0
ScaledSiLU
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch class ScaledSiLU(torch.nn.Module): def __init__(self): super().__init__() self.scale_factor = 1 / 0.6 self._activation = torch.nn.SiLU() def forward(self, x): return self._activation(x) * self.scale_factor def get_inputs(): return [torch.rand([4, 4, 4, 4])]...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
RolnickLab/ocp
ScaledSiLU
false
2,769
[ "MIT" ]
0
e120c3b90203a46f5fc7626f0b5c8979e4944765
https://github.com/RolnickLab/ocp/tree/e120c3b90203a46f5fc7626f0b5c8979e4944765
PolynomialEnvelope
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch class PolynomialEnvelope(torch.nn.Module): """ Polynomial envelope function that ensures a smooth cutoff. Parameters ---------- exponent: int Exponent of the envelope function. """ def __init__(self, exponent): super().__init__() assert expone...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
RolnickLab/ocp
PolynomialEnvelope
false
2,770
[ "MIT" ]
0
e120c3b90203a46f5fc7626f0b5c8979e4944765
https://github.com/RolnickLab/ocp/tree/e120c3b90203a46f5fc7626f0b5c8979e4944765
MetaLayerNorm
# 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 from collections import OrderedDict class MetaModule(nn.Module): """ Base class for PyTorch meta-learning modules. These modules accept an additional argument `params` in their `forward` method. Notes ----- Objects inherited 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.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
RisingStockPrices/multi-shape-siren
MetaLayerNorm
false
2,771
[ "MIT" ]
0
f78d6deb94660fd11ef0caf55f88095b74d3e223
https://github.com/RisingStockPrices/multi-shape-siren/tree/f78d6deb94660fd11ef0caf55f88095b74d3e223
MetaBilinear
# 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 from collections import OrderedDict class MetaModule(nn.Module): """ Base class for PyTorch meta-learning modules. These modules accept an additional argument `params` in their `forward` method. Notes ----- Objects inherited 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride reinterpret_tensor = torch._C._dynamo.guards._reinterp...
RisingStockPrices/multi-shape-siren
MetaBilinear
false
2,772
[ "MIT" ]
0
f78d6deb94660fd11ef0caf55f88095b74d3e223
https://github.com/RisingStockPrices/multi-shape-siren/tree/f78d6deb94660fd11ef0caf55f88095b74d3e223
ScaledDotProductAttention
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import torch.nn.functional as F import torch.nn as nn class ScaledDotProductAttention(nn.Module): """ Scaled Dot-Product Attention """ def __init__(self, temperature, attn_dropout=0.1): super().__init__() self.temperature = temperature self.dropout = nn.Dropout(attn_dropo...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
RogerTsai917/attention-is-all-you-need-pytorch
ScaledDotProductAttention
false
2,773
[ "MIT" ]
0
64197e55d275e5c819bc786a9ff19849cdf2f6b9
https://github.com/RogerTsai917/attention-is-all-you-need-pytorch/tree/64197e55d275e5c819bc786a9ff19849cdf2f6b9
RandomShiftsAug
# 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 RandomShiftsAug(nn.Module): def __init__(self, pad): super().__init__() self.pad = pad def forward(self, x): x = x.float() n, _c, h, w = x.size() assert h == w padding = tuple([self.pad] ...
import torch from torch import device import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._d...
RobertMcCarthy97/url_benchmark
RandomShiftsAug
false
2,774
[ "MIT" ]
0
e2d99b05bc7fd62d1e8d9789840a0cc5d8174136
https://github.com/RobertMcCarthy97/url_benchmark/tree/e2d99b05bc7fd62d1e8d9789840a0cc5d8174136
PositionwiseFeedForward
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn.functional as F import torch.nn as nn class PositionwiseFeedForward(nn.Module): """ A two-feed-forward-layer module """ def __init__(self, d_in, d_hid, dropout=0.1): super().__init__() self.w_1 = nn.Linear(d_in, d_hid) self.w_2 = nn.Linear(d_hid, d_in) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
RogerTsai917/attention-is-all-you-need-pytorch
PositionwiseFeedForward
false
2,775
[ "MIT" ]
0
64197e55d275e5c819bc786a9ff19849cdf2f6b9
https://github.com/RogerTsai917/attention-is-all-you-need-pytorch/tree/64197e55d275e5c819bc786a9ff19849cdf2f6b9
LanguageModelCriterion
# 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 from torch.autograd import * class LanguageModelCriterion(nn.Module): def __init__(self): super(LanguageModelCriterion, self).__init__() def forward(self, input, target, mask): if target.ndim == 3: target = target.reshape(-1, target.shape[2]) ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from torch.autograd import * assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
Romero027/ImageCaptioning.pytorch
LanguageModelCriterion
false
2,776
[ "MIT" ]
0
069c95f5d343fb126afa8b10ec18e472f30b7b35
https://github.com/Romero027/ImageCaptioning.pytorch/tree/069c95f5d343fb126afa8b10ec18e472f30b7b35
SiQU
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch class SiQU(torch.nn.Module): def __init__(self): super().__init__() self._activation = torch.nn.SiLU() def forward(self, x): return x * self._activation(x) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
RolnickLab/ocp
SiQU
false
2,777
[ "MIT" ]
0
e120c3b90203a46f5fc7626f0b5c8979e4944765
https://github.com/RolnickLab/ocp/tree/e120c3b90203a46f5fc7626f0b5c8979e4944765
L2Norm
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch class L2Norm(torch.nn.Module): def __init__(self): super(L2Norm, self).__init__() self.eps = 1e-10 def forward(self, x): norm = torch.sqrt(torch.sum(x * x, dim=1) + self.eps) if len(norm.size()) == 1: x = x / norm.unsqueeze(-1).expand_as(x) 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.triton_helpers import libdevice assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_c...
RiyaoDong/HGSL
L2Norm
false
2,778
[ "Apache-2.0" ]
0
19fa984b3bfde0e3b7acbce87dd40177cd64f9b0
https://github.com/RiyaoDong/HGSL/tree/19fa984b3bfde0e3b7acbce87dd40177cd64f9b0
GaussianSmearing
# 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 GaussianSmearing(nn.Module): def __init__(self, in_features, start=0, end=1, num_freqs=50): super(GaussianSmearing, self).__init__() self.num_freqs = num_freqs offset = torch.linspace(start, end, num_freqs) self.coeff = -0.5 / (offset[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.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
RolnickLab/ocp
GaussianSmearing
false
2,779
[ "MIT" ]
0
e120c3b90203a46f5fc7626f0b5c8979e4944765
https://github.com/RolnickLab/ocp/tree/e120c3b90203a46f5fc7626f0b5c8979e4944765
PixelwiseNorm
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch import nn import torch.nn.parallel import torch.utils.data class PixelwiseNorm(nn.Module): """ Pixelwise feature vector normalization. """ def __init__(self): super(PixelwiseNorm, self).__init__() def forward(self, x, alpha=1e-07): """ forward pass...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn import torch.nn.parallel import torch.utils.data assert_si...
RuslanKhalitov/gan_dogs
PixelwiseNorm
false
2,780
[ "MIT" ]
0
f11829d6d8d02e3c834061d7326b270ef2503108
https://github.com/RuslanKhalitov/gan_dogs/tree/f11829d6d8d02e3c834061d7326b270ef2503108
SphericalBesselBasis
# 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 numpy as np class SphericalBesselBasis(torch.nn.Module): """ 1D spherical Bessel basis Parameters ---------- num_radial: int Controls maximum frequency. cutoff: float Cutoff distance in Angstrom. """ def __init__(self, num_radial: 'int'...
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 math import numpy as np assert_size_stride = torch._C._dynamo.guar...
RolnickLab/ocp
SphericalBesselBasis
false
2,781
[ "MIT" ]
0
e120c3b90203a46f5fc7626f0b5c8979e4944765
https://github.com/RolnickLab/ocp/tree/e120c3b90203a46f5fc7626f0b5c8979e4944765
SpatialAttention
# 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 SpatialAttention(nn.Module): def __init__(self, kernel_size=7): super(SpatialAttention, self).__init__() assert kernel_size in (3, 7), 'kernel size must be 3 or 7' padding = 3 if kernel_size == 7 else 1 self.conv = nn.Conv1d(2, 1, kernel_si...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
RuaBQ/FEAT
SpatialAttention
false
2,782
[ "MIT" ]
0
e46f56b03f8ef820d549cb385600a12bdf224de9
https://github.com/RuaBQ/FEAT/tree/e46f56b03f8ef820d549cb385600a12bdf224de9
eca_block
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import math import torch import torch.nn as nn class eca_block(nn.Module): def __init__(self, channel, b=1, gamma=2): super(eca_block, self).__init__() kernel_size = int(abs((math.log(channel, 2) + b) / gamma)) kernel_size = kernel_size if kernel_size % 2 else kernel_size + 1 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 math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.a...
RuidongDavidLin/YOLOV4-tiny-Pytorch
eca_block
false
2,783
[ "MIT" ]
0
f2bb941ff894e12551bf285eb09fd42db2fb3dee
https://github.com/RuidongDavidLin/YOLOV4-tiny-Pytorch/tree/f2bb941ff894e12551bf285eb09fd42db2fb3dee
RewardCriterion
# 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 from torch.autograd import * class RewardCriterion(nn.Module): def __init__(self): super(RewardCriterion, self).__init__() def forward(self, input, seq, reward): input = input.gather(2, seq.unsqueeze(2)).squeeze(2) input = input.reshape(-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 import torch.nn as nn from torch.autograd import * assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
Romero027/ImageCaptioning.pytorch
RewardCriterion
false
2,784
[ "MIT" ]
0
069c95f5d343fb126afa8b10ec18e472f30b7b35
https://github.com/Romero027/ImageCaptioning.pytorch/tree/069c95f5d343fb126afa8b10ec18e472f30b7b35
ExponentialEnvelope
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch class ExponentialEnvelope(torch.nn.Module): """ Exponential envelope function that ensures a smooth cutoff, as proposed in Unke, Chmiela, Gastegger, Schütt, Sauceda, Müller 2021. SpookyNet: Learning Force Fields with Electronic Degrees of Freedom and Nonlocal Effects """ def ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_str...
RolnickLab/ocp
ExponentialEnvelope
false
2,785
[ "MIT" ]
0
e120c3b90203a46f5fc7626f0b5c8979e4944765
https://github.com/RolnickLab/ocp/tree/e120c3b90203a46f5fc7626f0b5c8979e4944765
PositionwiseFeedForward
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn import torch.nn.functional as F class PositionwiseFeedForward(nn.Module): """ A two-feed-forward-layer module """ def __init__(self, d_in, d_hid, dropout=0.1): super().__init__() self.w_1 = nn.Linear(d_in, d_hid) self.w_2 = nn.Linear(d_hid, d_in) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Romero027/OmniNet
PositionwiseFeedForward
false
2,786
[ "Apache-2.0" ]
0
c1cda1738c80925e5468b3ffc7aae2153bcd9e62
https://github.com/Romero027/OmniNet/tree/c1cda1738c80925e5468b3ffc7aae2153bcd9e62
LinearEncoder
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn from torch.autograd import * import torch.nn.init as init class LayerNormalization(nn.Module): """ Layer normalization module """ def __init__(self, d_hid, eps=0.001): super(LayerNormalization, self).__init__() self.eps = eps self.a_2 = nn.Parameter(...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
RussellMcGrady/Multi-head-attention-based-MetaR
LinearEncoder
false
2,787
[ "Apache-2.0" ]
0
4e47546da35bd57ff7ab16d0fed19be31c063563
https://github.com/RussellMcGrady/Multi-head-attention-based-MetaR/tree/4e47546da35bd57ff7ab16d0fed19be31c063563
SupportEncoder
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn from torch.autograd import * import torch.nn.init as init class LayerNormalization(nn.Module): """ Layer normalization module """ def __init__(self, d_hid, eps=0.001): super(LayerNormalization, self).__init__() self.eps = eps self.a_2 = nn.Parameter(...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
RussellMcGrady/Multi-head-attention-based-MetaR
SupportEncoder
false
2,788
[ "Apache-2.0" ]
0
4e47546da35bd57ff7ab16d0fed19be31c063563
https://github.com/RussellMcGrady/Multi-head-attention-based-MetaR/tree/4e47546da35bd57ff7ab16d0fed19be31c063563
EmbeddingsInteraction
# 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 EmbeddingsInteraction(nn.Module): def __init__(self): super(EmbeddingsInteraction, self).__init__() def forward(self, x): """ :param x: shape (batch_size, num_fields, embedding_dim) :return: shape (batch_size, num_fields*(num_fields)//...
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...
SUSTechBruce/RL_CTR
EmbeddingsInteraction
false
2,789
[ "Apache-2.0" ]
0
817398dc1c117e22f41281830ae3c33bba8062d3
https://github.com/SUSTechBruce/RL_CTR/tree/817398dc1c117e22f41281830ae3c33bba8062d3
NonLinearProbe4
# 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 NonLinearProbe4(nn.Module): def __init__(self, input_dim, num_hidden=300, num_classes=255): super().__init__() self.linear1 = nn.Linear(in_features=input_dim, out_features=num_hidden ) self.relu1 = nn.ReLU() self.linear2 = 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 import triton_helpers from torch import nn assert_s...
PAL-ML/atari-representation-learning
NonLinearProbe4
false
2,790
[ "MIT" ]
0
11977da174d9ef74c0b2333322b9f0b28e15239e
https://github.com/PAL-ML/atari-representation-learning/tree/11977da174d9ef74c0b2333322b9f0b28e15239e
MultiHeadAttention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn.functional as F import torch.nn as nn class ScaledDotProductAttention(nn.Module): """ Scaled Dot-Product Attention """ def __init__(self, temperature, attn_dropout=0.1): super().__init__() self.temperature = temperature self.dropout = nn.Dropout(attn_dropo...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
RogerTsai917/attention-is-all-you-need-pytorch
MultiHeadAttention
false
2,791
[ "MIT" ]
0
64197e55d275e5c819bc786a9ff19849cdf2f6b9
https://github.com/RogerTsai917/attention-is-all-you-need-pytorch/tree/64197e55d275e5c819bc786a9ff19849cdf2f6b9
EncoderLayer
# 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 ScaledDotProductAttention(nn.Module): """ Scaled Dot-Product Attention """ def __init__(self, temperature, attn_dropout=0.1): super().__init__() self.temperature = temperature self.dropout = nn.Dropout(attn_dropo...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
RogerTsai917/attention-is-all-you-need-pytorch
EncoderLayer
false
2,792
[ "MIT" ]
0
64197e55d275e5c819bc786a9ff19849cdf2f6b9
https://github.com/RogerTsai917/attention-is-all-you-need-pytorch/tree/64197e55d275e5c819bc786a9ff19849cdf2f6b9
ConvTemporalGraphical
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn class ConvTemporalGraphical(nn.Module): """The basic module for applying a graph convolution. Args: in_channels (int): Number of channels in the input sequence data out_channels (int): Number of channels produced by the convolution kernel_size (int):...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
SKBL5694/guard
ConvTemporalGraphical
false
2,793
[ "BSD-2-Clause" ]
0
55fa719197b08e11729a5dcc48418c49bd142f4a
https://github.com/SKBL5694/guard/tree/55fa719197b08e11729a5dcc48418c49bd142f4a
Dice
# 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 Dice(nn.Module): def __init__(self): super(Dice, self).__init__() self.alpha = nn.Parameter(torch.zeros((1,))) def forward(self, x): avg = x.mean(dim=0) std = x.std(dim=0) norm_x = (x - avg) / std p = torch.sigmoid(norm...
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_...
SUSTechBruce/RL_CTR
Dice
false
2,794
[ "Apache-2.0" ]
0
817398dc1c117e22f41281830ae3c33bba8062d3
https://github.com/SUSTechBruce/RL_CTR/tree/817398dc1c117e22f41281830ae3c33bba8062d3
DecoderLayer
# 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 ScaledDotProductAttention(nn.Module): """ Scaled Dot-Product Attention """ def __init__(self, temperature, attn_dropout=0.1): super().__init__() self.temperature = temperature self.dropout = nn.Dropout(attn_dropo...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
RogerTsai917/attention-is-all-you-need-pytorch
DecoderLayer
false
2,795
[ "MIT" ]
0
64197e55d275e5c819bc786a9ff19849cdf2f6b9
https://github.com/RogerTsai917/attention-is-all-you-need-pytorch/tree/64197e55d275e5c819bc786a9ff19849cdf2f6b9
Classifier
# 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 Classifier(nn.Module): def __init__(self, num_inputs1, num_inputs2): super().__init__() self.network = nn.Bilinear(num_inputs1, num_inputs2, 1) def forward(self, x1, x2): return self.network(x1, x2) def get_inputs(): return [torch.rand([4...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride reinterpret_tensor = torch._C._dynamo.guards._reinterpr...
PAL-ML/atari-representation-learning
Classifier
false
2,796
[ "MIT" ]
0
11977da174d9ef74c0b2333322b9f0b28e15239e
https://github.com/PAL-ML/atari-representation-learning/tree/11977da174d9ef74c0b2333322b9f0b28e15239e
NonLinearProbe2
# 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 NonLinearProbe2(nn.Module): def __init__(self, input_dim, num_hidden=300, num_classes=255): super().__init__() self.linear1 = nn.Linear(in_features=input_dim, out_features=num_hidden ) self.relu = nn.ReLU() self.linear2 = 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 from torch import nn assert_s...
PAL-ML/atari-representation-learning
NonLinearProbe2
false
2,797
[ "MIT" ]
0
11977da174d9ef74c0b2333322b9f0b28e15239e
https://github.com/PAL-ML/atari-representation-learning/tree/11977da174d9ef74c0b2333322b9f0b28e15239e
ABS_disc
# 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 ABS_disc(nn.Module): def __init__(self, weight_list=None): super(ABS_disc, self).__init__() self.weight_list = weight_list def forward(self, x, labels): loss = torch.abs(x - labels) if self.weight_list is not None: loss = l...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
Sampson-Lee/SIB-Net
ABS_disc
false
2,798
[ "MIT" ]
0
650399082e9237327fa38168ccfc7d48153a1db5
https://github.com/Sampson-Lee/SIB-Net/tree/650399082e9237327fa38168ccfc7d48153a1db5
ABS_cont
# 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 ABS_cont(nn.Module): def __init__(self, theta=1 / 10): super(ABS_cont, self).__init__() self.theta = theta def forward(self, x, labels): loss = torch.abs(x - labels) mask = loss.gt(self.theta).float() loss = loss * mask ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
Sampson-Lee/SIB-Net
ABS_cont
false
2,799
[ "MIT" ]
0
650399082e9237327fa38168ccfc7d48153a1db5
https://github.com/Sampson-Lee/SIB-Net/tree/650399082e9237327fa38168ccfc7d48153a1db5
ABS_disc_sm_v3
# AOT ID: ['2_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 ABS_disc_sm_v3(nn.Module): def __init__(self, weight_list=None, lb_sm=0.2): super(ABS_disc_sm_v3, self).__init__() self.weight_list = weight_list self.lb_sm = lb_sm def forward(self, x, labels): assert (x >= 0).all() and (x <= 1).all()...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
Sampson-Lee/SIB-Net
ABS_disc_sm_v3
false
2,800
[ "MIT" ]
0
650399082e9237327fa38168ccfc7d48153a1db5
https://github.com/Sampson-Lee/SIB-Net/tree/650399082e9237327fa38168ccfc7d48153a1db5
CpuEmbedding
# 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 CpuEmbedding(nn.Module): def __init__(self, num_embeddings, embed_dim): super(CpuEmbedding, self).__init__() self.weight = nn.Parameter(torch.zeros((num_embeddings, embed_dim))) nn.init.xavier_uniform_(self.weight.data) def forward(self, x): ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
SUSTechBruce/RL_CTR
CpuEmbedding
false
2,801
[ "Apache-2.0" ]
0
817398dc1c117e22f41281830ae3c33bba8062d3
https://github.com/SUSTechBruce/RL_CTR/tree/817398dc1c117e22f41281830ae3c33bba8062d3
NonLinearProbe3
# 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 NonLinearProbe3(nn.Module): def __init__(self, input_dim, num_classes=255): super().__init__() self.linear = nn.Linear(in_features=input_dim, out_features=num_classes ) self.sigmoid = nn.Sigmoid() def forward(self, feature_vectors):...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
PAL-ML/atari-representation-learning
NonLinearProbe3
false
2,802
[ "MIT" ]
0
11977da174d9ef74c0b2333322b9f0b28e15239e
https://github.com/PAL-ML/atari-representation-learning/tree/11977da174d9ef74c0b2333322b9f0b28e15239e
NonLinearProbe1
# 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 NonLinearProbe1(nn.Module): def __init__(self, input_dim, num_classes=255): super().__init__() self.linear = nn.Linear(in_features=input_dim, out_features=num_classes ) self.relu = nn.ReLU() def forward(self, feature_vectors): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
PAL-ML/atari-representation-learning
NonLinearProbe1
false
2,803
[ "MIT" ]
0
11977da174d9ef74c0b2333322b9f0b28e15239e
https://github.com/PAL-ML/atari-representation-learning/tree/11977da174d9ef74c0b2333322b9f0b28e15239e
L2N
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import torch.nn as nn def l2n(x, eps=1e-06): return x / (torch.norm(x, p=2, dim=1, keepdim=True) + eps).expand_as(x) class L2N(nn.Module): def __init__(self, eps=1e-06): super(L2N, self).__init__() self.eps = eps def forward(self, x): return l2n(x, eps=self.eps) ...
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_...
SamSweere/CV-PIRE
L2N
false
2,804
[ "MIT" ]
0
d857167b3058cb51d10662150c6a4ba3c85f2903
https://github.com/SamSweere/CV-PIRE/tree/d857167b3058cb51d10662150c6a4ba3c85f2903
InstanceNorm2d
# 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 InstanceNorm2d(nn.Module): def __init__(self, epsilon=1e-08, **kwargs): super().__i...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn as nn from torch.nn import init as init from torchvision.m...
Lotayou/BasicSR
InstanceNorm2d
false
2,805
[ "Apache-2.0", "MIT" ]
0
6cf9a706dd680d54f7dc26e87318ff79f76c0dbf
https://github.com/Lotayou/BasicSR/tree/6cf9a706dd680d54f7dc26e87318ff79f76c0dbf
BCE_disc_sm_v2
# AOT ID: ['2_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 BCE_disc_sm_v2(nn.Module): def __init__(self, weight_list=None, lb_sm=0.2): super(BCE_disc_sm_v2, self).__init__() self.weight_list = weight_list self.lb_sm = lb_sm def forward(self, x, labels): assert (...
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...
Sampson-Lee/SIB-Net
BCE_disc_sm_v2
false
2,806
[ "MIT" ]
0
650399082e9237327fa38168ccfc7d48153a1db5
https://github.com/Sampson-Lee/SIB-Net/tree/650399082e9237327fa38168ccfc7d48153a1db5
SelfAttention0
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import math import torch import torch.nn as nn import torch.nn.functional as F class MultiHeadedAttention(nn.Module): def __init__(self, h, d_model, dropout=0.0): """Take in model size and number of heads.""" super(MultiHeadedAttention, self).__init__() self.d_k = d_model // h sel...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
SSussexGit/deepikachu
SelfAttention0
false
2,807
[ "MIT" ]
0
72999c4a3f1767c3e5f332fe64cba9240ef43a79
https://github.com/SSussexGit/deepikachu/tree/72999c4a3f1767c3e5f332fe64cba9240ef43a79
SelfAttention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch import nn import torch.nn.functional as F def conv1d(ni: 'int', no: 'int', ks: 'int'=1, stride: 'int'=1, padding: 'int'=0, bias: 'bool'=True): """ Create and initialize a `nn.Conv1d` layer with spectral normalization. """ conv = nn.Conv1d(ni, no, ks, stride=stride, padding=...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
STRCSussex-UbiCompSiegen/dl_har_model
SelfAttention
false
2,808
[ "MIT" ]
0
caac0f87fc7dd08a5d6ad3e4455ee25b35f5e7b4
https://github.com/STRCSussex-UbiCompSiegen/dl_har_model/tree/caac0f87fc7dd08a5d6ad3e4455ee25b35f5e7b4
MSE_disc
# 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 MSE_disc(nn.Module): def __init__(self, weight_list=None): super(MSE_disc, self).__init__() self.weight_list = weight_list def forward(self, x, labels): loss = (x - labels) ** 2 if self.weight_list is not None: loss = loss ...
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...
Sampson-Lee/SIB-Net
MSE_disc
false
2,809
[ "MIT" ]
0
650399082e9237327fa38168ccfc7d48153a1db5
https://github.com/Sampson-Lee/SIB-Net/tree/650399082e9237327fa38168ccfc7d48153a1db5
QNetwork
# 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 def weights_init_(m): if isinstance(m, nn.Linear): torch.nn.init.xavier_uniform_(m.weight, gain=1) torch.nn.init.constant_(m.bias, 0) class QNetwork(nn.Module): def __init__(self, num_inputs, num_actions, hidden_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 import nn assert_s...
SINGROUP/Atom_manipulation_with_RL
QNetwork
false
2,810
[ "MIT" ]
0
428e05459ed395f1a5fc00a7c65a9b0c26210ee8
https://github.com/SINGROUP/Atom_manipulation_with_RL/tree/428e05459ed395f1a5fc00a7c65a9b0c26210ee8
BCE_disc_sm_v6
# AOT ID: ['2_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 BCE_disc_sm_v6(nn.Module): def __init__(self, weight_list=None, lb_sm1=0.5, lb_sm0=0.1): super(BCE_disc_sm_v6, self).__init__() self.weight_list = weight_list self.lb_sm1 = lb_sm1 self.lb_sm0 = lb_sm0 de...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
Sampson-Lee/SIB-Net
BCE_disc_sm_v6
false
2,811
[ "MIT" ]
0
650399082e9237327fa38168ccfc7d48153a1db5
https://github.com/Sampson-Lee/SIB-Net/tree/650399082e9237327fa38168ccfc7d48153a1db5
MultiHeadedAttention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import math import torch import torch.nn as nn import torch.nn.functional as F class MultiHeadedAttention(nn.Module): def __init__(self, h, d_model, dropout=0.0): """Take in model size and number of heads.""" super(MultiHeadedAttention, self).__init__() self.d_k = d_model // h sel...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
SSussexGit/deepikachu
MultiHeadedAttention
false
2,812
[ "MIT" ]
0
72999c4a3f1767c3e5f332fe64cba9240ef43a79
https://github.com/SSussexGit/deepikachu/tree/72999c4a3f1767c3e5f332fe64cba9240ef43a79
InnerProductModel
# 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 InnerProductModel(torch.nn.Module): @staticmethod def is_valid_model_type(model_type): raise NotImplementedError @staticmethod def get_model_from_type(model_type): raise NotImplementedError @property def loss_criterion(self): return torch.nn.MSELos...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda reinterpret...
SamuelGong/plato
InnerProductModel
false
2,813
[ "Apache-2.0" ]
0
726f965620e63dfe18cc2edf07cc010a751f0231
https://github.com/SamuelGong/plato/tree/726f965620e63dfe18cc2edf07cc010a751f0231
BCE_disc_sm_v8
# AOT ID: ['2_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 BCE_disc_sm_v8(nn.Module): def __init__(self, lb_sm=0.2): super(BCE_disc_sm_v8, self).__init__() self.lb_sm = lb_sm def forward(self, x, labels): assert (x >= 0).all() and (x <= 1).all(), 'x is wrong' as...
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...
Sampson-Lee/SIB-Net
BCE_disc_sm_v8
false
2,814
[ "MIT" ]
0
650399082e9237327fa38168ccfc7d48153a1db5
https://github.com/Sampson-Lee/SIB-Net/tree/650399082e9237327fa38168ccfc7d48153a1db5
InputConv
# 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 def _get_padding(kernel_size, stride, dilation): padding = (stride - 1 + dilation * (kernel_size - 1)) // 2 return padding class InputConv(nn.Module): def __init__(self, inp, outp, k=3, stride=1, dilation=1): super(InputConv, se...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
Sanjay-Ganeshan/webcam-mouse
InputConv
false
2,815
[ "Apache-2.0" ]
0
240d1ee00816440e971c8c747bef02c12f3e5d57
https://github.com/Sanjay-Ganeshan/webcam-mouse/tree/240d1ee00816440e971c8c747bef02c12f3e5d57
BCE_disc_sm_v3
# AOT ID: ['2_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 BCE_disc_sm_v3(nn.Module): def __init__(self, weight_list=None, lb_sm=0.2): super(BCE_disc_sm_v3, self).__init__() self.weight_list = weight_list self.lb_sm = lb_sm def forward(self, x, labels): assert (...
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...
Sampson-Lee/SIB-Net
BCE_disc_sm_v3
false
2,816
[ "MIT" ]
0
650399082e9237327fa38168ccfc7d48153a1db5
https://github.com/Sampson-Lee/SIB-Net/tree/650399082e9237327fa38168ccfc7d48153a1db5
ResidualSelfAttention0
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import math import torch import torch.nn as nn import torch.nn.functional as F class MultiHeadedAttention(nn.Module): def __init__(self, h, d_model, dropout=0.0): """Take in model size and number of heads.""" super(MultiHeadedAttention, self).__init__() self.d_k = d_model // h sel...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
SSussexGit/deepikachu
ResidualSelfAttention0
false
2,817
[ "MIT" ]
0
72999c4a3f1767c3e5f332fe64cba9240ef43a79
https://github.com/SSussexGit/deepikachu/tree/72999c4a3f1767c3e5f332fe64cba9240ef43a79
MaxLayer
# 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 Tensor import torch.nn class MaxLayer(torch.nn.Module): """Placeholder Layer for Max operation""" def __init__(self): super(MaxLayer, self).__init__() def forward(self, inputs: 'Tensor'): return inputs.max(dim=-1)[0] def get_inputs(): return [torch.ra...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_str...
MoritzWag/LPDN
MaxLayer
false
2,818
[ "MIT" ]
0
a88a5a03f18c7f87879918369b8dc7a0e3abb02b
https://github.com/MoritzWag/LPDN/tree/a88a5a03f18c7f87879918369b8dc7a0e3abb02b
BCE_disc_sm_v5
# AOT ID: ['1_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 BCE_disc_sm_v5(nn.Module): def __init__(self, weight_list=None, lb_sm=0.2): super(BCE_disc_sm_v5, self).__init__() self.weight_list = weight_list self.lb_sm = lb_sm def forward(self, x, labels): assert (...
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 ...
Sampson-Lee/SIB-Net
BCE_disc_sm_v5
false
2,819
[ "MIT" ]
0
650399082e9237327fa38168ccfc7d48153a1db5
https://github.com/Sampson-Lee/SIB-Net/tree/650399082e9237327fa38168ccfc7d48153a1db5
SeperableConv
# 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 def _get_padding(kernel_size, stride, dilation): padding = (stride - 1 + dilation * (kernel_size - 1)) // 2 return padding class SeperableConv(nn.Module): def __init__(self, inp, outp, k=3, stride=1, dilation=1): super(Seperable...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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_...
Sanjay-Ganeshan/webcam-mouse
SeperableConv
false
2,820
[ "Apache-2.0" ]
0
240d1ee00816440e971c8c747bef02c12f3e5d57
https://github.com/Sanjay-Ganeshan/webcam-mouse/tree/240d1ee00816440e971c8c747bef02c12f3e5d57
CustomInverse
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch class CustomTorchOp(torch.autograd.Function): @staticmethod def symbolic(g, input): return g.op('torchcustom::Add10', input) @staticmethod def forward(ctx, x): return x + 10 class CustomInverse(torch.nn.Module): def forward(self, x, y): ress = CustomTorchO...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
Sanster/onnxruntime-extensions
CustomInverse
false
2,821
[ "MIT" ]
0
6eb41afcb2394d94ee90c7ae409fa96122e4cace
https://github.com/Sanster/onnxruntime-extensions/tree/6eb41afcb2394d94ee90c7ae409fa96122e4cace
DQN
# 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 DQN(nn.Module): def __init__(self, state_dim, action_dim, fc1_unit=64, fc2_unit=64, fc3_unit=128): super(DQN, self).__init__() self.fc1 = nn.Linear(state_dim, fc1_unit) self.fc2 = nn.Linear(fc1_unit, fc2_unit...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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_...
ProfessorQu/Reinforcement-Learning
DQN
false
2,822
[ "MIT" ]
0
e1cd645fc5a7ce60248c1a96c560a38d1b9433cd
https://github.com/ProfessorQu/Reinforcement-Learning/tree/e1cd645fc5a7ce60248c1a96c560a38d1b9433cd
ScaledDotProductAttention
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import torch.nn as nn import torch.nn.functional as F class ScaledDotProductAttention(nn.Module): """ Scaled Dot-Product Attention """ def __init__(self, temperature, attn_dropout=0.1): super().__init__() self.temperature = temperature self.dropout = nn.Dropout(attn_dropo...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
RuaBQ/FEAT
ScaledDotProductAttention
false
2,823
[ "MIT" ]
0
e46f56b03f8ef820d549cb385600a12bdf224de9
https://github.com/RuaBQ/FEAT/tree/e46f56b03f8ef820d549cb385600a12bdf224de9
MSE_cont
# 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 MSE_cont(nn.Module): def __init__(self, theta=1 / 10): super(MSE_cont, self).__init__() self.theta = theta def forward(self, x, labels): loss = (x - labels) ** 2 mask = loss.gt(self.theta).float() loss = loss * mask 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
Sampson-Lee/SIB-Net
MSE_cont
false
2,824
[ "MIT" ]
0
650399082e9237327fa38168ccfc7d48153a1db5
https://github.com/Sampson-Lee/SIB-Net/tree/650399082e9237327fa38168ccfc7d48153a1db5
multiloss
# 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 multiloss(nn.Module): def __init__(self, objective_num): super(multiloss, self).__init__() self.objective_num = objective_num self.log_var = nn.Parameter(torch.zeros(self.objective_num)) def forward(self, losses): for i in range(len(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.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
ShaharLutatiPersonal/hyperhypernetworks
multiloss
false
2,825
[ "MIT" ]
0
16e2595d89ad0533c9d5a2c62870fb90f1b1dc42
https://github.com/ShaharLutatiPersonal/hyperhypernetworks/tree/16e2595d89ad0533c9d5a2c62870fb90f1b1dc42
ScaledDotProductAttention
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import torch.optim.lr_scheduler import torch.nn as nn class ScaledDotProductAttention(nn.Module): def __init__(self, d_model, attention_dropout=0.1): super(ScaledDotProductAttention, self).__init__() self.temper = d_model ** 0.5 self.dropout = nn.Dropout(attention_dropout) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
Shengqiang-Zhang/self-attentive-parser
ScaledDotProductAttention
false
2,826
[ "MIT" ]
0
493f74c7acab9824d593f55d231754c5ac7cbb26
https://github.com/Shengqiang-Zhang/self-attentive-parser/tree/493f74c7acab9824d593f55d231754c5ac7cbb26
conv_block
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn class conv_block(nn.Module): def __init__(self, init_shape): super(conv_block, self).__init__() self.conv0 = nn.Conv2d(in_channels=init_shape[0], out_channels= init_shape[1], kernel_size=init_shape[2]) self.relu = nn.ELU() nn.init.kai...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
ShaharLutatiPersonal/hyperhypernetworks
conv_block
false
2,827
[ "MIT" ]
0
16e2595d89ad0533c9d5a2c62870fb90f1b1dc42
https://github.com/ShaharLutatiPersonal/hyperhypernetworks/tree/16e2595d89ad0533c9d5a2c62870fb90f1b1dc42
FusedLeakyReLU
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch import nn from torch.nn import functional as F class FusedLeakyReLU(nn.Module): def __init__(self, channel, negative_slope=0.2, scale=2 ** 0.5): super().__init__() self.bias = nn.Parameter(torch.zeros(channel)) self.negative_slope = negative_slope self.scal...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
ShinoharaHare/stylegan2-pytorch
FusedLeakyReLU
false
2,828
[ "MIT", "BSD-2-Clause", "Apache-2.0" ]
0
5a4b1c4e9753681bc1694195f3b2391527c1b525
https://github.com/ShinoharaHare/stylegan2-pytorch/tree/5a4b1c4e9753681bc1694195f3b2391527c1b525
BCE_disc_sm_v7
# AOT ID: ['2_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 BCE_disc_sm_v7(nn.Module): def __init__(self, weight_list=None, lb_sm=0.2): super(BCE_disc_sm_v7, self).__init__() self.weight_list = weight_list self.lb_sm = lb_sm def forward(self, x, labels): assert (...
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...
Sampson-Lee/SIB-Net
BCE_disc_sm_v7
false
2,829
[ "MIT" ]
0
650399082e9237327fa38168ccfc7d48153a1db5
https://github.com/Sampson-Lee/SIB-Net/tree/650399082e9237327fa38168ccfc7d48153a1db5
Down2d
# 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 Down2d(nn.Module): """docstring for Down2d.""" def __init__(self, in_channel, out_channel, kernel, stride, padding): super(Down2d, self).__init__() self.c1 = nn.Conv2d(in_channel, out_channel, kernel_size=kernel, stride=stride, padding=padd...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
Shimamura-Lab-SU/SGV
Down2d
false
2,830
[ "MIT" ]
0
8df3c314532528b8597c5dbb28bdfb23155bee82
https://github.com/Shimamura-Lab-SU/SGV/tree/8df3c314532528b8597c5dbb28bdfb23155bee82
GCN
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import math import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.parameter import Parameter from itertools import * from time import * class GraphConvolution(nn.Module): """ Simple GCN layer, similar to https://arxiv.org/abs/1609.02907 """ def __init__(self, in_features, 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 math import torch.nn a...
Richard-LYF/SESS-GC
GCN
false
2,831
[ "MIT" ]
0
2280e5ec8e5c5e20d0bda629b7d05f61bad0bec7
https://github.com/Richard-LYF/SESS-GC/tree/2280e5ec8e5c5e20d0bda629b7d05f61bad0bec7
EPE
# 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 EPE(nn.Module): def __init__(self): super(EPE, self).__init__() def forward(self, flow, gt, loss_mask): loss_map = (flow - gt.detach()) ** 2 loss_map = (loss_map.sum(1, True) + 1e-06) ** 0.5 return loss_map * loss_mask def get_inputs...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
Shreyamkmr/Frame-Interpolation
EPE
false
2,832
[ "MIT" ]
0
bf5eb768e11fdd55d3f322f0a365db3b190a7903
https://github.com/Shreyamkmr/Frame-Interpolation/tree/bf5eb768e11fdd55d3f322f0a365db3b190a7903
BCE_disc_sm_v4
# AOT ID: ['2_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 BCE_disc_sm_v4(nn.Module): def __init__(self, weight_list=None, lb_sm=0.2): super(BCE_disc_sm_v4, self).__init__() self.weight_list = weight_list self.lb_sm = lb_sm def forward(self, x, labels): assert (...
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...
Sampson-Lee/SIB-Net
BCE_disc_sm_v4
false
2,833
[ "MIT" ]
0
650399082e9237327fa38168ccfc7d48153a1db5
https://github.com/Sampson-Lee/SIB-Net/tree/650399082e9237327fa38168ccfc7d48153a1db5
HingeLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import torch.nn as nn class HingeLoss(nn.Module): def __init__(self): super(HingeLoss, self).__init__() self.margin = 1.0 def hinge_loss(self, input, target): output = self.margin - input.mul(target) output[output.le(0)] = 0 return output.mean() def ...
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...
Siraj-Qazi/BNN-PYNQ
HingeLoss
false
2,834
[ "BSD-3-Clause" ]
0
b942fe92b3c62b0b877b0a9d5c13e7eb3a234685
https://github.com/Siraj-Qazi/BNN-PYNQ/tree/b942fe92b3c62b0b877b0a9d5c13e7eb3a234685
GradLoss
# 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 GradLoss(nn.Module): def __init__(self): super(GradLoss, self).__init__() def forward(self, grad_fake, grad_real): return torch.mean(torch.abs(grad_real - grad_fake)) def get_inputs(): return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])] ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
SiTae9317/Depth-Estimation-PyTorch
GradLoss
false
2,836
[ "MIT" ]
0
03b25d5cd2dff665c4435e72aba605a9d710fe01
https://github.com/SiTae9317/Depth-Estimation-PyTorch/tree/03b25d5cd2dff665c4435e72aba605a9d710fe01
Quantizer
# 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 QuantizeAct(torch.autograd.Function): @staticmethod def forward(ctx, input, numbits): ctx.save_for_backward(input) if numbits == 1: return input.sign() elif numbits == 2: return torch.floor(input + 0.5) else: ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert...
Siraj-Qazi/BNN-PYNQ
Quantizer
false
2,837
[ "BSD-3-Clause" ]
0
b942fe92b3c62b0b877b0a9d5c13e7eb3a234685
https://github.com/Siraj-Qazi/BNN-PYNQ/tree/b942fe92b3c62b0b877b0a9d5c13e7eb3a234685
h_sigmoid
# 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.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed class h_sigmoid(nn.Module): def __init__(self, inplace=True, h_max=1): super(h_sigmoid, self).__init__() self.relu = nn.ReLU6(inplace=inplace) self.h_...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data...
SpectrePrediction/micronet
h_sigmoid
false
2,838
[ "MIT" ]
0
f56269c7a8744f750e9870f0baa9fb6e68f27b9c
https://github.com/SpectrePrediction/micronet/tree/f56269c7a8744f750e9870f0baa9fb6e68f27b9c
StyledConv
# 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 from torch import nn from torch.nn import functional as F def upsample(in_tens, out_H=64): in_H = in_tens.shape[2] scale_factor = 1.0 * out_H / in_H return nn.Upsample(scale_factor=scale_factor, mode='bilinear', align_corners=False)(in_tens) def make_kernel(k): k = 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 from torch._inductor.runtime.triton_helpers import libdevice import math from to...
ShinoharaHare/stylegan2-pytorch
StyledConv
false
2,839
[ "MIT", "BSD-2-Clause", "Apache-2.0" ]
0
5a4b1c4e9753681bc1694195f3b2391527c1b525
https://github.com/ShinoharaHare/stylegan2-pytorch/tree/5a4b1c4e9753681bc1694195f3b2391527c1b525
ConvFC
# 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 ConvFC(nn.Module): def __init__(self, conv_in_channels, conv_out_channels, input_size, hidden_size, output_size, kernel_size=3): super(ConvFC, self).__init__() self.conv_out_channels = conv_out_channels 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...
Silent-Zebra/sequential_social_dilemma_games
ConvFC
false
2,840
[ "MIT" ]
0
8cf8faebf7de727bac55bd8020be7cd9cc243ccc
https://github.com/Silent-Zebra/sequential_social_dilemma_games/tree/8cf8faebf7de727bac55bd8020be7cd9cc243ccc
h_swish
# 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.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed class h_sigmoid(nn.Module): def __init__(self, inplace=True, h_max=1): super(h_sigmoid, self).__init__() self.relu = nn.ReLU6(inplace=inplace) self.h_...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data...
SpectrePrediction/micronet
h_swish
false
2,841
[ "MIT" ]
0
f56269c7a8744f750e9870f0baa9fb6e68f27b9c
https://github.com/SpectrePrediction/micronet/tree/f56269c7a8744f750e9870f0baa9fb6e68f27b9c
NeuralNet
# 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 NeuralNet(nn.Module): def __init__(self, input_size, hidden_size, output_size): super(NeuralNet, self).__init__() self.layer1 = nn.Linear(input_size, hidden_size) self.layer2 = nn.Linear(hidden_size, hidden_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...
Silent-Zebra/sequential_social_dilemma_games
NeuralNet
false
2,842
[ "MIT" ]
0
8cf8faebf7de727bac55bd8020be7cd9cc243ccc
https://github.com/Silent-Zebra/sequential_social_dilemma_games/tree/8cf8faebf7de727bac55bd8020be7cd9cc243ccc
cSE
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn class cSE(nn.Module): def __init__(self, out_channels): super().__init__() self.linear1 = nn.Linear(in_features=out_channels, out_features=int (out_channels / 2), bias=False) self.linear2 = nn.Linear(in_features=int(out_channels / 2), ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
Soo95/segmentation_models.pytorch
cSE
false
2,843
[ "MIT" ]
0
9131b336d6939dfabbadecd0d56d382283f46803
https://github.com/Soo95/segmentation_models.pytorch/tree/9131b336d6939dfabbadecd0d56d382283f46803
AUXModule
# 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 AUXModule(nn.Module): def __init__(self, in_features, out_features): super().__init__() self.linear = nn.Linear(in_features, out_features) def forward(self, x): x = F.adaptive_max_pool2d(x, output_size=(1, 1)) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
Soo95/segmentation_models.pytorch
AUXModule
false
2,844
[ "MIT" ]
0
9131b336d6939dfabbadecd0d56d382283f46803
https://github.com/Soo95/segmentation_models.pytorch/tree/9131b336d6939dfabbadecd0d56d382283f46803
h_tanh
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed class h_tanh(nn.Module): def __init__(self, inplace=True, h_max=1): super(h_tanh, self).__init__() self.relu = nn.ReLU6(inplace=inplace) self.h_max = ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data...
SpectrePrediction/micronet
h_tanh
false
2,845
[ "MIT" ]
0
f56269c7a8744f750e9870f0baa9fb6e68f27b9c
https://github.com/SpectrePrediction/micronet/tree/f56269c7a8744f750e9870f0baa9fb6e68f27b9c
PolarNet
# 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 PolarNet(torch.nn.Module): def __init__(self, num_hid): super(PolarNet, self).__init__() self.layer1 = nn.Linear(2, num_hid) self.layer2 = nn.Linear(num_hid, 1) def forward(self, input): r = torch.sqrt(input[:, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.utils....
Spacider/comp9444_assignment
PolarNet
false
2,846
[ "Apache-2.0" ]
0
149db9a562c579d03b3ea06c9de2020c8f3ef310
https://github.com/Spacider/comp9444_assignment/tree/149db9a562c579d03b3ea06c9de2020c8f3ef310
Conv2dLayer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn from torch.nn import Parameter def l2normalize(v, eps=1e-12): return v / (v.norm() + eps) class LayerNorm(nn.Module): def __init__(self, num_features, eps=1e-08, affine=True): super(LayerNorm, self).__init__() self.num_features = num_features self....
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
Sheroa/Video_Colorization
Conv2dLayer
false
2,847
[ "MIT" ]
0
5c772ac0ec944814cd8be0a94b0746116b11ac01
https://github.com/Sheroa/Video_Colorization/tree/5c772ac0ec944814cd8be0a94b0746116b11ac01
NetLin
# 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.functional as F import torch.nn as nn class NetLin(nn.Module): def __init__(self): super(NetLin, self).__init__() self.liner1 = nn.Linear(28 * 28, 10) def forward(self, x): x = x.view(-1, 784) output = self.liner1(x) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Spacider/comp9444_assignment
NetLin
false
2,848
[ "Apache-2.0" ]
0
149db9a562c579d03b3ea06c9de2020c8f3ef310
https://github.com/Spacider/comp9444_assignment/tree/149db9a562c579d03b3ea06c9de2020c8f3ef310
EncModel
# 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 class EncModel(torch.nn.Module): def __init__(self, num_input, num_hid, num_out): super(EncModel, self).__init__() self.in_hid = torch.nn.Linear(num_input, num_hid) self.hid_out = torch.nn.Linear(num_hid, num_out) def forward(self, input): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.utils....
Spacider/comp9444_assignment
EncModel
false
2,849
[ "Apache-2.0" ]
0
149db9a562c579d03b3ea06c9de2020c8f3ef310
https://github.com/Spacider/comp9444_assignment/tree/149db9a562c579d03b3ea06c9de2020c8f3ef310
NetFull
# 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.functional as F import torch.nn as nn class NetFull(nn.Module): def __init__(self): super(NetFull, self).__init__() self.liner1 = nn.Linear(28 * 28, 400) self.liner2 = nn.Linear(400, 200) self.liner3 = nn.Linear(200, 10) de...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
Spacider/comp9444_assignment
NetFull
false
2,850
[ "Apache-2.0" ]
0
149db9a562c579d03b3ea06c9de2020c8f3ef310
https://github.com/Spacider/comp9444_assignment/tree/149db9a562c579d03b3ea06c9de2020c8f3ef310
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 def spectral_norm(layer, n_iters=1): return torch.nn.utils.spectral_norm(layer, n_power_iterations=n_iters) class UpsampleConv(nn.Module): def __init__(self, input_dim, output_dim, kernel_size=3, biases=True, spec_norm=False): super().__init__() se...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Sriram-Ravula/Inverse_Meta
UpsampleConv
false
2,851
[ "MIT" ]
0
c6c1e4ae0d670093156249c60d74373b22d61f01
https://github.com/Sriram-Ravula/Inverse_Meta/tree/c6c1e4ae0d670093156249c60d74373b22d61f01
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_...
Sriram-Ravula/Inverse_Meta
VarianceNorm2d
false
2,852
[ "MIT" ]
0
c6c1e4ae0d670093156249c60d74373b22d61f01
https://github.com/Sriram-Ravula/Inverse_Meta/tree/c6c1e4ae0d670093156249c60d74373b22d61f01
ResConv2dLayer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn from torch.nn import Parameter def l2normalize(v, eps=1e-12): return v / (v.norm() + eps) class LayerNorm(nn.Module): def __init__(self, num_features, eps=1e-08, affine=True): super(LayerNorm, self).__init__() self.num_features = num_features self....
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
Sheroa/Video_Colorization
ResConv2dLayer
false
2,853
[ "MIT" ]
0
5c772ac0ec944814cd8be0a94b0746116b11ac01
https://github.com/Sheroa/Video_Colorization/tree/5c772ac0ec944814cd8be0a94b0746116b11ac01
Attention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn class Attention(nn.Module): def __init__(self, encoder_dim, hidden_dim): super(Attention, self).__init__() self.hidden_lin = nn.Linear(hidden_dim, hidden_dim) self.tanh = nn.Tanh() self.img_lin = nn.Linear(encoder_dim, hidden_dim) self.so...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
Soumya1612-Rasha/Image-Captioning
Attention
false
2,854
[ "MIT" ]
0
63439754567ced2dbe762aed150ba5476029781c
https://github.com/Soumya1612-Rasha/Image-Captioning/tree/63439754567ced2dbe762aed150ba5476029781c
TransposeConv2dLayer
# 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 from torch.nn import Parameter def l2normalize(v, eps=1e-12): return v / (v.norm() + eps) class LayerNorm(nn.Module): def __init__(self, num_features, eps=1e-08, affine=True): super(LayerNorm, self).__init__() self.num_featu...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
Sheroa/Video_Colorization
TransposeConv2dLayer
false
2,855
[ "MIT" ]
0
5c772ac0ec944814cd8be0a94b0746116b11ac01
https://github.com/Sheroa/Video_Colorization/tree/5c772ac0ec944814cd8be0a94b0746116b11ac01
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 def spectral_norm(layer, n_iters=1): return torch.nn.utils.spectral_norm(layer, n_power_iterations=n_iters) class ConvMeanPool(nn.Module): def __init__(self, input_dim, output_dim, kernel_size=3, biases=True, adjust_padding=False, spec_norm=False): super()...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
Sriram-Ravula/ncsnv2
ConvMeanPool
false
2,856
[ "MIT" ]
0
f610b59441a34063fae1c02aa06837b7eec95c03
https://github.com/Sriram-Ravula/ncsnv2/tree/f610b59441a34063fae1c02aa06837b7eec95c03
Encoder
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn import torch.nn.functional as F class Encoder(nn.Module): """Estimation of the nonnegative mixture weight by a 1-D conv layer. """ def __init__(self, L, N): super(Encoder, self).__init__() self.L, self.N = L, N self.conv1d_U = nn.Conv1d(1, N, ker...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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_...
Stanwang1210/HW3_1_Source_Seperation
Encoder
false
2,857
[ "MIT" ]
0
8c05850fa4f0f0845c460f9afd06fd8fe3e29dc9
https://github.com/Stanwang1210/HW3_1_Source_Seperation/tree/8c05850fa4f0f0845c460f9afd06fd8fe3e29dc9
CombineSlices
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch import nn import torch.utils.data import torch.utils.data.distributed import torch.optim class CombineSlices(nn.Module): def __init__(self, slice_dim=2): super().__init__() self.slice_dim = slice_dim def forward(self, x): return torch.index_select(x, dim=self....
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn import torch.utils.data import torch.utils.data.distributed import torch.optim assert_size_stride = torch._C._dynamo.gu...
Samuel-van-Gurp/fastMRI
CombineSlices
false
2,858
[ "MIT" ]
0
0b1884a1c218961f81199144057ffcfde29a86ad
https://github.com/Samuel-van-Gurp/fastMRI/tree/0b1884a1c218961f81199144057ffcfde29a86ad
JS_div
# 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 JS_div(nn.Module): def __init__(self, margin=0.1): super(JS_div, self).__init__() self.margin = margin self.dist = nn.CosineSimilarity(dim=0) self.KLDivloss = nn.KLDivLoss(reduction='batchmean') 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 from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
Sun915/MCALN
JS_div
false
2,859
[ "MIT" ]
0
e52600fddc62922148480ab9dce6aefc1d3788eb
https://github.com/Sun915/MCALN/tree/e52600fddc62922148480ab9dce6aefc1d3788eb
GlobalAttention
# 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 GlobalAttention(nn.Module): def __init__(self, dims): super(GlobalAttention, self).__init__() self.pool = nn.AdaptiveAvgPool2d(1) self.conv = nn.Conv2d(dims, dims, 1) def forward(self, x, y): att = torch.sigmoid(self.conv(self.pool(x + ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
StefOe/selection-masks
GlobalAttention
false
2,860
[ "BSD-2-Clause" ]
0
e59487bffe3c30bdab7a6425bed01f6adeda4f67
https://github.com/StefOe/selection-masks/tree/e59487bffe3c30bdab7a6425bed01f6adeda4f67
GAT
# 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 from itertools import * from time import * class GraphAttentionLayer(nn.Module): """ Simple GAT layer, similar to https://arxiv.org/abs/1710.10903 图注意力层 input: (B,N,C_in) output: (B,N,C_out) """ def __init__(self, in_featu...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
Richard-LYF/SESS-GC
GAT
false
2,861
[ "MIT" ]
0
2280e5ec8e5c5e20d0bda629b7d05f61bad0bec7
https://github.com/Richard-LYF/SESS-GC/tree/2280e5ec8e5c5e20d0bda629b7d05f61bad0bec7
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_...
Sriram-Ravula/ncsnv2
InstanceNorm2dPlus
false
2,862
[ "MIT" ]
0
f610b59441a34063fae1c02aa06837b7eec95c03
https://github.com/Sriram-Ravula/ncsnv2/tree/f610b59441a34063fae1c02aa06837b7eec95c03
Cartesian
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch import nn import torch.utils.data import torch.utils.data.distributed import torch.optim class Cartesian(nn.Module): def forward(self, x): r, phi = x[..., 0], x[..., 1] return torch.stack((r * torch.cos(phi), r * torch.sin(phi)), dim=-1) def get_inputs(): return [tor...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math from torch import nn import torch.utils.data import torch.utils.data.dist...
Samuel-van-Gurp/fastMRI
Cartesian
false
2,863
[ "MIT" ]
0
0b1884a1c218961f81199144057ffcfde29a86ad
https://github.com/Samuel-van-Gurp/fastMRI/tree/0b1884a1c218961f81199144057ffcfde29a86ad
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 def spectral_norm(layer, n_iters=1): return torch.nn.utils.spectral_norm(layer, n_power_iterations=n_iters) class MeanPoolConv(nn.Module): def __init__(self, input_dim, output_dim, kernel_size=3, biases=True, spec_norm=False): super().__init__() se...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Sriram-Ravula/ncsnv2
MeanPoolConv
false
2,864
[ "MIT" ]
0
f610b59441a34063fae1c02aa06837b7eec95c03
https://github.com/Sriram-Ravula/ncsnv2/tree/f610b59441a34063fae1c02aa06837b7eec95c03