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 |
|---|---|---|---|---|---|---|---|---|---|---|
SimpleSpatialEmbedding | # 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 math as tl_math
import torch.... | ashwinpn/Computer-Vision | SimpleSpatialEmbedding | false | 6,274 | [
"MIT"
] | 1 | 9dc3abfe416385171b76e2bad6872e10f36a12b4 | https://github.com/ashwinpn/Computer-Vision/tree/9dc3abfe416385171b76e2bad6872e10f36a12b4 |
AvgPool | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
import torch.utils.data
assert_size_stride = torch._C._dynamo.guards... | LindaCY/fastNLP | AvgPool | false | 17,610 | [
"Apache-2.0"
] | 4 | 3fa95b6cfc31211453bc21792e3eef87948858da | https://github.com/LindaCY/fastNLP/tree/3fa95b6cfc31211453bc21792e3eef87948858da |
PositionalEncoding1d | # 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 math
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guar... | alisiahkoohi/survae_flows | PositionalEncoding1d | false | 14,790 | [
"MIT"
] | 262 | e1747b05524c7ab540a211ed360ab3e67bc3e96d | https://github.com/alisiahkoohi/survae_flows/tree/e1747b05524c7ab540a211ed360ab3e67bc3e96d |
VirtualBatchNorm | # 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
import torch.autograd
import torch.utils.data
assert_size... | kayuksel/torchgan | VirtualBatchNorm | false | 10,555 | [
"MIT"
] | 0 | 739d97cef4c49fb80155de84e609471efafab107 | https://github.com/kayuksel/torchgan/tree/739d97cef4c49fb80155de84e609471efafab107 |
EnsembleFC | import torch
import torch.nn as nn
class EnsembleFC(nn.Module):
__constants__ = ['in_features', 'out_features']
in_features: 'int'
out_features: 'int'
ensemble_size: 'int'
weight: 'torch.Tensor'
def __init__(self, in_features: 'int', out_features: 'int',
ensemble_size: 'int', weight_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
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | simonat2011/DI-engine | EnsembleFC | false | 12,987 | [
"Apache-2.0"
] | 0 | 3a91c4297d58b3beff40b48bd37eb0b399c724a7 | https://github.com/simonat2011/DI-engine/tree/3a91c4297d58b3beff40b48bd37eb0b399c724a7 |
SelfGating | import torch
import torch as th
from torch import nn
class SelfGating(nn.Module):
def __init__(self, input_dim):
super(SelfGating, self).__init__()
self.fc = nn.Linear(input_dim, input_dim)
def forward(self, input_tensor):
"""Feature gating as used in S3D-G.
"""
spatiot... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import 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... | Fork-for-Modify/VideoFeatureExtractor | SelfGating | false | 8,110 | [
"Apache-2.0"
] | 15 | a73bb5a575a318c2d71bc8dd2432c8941c35a77f | https://github.com/Fork-for-Modify/VideoFeatureExtractor/tree/a73bb5a575a318c2d71bc8dd2432c8941c35a77f |
mfm | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 | mfm | false | 7,831 | [
"MIT"
] | 33 | 16d51fe7da6e4a52d144e938afb3072eb8e4e8de | https://github.com/BradyFU/DVG-Face/tree/16d51fe7da6e4a52d144e938afb3072eb8e4e8de |
Encoder | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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_... | DuneeshaFernando/usad | Encoder | false | 11,396 | [
"BSD-3-Clause"
] | 0 | 22653a96deefe57013b1df57bb6dc316ef423c95 | https://github.com/DuneeshaFernando/usad/tree/22653a96deefe57013b1df57bb6dc316ef423c95 |
GlobalAveragePooling | # 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... | MrChenFeng/Project-Template | GlobalAveragePooling | false | 850 | [
"MIT"
] | 0 | 42a335c6abb710bbae6407cbb0ca461533bc12f9 | https://github.com/MrChenFeng/Project-Template/tree/42a335c6abb710bbae6407cbb0ca461533bc12f9 |
JSloss | # 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... | jaredaevans/UltrafastNST | JSloss | false | 6,917 | [
"MIT"
] | 1 | 6671c6b618ce6bb4920b15f782be962e484a5423 | https://github.com/jaredaevans/UltrafastNST/tree/6671c6b618ce6bb4920b15f782be962e484a5423 |
ResidualBlockNoBN | import torch
import torch.utils.data
from torch.utils import data as data
import torch.nn as nn
from torch.nn import init as init
from torch.nn.modules.batchnorm import _BatchNorm
@torch.no_grad()
def default_init_weights(module_list, scale=1, bias_fill=0, **kwargs):
"""Initialize network weights.
Args:
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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
from ... | Xjg-0216/DCSNet | ResidualBlockNoBN | false | 11,985 | [
"MIT"
] | 0 | 0ed27d01ef1d3dbff7613ab3b145f95a32c071eb | https://github.com/Xjg-0216/DCSNet/tree/0ed27d01ef1d3dbff7613ab3b145f95a32c071eb |
VdLinear | import math
import torch
import torch.nn as nn
import torch.nn.functional as F
def calculate_kl(log_alpha):
return 0.5 * torch.sum(torch.log1p(torch.exp(-log_alpha)))
class VdLinear(nn.Module):
"""
Linear Layer variational dropout
"""
def __init__(self, n_in, n_out, alpha_shape=(1, 1), bias=Tr... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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... | Neronjust2017/pytorch-classification-project | VdLinear | false | 892 | [
"MIT"
] | 0 | fc5f4d7c46d071765f682ce20e6580646d4e5c76 | https://github.com/Neronjust2017/pytorch-classification-project/tree/fc5f4d7c46d071765f682ce20e6580646d4e5c76 |
StackTime | # 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.onnx
assert_size_stride = torch._C._dynamo.guards.assert_size_stri... | swiftdiaries/inference | StackTime | false | 10,842 | [
"Apache-2.0"
] | 0 | dbb39947d4515449b1a3393cde39ca0dba935b1d | https://github.com/swiftdiaries/inference/tree/dbb39947d4515449b1a3393cde39ca0dba935b1d |
Mish | # 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 torch.utils.data
import torch.nn as nn
from math import... | Het-Shah/Monk_Object_Detection | Mish | false | 8,374 | [
"Apache-2.0"
] | 15 | 1d7a07193ea3455221caa41d07c33c81d50c6b3f | https://github.com/Het-Shah/Monk_Object_Detection/tree/1d7a07193ea3455221caa41d07c33c81d50c6b3f |
GlobalPoolingBlock | # 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... | DevilMayNotCry/My_curl | GlobalPoolingBlock | false | 9,123 | [
"BSD-3-Clause"
] | 0 | a8f65a3e58cbdeefb4679aa2f0c3d9d800b67381 | https://github.com/DevilMayNotCry/My_curl/tree/a8f65a3e58cbdeefb4679aa2f0c3d9d800b67381 |
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
from torch import nn
import t... | nmichlo/msc-research | Net | false | 7,352 | [
"MIT"
] | 1 | 625e57eca77bbfbc4728ccebdb0733e1613bd258 | https://github.com/nmichlo/msc-research/tree/625e57eca77bbfbc4728ccebdb0733e1613bd258 |
UnfoldTemporalWindows | import torch
import torch.nn as nn
class UnfoldTemporalWindows(nn.Module):
def __init__(self, window_size, window_stride, window_dilation=1):
super().__init__()
self.window_size = window_size
self.window_stride = window_stride
self.window_dilation = window_dilation
self.pa... | 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... | IW276/IW276SS20P7 | UnfoldTemporalWindows | false | 9,236 | [
"MIT"
] | 0 | ed388c04eb8d5ea1d13b5ed4119e722552794a62 | https://github.com/IW276/IW276SS20P7/tree/ed388c04eb8d5ea1d13b5ed4119e722552794a62 |
WCE_loss | # 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
assert_size_stride = torch._C._dynamo.guards.assert... | atch841/pytorch-one-shot-texture-segmentation | WCE_loss | false | 1,498 | [
"MIT"
] | 0 | 8b781b861d17eb1e1e7014f54f8fd39dc10dd2b8 | https://github.com/atch841/pytorch-one-shot-texture-segmentation/tree/8b781b861d17eb1e1e7014f54f8fd39dc10dd2b8 |
RMSELoss | import torch
import torch.nn as nn
import torch.utils.data
class RMSELoss(torch.nn.Module):
def __init__(self):
super(RMSELoss, self).__init__()
def forward(self, x, y):
criterion = nn.MSELoss()
loss = torch.sqrt(criterion(x, y))
return loss
def get_inputs():
return [to... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice
import torch.utils.data
asse... | gitter-badger/HEPAutoencoders | RMSELoss | false | 12,429 | [
"Apache-2.0"
] | 0 | 43010cd66fa4335a04b30b87926148e1c8d92de9 | https://github.com/gitter-badger/HEPAutoencoders/tree/43010cd66fa4335a04b30b87926148e1c8d92de9 |
MyLinear | # 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 import nn
assert_s... | JunoCheon/D2L | MyLinear | false | 2,600 | [
"MIT"
] | 0 | 9464709862e55151aec28fc637c5942738bdd72b | https://github.com/JunoCheon/D2L/tree/9464709862e55151aec28fc637c5942738bdd72b |
Encoder | import torch
import torch.nn as nn
class Encoder(nn.Module):
"""
This class defines the encoder architecture
"""
def __init__(self, input_size, hidden_size, bottleneck):
super().__init__()
self.linear1 = nn.Linear(input_size, hidden_size)
self.mean = nn.Linear(hidden_size, bottlen... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | FaisalAhmed0/variational-autoencoder | Encoder | false | 461 | [
"MIT"
] | 0 | a6c1c96da8063d822aef2e2bdd69d7cb1b35c2cd | https://github.com/FaisalAhmed0/variational-autoencoder/tree/a6c1c96da8063d822aef2e2bdd69d7cb1b35c2cd |
OffsetNet | import torch
from torch import nn as nn
class OffsetNet(nn.Module):
"""OffsetNet in Temporal interlace module.
The OffsetNet consists of one convolution layer and two fc layers
with a relu activation following with a sigmoid function. Following
the convolution layer, two fc layers and relu are applie... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 as nn
as... | HypnosXC/mmaction2 | OffsetNet | false | 13,827 | [
"Apache-2.0"
] | 549 | a26d5f981449445a5e22a0a60d8b285e06c3dd6e | https://github.com/HypnosXC/mmaction2/tree/a26d5f981449445a5e22a0a60d8b285e06c3dd6e |
SorensenDiceLoss | import torch
from torch import nn
def assert_(condition, message='', exception_type=AssertionError):
"""Like assert, but with arbitrary exception types."""
if not condition:
raise exception_type(message)
def flatten_samples(input_):
"""
Flattens a tensor or a variable such that the channel a... | 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... | krayyalasomayajula/inferno | SorensenDiceLoss | false | 3,951 | [
"Apache-2.0"
] | 0 | 1c56f34ff19c69dec3d3cb6287b659345bce3492 | https://github.com/krayyalasomayajula/inferno/tree/1c56f34ff19c69dec3d3cb6287b659345bce3492 |
GeneratorBlock | import math
import torch
import numpy as np
from torch import nn
from typing import Tuple
import torch.nn.functional as F
import torch.utils.data
import torch.nn.functional
from typing import List
from typing import Optional
import torch.autograd
class EqualizedWeight(nn.Module):
"""
<a id="equalized_weight">... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | Hadryan/nn | GeneratorBlock | false | 9,412 | [
"MIT"
] | 0 | b10e3dea2c7e1f6569bfdf8e1a48f8d48b5a645d | https://github.com/Hadryan/nn/tree/b10e3dea2c7e1f6569bfdf8e1a48f8d48b5a645d |
SeparatedLoss | # 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... | koukyo1994/riadd-competition | SeparatedLoss | false | 7,056 | [
"MIT"
] | 1 | 0e399305aef21d40125cadccee55be1f0b310216 | https://github.com/koukyo1994/riadd-competition/tree/0e399305aef21d40125cadccee55be1f0b310216 |
NormUpscaleConvBlock | # 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 ... | ChandreyeeB/Blind-Image-Deconvolution-using-Deep-Generative-Priors | NormUpscaleConvBlock | false | 7,878 | [
"MIT"
] | 24 | 4198bd2d325a32ffc4e714c486540e63440ab110 | https://github.com/ChandreyeeB/Blind-Image-Deconvolution-using-Deep-Generative-Priors/tree/4198bd2d325a32ffc4e714c486540e63440ab110 |
EQ | import torch
class EQ(torch.nn.Module):
def __init__(self):
super(EQ, self).__init__()
def forward(self, x, y):
return x == y
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
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda
@triton.j... | Ilyabasharov/torch2trt | EQ | false | 2,522 | [
"MIT"
] | 0 | 76bf298b3da408509665e23e2494922b131afb10 | https://github.com/Ilyabasharov/torch2trt/tree/76bf298b3da408509665e23e2494922b131afb10 |
LayerNorm | import torch
import torch.nn as nn
class LayerNorm(nn.Module):
def __init__(self, num_features, eps=1e-05, affine=True):
super(LayerNorm, self).__init__()
self.num_features = num_features
self.affine = affine
self.eps = eps
if self.affine:
self.gamma = nn.Param... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_... | Boyiliee/PONO | LayerNorm | false | 13,405 | [
"MIT"
] | 133 | b9108e8bf8ba0228635532ba5bdc973b7393d045 | https://github.com/Boyiliee/PONO/tree/b9108e8bf8ba0228635532ba5bdc973b7393d045 |
LinearSQ | # 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 math
from torch import Tensor
import torch.nn as nn
from torch.nn.paramet... | June01/WFSAL-icmr21 | LinearSQ | false | 17,514 | [
"MIT"
] | 9 | 86fd6e9e34483ea17e088e4c1ee8f66edf3aecce | https://github.com/June01/WFSAL-icmr21/tree/86fd6e9e34483ea17e088e4c1ee8f66edf3aecce |
PointerAttention | import torch
import torch.utils.data
import torch.nn.functional as F
def masked_softmax(x, m=None, dim=-1):
"""
Softmax with mask
:param x:
:param m:
:param dim:
:return:
"""
if m is not None:
m = m.float()
x = x * m
e_x = torch.exp(x - torch.max(x, dim=dim, keepdim... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | xdong73S/Match_LSTM_v2.0 | PointerAttention | false | 4,581 | [
"MIT"
] | 0 | dfb8cfbc2a5dafc6655eecf151a7dbcf808cd729 | https://github.com/xdong73S/Match_LSTM_v2.0/tree/dfb8cfbc2a5dafc6655eecf151a7dbcf808cd729 |
MultiModel | import torch
import torch.nn as nn
class MultiModel(nn.Module):
def __init__(self, input_size, output_size):
super(MultiModel, self).__init__()
self.layer1 = nn.Linear(input_size, 8)
self.relu = nn.ReLU()
self.layer2 = nn.Linear(8, output_size)
self.out = nn.Softmax()
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | amperie/user-models | MultiModel | false | 3,096 | [
"Apache-2.0"
] | 0 | 5236c50d0f20a7bac81acc5d1936a3502de2f5f3 | https://github.com/amperie/user-models/tree/5236c50d0f20a7bac81acc5d1936a3502de2f5f3 |
CIoU_loss | # 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
assert_size_stride = torch._... | debrouchovea/ReproduceGoturn | CIoU_loss | false | 3,414 | [
"MIT"
] | 0 | d60f13c781ca612cacc17536530bbee989bdfa45 | https://github.com/debrouchovea/ReproduceGoturn/tree/d60f13c781ca612cacc17536530bbee989bdfa45 |
ScaleDotProductAttention | # 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.... | LindgeW/BiaffineNER | ScaleDotProductAttention | false | 8,484 | [
"Apache-2.0"
] | 13 | 0ae179e9ff731362f6c8ba6d0b24485ad45e8bbf | https://github.com/LindgeW/BiaffineNER/tree/0ae179e9ff731362f6c8ba6d0b24485ad45e8bbf |
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
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | mbrukman/machine-learning-book | Model | false | 7,195 | [
"MIT"
] | 1 | f29a0f8aafa63a77081f3bcec68866e33dd41776 | https://github.com/mbrukman/machine-learning-book/tree/f29a0f8aafa63a77081f3bcec68866e33dd41776 |
PerceptronTanh | # 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.... | Bhaskers-Blu-Org2/PDP-Solver | PerceptronTanh | false | 7,792 | [
"MIT"
] | 28 | 1fca34d81f36268288f46416fb6956e5b36df69e | https://github.com/Bhaskers-Blu-Org2/PDP-Solver/tree/1fca34d81f36268288f46416fb6956e5b36df69e |
ConvBlock | import torch
import torch.nn as nn
class Conv3x3(nn.Module):
"""Layer to pad and convolve input
"""
def __init__(self, in_channels, out_channels, use_refl=True):
super(Conv3x3, self).__init__()
if use_refl:
self.pad = nn.ReflectionPad2d(1)
else:
self.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.triton_helpers import libdevice, math as tl_math
im... | RaresAmbrus/KP3D | ConvBlock | false | 14,272 | [
"MIT"
] | 227 | 7966c66679d32b81ea6e3181847ab3146e5a3ed2 | https://github.com/RaresAmbrus/KP3D/tree/7966c66679d32b81ea6e3181847ab3146e5a3ed2 |
Norm | # 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
import torch.fx
assert_size_... | NVIDIA/Torch-TensorRT | Norm | false | 14,083 | [
"BSD-3-Clause"
] | 430 | 1a22204fecec690bc3c2a318dab4f57b98c57f05 | https://github.com/NVIDIA/Torch-TensorRT/tree/1a22204fecec690bc3c2a318dab4f57b98c57f05 |
CosLoss | # 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.nn.modules.loss import _Loss
assert_size_stride = torch._C._dynamo.g... | ezxzeng/FFB6D | CosLoss | false | 15,328 | [
"MIT"
] | 145 | fd0ea6471532ab1dc68f9a58b52d9a63f8fb76f2 | https://github.com/ezxzeng/FFB6D/tree/fd0ea6471532ab1dc68f9a58b52d9a63f8fb76f2 |
Decoder1 | import torch
import torch.nn as nn
class Decoder1(nn.Module):
def __init__(self, model=None, fixed=False):
super(Decoder1, self).__init__()
self.fixed = fixed
self.conv11 = nn.Conv2d(64, 3, 3, 1, 0, dilation=1)
self.relu = nn.ReLU(inplace=True)
self.unpool = nn.UpsamplingN... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | MingSun-Tse/Collaborative-Distillation | Decoder1 | false | 14,016 | [
"MIT"
] | 172 | 915712674af82ff91d926d922c14988cce0430f3 | https://github.com/MingSun-Tse/Collaborative-Distillation/tree/915712674af82ff91d926d922c14988cce0430f3 |
DotAttn | import torch
from torch import nn
from torch.nn import functional as F
class DotAttn(nn.Module):
def __init__(self, dropout=0, enc_trans=None, dec_trans=None):
super().__init__()
self.dropout = nn.Dropout(dropout)
self.dec_trans = dec_trans or nn.Identity()
self.enc_trans = enc_tr... | 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
a... | DreamerDeo/gazp | DotAttn | false | 8,013 | [
"MIT"
] | 18 | 5f823a447ffdf5176023a01516d2be7c383294d9 | https://github.com/DreamerDeo/gazp/tree/5f823a447ffdf5176023a01516d2be7c383294d9 |
CuboidPoseHead | # 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
assert_size_stride = torch._C._dynamo.guards.assert... | atoaiari/mmpose | CuboidPoseHead | false | 6,272 | [
"Apache-2.0"
] | 1 | 256a9117767008e8c33b4038a346aca12233e300 | https://github.com/atoaiari/mmpose/tree/256a9117767008e8c33b4038a346aca12233e300 |
GeM | # 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 import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
import... | Ajax0564/Cornell-Birdcall-Identification | GeM | false | 18,400 | [
"MIT"
] | 2 | af13f2a73a3a665aa27722855a1c6a4d915d46db | https://github.com/Ajax0564/Cornell-Birdcall-Identification/tree/af13f2a73a3a665aa27722855a1c6a4d915d46db |
FrameMaxPool | import torch
import torch.nn.parallel
import torch.nn as nn
import torch.utils.data
import torch.backends.cudnn
class FrameMaxPool(nn.Module):
def __init__(self, input_size, hidden_size, stride):
super(FrameMaxPool, self).__init__()
self.vis_conv = nn.Conv1d(input_size, hidden_size, 1, 1)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn.parallel
impo... | MicroTensor-ai/episodic-memory | FrameMaxPool | false | 11,704 | [
"MIT"
] | 0 | 295a3752ab94c7a6f45355aa2c54bffbf84b574f | https://github.com/MicroTensor-ai/episodic-memory/tree/295a3752ab94c7a6f45355aa2c54bffbf84b574f |
BertAttention | from _paritybench_helpers import _mock_config
import math
import torch
import torch.utils.data
import torch.nn as nn
import torch
import torch.nn.parallel
class BertSelfAttention(nn.Module):
def __init__(self, config):
super(BertSelfAttention, self).__init__()
if config.hidden_size % config.num_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
from torch._inductor.runtime.... | IsmaelElsharkawi/new_pororo_repo | BertAttention | false | 8,819 | [
"MIT"
] | 19 | 4617083b420615b8a3eb0f44d02e4e91a8f407f7 | https://github.com/IsmaelElsharkawi/new_pororo_repo/tree/4617083b420615b8a3eb0f44d02e4e91a8f407f7 |
FinalTanh | import torch
class FinalTanh(torch.nn.Module):
def __init__(self, input_channels, hidden_channels,
hidden_hidden_channels, num_hidden_layers):
super(FinalTanh, self).__init__()
self.input_channels = input_channels
self.hidden_channels = hidden_channels
self.hidden_hidden_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._inductor.runtime.... | MLforHealth/state_representations_for_RLinHealth | FinalTanh | false | 8,512 | [
"MIT"
] | 24 | aa8dbb7d56caa95bf4380e3e745e134996291b66 | https://github.com/MLforHealth/state_representations_for_RLinHealth/tree/aa8dbb7d56caa95bf4380e3e745e134996291b66 |
Transformer | import torch
import torch.nn as nn
import torch.nn.parallel
class Mlp(nn.Module):
"""Implementation of MLP"""
def __init__(self, in_features, hidden_features=None, out_features=None,
act_layer=nn.GELU, drop=0.0):
super().__init__()
out_features = out_features or in_features
hi... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | javierrodenas/clearml_javi | Transformer | false | 10,393 | [
"Apache-2.0"
] | 0 | b6326104fe6a6f522223c2ac3d87468990a9e6f2 | https://github.com/javierrodenas/clearml_javi/tree/b6326104fe6a6f522223c2ac3d87468990a9e6f2 |
FSM | # 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... | Genevievekim/segformer | FSM | false | 17,324 | [
"MIT"
] | 10 | 4a0800746ade51101ec2573c683b06eccadb9683 | https://github.com/Genevievekim/segformer/tree/4a0800746ade51101ec2573c683b06eccadb9683 |
reduction_1x1 | import math
import torch
import torch.nn as nn
import torch.utils.data.distributed
class reduction_1x1(nn.Sequential):
def __init__(self, num_in_filters, num_out_filters, max_depth, is_final
=False):
super(reduction_1x1, self).__init__()
self.max_depth = max_depth
self.is_final = ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | syKevinPeng/TransDepth | reduction_1x1 | false | 16,521 | [
"MIT"
] | 118 | 2282039da7bc0812e19a27b2d73a25bdef97d739 | https://github.com/syKevinPeng/TransDepth/tree/2282039da7bc0812e19a27b2d73a25bdef97d739 |
Expansion2D | import torch
class Expansion2D(torch.nn.Module):
"""
Expands a tensor in the last two dimensions, effectively to a coarse grid
of smaller grids.
"""
def __init__(self, expsize1: 'int', expsize2: 'int'):
"""
:param expsize1: size of the second last dimension to be created
:... | 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... | kpoeppel/pytorch_probgraph | Expansion2D | false | 15,850 | [
"BSD-3-Clause"
] | 47 | b78595ab03bbe92595ad2f6b35f5dd8bf84d6da0 | https://github.com/kpoeppel/pytorch_probgraph/tree/b78595ab03bbe92595ad2f6b35f5dd8bf84d6da0 |
Upsample | # 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... | CV-YYDS/YOLOv3 | Upsample | false | 11,274 | [
"MIT"
] | 0 | a433064721dfc932509aaed6cb44a785b24bc768 | https://github.com/CV-YYDS/YOLOv3/tree/a433064721dfc932509aaed6cb44a785b24bc768 |
GlobalAvgPool1d | # 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.nn.parallel
import torch.optim
import torch.utils.data
from abc import abstractmethod
assert_size_stride ... | savan77/nni | GlobalAvgPool1d | false | 4,268 | [
"MIT"
] | 0 | 510213393d9cae58c5a8cccd21f322f7bba4e0cf | https://github.com/savan77/nni/tree/510213393d9cae58c5a8cccd21f322f7bba4e0cf |
MixtureDensityHead | from _paritybench_helpers import _mock_config
import torch
import torch.nn as nn
from torch.autograd import Variable
from torch.distributions import Categorical
class MixtureDensityHead(nn.Module):
def __init__(self, config: 'DictConfig', **kwargs):
self.hparams = config
super().__init__()
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as ... | edchengmoore/pytorch_tabular | MixtureDensityHead | false | 4,749 | [
"MIT"
] | 0 | 25f87089fbed95b46f2a1a8a96fba1f581aa8af1 | https://github.com/edchengmoore/pytorch_tabular/tree/25f87089fbed95b46f2a1a8a96fba1f581aa8af1 |
DilatedResConv | # 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 ... | soumyac1999/instrumental-music-translation | DilatedResConv | false | 4,376 | [
"MIT"
] | 0 | f0d5edfdf34ef7bc9b329c426089f61d3468caa8 | https://github.com/soumyac1999/instrumental-music-translation/tree/f0d5edfdf34ef7bc9b329c426089f61d3468caa8 |
ResUnit | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | huang-junhong/SIRSRGAN | ResUnit | false | 12,520 | [
"Apache-2.0"
] | 0 | a774416cd45a00982141a1571cb2a8a18bb05c86 | https://github.com/huang-junhong/SIRSRGAN/tree/a774416cd45a00982141a1571cb2a8a18bb05c86 |
Model_CIFAR10 | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model_CIFAR10(nn.Module):
def __init__(self):
super(Model_CIFAR10, self).__init__()
self.linear1 = nn.Linear(32 * 32, 50)
self.linear2 = nn.Linear(50, 10)
def forward(self, inputs):
x = inputs.view(-1, 3... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | Pluriscient/learn-to-learn | Model_CIFAR10 | false | 11,790 | [
"MIT"
] | 0 | 4aa0143522eb90f6439b83ed424d12b434cb344b | https://github.com/Pluriscient/learn-to-learn/tree/4aa0143522eb90f6439b83ed424d12b434cb344b |
ConformerFeedForward | # 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
import torch.utils.data
import torch.optim
assert_size_stri... | ShantanuNair/NeMo | ConformerFeedForward | false | 17,899 | [
"Apache-2.0"
] | 10 | d01b7bbc3fdb1bbf14789f71b8f368cf0aa8f86b | https://github.com/ShantanuNair/NeMo/tree/d01b7bbc3fdb1bbf14789f71b8f368cf0aa8f86b |
WeightedSumLoss | import torch
from torch import nn
from torchvision import models as models
import torch.nn.parallel
import torch.optim
import torch.utils.data
import torch.utils.data.distributed
from torchvision.transforms import *
import torch.onnx
class WeightedSumLoss(nn.Module):
"""Aggregate multiple loss functions in one we... | 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
from torchvision import models as models
import torch.nn.parallel
import torch.optim
import torch.utils.data
import tor... | aalborov/openvino_training_extensions | WeightedSumLoss | false | 6,044 | [
"Apache-2.0"
] | 1 | a0bb39424151a98e1ca80c4aa5c865636d401785 | https://github.com/aalborov/openvino_training_extensions/tree/a0bb39424151a98e1ca80c4aa5c865636d401785 |
DeepNN_v1 | import torch
import torch.nn as nn
class DeepNN_v1(nn.Module):
def __init__(self, X_dim, i_dropout_rate, h_dropout_rate):
super().__init__()
self.v1_layer1 = nn.Linear(X_dim, 512, bias=True)
self.v1_layer2 = nn.Linear(512, 1, bias=True)
self.i_dropout = nn.Dropout(i_dropout_rate)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | SBIlab/NetBio | DeepNN_v1 | false | 11,834 | [
"MIT"
] | 0 | 7abd24b8989cea381147d912f76a72676750b9d2 | https://github.com/SBIlab/NetBio/tree/7abd24b8989cea381147d912f76a72676750b9d2 |
EmbedNoise | # 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... | KirillShmilovich/coarse2fine_VAE | EmbedNoise | false | 9,273 | [
"MIT"
] | 0 | e4c1022f9570934a2be59ea0989c80102dc46ad4 | https://github.com/KirillShmilovich/coarse2fine_VAE/tree/e4c1022f9570934a2be59ea0989c80102dc46ad4 |
BertSelfAttention | from _paritybench_helpers import _mock_config
import math
import torch
import torch.nn as nn
class BertSelfAttention(nn.Module):
def __init__(self, config):
super().__init__()
self.num_attention_heads = config.num_attention_heads
self.attention_head_size = int(config.hidden_size / config.... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | brendon-boldt/minbert-assignment | BertSelfAttention | false | 12,196 | [
"Apache-2.0"
] | 0 | 0b562d791d34a40fd3c0383a0a32b4eeb2171cb5 | https://github.com/brendon-boldt/minbert-assignment/tree/0b562d791d34a40fd3c0383a0a32b4eeb2171cb5 |
AconC | # 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
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | LTTBasic/lecttue-diagonosis | AconC | false | 749 | [
"MIT"
] | 0 | a9573f79da1fa8dcdd649bfd819ffad67ecad309 | https://github.com/LTTBasic/lecttue-diagonosis/tree/a9573f79da1fa8dcdd649bfd819ffad67ecad309 |
ConvNet | import torch
import torch.nn as nn
class ConvNet(nn.Module):
def __init__(self, img_size):
super(ConvNet, self).__init__()
self.conv1 = nn.Conv2d(3, 32, 3)
self.conv2 = nn.Conv2d(32, 64, 3)
self.relu = nn.ReLU()
self.padding = nn.ZeroPad2d(1)
self.fc1 = nn.Linear(4... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | Guojiacheng2017/wasteNet_SH | ConvNet | false | 9,073 | [
"MIT"
] | 0 | cc02e535e52513133fe87094f76a30835dbb0010 | https://github.com/Guojiacheng2017/wasteNet_SH/tree/cc02e535e52513133fe87094f76a30835dbb0010 |
dnn | # 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_... | Harshitmalaviya/whisper-to-normal-speech-conversion | dnn | false | 8,265 | [
"MIT"
] | 23 | a6d411b27a3c5cc4ad12e3968350b22d88b9b4d9 | https://github.com/Harshitmalaviya/whisper-to-normal-speech-conversion/tree/a6d411b27a3c5cc4ad12e3968350b22d88b9b4d9 |
RatioModel | # 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
as... | numahha/wmopo | RatioModel | false | 7,358 | [
"MIT"
] | 1 | 1557dab2e8168c1f2e53ffbc435b4000680f1d28 | https://github.com/numahha/wmopo/tree/1557dab2e8168c1f2e53ffbc435b4000680f1d28 |
ClsConvHead | import torch
import torch.nn as nn
import torch.nn.parallel
class ClsConvHead(nn.Module):
"""Global average pooling + conv head for classification
"""
def __init__(self, input_dim, output_dim):
super().__init__()
self.avg_pool = nn.AdaptiveAvgPool2d((1, 1))
self.conv = nn.Conv2d(i... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.nn.parallel
assert_size_stride = torch._C._dy... | a1004123217/pytorch-mobile | ClsConvHead | false | 1,324 | [
"MIT"
] | 0 | 97974af3259a2073efbc334d57841efbd3eaadfb | https://github.com/a1004123217/pytorch-mobile/tree/97974af3259a2073efbc334d57841efbd3eaadfb |
TransformerDecoderLayer | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.nn.parallel
import torch.utils.data
import torch.distributions
class TransformerDecoderLayer(nn.Module):
"""Decoder layer block. Follows an implementation in fairseq with args.decoder_normalize_before=True,
i.e. order of operation... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | IA3005/NLP_ens | TransformerDecoderLayer | false | 11,624 | [
"MIT"
] | 0 | 794ebbff46d5e6d5476f29b577b40bbb52991246 | https://github.com/IA3005/NLP_ens/tree/794ebbff46d5e6d5476f29b577b40bbb52991246 |
MultiHeadAttention | import torch
import torch.nn as nn
import torch.nn.functional as F
class MultiHeadAttention(nn.Module):
"""
Applies an multi-head attention mechanism on the output features from the decoder.
Refer to 「State-of-the-art Speech Recognition With Sequence-to-Sequence Models」 Paper
https://arxiv.org/abs/17... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | ngbsLab/Korean-Speech-Recognition | MultiHeadAttention | false | 7,344 | [
"Apache-2.0"
] | 1 | 3867bf7d23222da6812c9b98a93d3c6f7b3c80fc | https://github.com/ngbsLab/Korean-Speech-Recognition/tree/3867bf7d23222da6812c9b98a93d3c6f7b3c80fc |
Aggregation | import torch
from torch import nn
from torch.nn import *
class Aggregation(nn.Module):
"""
Aggregation layer for the Dueling architecture.
https://arxiv.org/abs/1511.06581
This layer computes a Q function by combining
an estimate of V with an estimate of the advantage.
The advantage is 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
from torch import nn
from torch.nn import *
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._d... | jlubars/autonomous-learning-library | Aggregation | false | 10,303 | [
"MIT"
] | 0 | 5d2d2e1ee9e0876614d7113e26f026f126a3899f | https://github.com/jlubars/autonomous-learning-library/tree/5d2d2e1ee9e0876614d7113e26f026f126a3899f |
Attention | import torch
from torch import nn
import torch.optim
import torch.utils.data
class Attention(nn.Module):
"""
Attention Network.
"""
def __init__(self, encoder_dim, decoder_dim, attention_dim):
"""
:param encoder_dim: feature size of encoded images
:param decoder_dim: size of 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 import triton_helpers
from torch._inductor.runtime.... | CasperLindbergAtGithub/CaptionGeneration | Attention | false | 2,101 | [
"MIT"
] | 0 | a181d4e8db41e77cb2663ed10652f40f62bed482 | https://github.com/CasperLindbergAtGithub/CaptionGeneration/tree/a181d4e8db41e77cb2663ed10652f40f62bed482 |
QRLoss | from torch.nn import Module
import torch
from typing import cast
from torch.nn.modules import Module
class QRLoss(Module):
"""The QR (forward) loss between class probabilities and predictions.
This loss is defined in `'Resolving label uncertainty with implicit generative
models' <https://openreview.net/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.triton_helpers import math as tl_math
from torch.nn... | LaudateCorpus1/torchgeo | QRLoss | false | 2,498 | [
"MIT"
] | 0 | 747a9352b9663e7d0e0c90a8b53533f0bb06c9b3 | https://github.com/LaudateCorpus1/torchgeo/tree/747a9352b9663e7d0e0c90a8b53533f0bb06c9b3 |
SpatialAttention | import torch
import torch.nn as nn
class SpatialAttention(nn.Module):
def __init__(self, kernel_size=7, bias=True):
super(SpatialAttention, self).__init__()
assert kernel_size in (3, 7), 'kernel size must be 3 or 7'
padding = 3 if kernel_size == 7 else 1
self.conv1 = nn.Conv2d(2, ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | SuzaKrish/mmdetection | SpatialAttention | false | 1,101 | [
"Apache-2.0"
] | 0 | 31c16891d7493252262e738bcbf05326dba866b2 | https://github.com/SuzaKrish/mmdetection/tree/31c16891d7493252262e738bcbf05326dba866b2 |
Warp | import torch
from torch import Tensor
import torch.nn as nn
import torch.nn.functional as F
def coords_grid(flow: 'Tensor') ->Tensor:
"""Generate shifted coordinate grid based based input flow.
Args:
flow (Tensor): Estimated optical flow.
Returns:
Tensor: The coordinate that shifted by i... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch import Tensor
import torch.nn as nn
assert_size_stride = torch._C._d... | hologerry/mmflow | Warp | false | 15,543 | [
"Apache-2.0"
] | 481 | 40caf064851bd95317424e31cc137c0007a2bece | https://github.com/hologerry/mmflow/tree/40caf064851bd95317424e31cc137c0007a2bece |
SelfAttention | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | dimitrios-ebi/gene_symbol_classifier | SelfAttention | false | 12,289 | [
"Apache-2.0"
] | 0 | fe415f719fda4619041b9fe0639996c92e0f12a8 | https://github.com/dimitrios-ebi/gene_symbol_classifier/tree/fe415f719fda4619041b9fe0639996c92e0f12a8 |
CommandEmbedding | import torch
from torch import Tensor
from torch import nn
class CommandEmbedding(nn.Module):
def __init__(self, input_size, output_size):
super().__init__()
self.embedding = nn.Linear(input_size, output_size // 2)
self.encoding = nn.Parameter(torch.rand(1, 1, output_size // 2))
def ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import 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... | Kaixhin/GUDRL | CommandEmbedding | false | 8,400 | [
"MIT"
] | 26 | c13fa605a9ffb4c2932390b0b86e476aec62c142 | https://github.com/Kaixhin/GUDRL/tree/c13fa605a9ffb4c2932390b0b86e476aec62c142 |
BinaryReg | # 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.utils.dat... | matinraayai/pytorch_connectomics | BinaryReg | false | 3,980 | [
"MIT"
] | 0 | b11a2f7e71a8d1442fb05f7a6edfaaaa7b0d9205 | https://github.com/matinraayai/pytorch_connectomics/tree/b11a2f7e71a8d1442fb05f7a6edfaaaa7b0d9205 |
EqualConv2d | # 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 math
from torch import nn
assert_size_stride = torch._C._dynamo.guards.as... | ArashVahabpour/encoder4editing | EqualConv2d | false | 1,970 | [
"MIT"
] | 0 | 819b90ecd7397fbe2ab7cb30eb451dab0f3149fd | https://github.com/ArashVahabpour/encoder4editing/tree/819b90ecd7397fbe2ab7cb30eb451dab0f3149fd |
ConcatConv2d | # 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... | TevenLeScao/BasicSR | ConcatConv2d | false | 18,000 | [
"Apache-2.0"
] | 4 | 1a7bd8754de00f3a9c9f2031acfc447350459ea0 | https://github.com/TevenLeScao/BasicSR/tree/1a7bd8754de00f3a9c9f2031acfc447350459ea0 |
EqualConv2d | import math
import torch
from torch import nn
from torch.nn import functional as F
class EqualConv2d(nn.Module):
def __init__(self, in_channel, out_channel, kernel_size, stride=1,
padding=0, bias=True):
super().__init__()
self.weight = nn.Parameter(torch.randn(out_channel, in_channel,
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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.as... | jchetboun/anycost-gan | EqualConv2d | false | 10,389 | [
"MIT"
] | 0 | 7e0005e50b915e2dfeb90fe7a9846c5df38d7c06 | https://github.com/jchetboun/anycost-gan/tree/7e0005e50b915e2dfeb90fe7a9846c5df38d7c06 |
TripletLoss | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn import *
from torch.optim.lr_scheduler import *
def _batch_hard(mat_distance, mat_similarity, indice=False):
sorted_mat_distance, positive_indices = torch.sort(mat_distance + -
9999999.0 * (1 - mat_similarity), dim=1, descend... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | WangWenhao0716/DomainMix | TripletLoss | false | 18,059 | [
"MIT"
] | 8 | 2d9a20c1536177d1d71fbdc99f714eaf98fdfe92 | https://github.com/WangWenhao0716/DomainMix/tree/2d9a20c1536177d1d71fbdc99f714eaf98fdfe92 |
LearnedPositionalEncoding | import torch
from torch import nn
class LayerNorm(nn.Module):
"""A layernorm module in the TF style (epsilon inside the square root)."""
def __init__(self, d_model, variance_epsilon=1e-12):
super().__init__()
self.gamma = nn.Parameter(torch.ones(d_model))
self.beta = nn.Parameter(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.triton_helpers import libdevice
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | minhnn-tiny/vietocr | LearnedPositionalEncoding | false | 16,097 | [
"Apache-2.0"
] | 307 | 80ed99b5d29df3f04c54ae394c525117846b503a | https://github.com/minhnn-tiny/vietocr/tree/80ed99b5d29df3f04c54ae394c525117846b503a |
HardTripletLoss | import torch
import torch.nn as nn
def _pairwise_distance_squared(x, y):
xx = torch.sum(torch.pow(x, 2), 1).view(-1, 1)
yy = torch.sum(torch.pow(y, 2), 1).view(1, -1)
pdist = xx + yy - 2.0 * torch.mm(x, torch.t(y))
return pdist
class HardTripletLoss(nn.Module):
def __init__(self, margin=0.2, ha... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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_... | pfe-everis/lcd | HardTripletLoss | false | 16,248 | [
"BSD-3-Clause"
] | 76 | 25f3fe7dc7e0c8ba02fb380dbcbe7752747b3fb5 | https://github.com/pfe-everis/lcd/tree/25f3fe7dc7e0c8ba02fb380dbcbe7752747b3fb5 |
BackwardsNet | import torch
from torch import nn
class BackwardsNet(nn.Module):
def __init__(self, h, ydim):
super().__init__()
self.loss = torch.nn.CrossEntropyLoss()
self.fc1 = torch.nn.Linear(2 * h, h)
self.fc2 = torch.nn.Linear(h, ydim)
def forward(self, phiPrev, phi, atn):
x = ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | smearle/neural-mmo | BackwardsNet | false | 12,997 | [
"MIT"
] | 0 | 7f1e98857cb32bdb59a273eb71ec43bbd9793b34 | https://github.com/smearle/neural-mmo/tree/7f1e98857cb32bdb59a273eb71ec43bbd9793b34 |
VanillaRNN | import torch
import torch.nn as nn
class VanillaRNN(nn.Module):
def __init__(self, seq_length, input_dim, num_hidden, num_classes,
batch_size, device='cpu'):
super(VanillaRNN, self).__init__()
self.seq_length = seq_length
self.h_init = nn.Parameter(torch.zeros(num_hidden, 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.triton_helpers import libdevice
import torch.nn as ... | askliar/deep_learning | VanillaRNN | false | 1,518 | [
"MIT"
] | 0 | e61b2391a3258d18719bf12d9ed1404620ce6c02 | https://github.com/askliar/deep_learning/tree/e61b2391a3258d18719bf12d9ed1404620ce6c02 |
CharbonnierLoss | import torch
import torch.nn as nn
def get_outnorm(x: 'torch.Tensor', out_norm: 'str'='') ->torch.Tensor:
""" Common function to get a loss normalization value. Can
normalize by either the batch size ('b'), the number of
channels ('c'), the image size ('i') or combinations
('bi', 'bci', et... | 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... | grofit/traiNNer | CharbonnierLoss | false | 15,458 | [
"Apache-2.0"
] | 78 | 12d006fd44ed304e4178839c53b1f3d95ca25dcb | https://github.com/grofit/traiNNer/tree/12d006fd44ed304e4178839c53b1f3d95ca25dcb |
GridAttentionBlock | # 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_... | WHU-YH-jx/bionetwork_segmentation | GridAttentionBlock | false | 5,956 | [
"MIT"
] | 1 | 556c5b61a1a3784875b31eacb8c6bb418d70ee9a | https://github.com/WHU-YH-jx/bionetwork_segmentation/tree/556c5b61a1a3784875b31eacb8c6bb418d70ee9a |
CustomizedNet | import torch
import torch.nn as nn
import torch.utils.data.distributed
class CustomizedNet(nn.Module):
def __init__(self, dropout, input_size, input_feature_num, hidden_dim,
output_size):
"""
Simply use linear layers for multi-variate single-step forecasting.
"""
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 ... | limn2o4/analytics-zoo | CustomizedNet | false | 15,915 | [
"Apache-2.0"
] | 2,970 | 78d6ce10976a7e1320ff5ebdf431db93a439ec56 | https://github.com/limn2o4/analytics-zoo/tree/78d6ce10976a7e1320ff5ebdf431db93a439ec56 |
SimpleAvgPool2dModule | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | mciprian13/glow | SimpleAvgPool2dModule | false | 3,997 | [
"Apache-2.0"
] | 0 | 90f88205d9bf8baff8df5bbda51c9d138e3e668b | https://github.com/mciprian13/glow/tree/90f88205d9bf8baff8df5bbda51c9d138e3e668b |
ResnetDecoder | # 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... | SeffyVon/ECG_MICResNet | ResnetDecoder | false | 17,904 | [
"BSD-3-Clause"
] | 5 | 8c6a319b5822ddfb130738eb1d9cdc3c21b24209 | https://github.com/SeffyVon/ECG_MICResNet/tree/8c6a319b5822ddfb130738eb1d9cdc3c21b24209 |
NoiseInjection | # 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 import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_str... | hologerry/style-based-gan-pytorch | NoiseInjection | false | 3,624 | [
"MIT"
] | 0 | 1a694fb3ea0288f1aaaa43aa67a570d908d9dc27 | https://github.com/hologerry/style-based-gan-pytorch/tree/1a694fb3ea0288f1aaaa43aa67a570d908d9dc27 |
CrossEntropyDiceLoss | import torch
from typing import Union
from typing import Optional
from typing import Iterable
from torch import nn
class FScoreLoss(nn.modules.loss._WeightedLoss):
"""Uses the 1 - F-score as a loss.
.. math::
F = rac{ (1 + eta^2) TP }{ (1 + eta^2) TP + eta^2 FN + FP }
Args:
beta: The... | 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 typing import Union
from typing import Optional
from typing import I... | MIC-DKFZ/image-time-series | CrossEntropyDiceLoss | false | 5,574 | [
"MIT"
] | 1 | 0480d5cb6936c7d9e839b6741f18c10893d78d8a | https://github.com/MIC-DKFZ/image-time-series/tree/0480d5cb6936c7d9e839b6741f18c10893d78d8a |
PositionalEncoder | # 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 math
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guar... | abhirajtiwari/QANet | PositionalEncoder | false | 18,211 | [
"MIT"
] | 4 | 85e1db4edf0710169268a091e7d7959e524f1ceb | https://github.com/abhirajtiwari/QANet/tree/85e1db4edf0710169268a091e7d7959e524f1ceb |
NeuralNetMultiplePositionalArgumentsMultiOutputsWithDependency | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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
import torch.... | mrshu/onnxruntime | NeuralNetMultiplePositionalArgumentsMultiOutputsWithDependency | false | 7,286 | [
"MIT"
] | 1 | 335edaa2c485ba0dec877bf4cdbd652e2d5d105c | https://github.com/mrshu/onnxruntime/tree/335edaa2c485ba0dec877bf4cdbd652e2d5d105c |
MaxPool | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language 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.nn.parallel
import torch.optim
import torch.utils.data
... | OrKatz7/kaggle-hubmap | MaxPool | false | 9,881 | [
"MIT"
] | 0 | 5cf8c5aebe956c256fa7f3db432639e28f29c6a3 | https://github.com/OrKatz7/kaggle-hubmap/tree/5cf8c5aebe956c256fa7f3db432639e28f29c6a3 |
Generator | import torch
import torch.nn as nn
import torch.cuda
class Generator(nn.Module):
def __init__(self, hidden_size: 'int', tgt_vocab_size: 'int'):
self.vocab_size = tgt_vocab_size
super(Generator, self).__init__()
self.linear_hidden = nn.Linear(hidden_size, tgt_vocab_size)
self.lsm =... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | YuxueShi/transformerNMT | Generator | false | 14,709 | [
"BSD-3-Clause"
] | 68 | 4ec660aa46f5edfeb5db749c73776d50c02c9324 | https://github.com/YuxueShi/transformerNMT/tree/4ec660aa46f5edfeb5db749c73776d50c02c9324 |
FiLMNetwork | import torch
import torch.nn as nn
class FiLMNetwork(nn.Module):
def __init__(self, in_sz, out_sz):
super(FiLMNetwork, self).__init__()
self.f = nn.Linear(in_sz, out_sz)
self.h = nn.Linear(in_sz, out_sz)
def forward(self, inputs, features):
gamma = self.f(inputs).unsqueeze(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... | bblinn2017/IM-NET-pytorch | FiLMNetwork | false | 3,184 | [
"MIT"
] | 0 | 82ff646aaf2f93ae1560debb40fe05f1420ff655 | https://github.com/bblinn2017/IM-NET-pytorch/tree/82ff646aaf2f93ae1560debb40fe05f1420ff655 |
DQN | import torch
import torch.nn as nn
import torch.nn.functional as F
class DQN(nn.Module):
def __init__(self, state_size, action_size):
super(DQN, self).__init__()
self.fc1 = nn.Linear(state_size, 30)
self.fc2 = nn.Linear(30, 10)
self.fc3 = nn.Linear(10, action_size)
def forwar... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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_... | NickHclos/DDPG-PyTorch | DQN | false | 11,754 | [
"MIT"
] | 0 | 9f6df328c275ff5c579fa0e4f7b30ab234cf236d | https://github.com/NickHclos/DDPG-PyTorch/tree/9f6df328c275ff5c579fa0e4f7b30ab234cf236d |
L2 | # 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
import torch.nn as nn
assert... | tomrunia/flownet2-pytorch | L2 | false | 4,452 | [
"Apache-2.0"
] | 0 | 759b09c375348cf64f52f914cf3bf3e9095cc959 | https://github.com/tomrunia/flownet2-pytorch/tree/759b09c375348cf64f52f914cf3bf3e9095cc959 |
FCN8VGG16 | # 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
from torch... | alzayats/DeepFish | FCN8VGG16 | false | 15,065 | [
"MIT"
] | 48 | 4d9ebfb0474a7e9346c72e2a5411ab6f72e878e2 | https://github.com/alzayats/DeepFish/tree/4d9ebfb0474a7e9346c72e2a5411ab6f72e878e2 |
Pad_Pool | import torch
from torch import nn
class Pad_Pool(nn.Module):
"""
Implements a padding layer in front of pool1d layers used in our architectures to achieve padding=same output shape
Pads 0 to the left and 1 to the right side of x
"""
def __init__(self, left=0, right=1, value=0):
super().... | 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... | Hullimulli/EEGEyeNet | Pad_Pool | false | 560 | [
"MIT"
] | 0 | 677a791b39800f44dc254553b16ee2f92e62c423 | https://github.com/Hullimulli/EEGEyeNet/tree/677a791b39800f44dc254553b16ee2f92e62c423 |
DoubleConvRelu | # 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... | BloodAxe/Catalyst-CamVid-Segmentation-Example | DoubleConvRelu | false | 17,011 | [
"MIT"
] | 7 | a24ed6301c2f2a97cbd4d5ba4ef2348d7ed1d9f3 | https://github.com/BloodAxe/Catalyst-CamVid-Segmentation-Example/tree/a24ed6301c2f2a97cbd4d5ba4ef2348d7ed1d9f3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.