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 |
|---|---|---|---|---|---|---|---|---|---|---|
TopicMemeoryMechanism | import torch
import torch.multiprocessing
from torch import nn
import torch.utils.data
class TopicMemeoryMechanism(nn.Module):
def __init__(self, topic_num, bow_size, embed_size):
super(TopicMemeoryMechanism, self).__init__()
self.topic_num = topic_num
self.bow_size = bow_size
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
import torch.multiprocessing
... | WuDiDaBinGe/TAKG | TopicMemeoryMechanism | false | 1,286 | [
"MIT"
] | 0 | 83e608e677a4ee74722d18cb5ef430f4f6c6ad31 | https://github.com/WuDiDaBinGe/TAKG/tree/83e608e677a4ee74722d18cb5ef430f4f6c6ad31 |
ResidualDenseBlock | # 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
from torch.utils import data as data
from torch import n... | WoojunePark/BasicSR | ResidualDenseBlock | false | 18,175 | [
"Apache-2.0"
] | 9 | e0910b022b924bb913045fc412a5470dc2242cf0 | https://github.com/WoojunePark/BasicSR/tree/e0910b022b924bb913045fc412a5470dc2242cf0 |
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
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.... | poria-cat/Transformer-TTS-Pytorch | DecoderLayer | false | 10,761 | [
"MIT"
] | 0 | 1e9e2dccc16c17372bf86ca73001f76645f53338 | https://github.com/poria-cat/Transformer-TTS-Pytorch/tree/1e9e2dccc16c17372bf86ca73001f76645f53338 |
CriticNetwork | import torch
import torch.nn as nn
import torch.nn.functional as F
class CriticNetwork(nn.Module):
def __init__(self, input_shape, output_shape, **kwargs):
super().__init__()
n_input = input_shape[-1]
n_output = output_shape[0]
self._h = nn.Linear(n_input, n_output)
nn.ini... | 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_... | PuzeLiu/mushroom-rl | CriticNetwork | false | 14,249 | [
"MIT"
] | 344 | 99942b425e66b4ddcc26009d7105dde23841e95d | https://github.com/PuzeLiu/mushroom-rl/tree/99942b425e66b4ddcc26009d7105dde23841e95d |
TLU | import torch
from torch import nn
from torch.nn import Parameter
from torch.nn.parameter import Parameter
class TLU(nn.Module):
def __init__(self, num_features):
"""max(y, tau) = max(y - tau, 0) + tau = ReLU(y - tau) + tau"""
super(TLU, self).__init__()
self.num_features = num_features
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
from torch.nn import Parameter
from torch.nn.parameter import Parame... | DengpanFu/fast-reid-v0 | TLU | false | 9,081 | [
"Apache-2.0"
] | 0 | e444c0187ccb6ef3b8348f8c5f0c5a0814b3683e | https://github.com/DengpanFu/fast-reid-v0/tree/e444c0187ccb6ef3b8348f8c5f0c5a0814b3683e |
C | # 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... | Nikronic/Deep-Halftoning | C | false | 893 | [
"MIT"
] | 0 | 9564c592abf139ccab2791c1dbb354505edab5f9 | https://github.com/Nikronic/Deep-Halftoning/tree/9564c592abf139ccab2791c1dbb354505edab5f9 |
RDivFloat | # 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
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda
@triton.j... | Akababa/torch2trt | RDivFloat | false | 18,396 | [
"MIT"
] | 2 | 03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 | https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 |
makeStyle | import torch
import torch.nn as nn
import torch.nn.functional as F
class makeStyle(nn.Module):
def __init__(self):
super().__init__()
self.flatten = nn.Flatten()
def forward(self, x0):
style = F.avg_pool2d(x0, kernel_size=(x0.shape[-2], x0.shape[-1]))
style = self.flatten(sty... | 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_... | cellimnet/scellseg-publish | makeStyle | false | 6,403 | [
"BSD-3-Clause"
] | 1 | 03bfbae11fedcf430c40419c9afadf55cbd3034d | https://github.com/cellimnet/scellseg-publish/tree/03bfbae11fedcf430c40419c9afadf55cbd3034d |
Baseline | import torch
import torch.utils
import torch.utils.data
import torch.nn as nn
import torch.nn.functional as F
from torch.nn import init
class Baseline(nn.Module):
"""
Baseline network
"""
@staticmethod
def weight_init(m):
if isinstance(m, nn.Linear):
init.kaiming_normal_(m.wei... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.utils
import tor... | dikers/DeepHyper | Baseline | false | 12,472 | [
"Apache-2.0"
] | 0 | 827a8f3077e18b71cf448a2e56e49670428b1bfd | https://github.com/dikers/DeepHyper/tree/827a8f3077e18b71cf448a2e56e49670428b1bfd |
EnsembleLayer | # 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 as th
from torch import nn as nn
assert_size_stride = torch._C._dyn... | LucasAlegre/sac-plus | EnsembleLayer | false | 17,609 | [
"MIT"
] | 9 | 829c8652bc07a420e855ace696ae44de5feb5379 | https://github.com/LucasAlegre/sac-plus/tree/829c8652bc07a420e855ace696ae44de5feb5379 |
SimpleFloorModule | import torch
import torch.jit
import torch.onnx
import torch.nn
class SimpleFloorModule(torch.nn.Module):
def forward(self, a, b):
c = a + b
return torch.floor(c)
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._... | briancoutinho/glow | SimpleFloorModule | false | 12,572 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 |
ContrastivePairwiseEmbeddingLoss | # 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 import triton_helpers
from torch._inductor.runtime.... | asmekal/catalyst | ContrastivePairwiseEmbeddingLoss | false | 12,118 | [
"MIT"
] | 0 | e11365c0a9812649ceaef14e53061cd5117d8684 | https://github.com/asmekal/catalyst/tree/e11365c0a9812649ceaef14e53061cd5117d8684 |
GEGLU | # 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
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | adam-mehdi/TimeSformer-pytorch | GEGLU | false | 9,662 | [
"MIT"
] | 0 | 4e6484dba2d3f9aeaaad09a3a310c0ea36b459e3 | https://github.com/adam-mehdi/TimeSformer-pytorch/tree/4e6484dba2d3f9aeaaad09a3a310c0ea36b459e3 |
HardMish | # 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 import nn
import torch.cuda
assert_size_stride = torch._C._dynamo.guards.asser... | LoveEachDay/towhee | HardMish | false | 11,652 | [
"Apache-2.0"
] | 0 | 513c9c2626676cadaaf0a16ac3c828d96bec91a1 | https://github.com/LoveEachDay/towhee/tree/513c9c2626676cadaaf0a16ac3c828d96bec91a1 |
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
import torch.nn as nn
from to... | alfred100p/VC-R-CNN | MLP | false | 14,788 | [
"MIT"
] | 344 | c887f5b6db6932fb5c828c8037e299ce5baadb9e | https://github.com/alfred100p/VC-R-CNN/tree/c887f5b6db6932fb5c828c8037e299ce5baadb9e |
Contract | import torch
import torch.nn as nn
class Contract(nn.Module):
def __init__(self, gain=2):
super().__init__()
self.gain = gain
def forward(self, x):
b, c, h, w = x.size()
s = self.gain
x = x.view(b, c, h // s, s, w // s, s)
x = x.permute(0, 3, 5, 1, 2, 4).conti... | 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... | Aditya239233/MDP | Contract | false | 16,907 | [
"MIT"
] | 4 | 87491e1d67e547c11f4bdd5d784d120473429eae | https://github.com/Aditya239233/MDP/tree/87491e1d67e547c11f4bdd5d784d120473429eae |
TensorPermute | import torch
import torch.utils.data
class TensorPermute(torch.nn.Module):
"""
Convert a torch.FloatTensor of shape (NUM_IMAGES x CHANNELS x HEIGHT x WIDTH) to
a torch.FloatTensor of shape (CHANNELS x NUM_IMAGES x HEIGHT x WIDTH).
"""
def forward(self, tensor):
return tensor.permute(1, 0,... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.utils.data
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_... | SheffieldAI/pykale | TensorPermute | false | 14,397 | [
"MIT"
] | 324 | be7670941fb06835883c80477b26702d407017db | https://github.com/SheffieldAI/pykale/tree/be7670941fb06835883c80477b26702d407017db |
ExtractTensorPatches | import torch
from typing import Optional
from typing import Tuple
import torch.nn as nn
import torch.nn.functional as F
from typing import Union
from torch.nn.modules.utils import _pair
def _extract_tensor_patchesnd(input: 'torch.Tensor', window_sizes:
'Tuple[int, ...]', strides: 'Tuple[int, ...]') ->torch.Tensor... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from typing import Optional
from typing import Tuple
import torch.nn as nn
import torch.nn.functional as F
from typing import Union
from tor... | justanhduc/kornia | ExtractTensorPatches | false | 15,757 | [
"ECL-2.0",
"Apache-2.0"
] | 51 | c14081292dfb2491fad50ba10e27491cad8cb3e3 | https://github.com/justanhduc/kornia/tree/c14081292dfb2491fad50ba10e27491cad8cb3e3 |
ZeroConv2d | import torch
from torch import nn
from torch.nn import functional as F
class ZeroConv2d(nn.Module):
def __init__(self, in_channel, out_channel, padding=1):
super().__init__()
self.conv = nn.Conv2d(in_channel, out_channel, 3, padding=0)
self.conv.weight.data.zero_()
self.conv.bias.... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
from torch im... | HugoSenetaire/glow-pytorch | ZeroConv2d | false | 567 | [
"MIT"
] | 0 | 7f11be87cac9770df63867910c34738dedee6f56 | https://github.com/HugoSenetaire/glow-pytorch/tree/7f11be87cac9770df63867910c34738dedee6f56 |
AlbertAttention | from _paritybench_helpers import _mock_config
import math
import torch
from typing import List
from typing import Tuple
from torch import nn
from typing import Set
import torch.utils.checkpoint
def find_pruneable_heads_and_indices(heads: 'List[int]', n_heads: 'int',
head_size: 'int', already_pruned_heads: 'Set[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.... | ncoop57/transformers | AlbertAttention | false | 4,069 | [
"Apache-2.0"
] | 0 | d7e156bd1ae2467e9ea1dbc44f31da0ed2296aee | https://github.com/ncoop57/transformers/tree/d7e156bd1ae2467e9ea1dbc44f31da0ed2296aee |
_GateAddNorm | import torch
from torch import Tensor
from torch import nn as nn
import torch.nn.functional as F
class MonteCarloDropout(nn.Dropout):
"""
Defines Monte Carlo dropout Module as defined
in the paper https://arxiv.org/pdf/1506.02142.pdf.
In summary, This technique uses the regular dropout
which can b... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch import T... | gdevos010/darts | _GateAddNorm | false | 3,673 | [
"Apache-2.0"
] | 0 | 96c97c1e241500ae7b91d32bbfa21d811e4a7d71 | https://github.com/gdevos010/darts/tree/96c97c1e241500ae7b91d32bbfa21d811e4a7d71 |
MMTMBi | # 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_... | ditannan/Multi-modal-Multi-instance-Learning | MMTMBi | false | 6,575 | [
"Apache-2.0"
] | 1 | 06aada1ff85784d5ed50aa528c506947c892d584 | https://github.com/ditannan/Multi-modal-Multi-instance-Learning/tree/06aada1ff85784d5ed50aa528c506947c892d584 |
CELossWeightedMasked | import torch
import torch.nn as nn
class WeightedLoss(nn.Module):
def __init__(self):
super(WeightedLoss, self).__init__()
self.weighted = False
def generate_weight_mask(self, mask, to_ignore=None):
""" Generates a weight mask where pixel weights are inversely proportional to
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
... | FANG-Xiaolin/uois | CELossWeightedMasked | false | 2,243 | [
"MIT"
] | 0 | 7489e69d1513faf2f3f030a441abdd33ca22304c | https://github.com/FANG-Xiaolin/uois/tree/7489e69d1513faf2f3f030a441abdd33ca22304c |
gem | import torch
import torch.nn as nn
import torch.nn.functional as F
class gem(nn.Module):
def __init__(self, p=3.0, eps=1e-06):
super(gem, self).__init__()
self.p = p
self.eps = eps
def forward(self, x):
return F.avg_pool2d(x.clamp(min=self.eps).pow(self.p), (x.size(-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
import torch.nn as nn
assert... | MCC-WH/Token | gem | false | 8,521 | [
"MIT"
] | 30 | eadc301f2df9e1851633be1b63c273659af0da49 | https://github.com/MCC-WH/Token/tree/eadc301f2df9e1851633be1b63c273659af0da49 |
BCEBlurWithLogitsLoss | # 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... | Alex-Beh/hand_tracking | BCEBlurWithLogitsLoss | false | 11,151 | [
"Apache-2.0"
] | 0 | 40ac39e10ed5815d9400d6a87149015ad6ab9686 | https://github.com/Alex-Beh/hand_tracking/tree/40ac39e10ed5815d9400d6a87149015ad6ab9686 |
adder2d | # 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.autograd import Function
import math
import torch.nn as nn
ass... | mark531593296/AdderNet | adder2d | false | 10,443 | [
"BSD-3-Clause"
] | 0 | 2936728f537c0cceb8a47727630e5723af86df61 | https://github.com/mark531593296/AdderNet/tree/2936728f537c0cceb8a47727630e5723af86df61 |
ResizeTransform | import torch
import torch.nn as nn
import torch.nn.functional as nnf
class ResizeTransform(nn.Module):
"""
Resize a transform, which involves resizing the vector field *and* rescaling it.
"""
def __init__(self, vel_resize, ndims):
super().__init__()
self.factor = 1.0 / vel_resize
... | 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... | McHz1s/voxelmorph | ResizeTransform | false | 14,004 | [
"Apache-2.0"
] | 1,532 | 0ca00ccf85be5c2d0ae73a166b64460e02c01d33 | https://github.com/McHz1s/voxelmorph/tree/0ca00ccf85be5c2d0ae73a166b64460e02c01d33 |
MeanPooling | # 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 import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_str... | HLTCHKUST/MulQG | MeanPooling | false | 8,185 | [
"MIT"
] | 19 | 8e257f2d6c0f03c07ea8a0bf0e8f55b0cde60605 | https://github.com/HLTCHKUST/MulQG/tree/8e257f2d6c0f03c07ea8a0bf0e8f55b0cde60605 |
Conv2dZeros | import torch
import torch.nn as nn
def compute_same_pad(kernel_size, stride):
if isinstance(kernel_size, int):
kernel_size = [kernel_size]
if isinstance(stride, int):
stride = [stride]
assert len(stride) == len(kernel_size
), 'Pass kernel size and stride both as int, or both as equ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.... | appuzanova/Glow-PyTorch | Conv2dZeros | false | 12,220 | [
"MIT"
] | 0 | 50316b1b242f0f345b2df9e3e4538cfab5a60895 | https://github.com/appuzanova/Glow-PyTorch/tree/50316b1b242f0f345b2df9e3e4538cfab5a60895 |
TransposeGatedConv2d | # 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 ... | kangzhiq/DeepFillv2_Pytorch | TransposeGatedConv2d | false | 10,445 | [
"MIT"
] | 0 | 9c7ed61b25bb995713f89108b712490737abe1b1 | https://github.com/kangzhiq/DeepFillv2_Pytorch/tree/9c7ed61b25bb995713f89108b712490737abe1b1 |
TimeEncode | import torch
import numpy as np
class TimeEncode(torch.nn.Module):
def __init__(self, dimension):
super(TimeEncode, self).__init__()
self.dimension = dimension
self.w = torch.nn.Linear(1, dimension)
self.w.weight = torch.nn.Parameter(torch.from_numpy(1 / 10 ** np.
lins... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
import numpy ... | Blidge/tgn-caw-main | TimeEncode | false | 4,911 | [
"Apache-2.0"
] | 1 | 7a58f22bc7d9f1e2f6e9cbb1a60a18aed81071ee | https://github.com/Blidge/tgn-caw-main/tree/7a58f22bc7d9f1e2f6e9cbb1a60a18aed81071ee |
GraphLearner | from torch.nn import Module
import torch
from torch.nn.modules.module import Module
import torch.nn as nn
import torch.nn.functional as F
class GraphLearner(Module):
def __init__(self, in_feature_dim, combined_feature_dim, n_obj, dropout=0.0
):
"""
eq(1): A=EE^T, build adj matrix
... | 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.... | Originofamonia/vqa-project | GraphLearner | false | 925 | [
"Apache-2.0"
] | 0 | cf67b62ddf5732881dfb4278478accfd15c4df6d | https://github.com/Originofamonia/vqa-project/tree/cf67b62ddf5732881dfb4278478accfd15c4df6d |
DiceLoss | import torch
from torch import nn
class DiceLoss(nn.Module):
def __init__(self, eps=1e-07):
super(DiceLoss, self).__init__()
self.eps = eps
def forward(self, pred, target):
pred = torch.sigmoid(pred)
intersection = (pred * target).sum()
loss = 1 - 2.0 * intersection /... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empt... | ForrestPi/semanticSegmentation | DiceLoss | false | 17,336 | [
"MIT"
] | 7 | 1e5519279e2a9574f09eaf91439138b74b0f860c | https://github.com/ForrestPi/semanticSegmentation/tree/1e5519279e2a9574f09eaf91439138b74b0f860c |
MaxPool3x3 | import torch
import torch.nn as nn
class MaxPool3x3(nn.Module):
"""3x3 max pool with no subsampling."""
def __init__(self, in_channels, out_channels, kernel_size=3, stride=1,
padding=1):
super(MaxPool3x3, self).__init__()
self.maxpool = nn.MaxPool2d(kernel_size, stride, padding)
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
emp... | jack-willturner/nas-without-training | MaxPool3x3 | false | 12,545 | [
"MIT"
] | 0 | d5e915b5f391f51d902f33b1d4beedfe3b09d2e0 | https://github.com/jack-willturner/nas-without-training/tree/d5e915b5f391f51d902f33b1d4beedfe3b09d2e0 |
AsymmetricLossOptimized | # 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... | davidaderup/query2labels | AsymmetricLossOptimized | false | 15,124 | [
"MIT"
] | 164 | 5a10c861dda85d94ba01ec6ad4119eef67a9f441 | https://github.com/davidaderup/query2labels/tree/5a10c861dda85d94ba01ec6ad4119eef67a9f441 |
GlobalAttention_text | # 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.... | ts170/T2I_CL | GlobalAttention_text | false | 10,909 | [
"MIT"
] | 0 | 8754bea1101aabcbf8108b95e722f7aaeb385869 | https://github.com/ts170/T2I_CL/tree/8754bea1101aabcbf8108b95e722f7aaeb385869 |
OELossLogConf | # 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
import torch.distributions
import torch.utils.data
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
emp... | AlexMeinke/Provable-OOD-Detection | OELossLogConf | false | 7,689 | [
"MIT"
] | 21 | 9a132aec994ff718c96b81885736ab866df60d87 | https://github.com/AlexMeinke/Provable-OOD-Detection/tree/9a132aec994ff718c96b81885736ab866df60d87 |
Resize | import torch
import torch.nn.functional as F
class Resize(torch.nn.Module):
def __init__(self, size, mode='bilinear'):
super().__init__()
self.size = size
self.mode = mode
def forward(self, img):
return F.interpolate(img, size=self.size, mode=self.mode,
align_corn... | 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... | rlmwang/torch-tools | Resize | false | 10,794 | [
"MIT"
] | 0 | 822132534d73414f26045bad38a0a345661b057f | https://github.com/rlmwang/torch-tools/tree/822132534d73414f26045bad38a0a345661b057f |
MatrixConv2dResblock | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import ... | hirayamy/nngen | MatrixConv2dResblock | false | 12,497 | [
"Apache-2.0"
] | 0 | 63f72be83e4bb1a697a969fb6a14d0335ec0316f | https://github.com/hirayamy/nngen/tree/63f72be83e4bb1a697a969fb6a14d0335ec0316f |
NegSamplingLoss | # 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... | dreaming-qin/RecBole | NegSamplingLoss | false | 12,310 | [
"MIT"
] | 0 | d6de39521484ded60c387ca604abaf86310acdbe | https://github.com/dreaming-qin/RecBole/tree/d6de39521484ded60c387ca604abaf86310acdbe |
RSubInt | # 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
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda
@triton.j... | Akababa/torch2trt | RSubInt | false | 18,403 | [
"MIT"
] | 2 | 03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 | https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 |
GSAHelper | import torch
from torch import nn
class GSAHelper(nn.Module):
def __init__(self, d):
super().__init__()
self.d = d
self.fc_k = nn.Linear(self.d, self.d)
self.fc_q = nn.Linear(self.d, self.d)
self.fc_kq = nn.Linear(self.d, self.d)
def forward(self, k, q):
m = k... | 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.... | VKCOM/TopicsDataset | GSAHelper | false | 5,925 | [
"MIT"
] | 1 | 149919321ba61a8f17b22f62f60f4aedec43d72b | https://github.com/VKCOM/TopicsDataset/tree/149919321ba61a8f17b22f62f60f4aedec43d72b |
AsymmetricLossMultiLabel | import torch
import torch.nn as nn
import torch.autograd
import torch.utils.data
class AsymmetricLossMultiLabel(nn.Module):
def __init__(self, gamma_neg=4, gamma_pos=1, clip=0.05, eps=1e-08,
disable_torch_grad_focal_loss=False):
super(AsymmetricLossMultiLabel, self).__init__()
self.gamma_... | 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... | MinghuiChen43/CIL-ReID | AsymmetricLossMultiLabel | false | 14,026 | [
"MIT"
] | 58 | 73c87500c4673db400f2760059aea27de7e08468 | https://github.com/MinghuiChen43/CIL-ReID/tree/73c87500c4673db400f2760059aea27de7e08468 |
HGCN | import torch
import torch.nn as nn
class HGCN(nn.Module):
def __init__(self, n_edges, in_feature, out_feature, n_agents):
super(HGCN, self).__init__()
None
self.W_line = nn.Parameter(torch.ones(n_edges))
self.W = None
def forward(self, node_features, hyper_graph):
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.triton_helpers import libdevice, math as tl_math
im... | cugbbaiyun/HGCN-MIX | HGCN | false | 6,507 | [
"Apache-2.0"
] | 1 | 82b5c22a3cb2dabc2b86c54f23fa314477d92b63 | https://github.com/cugbbaiyun/HGCN-MIX/tree/82b5c22a3cb2dabc2b86c54f23fa314477d92b63 |
DiaynDiscrimNet | # 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 to... | KtechB/machina | DiaynDiscrimNet | false | 2,466 | [
"MIT"
] | 0 | 24eca9cc9b89a0e0b9e026282f17c7b9fe2869ab | https://github.com/KtechB/machina/tree/24eca9cc9b89a0e0b9e026282f17c7b9fe2869ab |
SPPblock | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
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_... | JACKYLUO1991/HybridNet | SPPblock | false | 17,522 | [
"Apache-2.0"
] | 6 | eb97d8a048ca4bb4087bc542360172e169a08dbf | https://github.com/JACKYLUO1991/HybridNet/tree/eb97d8a048ca4bb4087bc542360172e169a08dbf |
N3 | # 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 math as tl_math
import torch.nn as nn
import torch.utils
from typing import Tuple
from ab... | angusl95/darts-kbc | N3 | false | 1,436 | [
"Apache-2.0"
] | 0 | 85fc6f4bdb7ba73c07d96ce47e96634599b346f9 | https://github.com/angusl95/darts-kbc/tree/85fc6f4bdb7ba73c07d96ce47e96634599b346f9 |
Attn | import torch
import torch.nn as nn
import torch.nn.functional as F
class Attn(nn.Module):
def __init__(self, hidden_size, batch_size=1, method='dot'):
super(Attn, self).__init__()
self.method = method
self.hidden_size = hidden_size
self.batch_size = batch_size
if self.meth... | 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.... | dhpollack/mgc | Attn | false | 1,837 | [
"MIT"
] | 0 | ed1b8fb512f0b42cb8121a2809def65f232dc154 | https://github.com/dhpollack/mgc/tree/ed1b8fb512f0b42cb8121a2809def65f232dc154 |
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
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_... | YuanZi1501040205/Ice-detection-for-smart-track-heating-with-normal-only-self-supervised-learning | SpatialAttention | false | 1,283 | [
"MIT"
] | 0 | ac7603dc27cf1cc9ce29cfae6c525dd5dbbcdd83 | https://github.com/YuanZi1501040205/Ice-detection-for-smart-track-heating-with-normal-only-self-supervised-learning/tree/ac7603dc27cf1cc9ce29cfae6c525dd5dbbcdd83 |
Embedding_Net | from _paritybench_helpers import _mock_config
import torch
import torch.nn as nn
import torch.nn.functional as F
def weights_init(m):
classname = m.__class__.__name__
if classname.find('Linear') != -1:
m.weight.data.normal_(0.0, 0.02)
m.bias.data.fill_(0)
elif classname.find('BatchNorm') !... | 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.... | Huihui-z/CE-GZSL | Embedding_Net | false | 15,226 | [
"MIT"
] | 58 | 7bf5358ac4727ea1dc2dc9dec2f453b014500bd8 | https://github.com/Huihui-z/CE-GZSL/tree/7bf5358ac4727ea1dc2dc9dec2f453b014500bd8 |
EncoderImageWeightNormPrecomp | # 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 collections im... | devilslot/SCAN | EncoderImageWeightNormPrecomp | false | 15,177 | [
"Apache-2.0"
] | 428 | 01812aa98e2ebe39695c8906589b6fe66b2a0d6e | https://github.com/devilslot/SCAN/tree/01812aa98e2ebe39695c8906589b6fe66b2a0d6e |
DiscriminatorLoss | import torch
from torch import nn
class DiscriminatorLoss(nn.Module):
def __init__(self):
super().__init__()
self.loss_fn = nn.BCEWithLogitsLoss()
def forward(self, fake_pred, real_pred):
fake_target = torch.zeros_like(fake_pred)
real_target = torch.ones_like(real_pred)
... | 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/CycleGAN | DiscriminatorLoss | false | 6,129 | [
"MIT"
] | 1 | a61e76134cfdda43306e326e3dbba38d8cb21163 | https://github.com/akanametov/CycleGAN/tree/a61e76134cfdda43306e326e3dbba38d8cb21163 |
BERTEmbedding2 | # 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
import torch.nn as nn
from itertools import chain as chain
import torch.utils.data
import torch.hub
import torch.nn.parallel
import torch.op... | byeongjokim/LateTemporalModeling3DCNN_for_sign | BERTEmbedding2 | false | 1,625 | [
"MIT"
] | 0 | e3a802fcf91dc3930aea782464ee34d9b747d3ab | https://github.com/byeongjokim/LateTemporalModeling3DCNN_for_sign/tree/e3a802fcf91dc3930aea782464ee34d9b747d3ab |
GELU2 | import torch
import torch.nn as nn
class GELU2(nn.Module):
def __init__(self):
super().__init__()
def forward(self, x):
return x * torch.sigmoid(1.702 * 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
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | DQiaole/ZITS | GELU2 | false | 7,958 | [
"Apache-2.0"
] | 40 | 5f7a060167790789d5e29a3d14d3c2ef8a34e765 | https://github.com/DQiaole/ZITS/tree/5f7a060167790789d5e29a3d14d3c2ef8a34e765 |
TVLoss | import torch
import torch.nn as nn
from torch.nn import functional as F
class TVLoss(nn.Module):
def forward(self, input):
input = F.pad(input, (0, 1, 0, 1), 'replicate')
x_diff = input[..., :-1, 1:] - input[..., :-1, :-1]
y_diff = input[..., 1:, :-1] - input[..., :-1, :-1]
diff =... | 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_... | aradalienzzzz/vqgan-clip-app | TVLoss | false | 6,227 | [
"MIT"
] | 1 | f5a16d792da5ad0ede855254fe393f6b990c8e1d | https://github.com/aradalienzzzz/vqgan-clip-app/tree/f5a16d792da5ad0ede855254fe393f6b990c8e1d |
LinearSum | import torch
import torch.nn as nn
import torch.nn.functional as F
class LinearSum(nn.Module):
def __init__(self, input_dims, output_dim, mm_dim=1200, activ_input=
'relu', activ_output='relu', normalize=False, dropout_input=0.0,
dropout_pre_lin=0.0, dropout_output=0.0):
super(LinearSum, s... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | JoannaLXY/block.bootstrap.pytorch | LinearSum | false | 11,560 | [
"BSD-3-Clause"
] | 0 | 42c3e7616b704e05c6ff2376ff68b5b18044fe77 | https://github.com/JoannaLXY/block.bootstrap.pytorch/tree/42c3e7616b704e05c6ff2376ff68b5b18044fe77 |
CoxPHLossSorted | # 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 Tens... | abhishek1015/MT-TS-Net | CoxPHLossSorted | false | 6,060 | [
"MIT"
] | 1 | f927f64cddd790ce1ddf07cbbd93ada332f96ba3 | https://github.com/abhishek1015/MT-TS-Net/tree/f927f64cddd790ce1ddf07cbbd93ada332f96ba3 |
Correlation | import torch
from torch import nn
class Correlation(nn.Module):
"""Correlation Congruence for Knowledge Distillation, ICCV 2019.
The authors nicely shared the code with me. I restructured their code to be
compatible with my running framework. Credits go to the original author"""
def __init__(self):
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_... | Alibaba-MIIL/HeadSharingKD | Correlation | false | 7,680 | [
"BSD-2-Clause"
] | 15 | 8e2738bf069c7d12ec933f9b9107f267f7b6603a | https://github.com/Alibaba-MIIL/HeadSharingKD/tree/8e2738bf069c7d12ec933f9b9107f267f7b6603a |
NormalProposal | # 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 import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_str... | BrettLeroux/GRIPS-MCMC | NormalProposal | false | 168 | [
"MIT"
] | 0 | 154457acfc47977e25870aed76c7dc49d70608af | https://github.com/BrettLeroux/GRIPS-MCMC/tree/154457acfc47977e25870aed76c7dc49d70608af |
get_normal | import torch
import torch.utils.data
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.sparse
class get_normal(nn.Module):
def __init__(self, num_in_layers, num_out_layers=3):
super(get_normal, self).__init__()
self.conv1 = nn.Conv2d(num_in_layers, num_out_layers, 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
import torch.utils.data
import torch
import torch.nn as nn
import torch.sparse
a... | PrendiProgramming/UprightNet | get_normal | false | 2,727 | [
"MIT"
] | 0 | 73a0677079e27a806b48bf9ede70b8377002b2f3 | https://github.com/PrendiProgramming/UprightNet/tree/73a0677079e27a806b48bf9ede70b8377002b2f3 |
FCDiscriminator | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
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... | Siddharth-Shrivastava7/DANNet | FCDiscriminator | false | 14,426 | [
"Apache-2.0"
] | 61 | 8db10056a4e445d24fc899505923615457cae5b7 | https://github.com/Siddharth-Shrivastava7/DANNet/tree/8db10056a4e445d24fc899505923615457cae5b7 |
WSDiceLoss | import torch
import torch.utils.data
import torch.nn as nn
import torch.nn.parallel
class WSDiceLoss(nn.Module):
def __init__(self, smooth=100.0, power=2.0, v2=0.85, v1=0.15):
super().__init__()
self.smooth = smooth
self.power = power
self.v2 = v2
self.v1 = v1
def dic... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.utils.data
import torch.nn as nn
import torch.nn.parallel
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty... | Atharva-Peshkar/pytorch_connectomics | WSDiceLoss | false | 13,336 | [
"MIT"
] | 99 | 8eccd9640a9a454d4df095a3529a030e58f882f5 | https://github.com/Atharva-Peshkar/pytorch_connectomics/tree/8eccd9640a9a454d4df095a3529a030e58f882f5 |
HardSigmoid | import torch
import torch.nn as nn
class HardSigmoid(nn.Module):
"""Implements the Had Mish activation module from `"H-Mish" <https://github.com/digantamisra98/H-Mish>`_
This activation is computed as follows:
.. math::
f(x) = \\frac{x}{2} \\cdot \\min(2, \\max(0, x + 2))
"""
def __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 math as tl_math
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert... | SevenMoGod/movenet.pytorch | HardSigmoid | false | 14,389 | [
"MIT"
] | 87 | 95ec8535245228aa4335243e68722810e50bcaf8 | https://github.com/SevenMoGod/movenet.pytorch/tree/95ec8535245228aa4335243e68722810e50bcaf8 |
GatedTransition | import torch
from torch import nn
class GatedTransition(nn.Module):
"""
Parameterizes the gaussian latent transition probability p(z_t | z_{t-1})
"""
def __init__(self, z_dim, transition_dim):
super().__init__()
self.lin_gate_z_to_hidden = nn.Linear(z_dim, transition_dim)
self... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | devonjkohler/sysbioDMM | GatedTransition | false | 10,025 | [
"MIT"
] | 0 | 3967a084a492f5b7abd1f3274f1dc5ee9ef868ff | https://github.com/devonjkohler/sysbioDMM/tree/3967a084a492f5b7abd1f3274f1dc5ee9ef868ff |
scSEmodule | # 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_... | HwangJohn/feature_representation | scSEmodule | false | 2,358 | [
"MIT"
] | 0 | 27389caacc9c026b65f47ab0cbb4e6d0465e6a60 | https://github.com/HwangJohn/feature_representation/tree/27389caacc9c026b65f47ab0cbb4e6d0465e6a60 |
ReOrgLayer | import torch
from torch import nn
import torch.utils.data
class ReOrgLayer(nn.Module):
def __init__(self, stride=2):
super(ReOrgLayer, self).__init__()
self.stride = stride
def forward(self, x):
assert x.data.dim() == 4
B, C, H, W = x.data.shape
hs = self.stride
... | 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
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._... | Dazz993/AlphaPose | ReOrgLayer | false | 5,040 | [
"Apache-2.0"
] | 1 | d4b9a3af5f590fa21bd033b4a19e98b5748ae683 | https://github.com/Dazz993/AlphaPose/tree/d4b9a3af5f590fa21bd033b4a19e98b5748ae683 |
LinearEmbedder | import torch
import torch.nn as nn
class LinearEmbedder(torch.nn.Module):
def __init__(self, in_features, out_features):
super(LinearEmbedder, self).__init__()
self.fc = nn.Linear(in_features, out_features)
def forward(self, x):
o = self.fc(x)
o = self.l2_norm(o)
retu... | 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 ... | xiaonanzzz/ProxyAnchorLossSimple | LinearEmbedder | false | 13,109 | [
"MIT"
] | 0 | a501578142fd00bf001c840e8051c67dee873f67 | https://github.com/xiaonanzzz/ProxyAnchorLossSimple/tree/a501578142fd00bf001c840e8051c67dee873f67 |
GeLU | import torch
import numpy as np
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.pi) * (x + 0.044715 * torch.pow(x, 3))... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import numpy as np
import torch.nn as nn
assert_size_stride = torch._C._dynamo.... | abhipsabasu/rubi.bootstrap.pytorch | GeLU | false | 14,731 | [
"BSD-3-Clause"
] | 83 | 9fa9639c1ee4a040958d976eeb5dca2dd2203980 | https://github.com/abhipsabasu/rubi.bootstrap.pytorch/tree/9fa9639c1ee4a040958d976eeb5dca2dd2203980 |
Decoder | import torch
import torch.nn as nn
class Decoder(nn.Module):
def __init__(self, input_size):
super(Decoder, self).__init__()
self.fully = nn.Linear(input_size, 40)
self.conv1 = nn.ConvTranspose2d(40, 20, kernel_size=5, stride=2)
self.conv2 = nn.ConvTranspose2d(20, 10, 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
import torch.nn as nn
assert_... | pacslab/serverless-ml-serving | Decoder | false | 7,446 | [
"MIT"
] | 1 | 03a4cd5f1739aa4710ef886edd9332b3d755efbd | https://github.com/pacslab/serverless-ml-serving/tree/03a4cd5f1739aa4710ef886edd9332b3d755efbd |
Planar | import torch
import torch.nn as nn
class PlanarStep(nn.Module):
def __init__(self):
super(PlanarStep, self).__init__()
self.h = nn.Tanh()
self.softplus = nn.Softplus()
def _der_h(self, x):
"""Derivative of activation function h."""
return self._der_tanh(x)
def _d... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
im... | scfrank/deep-generative-lm | Planar | false | 4,295 | [
"MIT"
] | 0 | 70067fcda82aa035bba805ce6c2709097166a7a4 | https://github.com/scfrank/deep-generative-lm/tree/70067fcda82aa035bba805ce6c2709097166a7a4 |
SoftDiceLossSquared | # 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 numpy as np
from torch import nn
import torch.nn.functional
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_str... | BRAIN-Lab-UNC/BrainExtraction-TissueSegmentation-Macaque | SoftDiceLossSquared | false | 13,375 | [
"MIT"
] | 770 | b5329035d9e32c8a27151cf2396eaf209396a334 | https://github.com/BRAIN-Lab-UNC/BrainExtraction-TissueSegmentation-Macaque/tree/b5329035d9e32c8a27151cf2396eaf209396a334 |
SELECT_fusion_block | import torch
import torch.nn.parallel
import torch.optim
import torch
import torch.nn as nn
class SELECT_fusion_block(nn.Module):
def __init__(self, in_channels, n_segment, n_div):
super(SELECT_fusion_block, self).__init__()
self.n_div = n_div
self.fold = in_channels // n_div
self... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn.parallel
impo... | RongchangLi/DEN | SELECT_fusion_block | false | 17,883 | [
"MIT"
] | 4 | f8b744f96a3a68cf0784080ffd561a5279715727 | https://github.com/RongchangLi/DEN/tree/f8b744f96a3a68cf0784080ffd561a5279715727 |
CNN | import torch
from torch import nn
import torch.nn.functional as F
class CNN(torch.nn.Module):
"""Basic CNN architecture."""
def __init__(self, in_channels=1):
super(CNN, self).__init__()
self.conv1 = nn.Conv2d(in_channels, 64, 8, 1)
self.conv2 = nn.Conv2d(64, 128, 6, 2)
self.c... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
assert_s... | saumya0303/cleverhans | CNN | false | 16,369 | [
"MIT"
] | 4,333 | 03f3ee254c2a1c4ebd91728263b66ff29e8b4f78 | https://github.com/saumya0303/cleverhans/tree/03f3ee254c2a1c4ebd91728263b66ff29e8b4f78 |
LSTMRegressCriterion | # 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... | LeoZDong/shape2prog | LSTMRegressCriterion | false | 11,642 | [
"BSD-2-Clause"
] | 0 | 2185d1d4eb7a1c4c55e644c6af477fd8e8e70241 | https://github.com/LeoZDong/shape2prog/tree/2185d1d4eb7a1c4c55e644c6af477fd8e8e70241 |
Sparsemax | from torch.autograd import Function
import torch
from torch import nn
def _make_ix_like(X, dim):
d = X.size(dim)
rho = torch.arange(1, d + 1, device=X.device, dtype=X.dtype)
view = [1] * X.dim()
view[0] = -1
return rho.view(view).transpose(0, dim)
def _roll_last(X, dim):
if dim == -1:
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch.autograd import Function
from torch import nn
assert_size_stride = torch._C._d... | gitlost-murali/awesome-align | Sparsemax | false | 3,554 | [
"BSD-3-Clause"
] | 0 | 39fb45ca85a98e005447bddb52c48e65ce7d399b | https://github.com/gitlost-murali/awesome-align/tree/39fb45ca85a98e005447bddb52c48e65ce7d399b |
LogReg | # 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.... | BruceRayWilson/sambanova_starter | LogReg | false | 8,889 | [
"MIT"
] | 0 | be1b01369b040d00f174a0ee1fdb22e89ef40062 | https://github.com/BruceRayWilson/sambanova_starter/tree/be1b01369b040d00f174a0ee1fdb22e89ef40062 |
ContrastiveLoss | import torch
import torch.utils.data
class ContrastiveLoss(torch.nn.Module):
"""
Contrastive loss function.
"""
def __init__(self, margin=1.0):
super(ContrastiveLoss, self).__init__()
self.margin = margin
def forward(self, x0, x1, y):
diff = x0 - x1
dist_sq = torc... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice
import torch.utils.data
asse... | guruprasaad123/all_dl_projects | ContrastiveLoss | false | 6,757 | [
"Apache-2.0"
] | 1 | 04c869f7f001ef94c467740260663d91a34815e0 | https://github.com/guruprasaad123/all_dl_projects/tree/04c869f7f001ef94c467740260663d91a34815e0 |
FactorTransfer | # 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... | RylanSchaeffer/RepDistiller | FactorTransfer | false | 5,788 | [
"BSD-2-Clause"
] | 1 | 3612d9d8f6f913527c7aaec7e5ea557e72ed7c5e | https://github.com/RylanSchaeffer/RepDistiller/tree/3612d9d8f6f913527c7aaec7e5ea557e72ed7c5e |
AlexNet | # 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_... | jamessoni/x-ray-ML-classification | AlexNet | false | 3,854 | [
"MIT"
] | 0 | 6934f37631d367cdbe813fa6a2cbdc673c64c503 | https://github.com/jamessoni/x-ray-ML-classification/tree/6934f37631d367cdbe813fa6a2cbdc673c64c503 |
RpowInt | import torch
class RpowInt(torch.nn.Module):
def __init__(self):
super(RpowInt, self).__init__()
def forward(self, x):
return 2 ** 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
from torch._inductor.runtime.triton_helpers import libdevice
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_c... | ahangchen/torch2trt | RpowInt | false | 6,106 | [
"MIT"
] | 1 | 53c663f0e0570ef7ffd6771354ae3478f63bd328 | https://github.com/ahangchen/torch2trt/tree/53c663f0e0570ef7ffd6771354ae3478f63bd328 |
group | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
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_... | BradyFU/DVG-Face | group | false | 7,819 | [
"MIT"
] | 33 | 16d51fe7da6e4a52d144e938afb3072eb8e4e8de | https://github.com/BradyFU/DVG-Face/tree/16d51fe7da6e4a52d144e938afb3072eb8e4e8de |
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 triton
import triton.language 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 itertools import product as product
import torch.nn.parallel
i... | DefTruth/PIPNet | h_swish | false | 13,582 | [
"MIT"
] | 162 | a1fb1e229319dac0069e37eb8fb4278d454edbb0 | https://github.com/DefTruth/PIPNet/tree/a1fb1e229319dac0069e37eb8fb4278d454edbb0 |
Linear | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | 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.functional as F
import torch.nn as nn
assert_size_stride = torch... | BrandonBian/OSDR-GNN | Linear | false | 181 | [
"MIT"
] | 0 | 0f631d5ddad77df7260c11de3507af014f9447ed | https://github.com/BrandonBian/OSDR-GNN/tree/0f631d5ddad77df7260c11de3507af014f9447ed |
NetTan2018 | import torch
import torch.nn as nn
import torch.nn.functional as F
class NetTan2018(nn.Module):
def __init__(self, in_channels=3, out_classes=2):
super(NetTan2018, self).__init__()
oc = 16
self.conv1 = nn.Conv2d(in_channels=in_channels, out_channels=oc,
kernel_size=(3, 3), pad... | 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_... | Nicolik/SimpleCNNClassifier | NetTan2018 | false | 8,616 | [
"MIT"
] | 11 | e5cd37fbde90f4096183658abe3f8836be92a8f2 | https://github.com/Nicolik/SimpleCNNClassifier/tree/e5cd37fbde90f4096183658abe3f8836be92a8f2 |
ConvBlock | # 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... | DevilMayNotCry/My_curl | ConvBlock | false | 9,127 | [
"BSD-3-Clause"
] | 0 | a8f65a3e58cbdeefb4679aa2f0c3d9d800b67381 | https://github.com/DevilMayNotCry/My_curl/tree/a8f65a3e58cbdeefb4679aa2f0c3d9d800b67381 |
ChannelNorm2D | # 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 libdevice
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_... | ahmedfgad/high-fidelity-generative-compression | ChannelNorm2D | false | 6,118 | [
"Apache-2.0"
] | 1 | f3c6aa3472e3c629cbc35eefb0957119c913054a | https://github.com/ahmedfgad/high-fidelity-generative-compression/tree/f3c6aa3472e3c629cbc35eefb0957119c913054a |
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 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 ... | YJSYJSYJS/GloRe | GCN | false | 14,619 | [
"MIT"
] | 200 | b236dc92bd89f59c2b591c1b1ba5ead134ea75cd | https://github.com/YJSYJSYJS/GloRe/tree/b236dc92bd89f59c2b591c1b1ba5ead134ea75cd |
HyperSphereLoss | import torch
import torch.nn as nn
class HyperSphereLoss(nn.Module):
def forward(self, input):
"""
Calcuate distance between input and N(North Pole) using hypersphere metrics.
Woo Park, Sung, and Junseok Kwon.
"Sphere Generative Adversarial Network Based on Geometric Moment Match... | 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_... | Dotori-HJ/SphereGAN-Pytorch-implementation | HyperSphereLoss | false | 7,995 | [
"MIT"
] | 11 | fe7843545388ecdae34f374e7f1c42300ab12689 | https://github.com/Dotori-HJ/SphereGAN-Pytorch-implementation/tree/fe7843545388ecdae34f374e7f1c42300ab12689 |
Conv2d_GN_ReLU | import torch
import torch.nn as nn
class Conv2d_GN_ReLU(nn.Module):
""" Implements a module that performs
conv2d + groupnorm + ReLU +
Assumes kernel size is odd
"""
def __init__(self, in_channels, out_channels, num_groups, ksize=3, stride=1
):
super(Conv2d_GN_ReLU, ... | 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.... | FANG-Xiaolin/uois | Conv2d_GN_ReLU | false | 2,220 | [
"MIT"
] | 0 | 7489e69d1513faf2f3f030a441abdd33ca22304c | https://github.com/FANG-Xiaolin/uois/tree/7489e69d1513faf2f3f030a441abdd33ca22304c |
GaussianKullbackLeiblerLoss | # 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... | aloctavodia/kulprit | GaussianKullbackLeiblerLoss | false | 18,287 | [
"MIT"
] | 4 | ab017074f7428154b8834515512db259c5f635e8 | https://github.com/aloctavodia/kulprit/tree/ab017074f7428154b8834515512db259c5f635e8 |
AGRUCell | # 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 ... | liyunrui/DeepCTR-Torch | AGRUCell | false | 12,721 | [
"Apache-2.0"
] | 0 | 392fd6d39d9ca0ac854022136cdb4d5c68e3a592 | https://github.com/liyunrui/DeepCTR-Torch/tree/392fd6d39d9ca0ac854022136cdb4d5c68e3a592 |
LatentLoss | import torch
class L1Loss(torch.nn.Module):
def __init__(self):
super().__init__()
def forward(self, true, pred):
return torch.mean(torch.abs(true - pred))
class LogCoshLoss(torch.nn.Module):
def __init__(self):
super().__init__()
def forward(self, true, pred):
lo... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | CSID-DGU/-2020-1-OSSP1-ninetynine-2 | LatentLoss | false | 4,941 | [
"MIT"
] | 1 | b1824254882eeea0ee44e4e60896b72c51ef1d2c | https://github.com/CSID-DGU/-2020-1-OSSP1-ninetynine-2/tree/b1824254882eeea0ee44e4e60896b72c51ef1d2c |
Encoder | import torch
from torch import nn
from torch.nn import functional as F
class Encoder(nn.Module):
def __init__(self, latent_size):
super().__init__()
self.latent_size = latent_size
self.conv1 = nn.Conv2d(3, 32, 4, stride=2)
self.conv2 = nn.Conv2d(32, 64, 4, stride=2)
self.c... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
assert_s... | jinyeom/ga-plastic-models | Encoder | false | 3,754 | [
"MIT"
] | 0 | e38b245ae51c35a5f32679cc9f215463a3d58f1a | https://github.com/jinyeom/ga-plastic-models/tree/e38b245ae51c35a5f32679cc9f215463a3d58f1a |
SimpleResidualBlock | # 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_... | ayanch07/ResNet-cifar-10-pytorch | SimpleResidualBlock | false | 3,154 | [
"MIT"
] | 0 | bafc945a022a2e3ada689a831c7e57b5bdb0e8bd | https://github.com/ayanch07/ResNet-cifar-10-pytorch/tree/bafc945a022a2e3ada689a831c7e57b5bdb0e8bd |
Gate | import torch
import torch.nn as nn
import torch.nn.functional as F
class Gate(nn.Module):
"""Gate Unit
g = sigmoid(Wx)
x = g * x
"""
def __init__(self, input_size):
super(Gate, self).__init__()
self.linear = nn.Linear(input_size, input_size, bias=False)
def forward(self, x):
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | albert-dot-ai/MnemonicReader | Gate | false | 12,066 | [
"BSD-3-Clause"
] | 0 | eb51eb679a58677a405953c0c579568377c0b0f8 | https://github.com/albert-dot-ai/MnemonicReader/tree/eb51eb679a58677a405953c0c579568377c0b0f8 |
Combiner | # 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... | BaharAzari/EquiGenDyna | Combiner | false | 11,252 | [
"MIT"
] | 0 | 1f71d9f7bf278880c61ceacec705bbb23852227c | https://github.com/BaharAzari/EquiGenDyna/tree/1f71d9f7bf278880c61ceacec705bbb23852227c |
GetMask | # 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.multiprocessing
import torch.utils.data
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = to... | WuDiDaBinGe/TAKG | GetMask | false | 1,215 | [
"MIT"
] | 0 | 83e608e677a4ee74722d18cb5ef430f4f6c6ad31 | https://github.com/WuDiDaBinGe/TAKG/tree/83e608e677a4ee74722d18cb5ef430f4f6c6ad31 |
AMSoftmaxLoss | import torch
import torch.nn as nn
import torch.nn.functional as F
class AMSoftmaxLoss(nn.Module):
def __init__(self, hidden_dim, speaker_num, s=30.0, m=0.4, **kwargs):
"""
AM Softmax Loss
"""
super(AMSoftmaxLoss, self).__init__()
self.s = s
self.m = m
self... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | AyushExel/s3prl | AMSoftmaxLoss | false | 1,991 | [
"MIT"
] | 0 | 6531904e9621a778978b9cfef3ba9f582e56639a | https://github.com/AyushExel/s3prl/tree/6531904e9621a778978b9cfef3ba9f582e56639a |
GatedConv2d | # 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... | JamesRitchie/nsf | GatedConv2d | false | 5,382 | [
"MIT"
] | 1 | 5628a6f8190c9e3840208da8baf5cf403ca9b892 | https://github.com/JamesRitchie/nsf/tree/5628a6f8190c9e3840208da8baf5cf403ca9b892 |
encoder3 | import torch
import torch.nn as nn
class encoder3(nn.Module):
def __init__(self):
super(encoder3, self).__init__()
self.conv1 = nn.Conv2d(3, 3, 1, 1, 0)
self.reflecPad1 = nn.ReflectionPad2d((1, 1, 1, 1))
self.conv2 = nn.Conv2d(3, 64, 3, 1, 0)
self.relu2 = nn.ReLU(inplace=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 import triton_helpers
from torch._inductor.runtime.... | cy-xu/LinearStyleTransfer | encoder3 | false | 6,564 | [
"BSD-2-Clause"
] | 1 | a07ab32db037f60a122e252588d6bd504b7d70d7 | https://github.com/cy-xu/LinearStyleTransfer/tree/a07ab32db037f60a122e252588d6bd504b7d70d7 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.