entry_point
stringlengths
1
65
original_triton_python_code
stringlengths
208
619k
optimised_triton_code
stringlengths
1.15k
275k
repo_name
stringlengths
7
115
module_name
stringlengths
1
65
synthetic
bool
1 class
uuid
int64
0
18.5k
licenses
listlengths
1
6
stars
int64
0
19.8k
sha
stringlengths
40
40
repo_link
stringlengths
72
180
MAECriterion
import torch class MAECriterion(torch.nn.Module): def __init__(self): super().__init__() def forward(self, pred, target): return torch.mean(torch.abs(pred - target)) def get_inputs(): return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math assert_size_stride = t...
Dolorousrtur/style-people
MAECriterion
false
8,004
[ "MIT" ]
15
c48b12b245cc50f8230c0654dffe40016f2a69f1
https://github.com/Dolorousrtur/style-people/tree/c48b12b245cc50f8230c0654dffe40016f2a69f1
FusionMul
from _paritybench_helpers import _mock_config import torch import torch.utils.data from torch import nn class FusionMul(nn.Module): def __init__(self, input_channels, cfg): super(FusionMul, self).__init__() def forward(self, im_x, ra_x): x = torch.mul(im_x, ra_x) return x def get_i...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._...
Singingkettle/SAF-FCOS
FusionMul
false
18,388
[ "BSD-2-Clause" ]
10
5d00b83d659552940025923460d02bb2db7d29e8
https://github.com/Singingkettle/SAF-FCOS/tree/5d00b83d659552940025923460d02bb2db7d29e8
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 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...
Tiamat-Tech/neurodiffeq
Swish
false
14,491
[ "MIT" ]
202
622827e5b9b65d285ebe36614fbdae68ba07f4dc
https://github.com/Tiamat-Tech/neurodiffeq/tree/622827e5b9b65d285ebe36614fbdae68ba07f4dc
GumbelQuantizer
import torch import torch.nn as nn from torch.nn import functional as F class GumbelQuantizer(nn.Module): def __init__(self, input_dim, num_latents, embedding_dim): super().__init__() self.embedding_dim = embedding_dim self.num_latents = num_latents self.proj = nn.Conv2d(input_dim...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
TobiasNorlund/vq-vae
GumbelQuantizer
false
5,920
[ "Apache-2.0" ]
1
bdfc35f35491e8d4877a13f7f84d6cbdcc69daa0
https://github.com/TobiasNorlund/vq-vae/tree/bdfc35f35491e8d4877a13f7f84d6cbdcc69daa0
LinModel
import torch import torch.nn as nn import torch.nn.functional as F class LinModel(nn.Module): def __init__(self, in_dim, out_dim): super(LinModel, self).__init__() self.linear = nn.Linear(in_dim, out_dim) def forward(self, x): out = self.linear(x) out = F.softmax(out, dim=-1)...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Lisennlp/distributed_train_pytorch
LinModel
false
17,578
[ "Apache-2.0" ]
10
da43ac6b5f4484b5f7bc92e3c778539b9017cb82
https://github.com/Lisennlp/distributed_train_pytorch/tree/da43ac6b5f4484b5f7bc92e3c778539b9017cb82
Model
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch.nn import Module from torch.nn.parameter import Parameter from torch.nn.modules import Module import torch.utils.data import torc...
FDecaYed/apex
Model
false
4,753
[ "BSD-3-Clause" ]
0
789afd89fe2c5a3e772f557055a9cf0f5e9d1241
https://github.com/FDecaYed/apex/tree/789afd89fe2c5a3e772f557055a9cf0f5e9d1241
MinimaxGeneratorLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
shi-weili/torchgan
MinimaxGeneratorLoss
false
12,978
[ "MIT" ]
0
28ffd4026b8c0db2217b667d30a222d6758bfc41
https://github.com/shi-weili/torchgan/tree/28ffd4026b8c0db2217b667d30a222d6758bfc41
StableBCELoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
toandaominh1997/understanding_cloud_organization
StableBCELoss
false
4,431
[ "MIT" ]
0
7da991ff3da557c18f4585c1b956ed799c104c7c
https://github.com/toandaominh1997/understanding_cloud_organization/tree/7da991ff3da557c18f4585c1b956ed799c104c7c
_ImpalaResBlock
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_s...
IBM/vsrl-framework
_ImpalaResBlock
false
8,273
[ "MIT" ]
44
42e0853bffb5efbb66cd97178aff9e10ad18c5a9
https://github.com/IBM/vsrl-framework/tree/42e0853bffb5efbb66cd97178aff9e10ad18c5a9
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 from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
YanLu-nyu/transferlearning
MultiHeadAttention
false
14,645
[ "MIT" ]
9,657
037806c6eb8b0c12aefbfbf3e35cbf893093cff9
https://github.com/YanLu-nyu/transferlearning/tree/037806c6eb8b0c12aefbfbf3e35cbf893093cff9
BCEDiceLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
NajusAnaxi/UNet-based-for-Brain-Tumor-Segmentation
BCEDiceLoss
false
11,735
[ "MIT" ]
0
24ca4432873f145ad33810f40c851ac10bf030fa
https://github.com/NajusAnaxi/UNet-based-for-Brain-Tumor-Segmentation/tree/24ca4432873f145ad33810f40c851ac10bf030fa
Block
import torch from torch import nn def drop_path(x, drop_prob: 'float'=0.0, training: 'bool'=False): """Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks). This is the same as the DropConnect impl I created for EfficientNet, etc networks, however, the original name is ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
JetRunner/PaSST-EE
Block
false
11,566
[ "Apache-2.0" ]
0
2ff8f4fd0e9c1868856d08147e6e3cf1c1bed68c
https://github.com/JetRunner/PaSST-EE/tree/2ff8f4fd0e9c1868856d08147e6e3cf1c1bed68c
CategoricalDQN
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
tegg89/categorical_dqn
CategoricalDQN
false
4,416
[ "MIT" ]
0
647c24ee4734450551fc446d3225f57dadd82d48
https://github.com/tegg89/categorical_dqn/tree/647c24ee4734450551fc446d3225f57dadd82d48
Mlp
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 import ...
denisleonov/pytorch-CycleGAN-and-pix2pix
Mlp
false
12,266
[ "BSD-3-Clause" ]
0
d1a5f0c5911f70ed896f826619b4067ce737a83d
https://github.com/denisleonov/pytorch-CycleGAN-and-pix2pix/tree/d1a5f0c5911f70ed896f826619b4067ce737a83d
GaussianSmearing
# 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 triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_...
lsnty5190/torchmd-net
GaussianSmearing
false
15,962
[ "MIT" ]
51
0bedf43801f0c7d38900d8e1db778fe69f3a4d01
https://github.com/lsnty5190/torchmd-net/tree/0bedf43801f0c7d38900d8e1db778fe69f3a4d01
BasicModel_ConvNet_MaxPool3d
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
YNNEKUW/captum
BasicModel_ConvNet_MaxPool3d
false
12,014
[ "BSD-3-Clause" ]
0
c8b5357b21f2ddf440e5f0ce25635977292aa5d1
https://github.com/YNNEKUW/captum/tree/c8b5357b21f2ddf440e5f0ce25635977292aa5d1
UpsampleConv
import torch import torch.nn as nn class UpsampleConv(nn.Module): def __init__(self, input_dim, output_dim, kernel_size=3, biases=True): super().__init__() self.conv = nn.Conv2d(input_dim, output_dim, kernel_size, stride=1, padding=kernel_size // 2, bias=biases) self.pixelshuf...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
samsartor/score_sde
UpsampleConv
false
7,598
[ "Apache-2.0" ]
1
d25c8d092a68d643c796d771c55f80075aa041d1
https://github.com/samsartor/score_sde/tree/d25c8d092a68d643c796d771c55f80075aa041d1
CR
import torch from typing import List from typing import Union import torch.nn as nn def autopad(kernel_size: 'Union[int, List[int]]', padding: 'Union[int, None]'=None) ->Union[int, List[int]]: """Auto padding calculation for pad='same' in TensorFlow.""" if isinstance(kernel_size, int): kernel_size...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from typing import List from ...
bcaitech1/p4-mod-model_diet
CR
false
6,322
[ "MIT" ]
1
36d8a747e12c375b07d132ed4d08f9fc77126a8b
https://github.com/bcaitech1/p4-mod-model_diet/tree/36d8a747e12c375b07d132ed4d08f9fc77126a8b
channel_selection
import torch import torch.nn as nn class channel_selection(nn.Module): def __init__(self, num_channels): """ Initialize the `indexes` with all one vector with the length same as the number of channels. During pruning, the places in `indexes` which correpond to the channels to be pruned wi...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
Cydia2018/ViT-cifar10-pruning
channel_selection
false
7,927
[ "MIT" ]
18
7de250edb8639094355b86e19c8303e635ade026
https://github.com/Cydia2018/ViT-cifar10-pruning/tree/7de250edb8639094355b86e19c8303e635ade026
InnerProductLayer
import torch import torch.nn as nn class InnerProductLayer(nn.Module): """InnerProduct Layer used in PNN that compute the element-wise product or inner product between feature vectors. """ def __init__(self, num_feature_field, device): """ Args: num_feature_field(int) :nu...
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...
MIracleyin/RecBole-notebook
InnerProductLayer
false
9,568
[ "MIT" ]
0
ef32b3e57a297ff4889dec1f63c7984f8f901a23
https://github.com/MIracleyin/RecBole-notebook/tree/ef32b3e57a297ff4889dec1f63c7984f8f901a23
BlockWidth1d
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data import torch.nn as nn assert_size_stride = torch._C._dyn...
ishine/HiFiplusplus-pytorch
BlockWidth1d
false
15,613
[ "MIT" ]
69
8be0d0e0092d4f609c37bfbeede5a9ad9bd7470a
https://github.com/ishine/HiFiplusplus-pytorch/tree/8be0d0e0092d4f609c37bfbeede5a9ad9bd7470a
SigmoidModel
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
archydeberker/captum
SigmoidModel
false
9,758
[ "BSD-3-Clause" ]
0
2d72a060f12f5e325c9d1c411a2ef69bf43a06fd
https://github.com/archydeberker/captum/tree/2d72a060f12f5e325c9d1c411a2ef69bf43a06fd
ImageEncoderV3
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_s...
KH-Kyle/rmp_nav
ImageEncoderV3
false
8,773
[ "MIT" ]
30
d598fe70664a4cdc0e9b9dd4b52e84aa3de1b551
https://github.com/KH-Kyle/rmp_nav/tree/d598fe70664a4cdc0e9b9dd4b52e84aa3de1b551
ConvEncoder
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn from ty...
jondeaton/AgarAI
ConvEncoder
false
6,986
[ "MIT" ]
1
0c60896465a969ba6832a4b417cf6199715799a1
https://github.com/jondeaton/AgarAI/tree/0c60896465a969ba6832a4b417cf6199715799a1
EqualLinear
import torch from torch import nn from math import sqrt def equal_lr(module, name='weight'): EqualLR.apply(module, name) return module class EqualLR: def __init__(self, name): self.name = name def compute_weight(self, module): weight = getattr(module, self.name + '_orig') f...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn from math import sqrt assert_size_stride = torch._C._dynamo...
KUMartin77/AAA738_StyleGAN_pytorch
EqualLinear
false
11,606
[ "BSD-2-Clause" ]
0
ed0689102c922d336f53e374e8be2ab532a84ccd
https://github.com/KUMartin77/AAA738_StyleGAN_pytorch/tree/ed0689102c922d336f53e374e8be2ab532a84ccd
Znorm
import torch import typing import torch.optim def dims(tensor: 'torch.Tensor', start_index: 'int'=1) ->torch.Tensor: return torch.Tensor([tensor.size()[start_index:]]).squeeze() class Znorm(torch.nn.Module): def __init__(self, dims: 'typing.Sequence[int]'): super(Znorm, self).__init__() sel...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import typing import torch.optim assert_size_stride = torch._C._dynamo.guards.a...
ai-in-motion/moai
Znorm
false
18,345
[ "Apache-2.0" ]
10
e38cac046c059d2e2331ef4883bbabc5a500a5cf
https://github.com/ai-in-motion/moai/tree/e38cac046c059d2e2331ef4883bbabc5a500a5cf
SphericalBesselBasis
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...
Open-Catalyst-Project/baselines
SphericalBesselBasis
false
17,804
[ "MIT" ]
10
89948582edfb8debb736406d54db9813a5f2c88d
https://github.com/Open-Catalyst-Project/baselines/tree/89948582edfb8debb736406d54db9813a5f2c88d
MaxPool
import torch import torch.utils.data import torch.nn as nn from torch import optim as optim import torch.nn.parallel class MaxPool(nn.Module): def __init__(self, kernel_size, stride=1, padding=1, zero_pad=False): super(MaxPool, self).__init__() self.zero_pad = nn.ZeroPad2d((1, 0, 1, 0)) if zero_p...
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.utils.data import torch.nn as nn from torch import optim as optim import tor...
Exir-lxr/crldr-prune-pytorch
MaxPool
false
2,276
[ "Apache-2.0" ]
0
adeb5e0b24ce66ff9531d4d947f72412c1b5c033
https://github.com/Exir-lxr/crldr-prune-pytorch/tree/adeb5e0b24ce66ff9531d4d947f72412c1b5c033
SelfAttentionBatch
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
RUCAIBox/WSDM2022-C2CRS
SelfAttentionBatch
false
17,847
[ "MIT" ]
4
8ef2fa7c44bdba1799ab79f379ae7394bd468c02
https://github.com/RUCAIBox/WSDM2022-C2CRS/tree/8ef2fa7c44bdba1799ab79f379ae7394bd468c02
Net
import torch import torch.nn as nn import torch.utils class Net(nn.Module): def __init__(self, n_inputs, n_units=50): super(Net, self).__init__() self.fc = nn.Linear(n_inputs, n_units) self.out = nn.Linear(n_units, 1) def forward(self, x): x = torch.tanh(self.fc(x)) r...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
MSU-MLSys-Lab/CATE
Net
false
8,526
[ "Apache-2.0" ]
15
654c393d7df888d2c3f3b90f9e6752faa061157e
https://github.com/MSU-MLSys-Lab/CATE/tree/654c393d7df888d2c3f3b90f9e6752faa061157e
GatAttention
import torch import torch.nn.functional as F import torch.nn as nn from torch.nn import Parameter class ConstAttention(nn.Module): def __init__(self, **kwargs): super(ConstAttention, self).__init__() def forward(self, neighbor_vecs, self_vecs): return 1 class GatAttention(ConstAttention): ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from torch.nn import Parameter assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = to...
GraphNAS/GraphNAS
GatAttention
false
13,733
[ "Apache-2.0" ]
94
b4f05bb10b8b96bb9e82344bfae36a23db2431a6
https://github.com/GraphNAS/GraphNAS/tree/b4f05bb10b8b96bb9e82344bfae36a23db2431a6
ConcatSquashConv2d
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dyn...
musyoku/ffjord
ConcatSquashConv2d
false
7,301
[ "MIT" ]
1
9e431e122e59fa9a71f3f301dec8fdd3db51e0ce
https://github.com/musyoku/ffjord/tree/9e431e122e59fa9a71f3f301dec8fdd3db51e0ce
SimpleDropoutOptimizer
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
ArronHZG/ABD-Net
SimpleDropoutOptimizer
false
9,587
[ "MIT" ]
0
4f6d15f4d389a55549ea10a2e00d4a5cdecb5753
https://github.com/ArronHZG/ABD-Net/tree/4f6d15f4d389a55549ea10a2e00d4a5cdecb5753
stage_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 from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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.onnx import torc...
IrohXu/Infant-Pose-pytorch
stage_block
false
5,374
[ "MIT" ]
1
148c43fbfefe06ec2fffa7055049c3ff341154f8
https://github.com/IrohXu/Infant-Pose-pytorch/tree/148c43fbfefe06ec2fffa7055049c3ff341154f8
CNNEncoder
import torch import torch.nn as nn from torch.nn import functional as F class CNNEncoder(nn.Module): def __init__(self, out_channels: 'int', kernel_size: 'tuple'): super(CNNEncoder, self).__init__() self.cnn_encoder = nn.Conv2d(in_channels=1, out_channels= out_channels, kernel_size=ke...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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_...
OwenLeng/Early-Detection-of-Fake-News-on-Social-Media-Through-Propagation-Path-Classification-with-pytorch-
CNNEncoder
false
8,612
[ "MIT" ]
38
39f8b7508240ebf58a3cdcf69fbb838a4239e0e5
https://github.com/OwenLeng/Early-Detection-of-Fake-News-on-Social-Media-Through-Propagation-Path-Classification-with-pytorch-/tree/39f8b7508240ebf58a3cdcf69fbb838a4239e0e5
ycbcr_to_rgb_jpeg
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import numpy as np import torch.nn as nn assert_size_stride = torch._C._dynamo.g...
mlomnitz/DifferentiableJPEG
ycbcr_to_rgb_jpeg
false
16,100
[ "MIT" ]
86
a5767feba955a1bcb78600135a09c36a806f6249
https://github.com/mlomnitz/DifferentiableJPEG/tree/a5767feba955a1bcb78600135a09c36a806f6249
LNN
import math import torch from torch.nn import functional as F import torch.utils.data class LNN(torch.nn.Module): """ A pytorch implementation of LNN layer Input shape - A 3D tensor with shape: ``(batch_size,field_size,embedding_size)``. Output shape - 2D tensor with shape:``(batch_siz...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
jqsl2012/pytorch-fm
LNN
false
10,373
[ "MIT" ]
0
de6240d0a17750303bbc97dba676b667c3a27829
https://github.com/jqsl2012/pytorch-fm/tree/de6240d0a17750303bbc97dba676b667c3a27829
LabelSmoothingLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
Chizuchizu/riadd
LabelSmoothingLoss
false
4,998
[ "MIT" ]
1
c3f55aebc0f582d9fa55dc517b1489963cf0506f
https://github.com/Chizuchizu/riadd/tree/c3f55aebc0f582d9fa55dc517b1489963cf0506f
AddPositionEmb
import torch from typing import Sequence import torch.nn as nn import torch._C import torch.serialization import torch.nn.parallel class AddPositionEmb(nn.Module): """Module to add position embedding to input features """ def __init__(self, dim=384, spatial_shape=[14, 14]): super().__init__() ...
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 typing import Sequence import torch.nn as nn import torch._C import torch.serialization import torch.nn.parallel assert_size_stride = t...
dumpmemory/poolformer
AddPositionEmb
false
15,273
[ "Apache-2.0" ]
677
d108be054469da760141f4789bf87c915c4fd0b2
https://github.com/dumpmemory/poolformer/tree/d108be054469da760141f4789bf87c915c4fd0b2
MsgNorm
import torch import torch.nn.functional as F class MsgNorm(torch.nn.Module): def __init__(self, learn_msg_scale=False): super(MsgNorm, self).__init__() self.msg_scale = torch.nn.Parameter(torch.Tensor([1.0]), requires_grad=learn_msg_scale) def forward(self, x, msg, p=2): ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice assert_size_stride = torch._...
LMZimmer/nasbench301
MsgNorm
false
9,221
[ "Apache-2.0" ]
0
3329d24a41765e87ac7ebf91fbf38269beeda822
https://github.com/LMZimmer/nasbench301/tree/3329d24a41765e87ac7ebf91fbf38269beeda822
BertLMPredictionHead
from _paritybench_helpers import _mock_config import math import torch import torch.nn as nn def gelu(x): """Implementation of the gelu activation function. For information: OpenAI GPT's gelu is slightly different (and gives slightly different results): 0.5 * x * (1 + torch.tanh(math.sqrt(2 / math...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
minjoong507/Image-Captioning-Transformer
BertLMPredictionHead
false
7,248
[ "MIT" ]
1
813060f0bb656e336154173f11e99a80362c8c2a
https://github.com/minjoong507/Image-Captioning-Transformer/tree/813060f0bb656e336154173f11e99a80362c8c2a
mlp
import torch from torch import nn class mlp(nn.Module): def __init__(self, in_feature, **kwargs): super().__init__() self.in_feature = in_feature self.relu = nn.ReLU() self.linear1 = nn.Linear(in_feature, in_feature) self.dropout1 = nn.Dropout(p=0.3) self.linear2 =...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
EuphoriaYan/sales_pred
mlp
false
2,221
[ "MIT" ]
0
cc39c32a3387285f3561aeeea7a133810069dc98
https://github.com/EuphoriaYan/sales_pred/tree/cc39c32a3387285f3561aeeea7a133810069dc98
BiDAFSelfAttention
import torch import torch.nn as nn import torch.nn.functional as F def masked_softmax(logits, mask, dim=-1, log_softmax=False): """Take the softmax of `logits` over given dimension, and set entries to 0 wherever `mask` is 0. Args: logits (torch.Tensor): Inputs to the softmax function. mas...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
melaniezhang/cs224n-final-proj
BiDAFSelfAttention
false
12,786
[ "MIT" ]
0
a012759e8caf4d585421d78c07125fa3696fda4e
https://github.com/melaniezhang/cs224n-final-proj/tree/a012759e8caf4d585421d78c07125fa3696fda4e
ReLUBoundToPOTNet
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch.nn import ReLU fro...
elad-c/model_optimization
ReLUBoundToPOTNet
false
10,660
[ "Apache-2.0" ]
0
b0ecf41c3f9434008d57d7fe724ff8585e19d4cc
https://github.com/elad-c/model_optimization/tree/b0ecf41c3f9434008d57d7fe724ff8585e19d4cc
MovingAvg
import torch import torch.nn as nn import torch.fft class MovingAvg(nn.Module): """Moving average block to highlight the trend of time series.""" def __init__(self, kernel_size, stride): super(MovingAvg, self).__init__() self.kernel_size = kernel_size self.avg = nn.AvgPool1d(kernel_si...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.fft assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo...
jianzhnie/TsFormer
MovingAvg
false
3,722
[ "Apache-2.0" ]
0
47e362f02445ba00d5ab8db206667767e72faca7
https://github.com/jianzhnie/TsFormer/tree/47e362f02445ba00d5ab8db206667767e72faca7
BaseFactorizationMachine
import torch import torch.nn as nn class BaseFactorizationMachine(nn.Module): """Calculate FM result over the embeddings Args: reduce_sum: bool, whether to sum the result, default is True. Input: input_x: tensor, A 3D tensor with shape:``(batch_size,field_size,embed_dim)``. Output ...
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...
dreaming-qin/RecBole
BaseFactorizationMachine
false
12,314
[ "MIT" ]
0
d6de39521484ded60c387ca604abaf86310acdbe
https://github.com/dreaming-qin/RecBole/tree/d6de39521484ded60c387ca604abaf86310acdbe
VAE
import torch import torch.utils.data import torch.nn as nn import torch.nn.functional as F class Decoder(nn.Module): """ VAE decoder """ def __init__(self, img_channels, latent_size): super(Decoder, self).__init__() self.latent_size = latent_size self.img_channels = img_channels ...
import torch from torch import device from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from...
benedictquartey/modified-wm
VAE
false
3,221
[ "MIT" ]
0
bc6cab1aadff24f4be8bb7b9c183b6ef266cf8ba
https://github.com/benedictquartey/modified-wm/tree/bc6cab1aadff24f4be8bb7b9c183b6ef266cf8ba
L2N
import torch import torch.nn as nn class L2N(nn.Module): def __init__(self, eps=1e-06): super(L2N, self).__init__() self.eps = eps def forward(self, x): return x / (torch.norm(x, p=2, dim=1, keepdim=True) + self.eps ).expand_as(x) def __repr__(self): return s...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
SIJIEJI/2020-ai-meets-beauty_ntubeauty
L2N
false
5,805
[ "MIT" ]
1
fede564fb3e3029f3fadfe107484c5c7e39c29c5
https://github.com/SIJIEJI/2020-ai-meets-beauty_ntubeauty/tree/fede564fb3e3029f3fadfe107484c5c7e39c29c5
UnaryPrimitivesToyotaJoint
import math import torch from torch import nn class Normalize(nn.Module): def __init__(self, distribution=None, **kwargs): super().__init__() self.distribution = distribution self.data_ = [] if distribution is None: pass elif distribution == 'normal': ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guard...
C-SUNSHINE/TOQ-Nets-PyTorch-Release
UnaryPrimitivesToyotaJoint
false
17,154
[ "MIT" ]
6
05e06bf633fb3c6b610dda9a5126ecd7af1db02f
https://github.com/C-SUNSHINE/TOQ-Nets-PyTorch-Release/tree/05e06bf633fb3c6b610dda9a5126ecd7af1db02f
MatrixVectorScaledDotProductAttention
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
michiyasunaga/GreaseLM
MatrixVectorScaledDotProductAttention
false
16,056
[ "MIT" ]
76
596aa5047841e3e97730f621a2e4576772733df2
https://github.com/michiyasunaga/GreaseLM/tree/596aa5047841e3e97730f621a2e4576772733df2
Rotate
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
Hayoung93/UDA
Rotate
false
959
[ "Apache-2.0" ]
0
a587b01c76141d64e7cead55b62e0f3ed75890bf
https://github.com/Hayoung93/UDA/tree/a587b01c76141d64e7cead55b62e0f3ed75890bf
Critic
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import numpy as np import tor...
Jeyhooon/deep-reinforcement-learning
Critic
false
651
[ "MIT" ]
0
7a6f1974493a2058635539a4868512cdf3fb5bdb
https://github.com/Jeyhooon/deep-reinforcement-learning/tree/7a6f1974493a2058635539a4868512cdf3fb5bdb
ResNetClassifier
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
Starrah/THU-SuperMoon
ResNetClassifier
false
14,431
[ "MIT" ]
64
1e6b8ccc207f789fb8426806251cc3d4e1cca35a
https://github.com/Starrah/THU-SuperMoon/tree/1e6b8ccc207f789fb8426806251cc3d4e1cca35a
LayerNorm
import torch import torch.nn as nn import torch.utils.data class LayerNorm(nn.Module): """ LayerNorm that supports inputs of size B, C, T """ def __init__(self, num_channels, eps=1e-05, affine=True, device=None, dtype=None): super().__init__() factory_kwargs = {'device': devic...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dy...
yjh0410/actionformer_release
LayerNorm
false
16,764
[ "MIT" ]
61
7a97422111d3e29c8d2e14088c850c6975855ea7
https://github.com/yjh0410/actionformer_release/tree/7a97422111d3e29c8d2e14088c850c6975855ea7
Upscale2d
import torch import torch.nn as nn def upscale2d(x, factor=2, gain=1): assert x.dim() == 4 if gain != 1: x = x * gain if factor != 1: shape = x.shape x = x.view(shape[0], shape[1], shape[2], 1, shape[3], 1).expand(-1, -1, -1, factor, -1, factor) x = x.contiguous...
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...
AleksiKnuutila/ganspace
Upscale2d
false
1,921
[ "Apache-2.0" ]
0
23471a07c8b0d693fa7f1f2dfbb8b34ce22d9d38
https://github.com/AleksiKnuutila/ganspace/tree/23471a07c8b0d693fa7f1f2dfbb8b34ce22d9d38
DiscriminatorLoss
import torch from torch import nn class DiscriminatorLoss(nn.Module): """ Discriminator (BCE) loss function Args: - None - """ def __init__(self): super().__init__() self.adv_criterion = nn.BCEWithLogitsLoss() def forward(self, fake_pred, real_pred): fake_tar...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math from torch ...
akanametov/pathgan
DiscriminatorLoss
false
18,296
[ "MIT" ]
8
d93464a9c2490532afdf7bbc0f60decdf2d0767d
https://github.com/akanametov/pathgan/tree/d93464a9c2490532afdf7bbc0f60decdf2d0767d
ReCoNet
import torch import numpy as np class SelectiveLoadModule(torch.nn.Module): """Only load layers in trained models with the same name.""" def __init__(self): super(SelectiveLoadModule, self).__init__() def forward(self, x): return x def load_state_dict(self, state_dict): """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 from torch._inductor.runtime....
irsisyphus/reconet
ReCoNet
false
15,631
[ "MIT" ]
56
863acf8dde4d45c8521634af27878fe04f3b2e56
https://github.com/irsisyphus/reconet/tree/863acf8dde4d45c8521634af27878fe04f3b2e56
Net
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as tnn assert...
Exusial/jittor
Net
false
13,674
[ "Apache-2.0" ]
2,571
eca21d5bba5098bce4f492fa44908677b6e76588
https://github.com/Exusial/jittor/tree/eca21d5bba5098bce4f492fa44908677b6e76588
KLMutualLoss
import torch import torch.nn as nn class KLMutualLoss(nn.Module): def __init__(self): super(KLMutualLoss, self).__init__() self.kl_loss = nn.KLDivLoss(size_average=False) self.log_softmax = nn.functional.log_softmax self.softmax = nn.functional.softmax def forward(self, pred1...
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...
LT1st/ReID_Alined_beginer
KLMutualLoss
false
13,990
[ "MIT" ]
370
1a12403a32d99900451ac05cd3623a9b770f6d24
https://github.com/LT1st/ReID_Alined_beginer/tree/1a12403a32d99900451ac05cd3623a9b770f6d24
ShapedSineModel
# 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 triton import triton.language 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.utils.data assert_size_stride = torch._C._dynamo.guards.asse...
bechtle/LearningToLearn
ShapedSineModel
false
3,267
[ "MIT" ]
0
52eed5359e8a42bd99abe1df554a3b035dd3e2d2
https://github.com/bechtle/LearningToLearn/tree/52eed5359e8a42bd99abe1df554a3b035dd3e2d2
Fusion2_MinusFCLayer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
RUCAIBox/WSDM2022-C2CRS
Fusion2_MinusFCLayer
false
17,842
[ "MIT" ]
4
8ef2fa7c44bdba1799ab79f379ae7394bd468c02
https://github.com/RUCAIBox/WSDM2022-C2CRS/tree/8ef2fa7c44bdba1799ab79f379ae7394bd468c02
Zero
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
BayesWatch/pytorch-prunes
Zero
false
13,392
[ "MIT" ]
143
bc85a5c52865a2daf515ad4d3c26dcab88e3d941
https://github.com/BayesWatch/pytorch-prunes/tree/bc85a5c52865a2daf515ad4d3c26dcab88e3d941
DiceBCELoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math from torch ...
Michaelistaken/PathPretrain
DiceBCELoss
false
839
[ "MIT" ]
0
650b7eb02e67f6d864d81808eb7230c48fe6946a
https://github.com/Michaelistaken/PathPretrain/tree/650b7eb02e67f6d864d81808eb7230c48fe6946a
Network
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
chathurawidanage/cylon
Network
false
3,276
[ "Apache-2.0" ]
0
ac61b7a50880138fe67de21adee208016a94979a
https://github.com/chathurawidanage/cylon/tree/ac61b7a50880138fe67de21adee208016a94979a
SetConv
import torch import torch.nn as nn import torch.nn.functional as F class SetConv(nn.Module): def __init__(self, sample_feats, predicate_feats, predicate_uri_feats, join_feats, hid_units): super(SetConv, self).__init__() self.sample_mlp1 = nn.Linear(sample_feats, hid_units) self.sa...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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_...
dacasals/learnedcardinalities
SetConv
false
1,791
[ "MIT" ]
0
ee9741ce1a7b55ed18c33fbd6047484e50068037
https://github.com/dacasals/learnedcardinalities/tree/ee9741ce1a7b55ed18c33fbd6047484e50068037
PermEqui1_mean
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
haoruilee/DeepSets
PermEqui1_mean
false
15,491
[ "Apache-2.0" ]
213
b405dd6b51a34fb1ef622e25e6685b417b7b7cbb
https://github.com/haoruilee/DeepSets/tree/b405dd6b51a34fb1ef622e25e6685b417b7b7cbb
InceptionA
import torch import torch.nn.functional as F import torch.nn as nn class InceptionA(nn.Module): def __init__(self, in_channels): super(InceptionA, self).__init__() self.branch1x1 = nn.Conv2d(in_channels, 16, kernel_size=1) self.branch5x5_1 = nn.Conv2d(in_channels, 16, kernel_size=1) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
HuangCongQing/pytorch
InceptionA
false
8,237
[ "MIT" ]
12
2b2b01d74b45cbe4e467da229798609e79cec97c
https://github.com/HuangCongQing/pytorch/tree/2b2b01d74b45cbe4e467da229798609e79cec97c
TripletLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
MikeLagunes/Supervised-Triplet-Network
TripletLoss
false
17,713
[ "MIT" ]
6
575bcaf8f17affb0ff0e93212dde0f3f634c196f
https://github.com/MikeLagunes/Supervised-Triplet-Network/tree/575bcaf8f17affb0ff0e93212dde0f3f634c196f
RegLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch import nn i...
kuanhungchen/CenterNet-HarDNet
RegLoss
false
15,864
[ "MIT" ]
164
050d55a532706d989105982c5bc10f1c89edc8d2
https://github.com/kuanhungchen/CenterNet-HarDNet/tree/050d55a532706d989105982c5bc10f1c89edc8d2
DiceLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
ivadomed-profile-analysis-project/ivadomed
DiceLoss
false
15,643
[ "MIT" ]
87
3b53e2cb2b210511943da439401e2471fd387876
https://github.com/ivadomed-profile-analysis-project/ivadomed/tree/3b53e2cb2b210511943da439401e2471fd387876
openai_critic
import torch import torch.nn as nn class openai_critic(nn.Module): def __init__(self, obs_shape_n, action_shape_n): super(openai_critic, self).__init__() self.LReLU = nn.LeakyReLU(0.01) self.linear_c1 = nn.Linear(action_shape_n + obs_shape_n, 128) self.linear_c2 = nn.Linear(128, 6...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
FlickerNiko/ai_lib
openai_critic
false
13,703
[ "MIT" ]
99
7087d4569c9a827d35dd8735b55a080834d31a82
https://github.com/FlickerNiko/ai_lib/tree/7087d4569c9a827d35dd8735b55a080834d31a82
UpsampleConv2d
from torch.nn import Module import math import torch from torchvision.datasets import * import torch.nn.functional as F from torch.nn.parameter import Parameter from torch.nn import Parameter from torch.nn.modules.utils import _pair from torchvision.transforms import * class UpsampleConv2d(Module): """ To avo...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch.nn import Module import math from torchvision.datasets import * from ...
Womcos/SCARF
UpsampleConv2d
false
5,984
[ "MIT" ]
1
b90251bc23410cb810a7082ca75147a7aae21dec
https://github.com/Womcos/SCARF/tree/b90251bc23410cb810a7082ca75147a7aae21dec
SubtractMedian
import torch import torch.nn as nn class SubtractMedian(nn.Module): """ Subtracts the median over the last axis. """ def forward(self, x): return x - x.median(-1, keepdim=True).values 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
CPJKU/kagglebirds2020
SubtractMedian
false
17,045
[ "MIT" ]
4
f86b459389b1d0b0af96ebc9252ffc8496c272e8
https://github.com/CPJKU/kagglebirds2020/tree/f86b459389b1d0b0af96ebc9252ffc8496c272e8
Downsample
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
DavidRuhe/simple-variational-diffusion-models
Downsample
false
17,221
[ "MIT" ]
4
a32355bf052a8f08e9c1919080588d0b22c8de4e
https://github.com/DavidRuhe/simple-variational-diffusion-models/tree/a32355bf052a8f08e9c1919080588d0b22c8de4e
PixelNorm
import torch from torch import nn class PixelNorm(nn.Module): def __init__(self): super().__init__() def forward(self, input): return input * torch.rsqrt(torch.mean(input ** 2, dim=1, keepdim= True) + 1e-08) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
ArashVahabpour/encoder4editing
PixelNorm
false
1,963
[ "MIT" ]
0
819b90ecd7397fbe2ab7cb30eb451dab0f3149fd
https://github.com/ArashVahabpour/encoder4editing/tree/819b90ecd7397fbe2ab7cb30eb451dab0f3149fd
MiniBatchStdDev
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
davidleonfdez/face2anime
MiniBatchStdDev
false
1,805
[ "MIT" ]
0
896bf85a7aa28322cc9e9e586685db8cbbf39d89
https://github.com/davidleonfdez/face2anime/tree/896bf85a7aa28322cc9e9e586685db8cbbf39d89
TransformerBlock
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math im...
haophancs/TREQS
TransformerBlock
false
15,519
[ "MIT" ]
149
49e354ce2a08cf963ec139d99936020e0f80ced8
https://github.com/haophancs/TREQS/tree/49e354ce2a08cf963ec139d99936020e0f80ced8
Classify
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
JuliannaChaykina/social-distance
Classify
false
2,433
[ "Apache-2.0" ]
0
1c8ade043254b78de49a1244d438203ddb38c586
https://github.com/JuliannaChaykina/social-distance/tree/1c8ade043254b78de49a1244d438203ddb38c586
FociDetector
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
bharath272/centrosome-analysis
FociDetector
false
6,340
[ "MIT" ]
1
6ae3744be464812b3767909420d7b78cea9da670
https://github.com/bharath272/centrosome-analysis/tree/6ae3744be464812b3767909420d7b78cea9da670
Downsampler
import torch import numpy as np import torch.nn as nn import torch.nn.functional as F def bilinear_kernel(size, normalize=False): """ Make a 2D bilinear kernel suitable for upsampling/downsampling with normalize=False/True. The kernel is size x size square. Take size: kernel size (square) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import numpy as np import torch.nn as nn import torch.nn.functional as F assert_...
Global19/revolver
Downsampler
false
13,732
[ "BSD-2-Clause" ]
151
200082798d862516de6d9aa18e863a5968127a3f
https://github.com/Global19/revolver/tree/200082798d862516de6d9aa18e863a5968127a3f
SRB
import torch import torch.nn as nn import torch.utils.model_zoo class SRB(nn.Module): def __init__(self): super(SRB, self).__init__() self.conv1 = nn.Conv2d(3, 64, 9, padding=4) self.conv2 = nn.Conv2d(64, 32, 5, padding=2) self.conv3 = nn.Conv2d(32, 3, 5, padding=2) self.a...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
JiahangGu/RFN
SRB
false
17,480
[ "MIT" ]
4
8f7b33e22bb0a9f4057476720e05cc694a46ec00
https://github.com/JiahangGu/RFN/tree/8f7b33e22bb0a9f4057476720e05cc694a46ec00
CeCriterion
import torch import torch.nn.functional as F from torch.nn.modules.loss import _Loss from torch.optim.lr_scheduler import * class Criterion(_Loss): def __init__(self, alpha=1.0, name='criterion'): super().__init__() """Alpha is used to weight each loss term """ self.alpha = alpha ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch.nn.modules....
kiminh/mt-dnn
CeCriterion
false
7,025
[ "MIT" ]
1
133884b380244dbe74acc4d7507e551b2c5035b3
https://github.com/kiminh/mt-dnn/tree/133884b380244dbe74acc4d7507e551b2c5035b3
MLP
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
AllenPu/DomainBed
MLP
false
1,941
[ "MIT" ]
0
77519d71471e67f0356134abe0bf01a6dd2fdcfa
https://github.com/AllenPu/DomainBed/tree/77519d71471e67f0356134abe0bf01a6dd2fdcfa
WeightedBCEWithLogitsLoss
import torch import torch.utils.data import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel class WeightedBCEWithLogitsLoss(nn.Module): """Weighted binary cross-entropy with logits. """ def __init__(self, size_average=True, reduce=True, eps=0.0): super().__init__() ...
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...
HarshSulakhe/pytorch_connectomics
WeightedBCEWithLogitsLoss
false
9,863
[ "MIT" ]
0
73402e654afde69a43a5836cc90a32ef75c75dc2
https://github.com/HarshSulakhe/pytorch_connectomics/tree/73402e654afde69a43a5836cc90a32ef75c75dc2
SKL
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
lonePatient/TorchBlocks
SKL
false
15,960
[ "MIT" ]
82
4a65d746cc8a396cb7df73ed4644d97ddf843e29
https://github.com/lonePatient/TorchBlocks/tree/4a65d746cc8a396cb7df73ed4644d97ddf843e29
MaxPool2d
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import numpy as np import torch.nn as nn from numbers import N...
THAKAORI/SalsaNext
MaxPool2d
false
11,909
[ "MIT" ]
0
855cd7e9ebb83ee62538ba4753a011ada7bbfb6c
https://github.com/THAKAORI/SalsaNext/tree/855cd7e9ebb83ee62538ba4753a011ada7bbfb6c
Blind_UNet
import torch import torch.nn as nn import torch.nn.functional as F class crop(nn.Module): def __init__(self): super().__init__() def forward(self, x): N, C, H, W = x.shape x = x[0:N, 0:C, 0:H - 1, 0:W] return x class shift(nn.Module): def __init__(self): 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 from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
amonod/udvd
Blind_UNet
false
1,486
[ "MIT" ]
0
a1ccb777d205255ac68c40efb93dd3996f562c45
https://github.com/amonod/udvd/tree/a1ccb777d205255ac68c40efb93dd3996f562c45
Brightness
import torch import torch.nn as nn from torchvision import transforms as ttf class Brightness(nn.Module): def __init__(self, M): super().__init__() self.M = M def forward(self, img): return ttf.functional.adjust_brightness(img, self.M / 5.0) def get_inputs(): return [torch.rand...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
Hayoung93/UDA
Brightness
false
980
[ "Apache-2.0" ]
0
a587b01c76141d64e7cead55b62e0f3ed75890bf
https://github.com/Hayoung93/UDA/tree/a587b01c76141d64e7cead55b62e0f3ed75890bf
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 from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
Huuush/deepfashion2-det
MultiheadAttention
false
11,494
[ "Apache-2.0" ]
0
46af0ada8d6f534de2de6a9c069580cd1bf609ec
https://github.com/Huuush/deepfashion2-det/tree/46af0ada8d6f534de2de6a9c069580cd1bf609ec
TensorClampOptionMin
import torch class TensorClampOptionMin(torch.nn.Module): def forward(self, x): return x.clamp(min=-0.1) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
ahangchen/torch2trt
TensorClampOptionMin
false
6,114
[ "MIT" ]
1
53c663f0e0570ef7ffd6771354ae3478f63bd328
https://github.com/ahangchen/torch2trt/tree/53c663f0e0570ef7ffd6771354ae3478f63bd328
A2CActorCont
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
ikamensh/machin
A2CActorCont
false
6,865
[ "MIT" ]
1
af7b423c47bc1412530cf6c96c11bd3af9b3e239
https://github.com/ikamensh/machin/tree/af7b423c47bc1412530cf6c96c11bd3af9b3e239
CNN
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
dennis-j-lee/AirNet-SNL
CNN
false
6,552
[ "BSD-3-Clause" ]
1
c35b84b50b7f1351a450a5970b19d8a8b83053d1
https://github.com/dennis-j-lee/AirNet-SNL/tree/c35b84b50b7f1351a450a5970b19d8a8b83053d1
NAC
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import n...
FlorianWilhelm/snalu.pytorch
NAC
false
8,100
[ "MIT" ]
24
6ce4b4b635e03f534117e3804b545fcaa4e4d56b
https://github.com/FlorianWilhelm/snalu.pytorch/tree/6ce4b4b635e03f534117e3804b545fcaa4e4d56b
RAddFloat
import torch import torch._utils class RAddFloat(torch.nn.Module): def __init__(self): super(RAddFloat, self).__init__() def forward(self, x): y = 1.0 + x y = y + y + 1 y = y + y + 1 x = y + x return x def get_inputs(): return [torch.rand([4, 4, 4, 4])] ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch._utils assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_stri...
ijinjay/torch2mindspore
RAddFloat
false
3,652
[ "MIT" ]
0
e4c06bd5e8a3b25b72bf158393a66c5cd1b572d2
https://github.com/ijinjay/torch2mindspore/tree/e4c06bd5e8a3b25b72bf158393a66c5cd1b572d2
RewardModelNetwork
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
L-Net-1992/DI-engine
RewardModelNetwork
false
5,495
[ "Apache-2.0" ]
1
06803b4e18fa64bbed0fd1d44952242c0c063b0f
https://github.com/L-Net-1992/DI-engine/tree/06803b4e18fa64bbed0fd1d44952242c0c063b0f
Head
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dyn...
Weiyuhong-1998/DI-engine
Head
false
14,577
[ "Apache-2.0" ]
464
88658ea358298c6e61e95a454284b8853a3e9484
https://github.com/Weiyuhong-1998/DI-engine/tree/88658ea358298c6e61e95a454284b8853a3e9484
output
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
YongWookHa/Pytorch-EAST-for-Documents
output
false
6,021
[ "MIT" ]
1
169f879ffe2db916821f929b26fdaf29c6ccd757
https://github.com/YongWookHa/Pytorch-EAST-for-Documents/tree/169f879ffe2db916821f929b26fdaf29c6ccd757
AdaptiveCatAvgMaxPool2d
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.utils.data import torchvision.transforms.functional as...
DifferentSC/pytorch-image-models
AdaptiveCatAvgMaxPool2d
false
11,611
[ "Apache-2.0" ]
0
ccfb5751abc70d80add4f197464190c4a2637c6c
https://github.com/DifferentSC/pytorch-image-models/tree/ccfb5751abc70d80add4f197464190c4a2637c6c
RKDLoss
import torch import torch.nn as nn import torch.nn.functional as F import torch.optim class RKDLoss(nn.Module): """Relational Knowledge Disitllation, CVPR2019""" def __init__(self, w_d=25, w_a=50): super(RKDLoss, self).__init__() self.w_d = w_d self.w_a = w_a def forward(self, f_...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
RylanSchaeffer/RepDistiller
RKDLoss
false
5,789
[ "BSD-2-Clause" ]
1
3612d9d8f6f913527c7aaec7e5ea557e72ed7c5e
https://github.com/RylanSchaeffer/RepDistiller/tree/3612d9d8f6f913527c7aaec7e5ea557e72ed7c5e
LeastSquaresGenerativeAdversarialLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dynamo.guard...
Neronjust2017/TransferBed
LeastSquaresGenerativeAdversarialLoss
false
5,643
[ "MIT" ]
1
eaa703a4bc10eaf6216fe1394cd272f6e75489e2
https://github.com/Neronjust2017/TransferBed/tree/eaa703a4bc10eaf6216fe1394cd272f6e75489e2