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 |
|---|---|---|---|---|---|---|---|---|---|---|
KLDivergence | import torch
import torch.nn.functional as F
import torch.nn as nn
import torch.optim
def kl_divergence(y, target, mask=None, reduce=True):
loss = (target * torch.log(target) - target * F.log_softmax(y, 1)).sum(1)
if mask is not None:
loss = mask * loss
if reduce:
return loss.mean()
el... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn.functi... | shrutimoy10/cords | KLDivergence | false | 16,432 | [
"MIT"
] | 185 | 8f8d087098afafd352f793821911d80eb7b39a7d | https://github.com/shrutimoy10/cords/tree/8f8d087098afafd352f793821911d80eb7b39a7d |
SoftmaxCELoss | # 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.... | Pandinosaurus/RandPerson | SoftmaxCELoss | false | 14,159 | [
"Apache-2.0"
] | 83 | 7dd503cc1d063d95b8cf6b43d40bb93452192d6d | https://github.com/Pandinosaurus/RandPerson/tree/7dd503cc1d063d95b8cf6b43d40bb93452192d6d |
SigmoidBCELoss | # 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... | azxj/BRRNet | SigmoidBCELoss | false | 6,306 | [
"MIT"
] | 1 | 274068efd5453f2c1fb07bfaad448d048b9c793b | https://github.com/azxj/BRRNet/tree/274068efd5453f2c1fb07bfaad448d048b9c793b |
Conv3d | # 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.... | MargeryLab/nnConRes | Conv3d | false | 9,325 | [
"Apache-2.0"
] | 0 | a5aba912d0f0f30490ae820fb6d3dbb8cf1556d4 | https://github.com/MargeryLab/nnConRes/tree/a5aba912d0f0f30490ae820fb6d3dbb8cf1556d4 |
Actor | import torch
import torch.nn as nn
import torch.nn.functional as F
class Actor(nn.Module):
def __init__(self, state_dim, action_dim, max_action):
super(Actor, self).__init__()
self.l1 = nn.Linear(state_dim, 4)
self.l2 = nn.Linear(4, 4)
self.l3 = nn.Linear(4, action_dim)
se... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | pkj415/CityLearn | Actor | false | 10,636 | [
"MIT"
] | 0 | 912d1e28270fba2d11a713dc7f0445d59d620511 | https://github.com/pkj415/CityLearn/tree/912d1e28270fba2d11a713dc7f0445d59d620511 |
PositionwiseFeedForward | import torch
import torch.nn as nn
import torch.nn.functional as F
class PositionwiseFeedForward(nn.Module):
"""A two-feed-forward-layer module.
Parameters
----------
d_model : int
embed_dim.
d_inner : int
dff.
dropout : float
dropout rate.
"""
def __init__(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_... | TaoranJ/PC-RNN | PositionwiseFeedForward | false | 5,880 | [
"MIT"
] | 1 | f360b464cf68737fefd5e6093e55056838693b1b | https://github.com/TaoranJ/PC-RNN/tree/f360b464cf68737fefd5e6093e55056838693b1b |
CReLU_IN | # 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_... | dipikakhullar/ocr | CReLU_IN | false | 15,188 | [
"MIT"
] | 284 | a55e70d82f42803be5ed63f8f59e4fa597fcf8d6 | https://github.com/dipikakhullar/ocr/tree/a55e70d82f42803be5ed63f8f59e4fa597fcf8d6 |
DiceBCELoss | import torch
import torch.nn as nn
import torch.nn.functional as F
class DiceBCELoss(nn.Module):
def __init__(self):
super(DiceBCELoss, self).__init__()
def forward(self, predicted, target):
batch = predicted.size()[0]
batch_loss = 0
smooth = 1
for index in range(batc... | 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... | daoducanhc/Tumor_Segmentation | DiceBCELoss | false | 9,988 | [
"MIT"
] | 0 | 485a70492f7efb65a0f88f61a0eeffd6f0c92cc9 | https://github.com/daoducanhc/Tumor_Segmentation/tree/485a70492f7efb65a0f88f61a0eeffd6f0c92cc9 |
MultiHeadAttention | import math
import torch
from torch import nn
class ScaleDotProductAttention(nn.Module):
"""
compute scale dot product attention
Query : given sentence that we focused on (decoder)
Key : every sentence to check relationship with Qeury(encoder)
Value : every sentence same with Key (encoder)
""... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | hyunwoongko/transformer | MultiHeadAttention | false | 15,566 | [
"Apache-2.0"
] | 233 | 8f7aaa19d37b088c156db0512868127ba9bf1a0f | https://github.com/hyunwoongko/transformer/tree/8f7aaa19d37b088c156db0512868127ba9bf1a0f |
IdentityMessage | # 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.utils.data
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_... | THinnerichs/pytorch_geometric | IdentityMessage | false | 11,913 | [
"MIT"
] | 0 | 90c2126895b21313a23657f4e845acc782d11bf5 | https://github.com/THinnerichs/pytorch_geometric/tree/90c2126895b21313a23657f4e845acc782d11bf5 |
ResidualBlock | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.optim import *
imp... | EvilPerfectionist/ssl_e2vid | ResidualBlock | false | 8,081 | [
"MIT"
] | 24 | 84f7c7e59875f134e97c14ec423f396725e04be7 | https://github.com/EvilPerfectionist/ssl_e2vid/tree/84f7c7e59875f134e97c14ec423f396725e04be7 |
QuadriLinearScore | import math
import torch
import torch.nn as nn
import torch.utils.data.dataloader
import torch.nn
class QuadriLinearScore(nn.Module):
"""
Outer product version of quadrilinear function for sequence labeling.
"""
def __init__(self, wemb_size, tagset_size, temb_size=20, rank=396, std=
0.1545, w... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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
import torch.utils.data.dataloader
import torc... | ciaochiaociao/CLNER | QuadriLinearScore | false | 3,379 | [
"MIT"
] | 0 | a31fb1c3bfdaa5d62147dc892489d29a85e6b385 | https://github.com/ciaochiaociao/CLNER/tree/a31fb1c3bfdaa5d62147dc892489d29a85e6b385 |
A2CCritic | # 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_... | iffiX/machin | A2CCritic | false | 15,587 | [
"MIT"
] | 287 | 7fa986b1bafdefff117d6ff73d14644a5488de9d | https://github.com/iffiX/machin/tree/7fa986b1bafdefff117d6ff73d14644a5488de9d |
SoftDiceLoss | # 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... | kryptonite0/Global_Convolutional_Network | SoftDiceLoss | false | 15,842 | [
"MIT"
] | 88 | 33de71bbe468f485eb38345f4982923945d1a0be | https://github.com/kryptonite0/Global_Convolutional_Network/tree/33de71bbe468f485eb38345f4982923945d1a0be |
XTanhLoss | # 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._... | tuantle/regression-losses-pytorch | XTanhLoss | false | 16,625 | [
"MIT"
] | 82 | 2893f4439ada5df239e3afd0ec7e781dd61403e9 | https://github.com/tuantle/regression-losses-pytorch/tree/2893f4439ada5df239e3afd0ec7e781dd61403e9 |
Model | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, inputdim):
super(Model, self).__init__()
self.layer1 = nn.Linear(inputdim, 16)
torch.nn.init.xavier_uniform_(self.layer1.weight)
self.layer2 = nn.Linear(16, 32)
torch.nn.init.xavier_uniform_(self... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | terry97-guel/POENet-ActiveLearning | Model | false | 4,436 | [
"MIT"
] | 0 | 78e959c8c5eacc5b2dc4e3334ed609d182ce7b6c | https://github.com/terry97-guel/POENet-ActiveLearning/tree/78e959c8c5eacc5b2dc4e3334ed609d182ce7b6c |
SigmaL1SmoothLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
from torch import nn
a... | VrunArya/Hacktoberfest2021 | SigmaL1SmoothLoss | false | 5,941 | [
"MIT"
] | 1 | 5e739e52310dabf8b131abe5ecf906e13711b9d6 | https://github.com/VrunArya/Hacktoberfest2021/tree/5e739e52310dabf8b131abe5ecf906e13711b9d6 |
MultiHead | import math
import torch
from torch import nn
from torch.nn import functional as F
import torch.utils.data
def matmul(x, y):
if x.dim() == y.dim():
return x @ y
if x.dim() == y.dim() - 1:
return (x.unsqueeze(-2) @ y).squeeze(-2)
return (x @ y.unsqueeze(-2)).squeeze(-2)
class Linear(nn.Li... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | FGDBTKD/decaNLP | MultiHead | false | 13,680 | [
"BSD-3-Clause"
] | 2,361 | ff2d7e18cc226197bb8fe5fe796c4b8bc0395e86 | https://github.com/FGDBTKD/decaNLP/tree/ff2d7e18cc226197bb8fe5fe796c4b8bc0395e86 |
MultiHeadedAttention | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | fallcat/synst | MultiHeadedAttention | false | 6,679 | [
"BSD-3-Clause"
] | 1 | 0fa4adffa825af4a62b6e739b59c4125a7b6698e | https://github.com/fallcat/synst/tree/0fa4adffa825af4a62b6e739b59c4125a7b6698e |
Bilinear | # 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... | LindgeW/BiaffineNER | Bilinear | false | 8,464 | [
"Apache-2.0"
] | 13 | 0ae179e9ff731362f6c8ba6d0b24485ad45e8bbf | https://github.com/LindgeW/BiaffineNER/tree/0ae179e9ff731362f6c8ba6d0b24485ad45e8bbf |
MaskUpdate | import torch
import torch.nn as nn
class MaskUpdate(nn.Module):
def __init__(self, alpha):
super(MaskUpdate, self).__init__()
self.updateFunc = nn.ReLU(True)
self.alpha = alpha
def forward(self, inputMaskMap):
""" self.alpha.data = torch.clamp(self.alpha.data, 0.6, 0.8)
... | 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... | Vious/LBAM_Pytorch | MaskUpdate | false | 14,559 | [
"MIT"
] | 112 | b9292440e7a7559c027f48d6fd061dcabc41a6bf | https://github.com/Vious/LBAM_Pytorch/tree/b9292440e7a7559c027f48d6fd061dcabc41a6bf |
EncoderBlock | # 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.... | Graeme22/VisionTransformer-Pytorch | EncoderBlock | false | 17,337 | [
"Apache-2.0"
] | 5 | 4e8abecf27e92dffd8d00f3d9b5ad4a21079cd0e | https://github.com/Graeme22/VisionTransformer-Pytorch/tree/4e8abecf27e92dffd8d00f3d9b5ad4a21079cd0e |
GetStyleLoss | import torch
import torch.nn as nn
import torch.nn.functional as F
def gram_matrix(input):
""" gram matrix for feature assignments """
a, b, c, d = input.size()
allG = []
for i in range(a):
features = input[i].view(b, c * d)
gram = torch.mm(features, features.t())
gram = gram.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
import torch.nn as nn
assert_... | jaredaevans/UltrafastNST | GetStyleLoss | false | 6,919 | [
"MIT"
] | 1 | 6671c6b618ce6bb4920b15f782be962e484a5423 | https://github.com/jaredaevans/UltrafastNST/tree/6671c6b618ce6bb4920b15f782be962e484a5423 |
SimpleAddMmModule | import torch
import torch.jit
import torch.onnx
import torch.nn
class SimpleAddMmModule(torch.nn.Module):
def __init__(self, alpha=1, beta=1):
super(SimpleAddMmModule, self).__init__()
self.alpha = alpha
self.beta = beta
def forward(self, a, b, c):
return (a + a).addmm(b, 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
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._C... | briancoutinho/glow | SimpleAddMmModule | false | 12,562 | [
"Apache-2.0"
] | 0 | 4c919d60b3c33296c4109aec8020a1733c98f5b5 | https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5 |
Squash | # 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... | WdBlink/AugMix-3DOCUNet-Brats2019 | Squash | false | 5,963 | [
"MIT"
] | 1 | 125c6c8682b51a550eeac9173d13d0a211576abc | https://github.com/WdBlink/AugMix-3DOCUNet-Brats2019/tree/125c6c8682b51a550eeac9173d13d0a211576abc |
Connect2Model | # 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.... | ShokuninSan/AlphaZeroSimple | Connect2Model | false | 1,074 | [
"MIT"
] | 0 | e32e6a28f872a046705a3f68882139688d5a43c3 | https://github.com/ShokuninSan/AlphaZeroSimple/tree/e32e6a28f872a046705a3f68882139688d5a43c3 |
AdaptiveAvgMaxPool2d | import torch
import torch.nn
import torch.nn as nn
import torch.nn.parallel
import torch.optim
import torch.utils.data
import torch.utils.data.distributed
def pooling_factor(pool_type='avg'):
return 2 if pool_type == 'avgmaxc' else 1
class AdaptiveAvgMaxPool2d(torch.nn.Module):
"""Selectable global pooling ... | 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
import torch.nn as nn
import torch.nn.parallel
import torch.optim
import torch.utils.data
import torch.utils.data.distribute... | Ajithbalakrishnan/PyTorch-Image-Classification | AdaptiveAvgMaxPool2d | false | 4,803 | [
"MIT"
] | 1 | 2a6fe541cd537d3c6412f7a38ec41ac2ead43f63 | https://github.com/Ajithbalakrishnan/PyTorch-Image-Classification/tree/2a6fe541cd537d3c6412f7a38ec41ac2ead43f63 |
Accuracy | import torch
from torch import nn
class Accuracy(nn.Module):
label = 'Accuracy'
def forward(self, prediction, truth):
prediction = prediction.argmax(dim=1)
correct = prediction == truth
accuracy = correct.float().mean()
return accuracy
def get_inputs():
return [torch.ran... | 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... | cms-flash/beauty-net | Accuracy | false | 15,052 | [
"MIT"
] | 155 | 668210a95ccb4462d7beff10505e4e83532682f2 | https://github.com/cms-flash/beauty-net/tree/668210a95ccb4462d7beff10505e4e83532682f2 |
Fire | import torch
import torch.nn as nn
class Fire(nn.Module):
def __init__(self, inplanes, squeeze_planes, expand1x1_planes,
expand3x3_planes):
super(Fire, self).__init__()
self.inplanes = inplanes
self.squeeze = nn.Conv2d(inplanes, squeeze_planes, kernel_size=1)
self.squeeze_... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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_... | ArronHZG/ABD-Net | Fire | false | 9,590 | [
"MIT"
] | 0 | 4f6d15f4d389a55549ea10a2e00d4a5cdecb5753 | https://github.com/ArronHZG/ABD-Net/tree/4f6d15f4d389a55549ea10a2e00d4a5cdecb5753 |
RegWeightedL1Loss | import torch
import torch.nn as nn
import torch.nn.functional as F
from itertools import product as product
from math import sqrt as sqrt
import torch.utils.data
def _gather_feat(feat, ind, mask=None):
dim = feat.size(2)
ind = ind.unsqueeze(2).expand(ind.size(0), ind.size(1), dim)
feat = feat.gather(1, in... | 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
... | XiangLiK/cv_course | RegWeightedL1Loss | false | 18,115 | [
"MIT"
] | 8 | da7c2318fd4128bbdab96db26ddbb2524f37d0a0 | https://github.com/XiangLiK/cv_course/tree/da7c2318fd4128bbdab96db26ddbb2524f37d0a0 |
FeedForward | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | chenjun-110/WZCQ | FeedForward | false | 1,681 | [
"Apache-2.0"
] | 0 | e2de7743ad671e8632cfa084638555d7f1deb42f | https://github.com/chenjun-110/WZCQ/tree/e2de7743ad671e8632cfa084638555d7f1deb42f |
CrossEntropyBayesRisk | # 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.nn import Module
import torch.utils.data
import torch.nn.functional
import torch.autograd
assert_size_stride = torch._C._dynamo.g... | techthiyanes/annotated_deep_learning_paper_implementations | CrossEntropyBayesRisk | false | 16,547 | [
"MIT"
] | 3,714 | 8af24da2dd39a9a87482a4d18c2dc829bbd3fd47 | https://github.com/techthiyanes/annotated_deep_learning_paper_implementations/tree/8af24da2dd39a9a87482a4d18c2dc829bbd3fd47 |
ConvGLU | import torch
from torch import nn
import torch.utils.data
import torch.optim
def str2act(txt):
"""Translates text to neural network activation"""
return {'sigmoid': nn.Sigmoid(), 'relu': nn.ReLU(), 'none': nn.
Sequential(), 'lrelu': nn.LeakyReLU(0.2), 'selu': nn.SELU()}[txt.
lower()]
class 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 import nn
import torch.utils.data
import torch.optim
assert_size_stri... | JINHXu/NeMo | ConvGLU | false | 11,618 | [
"Apache-2.0"
] | 0 | 835db62e39919436824ce022fd3b3f6bac301cd6 | https://github.com/JINHXu/NeMo/tree/835db62e39919436824ce022fd3b3f6bac301cd6 |
ASP | import torch
import torch.nn as nn
class AttentivePooling(nn.Module):
"""
Implementation of Attentive Pooling
"""
def __init__(self, input_dim, **kwargs):
super(AttentivePooling, self).__init__()
self.W_a = nn.Linear(input_dim, input_dim)
self.W = nn.Linear(input_dim, 1)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | B06901052/s3prl | ASP | false | 134 | [
"MIT"
] | 0 | 5f63d2df043d2d7c81580cd042fa2cea34746f48 | https://github.com/B06901052/s3prl/tree/5f63d2df043d2d7c81580cd042fa2cea34746f48 |
TransformerLayer | # 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.... | Yingting-dev/ReChorus | TransformerLayer | false | 3,010 | [
"MIT"
] | 0 | a16bc1e42f3e90e889133d7476c52ada44db573b | https://github.com/Yingting-dev/ReChorus/tree/a16bc1e42f3e90e889133d7476c52ada44db573b |
ResidualAttention | # 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... | LeftAttention/Attention-Codebase | ResidualAttention | false | 17,639 | [
"Apache-2.0"
] | 6 | 348ec66233a7c0f95a3cb5f0f11641e2a7a9b9c3 | https://github.com/LeftAttention/Attention-Codebase/tree/348ec66233a7c0f95a3cb5f0f11641e2a7a9b9c3 |
NsSymKlCriterion | import torch
import torch.nn.functional as F
from torch.nn.modules.loss import _Loss
from torch.optim.lr_scheduler import *
def stable_kl(logit, target, epsilon=1e-06, reduce=True):
logit = logit.view(-1, logit.size(-1)).float()
target = target.view(-1, target.size(-1)).float()
bs = logit.size(0)
p = ... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn.functi... | anlewy/mt-dnn | NsSymKlCriterion | false | 14,874 | [
"MIT"
] | 2,075 | eeb6f01ce0630e61a52b8c9c6f7537cd34978e45 | https://github.com/anlewy/mt-dnn/tree/eeb6f01ce0630e61a52b8c9c6f7537cd34978e45 |
EncoderLayer | import torch
import torch.nn as nn
class FeedForwardNetwork(nn.Module):
def __init__(self, hidden_size, ffn_size, dropout_rate):
super(FeedForwardNetwork, self).__init__()
self.layer1 = nn.Linear(hidden_size, ffn_size)
self.gelu = nn.GELU()
self.layer2 = nn.Linear(ffn_size, hidden... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | Luo-Chang/Graphormer | EncoderLayer | false | 5,584 | [
"MIT"
] | 1 | b35b3ca6369e25cdae80e1617bfc3921feeb3158 | https://github.com/Luo-Chang/Graphormer/tree/b35b3ca6369e25cdae80e1617bfc3921feeb3158 |
cSE | import torch
import torch.nn as nn
class cSE(nn.Module):
def __init__(self, in_channels):
super().__init__()
reduced_filters = 1 if in_channels // 2 == 0 else in_channels // 2
self.global_avg_pool = nn.AdaptiveAvgPool2d(output_size=(1, 1))
self.pointwise_1 = nn.Conv2d(in_channels=... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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_... | mattroz/yatopi | cSE | false | 3,990 | [
"MIT"
] | 0 | 278bac6f3d2f13916ae9d43309b9f38b608426bd | https://github.com/mattroz/yatopi/tree/278bac6f3d2f13916ae9d43309b9f38b608426bd |
CRFOutputLayer | # 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
import torch.nn as nn
assert_... | oya163/torchnlp | CRFOutputLayer | false | 4,118 | [
"Apache-2.0"
] | 0 | 361caa24d741e47b8bd92af122ae281d6ad72d9d | https://github.com/oya163/torchnlp/tree/361caa24d741e47b8bd92af122ae281d6ad72d9d |
MAE | import torch
import torch.nn as nn
class MAE(nn.Module):
def __init__(self):
super(MAE, self).__init__()
def forward(self, outputs, target, *args):
val_pixels = (target > 0).float() * (outputs > 0).float()
err = torch.abs(target * val_pixels - outputs * val_pixels)
loss = tor... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert... | anglixjtu/MSG_CHN_WACV20 | MAE | false | 14,846 | [
"Apache-2.0"
] | 61 | 6910894cf3caed2ffde27586f96b132b0c1d1a98 | https://github.com/anglixjtu/MSG_CHN_WACV20/tree/6910894cf3caed2ffde27586f96b132b0c1d1a98 |
IWEncoder | # 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.... | MIC-DKFZ/mood | IWEncoder | false | 8,601 | [
"Apache-2.0"
] | 42 | a01303adb4256653b133e2f7cd4741d366b681f7 | https://github.com/MIC-DKFZ/mood/tree/a01303adb4256653b133e2f7cd4741d366b681f7 |
IIDIsotropicGaussianUVLoss | # 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 math... | GOPIKA-0204/Clothing-Detection-and-Recolouring | IIDIsotropicGaussianUVLoss | false | 9,056 | [
"MIT"
] | 0 | b5d436a981b854228314729b41874f31948a33ba | https://github.com/GOPIKA-0204/Clothing-Detection-and-Recolouring/tree/b5d436a981b854228314729b41874f31948a33ba |
TripletLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.utils.data
from torch import nn
assert_size_stride = torch._C._dynamo.guards... | Sigma10010/nuclei_cells_det | TripletLoss | false | 17,927 | [
"MIT"
] | 4 | c074175fec8938472bb4cddabd83d1d0ea78f230 | https://github.com/Sigma10010/nuclei_cells_det/tree/c074175fec8938472bb4cddabd83d1d0ea78f230 |
HingeLoss | import torch
import torch.nn as nn
import torch.nn.functional as F
class HingeLoss(nn.Module):
"""Hinge loss function module for multi-label classification"""
def __init__(self, margin=1.0, power=2, cost_weighted=False):
"""
Args:
margin (float, optional): margin for the hinge los... | 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... | cjhsieh/pecos | HingeLoss | false | 3,295 | [
"Apache-2.0",
"BSD-3-Clause"
] | 0 | 22e88ee544d5a5e891a1d23a578881fdf26dfcf7 | https://github.com/cjhsieh/pecos/tree/22e88ee544d5a5e891a1d23a578881fdf26dfcf7 |
LastLevelMaxPool | import torch
import torch.utils.data
from torchvision.transforms import functional as F
from torch import nn
import torch.nn.functional as F
class LastLevelMaxPool(nn.Module):
def forward(self, x):
return [F.max_pool2d(x, 1, 2, 0)]
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.utils.data
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._... | Bhaskers-Blu-Org2/arcticseals | LastLevelMaxPool | false | 8,127 | [
"MIT"
] | 16 | 9e2629ca0ce7aadbe63118f39ff2da757d5dbc33 | https://github.com/Bhaskers-Blu-Org2/arcticseals/tree/9e2629ca0ce7aadbe63118f39ff2da757d5dbc33 |
GAT | import torch
import torch.nn as nn
import torch.nn.functional as F
class GraphAttentionLayer(nn.Module):
"""
Simple GAT layer, similar to https://arxiv.org/abs/1710.10903
"""
def __init__(self, in_features, out_features, dropout, alpha, concat=True):
super(GraphAttentionLayer, self).__init__(... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | CxzPink/polyGAT | GAT | false | 2,153 | [
"MIT"
] | 0 | 95ee1414dd721567f321a7a6271ce518964688ac | https://github.com/CxzPink/polyGAT/tree/95ee1414dd721567f321a7a6271ce518964688ac |
run_latent | import torch
import torch.nn as nn
class run_latent(nn.Module):
def __init__(self, in_dim, hidden_dim):
super(run_latent, self).__init__()
self.fc_z_mean = nn.Linear(in_dim, hidden_dim)
self.fc_z_log_sigma = nn.Linear(in_dim, hidden_dim)
self.fc_gen = nn.Linear(hidden_dim, in_dim)... | import torch
from torch import device
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from... | FizzerYu/CollaborativeVAE | run_latent | false | 490 | [
"MIT"
] | 0 | 4714cce49acba258600b1b5bbcd3a1a4762385e6 | https://github.com/FizzerYu/CollaborativeVAE/tree/4714cce49acba258600b1b5bbcd3a1a4762385e6 |
RationalHat_transform | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert... | BorgwardtLab/TOGL | RationalHat_transform | false | 17,019 | [
"BSD-3-Clause"
] | 6 | d0c986cf829ca6bbae1a23e5cdab1c99146503cd | https://github.com/BorgwardtLab/TOGL/tree/d0c986cf829ca6bbae1a23e5cdab1c99146503cd |
FNetEncoder | import torch
from torch import nn
class FeedForward(nn.Module):
def __init__(self, dhidden, dropout_rate, **kwargs):
super(FeedForward, self).__init__(**kwargs)
self.dhidden = dhidden
self.dropout_rate = dropout_rate
self.dense_1 = nn.Linear(dhidden, 4 * dhidden)
self.dens... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | abdelghanibelgaid/FNet-TensorFlow-PyTorch | FNetEncoder | false | 6,079 | [
"MIT"
] | 1 | e8eef4366b98d78b79917b6eadd168515de26a3f | https://github.com/abdelghanibelgaid/FNet-TensorFlow-PyTorch/tree/e8eef4366b98d78b79917b6eadd168515de26a3f |
InvGridSamplerNumerator | # 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 numpy as np
imp... | Minsoo2022/Pose-Transfer | InvGridSamplerNumerator | false | 14,049 | [
"MIT"
] | 692 | 10a60bb33d51a06e1200f5726f2367b5be4a6b79 | https://github.com/Minsoo2022/Pose-Transfer/tree/10a60bb33d51a06e1200f5726f2367b5be4a6b79 |
Biaffine | import torch
import torch.nn as nn
class Biaffine(nn.Module):
"""
Biaffine layer for first-order scoring.
This function has a tensor of weights :math:`W` and bias terms if needed.
The score :math:`s(x, y)` of the vector pair :math:`(x, y)` is computed as :math:`x^T W y`,
in which :math:`x` and :m... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | KoichiYasuoka/SuPar | Biaffine | false | 11,629 | [
"MIT"
] | 0 | 9bcf10fb946cae75b6a311d4cd19bec5bb1a9487 | https://github.com/KoichiYasuoka/SuPar/tree/9bcf10fb946cae75b6a311d4cd19bec5bb1a9487 |
NIN | import string
import torch
import numpy as np
import torch.utils.data
import torch
import torch.nn as nn
def _einsum(a, b, c, x, y):
einsum_str = '{},{}->{}'.format(''.join(a), ''.join(b), ''.join(c))
return torch.einsum(einsum_str, x, y)
def contract_inner(x, y):
"""tensordot(x, y, 1)."""
x_chars =... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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 string
import numpy as np
import torch.utils.data
import torch
import tor... | mrjavoman/Image-Super-Resolution-via-Iterative-Refinement | NIN | false | 7,285 | [
"Apache-2.0"
] | 1 | 2eb11d972e8e024c3b1d7a84f90895e329b5b408 | https://github.com/mrjavoman/Image-Super-Resolution-via-Iterative-Refinement/tree/2eb11d972e8e024c3b1d7a84f90895e329b5b408 |
Model | import torch
import torch.nn as nn
import torch.hub
import torch.nn.functional as F
class Model(nn.Module):
def __init__(self):
super(Model, self).__init__()
self.conv1 = nn.Conv2d(1, 20, 5)
self.conv2 = nn.Conv2d(20, 20, 5)
def forward(self, x):
x = F.relu(self.conv1(x))
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import ... | UoA-CARES/BuilT-NLP | Model | false | 2,925 | [
"MIT"
] | 0 | 761798cbce51d91ec24171e9159413e51c0e0e62 | https://github.com/UoA-CARES/BuilT-NLP/tree/761798cbce51d91ec24171e9159413e51c0e0e62 |
RAddFloat | import torch
class RAddFloat(torch.nn.Module):
def __init__(self):
super(RAddFloat, self).__init__()
def forward(self, x):
return 1.0 + x
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda
@triton.j... | PogChamper/torch2trt | RAddFloat | false | 14,245 | [
"MIT"
] | 3,363 | 43b12627ec0de4d212efb6d02b07570205085ccc | https://github.com/PogChamper/torch2trt/tree/43b12627ec0de4d212efb6d02b07570205085ccc |
SPU | # 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... | DanDoge/course_ethz | SPU | false | 343 | [
"MIT"
] | 0 | 73e5f77e3694d6134169127c0500898402683c32 | https://github.com/DanDoge/course_ethz/tree/73e5f77e3694d6134169127c0500898402683c32 |
GatedLinearUnit | # 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... | JustinNeumann/pytorch-forecasting | GatedLinearUnit | false | 725 | [
"MIT"
] | 0 | 4f6e449cb3788b856e66c4283398a5db201aa6ff | https://github.com/JustinNeumann/pytorch-forecasting/tree/4f6e449cb3788b856e66c4283398a5db201aa6ff |
BackprojectDepth | # 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... | HalleyJiang/PLNet | BackprojectDepth | false | 8,228 | [
"MIT"
] | 16 | a02bd5f343b9e4766891fd234e3a338c1eaa26ff | https://github.com/HalleyJiang/PLNet/tree/a02bd5f343b9e4766891fd234e3a338c1eaa26ff |
BoundedIoULoss | import torch
import torch.distributed
import torch
import torch.nn as nn
import torch.nn.functional
import torch.utils.data
import torch.optim
import torch.optim.lr_scheduler
def bounded_iou_loss(pred, target, beta=0.2, eps=0.001):
"""BIoULoss.
This is an implementation of paper
`Improving Object Localiz... | 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.distribut... | zhangzhengde0225/SwinTrack | BoundedIoULoss | false | 16,813 | [
"MIT"
] | 143 | 526be17f8ef266cb924c6939bd8dda23e9b73249 | https://github.com/zhangzhengde0225/SwinTrack/tree/526be17f8ef266cb924c6939bd8dda23e9b73249 |
DenseCrossEntropy | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
... | Mo5mami/wtfml | DenseCrossEntropy | false | 14,054 | [
"MIT"
] | 283 | afddec88d9c3a94e30ab2897525daf3f5cf8b774 | https://github.com/Mo5mami/wtfml/tree/afddec88d9c3a94e30ab2897525daf3f5cf8b774 |
Model | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, n_input_features):
super(Model, self).__init__()
self.linear = nn.Linear(n_input_features, 1)
def forward(self, x):
y_pred = torch.sigmoid(self.linear(x))
return y_pred
def get_inputs():
retur... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | ValerioMessina/Logistic-Regression | Model | false | 14,546 | [
"MIT"
] | 832 | 7cd3223b5ddfc228f9eae1adabaa5de5fa8f26e9 | https://github.com/ValerioMessina/Logistic-Regression/tree/7cd3223b5ddfc228f9eae1adabaa5de5fa8f26e9 |
fully_conv_layer | import torch
import torch.nn as nn
class fully_conv_layer(nn.Module):
def __init__(self, c):
super(fully_conv_layer, self).__init__()
self.conv = nn.Conv2d(c, 1, 1)
def forward(self, x):
return self.conv(x)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inpu... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | QiweiMa-LL/STAGCN | fully_conv_layer | false | 956 | [
"MIT"
] | 0 | c6889c845ac7fcba4419b2727022a599981f2a54 | https://github.com/QiweiMa-LL/STAGCN/tree/c6889c845ac7fcba4419b2727022a599981f2a54 |
CosineAngularLoss | # 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
import... | princeton-vl/oasis | CosineAngularLoss | false | 16,281 | [
"BSD-3-Clause"
] | 59 | 5835d24c331d78e91becba29f7e4a53ccd3e376e | https://github.com/princeton-vl/oasis/tree/5835d24c331d78e91becba29f7e4a53ccd3e376e |
XConv2d | import torch
import torch.utils.data
import torch.nn as nn
import torch.nn.functional as F
class XConv2d(nn.Conv2d):
"""
X-Convolution layer.
Parameters:
----------
in_channels : int
Number of input channels.
out_channels : int
Number of output channels.
kernel_size : int ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.utils.data
import torch.nn as nn
assert_size_stride = torch._C._dyn... | HyperGAN/imgclsmob | XConv2d | false | 17,688 | [
"MIT"
] | 9 | 88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3 | https://github.com/HyperGAN/imgclsmob/tree/88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3 |
MergeLayer | # 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
assert_size_stride = torch._C... | Awannaphasch2016/tgn | MergeLayer | false | 89 | [
"Apache-2.0"
] | 0 | a0eb4b4759cb44e053dfb6a825ccac1d54dba33f | https://github.com/Awannaphasch2016/tgn/tree/a0eb4b4759cb44e053dfb6a825ccac1d54dba33f |
SkipLastTargetChannelWrapper | import torch
from torch import nn
from torch.nn import MSELoss
class SkipLastTargetChannelWrapper(nn.Module):
"""
Loss wrapper which removes additional target channel
"""
def __init__(self, loss, squeeze_channel=False):
super(SkipLastTargetChannelWrapper, self).__init__()
self.loss = ... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_str... | YinanZYN/pytorch-3dunet | SkipLastTargetChannelWrapper | false | 11,988 | [
"MIT"
] | 0 | d1494f421a836af54c3dde65c54e3e62d5c00800 | https://github.com/YinanZYN/pytorch-3dunet/tree/d1494f421a836af54c3dde65c54e3e62d5c00800 |
WDV29Linear | import math
import torch
import torch.nn.functional as F
import torch.utils.data
from torch.nn import Parameter
import torch.onnx.operators
from torch.nn.parameter import Parameter
from torch.nn import init
import torch.optim
import torch.optim.lr_scheduler
class WDV29Linear(torch.nn.Module):
"""Applies a linear ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import math
import ... | Lollipop321/weight-distillation | WDV29Linear | false | 5,562 | [
"BSD-3-Clause"
] | 1 | cfc76ec58e3e88094dde1825287b2968f9718431 | https://github.com/Lollipop321/weight-distillation/tree/cfc76ec58e3e88094dde1825287b2968f9718431 |
Softmax_Policy | # 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.... | NadeemWard/pytorch_simple_policy_gradients | Softmax_Policy | false | 17,734 | [
"MIT"
] | 5 | d0ae66b46860504a077fdffdac45b5077c12c480 | https://github.com/NadeemWard/pytorch_simple_policy_gradients/tree/d0ae66b46860504a077fdffdac45b5077c12c480 |
ModulatedConv2d | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import math
import ... | bronemos/contrastive-unpaired-translation-focal | ModulatedConv2d | false | 3,258 | [
"BSD-3-Clause"
] | 0 | 50b9008d08a86439ede081a910d02df5da8e32df | https://github.com/bronemos/contrastive-unpaired-translation-focal/tree/50b9008d08a86439ede081a910d02df5da8e32df |
ScaledLeakyReLU | import math
import torch
from torch import nn
from torch.nn import functional as F
class ScaledLeakyReLU(nn.Module):
def __init__(self, negative_slope=0.2):
super().__init__()
self.negative_slope = negative_slope
def forward(self, input):
out = F.leaky_relu(input, negative_slope=self... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_str... | BinahHu/stylegan2-pytorch | ScaledLeakyReLU | false | 155 | [
"MIT",
"BSD-2-Clause",
"Apache-2.0"
] | 0 | 9975707ffd93872fce02f7e3654eb588a09e23e4 | https://github.com/BinahHu/stylegan2-pytorch/tree/9975707ffd93872fce02f7e3654eb588a09e23e4 |
MaskedConv1d | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.onnx
assert_size_stride = torch._C._dynamo.gu... | jonndoe/Character-Level-Language-Modeling-with-Deeper-Self-Attention-pytorch | MaskedConv1d | false | 3,772 | [
"MIT"
] | 0 | d27d2d390f0831330405c16bd29c7f331ad2007a | https://github.com/jonndoe/Character-Level-Language-Modeling-with-Deeper-Self-Attention-pytorch/tree/d27d2d390f0831330405c16bd29c7f331ad2007a |
ParameterLoss | # 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... | nkolot/ProHMR | ParameterLoss | false | 16,182 | [
"BSD-3-Clause"
] | 120 | dac2409c0b451b6dd5d91f03cbe7132aa495792f | https://github.com/nkolot/ProHMR/tree/dac2409c0b451b6dd5d91f03cbe7132aa495792f |
HardSwish | # 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... | Culturenotes/Network-Slimming | HardSwish | false | 7,914 | [
"Apache-2.0"
] | 12 | 9004ab4c1f6bcbf8f317a37984ed3f8db39ecbe2 | https://github.com/Culturenotes/Network-Slimming/tree/9004ab4c1f6bcbf8f317a37984ed3f8db39ecbe2 |
EqualizedConv2d | # 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
import numpy as np
from torch import nn
import torch.utils.data
impo... | Aarsh2001/annotated_deep_learning_paper_implementations | EqualizedConv2d | false | 4,783 | [
"MIT"
] | 1 | ff0d5c065da1a46769f5f66fddc252c178f8fa37 | https://github.com/Aarsh2001/annotated_deep_learning_paper_implementations/tree/ff0d5c065da1a46769f5f66fddc252c178f8fa37 |
ClassHead | # 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
from itertools import product as product
assert_size_strid... | ai18435136351/facenet-retinaface-pytorch | ClassHead | false | 14,770 | [
"MIT"
] | 48 | f228969e46d7402170b708798a210de552879d16 | https://github.com/ai18435136351/facenet-retinaface-pytorch/tree/f228969e46d7402170b708798a210de552879d16 |
Actor | import torch
import torch.nn.functional as F
from torch import nn
class Actor(nn.Module):
"""
Policy Network (state --> action)
"""
def __init__(self, state_size: 'int', action_size: 'int', hidden_size:
'int'=256):
super().__init__()
self.fc1 = nn.Linear(state_size, hidden_siz... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | jadenvc/puppersim | Actor | false | 10,240 | [
"Apache-2.0"
] | 0 | 1b3f3e3fc0515d5d6101622e0d729c779debfd32 | https://github.com/jadenvc/puppersim/tree/1b3f3e3fc0515d5d6101622e0d729c779debfd32 |
PA | import torch
from torch import nn
class PA(nn.Module):
def __init__(self, dim):
super().__init__()
self.pa_conv = nn.Conv2d(dim, dim, 3, 1, 1, groups=dim)
def forward(self, x):
return x * self.pa_conv(x).sigmoid()
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_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 import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_st... | Genevievekim/segformer | PA | false | 17,318 | [
"MIT"
] | 10 | 4a0800746ade51101ec2573c683b06eccadb9683 | https://github.com/Genevievekim/segformer/tree/4a0800746ade51101ec2573c683b06eccadb9683 |
ConvGRUCell | import torch
from torch import nn
import torch.nn.functional as F
def one_param(m):
"""First parameter in `m`"""
return next(m.parameters())
class ConvGRUCell(nn.Module):
def __init__(self, input_dim, hidden_dim, kernel_size=(3, 3), bias=True,
activation=F.tanh, batchnorm=False):
"""
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch import n... | lukeleeai/metnet | ConvGRUCell | false | 12,746 | [
"MIT"
] | 0 | 1dc0bf11780f413f3d55207866e0fa921b8aa60d | https://github.com/lukeleeai/metnet/tree/1dc0bf11780f413f3d55207866e0fa921b8aa60d |
QNetwork | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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_... | royveshovda/deep-reinforcement-learning | QNetwork | false | 4,202 | [
"MIT"
] | 0 | 64ba7ef5ab44f095b7e8b29f6c4ff1585025981a | https://github.com/royveshovda/deep-reinforcement-learning/tree/64ba7ef5ab44f095b7e8b29f6c4ff1585025981a |
KLDivLoss | # 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.nn import M... | mcx/annotated_deep_learning_paper_implementations | KLDivLoss | false | 7,199 | [
"MIT"
] | 1 | f169f3a71dd2d36eb28ad31062d3475efa367b88 | https://github.com/mcx/annotated_deep_learning_paper_implementations/tree/f169f3a71dd2d36eb28ad31062d3475efa367b88 |
CrossEntropy2D | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
... | Jinboasltw/FastSurfer | CrossEntropy2D | false | 13,894 | [
"Apache-2.0"
] | 257 | 3c0330c459c221b85428d3ec2e95f5196aee3129 | https://github.com/Jinboasltw/FastSurfer/tree/3c0330c459c221b85428d3ec2e95f5196aee3129 |
CBAM_Module | # 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
from tor... | IrvingShu/batch-feature-erasing-network | CBAM_Module | false | 13,864 | [
"MIT"
] | 152 | 534616c09dade92561a0203797892a63a072b1b4 | https://github.com/IrvingShu/batch-feature-erasing-network/tree/534616c09dade92561a0203797892a63a072b1b4 |
DuelingQNetwork | import torch
import torch.nn.functional as F
import torch.nn as nn
class DuelingQNetwork(nn.Module):
def __init__(self, state_size, action_size, hidsize1=128, hidsize2=128):
super(DuelingQNetwork, self).__init__()
self.fc1_val = nn.Linear(state_size, hidsize1)
self.fc2_val = nn.Linear(hid... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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_... | LuckUVeryX/flatland-kit | DuelingQNetwork | false | 9,272 | [
"MIT"
] | 0 | 3127c072b2f26fa0a0f4b45888672c11b80acfd3 | https://github.com/LuckUVeryX/flatland-kit/tree/3127c072b2f26fa0a0f4b45888672c11b80acfd3 |
SDFNetwork | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
im... | hzwangjl/NeuS | SDFNetwork | false | 10,242 | [
"MIT"
] | 0 | f1b89176ec18e19b3848d787416dab9a1ce5300b | https://github.com/hzwangjl/NeuS/tree/f1b89176ec18e19b3848d787416dab9a1ce5300b |
R2Score | # 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... | RosarioAndolina/psychXRF | R2Score | false | 994 | [
"MIT"
] | 0 | e2adadbd17664d7f74c10304f84b3751c571226e | https://github.com/RosarioAndolina/psychXRF/tree/e2adadbd17664d7f74c10304f84b3751c571226e |
DiceLoss | import torch
import torch.utils.data
import torch.nn as nn
import torch.nn.parallel
class DiceLoss(nn.Module):
"""DICE loss.
"""
def __init__(self, reduce=True, smooth=100.0, power=1):
super(DiceLoss, self).__init__()
self.smooth = smooth
self.reduce = reduce
self.power = ... | 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... | HarshSulakhe/pytorch_connectomics | DiceLoss | false | 9,864 | [
"MIT"
] | 0 | 73402e654afde69a43a5836cc90a32ef75c75dc2 | https://github.com/HarshSulakhe/pytorch_connectomics/tree/73402e654afde69a43a5836cc90a32ef75c75dc2 |
CeCriterion | import torch
import torch.nn.functional as F
from torch.nn.modules.loss import _Loss
from torch.optim.lr_scheduler import *
class Criterion(_Loss):
def __init__(self, alpha=1.0, name='criterion'):
super().__init__()
"""Alpha is used to weight each loss term
"""
self.alpha = alpha
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
from torch.nn.modules.... | chunhuililili/mt_dnn | CeCriterion | false | 10,207 | [
"MIT"
] | 0 | 4c6efaf21724c7b8103a05e46b5b44d7b246225e | https://github.com/chunhuililili/mt_dnn/tree/4c6efaf21724c7b8103a05e46b5b44d7b246225e |
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
from torch.nn import Module
i... | Myeongchan-Kim/SVAMP | GCN | false | 5,628 | [
"MIT"
] | 1 | 9ff9ad471a61aa390199df4b99beb3b654f5c943 | https://github.com/Myeongchan-Kim/SVAMP/tree/9ff9ad471a61aa390199df4b99beb3b654f5c943 |
SparsemaxBisect | from torch.autograd import Function
import torch
import torch.nn as nn
def sparsemax_bisect(X, dim=-1, n_iter=50, ensure_sum_one=True):
"""sparsemax: normalizing sparse transform (a la softmax), via bisection.
Solves the projection:
min_p ||x - p||_2 s.t. p >= 0, sum(p) == 1.
Parameters
... | 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
import torch.nn as nn
assert_size_stride = torch._C._... | roholazandie/entmax | SparsemaxBisect | false | 7,626 | [
"MIT"
] | 1 | 657374e6a792ec6840b6f78bc759cc1f51570aad | https://github.com/roholazandie/entmax/tree/657374e6a792ec6840b6f78bc759cc1f51570aad |
ConvReLU | import math
import torch
import torch.nn.functional as F
from torch.nn import Conv2d
from torch.nn import LeakyReLU
class PadSameConv2d(torch.nn.Module):
def __init__(self, kernel_size, stride=1):
"""
Imitates padding_mode="same" from tensorflow.
:param kernel_size: Kernelsize of the conv... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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.functional as F
from torch.nn import Conv2d
from tor... | pc2005/MonoRec | ConvReLU | false | 12,868 | [
"MIT"
] | 0 | 6e1628eeef9987b1acce3e5e8bb6a6a324fc8d2c | https://github.com/pc2005/MonoRec/tree/6e1628eeef9987b1acce3e5e8bb6a6a324fc8d2c |
TreeMaxPool | # 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... | balsa-project/balsa | TreeMaxPool | false | 3,159 | [
"Apache-2.0"
] | 0 | 36f3fb35d33589928d761b89de52367d18d08fd8 | https://github.com/balsa-project/balsa/tree/36f3fb35d33589928d761b89de52367d18d08fd8 |
VAE | import torch
from torch.nn import functional as F
from torch import nn
import torch.nn
class VAE(nn.Module):
def __init__(self, in_ch, out_ch, hidden_ch=128):
super(VAE, self).__init__()
self.in_ch = in_ch
self.out_ch = out_ch
self.fc1 = nn.Linear(in_ch, hidden_ch)
self.fc... | import torch
from torch import device
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from... | Jack12xl/scene-representation-networks | VAE | false | 606 | [
"MIT"
] | 0 | 2691b23c956cf188a1fe4c84a888b19871cac8f4 | https://github.com/Jack12xl/scene-representation-networks/tree/2691b23c956cf188a1fe4c84a888b19871cac8f4 |
LanguageModelCriterion | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
from torch.autograd import *
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | zhlnhn/ImageNewsMatching | LanguageModelCriterion | false | 13,173 | [
"MIT"
] | 0 | a9ebfc5f7669621cfc37510d6d9476a7b7a86eaa | https://github.com/zhlnhn/ImageNewsMatching/tree/a9ebfc5f7669621cfc37510d6d9476a7b7a86eaa |
ConvReLU2 | import math
import torch
import torch.nn.functional as F
from torch.nn import Conv2d
from torch.nn import LeakyReLU
class PadSameConv2d(torch.nn.Module):
def __init__(self, kernel_size, stride=1):
"""
Imitates padding_mode="same" from tensorflow.
:param kernel_size: Kernelsize of the conv... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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.functional as F
from torch.nn import Conv2d
from tor... | shlomi-amitai/monorec | ConvReLU2 | false | 10,910 | [
"MIT"
] | 0 | 74571c6cd8d06ae4fb15cbee5a41147c54c78556 | https://github.com/shlomi-amitai/monorec/tree/74571c6cd8d06ae4fb15cbee5a41147c54c78556 |
NIN4d | import torch
import torch.nn as nn
from torch.nn import Parameter
def norm(p: 'torch.Tensor', dim: 'int'):
"""Computes the norm over all dimensions except dim"""
if dim is None:
return p.norm()
elif dim == 0:
output_size = (p.size(0),) + (1,) * (p.dim() - 1)
return p.contiguous().v... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | XuezheMax/macow | NIN4d | false | 14,612 | [
"Apache-2.0"
] | 60 | 6de247c09b590a037c9eec2d6b1248845f6efb31 | https://github.com/XuezheMax/macow/tree/6de247c09b590a037c9eec2d6b1248845f6efb31 |
SobelConv | import torch
import torch.nn as nn
class SobelConv(nn.Module):
def __init__(self, in_channel=31, batch_num=16):
super(SobelConv, self).__init__()
self.bz = batch_num
self.in_channel = in_channel
self.convx = nn.Conv2d(in_channels=31, out_channels=31, kernel_size
=3, st... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | SeVEnMY/hyper-reconstruction | SobelConv | false | 5,807 | [
"MIT"
] | 1 | 018c34aaf6884650c36a73bd7f4635f927a79da3 | https://github.com/SeVEnMY/hyper-reconstruction/tree/018c34aaf6884650c36a73bd7f4635f927a79da3 |
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.parallel
impo... | NeilDG/NeuralNets-Experiment3 | SpatialAttention | false | 887 | [
"MIT"
] | 0 | f0d2f788eeca49f803f65810c155491ce687cf9e | https://github.com/NeilDG/NeuralNets-Experiment3/tree/f0d2f788eeca49f803f65810c155491ce687cf9e |
BertPooler | from _paritybench_helpers import _mock_config
import torch
from torch import nn
class BertPooler(nn.Module):
def __init__(self, config):
super(BertPooler, self).__init__()
self.dense = nn.Linear(config.hidden_size, config.hidden_size)
self.activation = nn.Tanh()
def forward(self, hid... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch import n... | ArrowLuo/GRACE | BertPooler | false | 8,775 | [
"Apache-2.0"
] | 17 | f27b500ba905685c03eee6d91d87adc9ef78b4d1 | https://github.com/ArrowLuo/GRACE/tree/f27b500ba905685c03eee6d91d87adc9ef78b4d1 |
Mnist_NN | # 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_... | Sara-Rajaee/Deep_learning_explorations | Mnist_NN | false | 14,386 | [
"MIT"
] | 154 | d0c527f1cde61eea90bda01b073c5ac24565ebf1 | https://github.com/Sara-Rajaee/Deep_learning_explorations/tree/d0c527f1cde61eea90bda01b073c5ac24565ebf1 |
Transition_nobn | import torch
import torch.nn as nn
import torch.nn.functional as F
class Transition_nobn(nn.Module):
def __init__(self, in_planes, out_planes):
super(Transition_nobn, self).__init__()
self.conv = nn.Conv2d(in_planes, out_planes, kernel_size=1, bias=False)
def forward(self, x):
out = ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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_... | daroczyb/tangent_sensitivity | Transition_nobn | false | 10,006 | [
"MIT"
] | 0 | 925258ab381ca5ab95620c411f72836a90baeb7f | https://github.com/daroczyb/tangent_sensitivity/tree/925258ab381ca5ab95620c411f72836a90baeb7f |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.