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 |
|---|---|---|---|---|---|---|---|---|---|---|
EncoderLayer | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | Rajathbharadwaj/algorithmic-efficiency | EncoderLayer | false | 14,331 | [
"Apache-2.0"
] | 49 | 47d2928836e0574bc54cc3ad58860dd4daf86cce | https://github.com/Rajathbharadwaj/algorithmic-efficiency/tree/47d2928836e0574bc54cc3ad58860dd4daf86cce |
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_... | deeplearningrobotics/p1nav | QNetwork | false | 9,978 | [
"Apache-2.0"
] | 0 | 433ff8d8b5fec6c8bb3c346e5b8dfff2865f4a55 | https://github.com/deeplearningrobotics/p1nav/tree/433ff8d8b5fec6c8bb3c346e5b8dfff2865f4a55 |
SamePaddingConv1d | import torch
import torch.nn as nn
class SamePaddingConv1d(nn.Module):
def __init__(self, in_dim, out_dim, kernel_size):
super().__init__()
self.conv = nn.Conv1d(in_dim, out_dim, kernel_size, padding=int((
kernel_size - 1) / 2))
def forward(self, x):
return self.conv(x)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | Yotsuyubi/drumgan | SamePaddingConv1d | false | 2,984 | [
"MIT"
] | 0 | eb6a9aa8b5c0d64bad65e4dbd14d444b7a859a29 | https://github.com/Yotsuyubi/drumgan/tree/eb6a9aa8b5c0d64bad65e4dbd14d444b7a859a29 |
PA | # 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... | EmanuelNk/semantic-segmentation | PA | false | 2,187 | [
"MIT"
] | 0 | 20ff16da49691fb407724909d9c7e84b47e2fee0 | https://github.com/EmanuelNk/semantic-segmentation/tree/20ff16da49691fb407724909d9c7e84b47e2fee0 |
UpdateNodeEmbeddingLayer | import torch
import torch.nn.functional as F
import torch.nn as nn
class UpdateNodeEmbeddingLayer(nn.Module):
def __init__(self, n_features):
super().__init__()
self.message_layer = nn.Linear(2 * n_features, n_features, bias=False)
self.update_layer = nn.Linear(2 * n_features, n_features,... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | LanaLana/eco-dqn | UpdateNodeEmbeddingLayer | false | 14,008 | [
"MIT"
] | 57 | c9ac07618b906bc14faaa1ddc7df3f4b31d83c37 | https://github.com/LanaLana/eco-dqn/tree/c9ac07618b906bc14faaa1ddc7df3f4b31d83c37 |
SelfExpression | import torch
import torch.nn as nn
class SelfExpression(nn.Module):
def __init__(self, n):
super(SelfExpression, self).__init__()
self.Coefficient = nn.Parameter(0.0001 * torch.ones(n, n, dtype=
torch.float32), requires_grad=True)
def forward(self, x):
y = torch.matmul(se... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | qilinli/DSC-Net | SelfExpression | false | 4,151 | [
"MIT"
] | 0 | c0e7a3cae3e07c34b2989234f568c7007cf0fc55 | https://github.com/qilinli/DSC-Net/tree/c0e7a3cae3e07c34b2989234f568c7007cf0fc55 |
DiceLoss | import torch
from torch import nn
from torch.autograd import Variable
def flatten(tensor):
"""Flattens a given tensor such that the channel axis is first.
The shapes are transformed as follows:
(N, C, D, H, W) -> (C, N * D * H * W)
"""
C = tensor.size(1)
axis_order = (1, 0) + tuple(range(2,... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empt... | zzz123xyz/pytorch-3dunet | DiceLoss | false | 11,039 | [
"MIT"
] | 0 | 5bab6968b23cff5c6ae456b343285bfa9b104294 | https://github.com/zzz123xyz/pytorch-3dunet/tree/5bab6968b23cff5c6ae456b343285bfa9b104294 |
AvgPoolPad | import torch
import torch.nn as nn
class AvgPoolPad(nn.Module):
def __init__(self, stride=2, padding=1):
super(AvgPoolPad, self).__init__()
self.pad = nn.ZeroPad2d((1, 0, 1, 0))
self.pool = nn.AvgPool2d(3, stride=stride, padding=padding,
count_include_pad=False)
def forwa... | 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... | GoalballAnalysis/GUI | AvgPoolPad | false | 2,307 | [
"MIT"
] | 0 | c7f1cc27f4fd7f861c3ca09f5ca25d1a3f19a8a7 | https://github.com/GoalballAnalysis/GUI/tree/c7f1cc27f4fd7f861c3ca09f5ca25d1a3f19a8a7 |
stack_pool | # 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... | siyuhuang/crowdcount-stackedpool | stack_pool | false | 16,477 | [
"MIT"
] | 93 | bbba3d9e91a5a89642b4bd3638ae8e68801ea7bf | https://github.com/siyuhuang/crowdcount-stackedpool/tree/bbba3d9e91a5a89642b4bd3638ae8e68801ea7bf |
DecoderBias | # 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... | xiaoyanLi629/single_cell_data_analysis | DecoderBias | false | 13,111 | [
"MIT"
] | 0 | 39d6bbd64249385d2005a775ea1d05e210f41fbe | https://github.com/xiaoyanLi629/single_cell_data_analysis/tree/39d6bbd64249385d2005a775ea1d05e210f41fbe |
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
from torch import n... | abcdefg-dev-dd/asxdcvfg | FeedForward | false | 6,055 | [
"Apache-2.0"
] | 1 | 83421d4a133810968d6e04b256a9312895452941 | https://github.com/abcdefg-dev-dd/asxdcvfg/tree/83421d4a133810968d6e04b256a9312895452941 |
AE_2D | # 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 ... | gitter-badger/HEPAutoencoders | AE_2D | false | 12,437 | [
"Apache-2.0"
] | 0 | 43010cd66fa4335a04b30b87926148e1c8d92de9 | https://github.com/gitter-badger/HEPAutoencoders/tree/43010cd66fa4335a04b30b87926148e1c8d92de9 |
SpatialAttentionLayer | import torch
import torch.nn as nn
import torch.nn.parallel
import torch.utils.data.distributed
class SpatialAttentionLayer(nn.Module):
def __init__(self, spatial_size):
super(SpatialAttentionLayer, self).__init__()
self.avg_pool = nn.AdaptiveAvgPool2d(1)
self.max_pool = nn.AdaptiveMaxPoo... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | HolmesShuan/Compact-Global-Descriptor | SpatialAttentionLayer | false | 8,247 | [
"BSD-2-Clause"
] | 24 | 715601bd7fce76596db960f7dc480241d443fa66 | https://github.com/HolmesShuan/Compact-Global-Descriptor/tree/715601bd7fce76596db960f7dc480241d443fa66 |
LinearWithChannel | import torch
import numpy as np
import torch.nn as nn
class LinearWithChannel(nn.Module):
def __init__(self, input_size, output_size, channel_size):
super(LinearWithChannel, self).__init__()
self.channel_size = channel_size
self.weight = torch.nn.Parameter(torch.zeros(channel_size,
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import numpy as np
import torch.nn as nn
assert_size_stride = torch._C._dynamo.g... | jilanglois-su/cobs10-dengai | LinearWithChannel | false | 10,279 | [
"MIT"
] | 0 | 101d3434db6330e9794b2e266b02c93793abfb82 | https://github.com/jilanglois-su/cobs10-dengai/tree/101d3434db6330e9794b2e266b02c93793abfb82 |
Invertible1x1Conv | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn.functional as F
from torch.autograd import Variable
import torch... | GreyZzzzzzXh/TensorRT | Invertible1x1Conv | false | 507 | [
"Apache-2.0"
] | 0 | ba5b1b4f1ade5896c7fae206e43570a2712498d4 | https://github.com/GreyZzzzzzXh/TensorRT/tree/ba5b1b4f1ade5896c7fae206e43570a2712498d4 |
ZeroPad1d | import torch
import torch.nn.functional as F
import torch.nn as nn
import torch.utils.data
import torch.onnx.operators
import torch.optim
import torch.optim.lr_scheduler
class ZeroPad1d(nn.Module):
def __init__(self, pad_left, pad_right):
super().__init__()
self.pad_left = pad_left
self.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
import torch.nn as nn
import torch.utils.data
import torch.onnx.operators
import torch.optim
import torch.optim.lr_scheduler
assert_size_str... | Ashprakash/roberta | ZeroPad1d | false | 11,470 | [
"MIT"
] | 0 | 5ee7abda64d752a467218c247855ddc20c09a779 | https://github.com/Ashprakash/roberta/tree/5ee7abda64d752a467218c247855ddc20c09a779 |
Decoder2 | import torch
import torch.nn as nn
class Decoder2(nn.Module):
def __init__(self, M, H, D):
super().__init__()
self.D = D
self.M = M
self.H = H
self.dec1 = nn.Linear(in_features=self.M, out_features=self.H * 2)
self.dec2 = nn.Linear(in_features=self.H * 2, out_featu... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | le0x99/deep-generative-modeling | Decoder2 | false | 7,068 | [
"MIT"
] | 1 | 40ffd1640dc3e5a6a2b4ba16a1d767034f081475 | https://github.com/le0x99/deep-generative-modeling/tree/40ffd1640dc3e5a6a2b4ba16a1d767034f081475 |
_Residual_Block | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | Shandilya21/Improved-Optimization-Tecniques-for-Super-Resoultion-in-Images | _Residual_Block | false | 17,902 | [
"MIT"
] | 10 | d903d99706f557d74e00d4395e7d316172a9f7ee | https://github.com/Shandilya21/Improved-Optimization-Tecniques-for-Super-Resoultion-in-Images/tree/d903d99706f557d74e00d4395e7d316172a9f7ee |
PositionwiseFeedForward | import torch
from torch import nn
import torch.nn.functional as F
class PositionwiseFeedForward(nn.Module):
""" a two layer feed forward"""
def __init__(self, model_dim=512, ffn_dim=2048, dropout=0.1):
super(PositionwiseFeedForward, self).__init__()
self.w1 = nn.Conv1d(model_dim, ffn_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.... | LinXueyuanStdio/scRNN-seq | PositionwiseFeedForward | false | 2,543 | [
"Apache-2.0"
] | 0 | 87e11a56acb18a86fa4fb309d33a1bc02bf38b39 | https://github.com/LinXueyuanStdio/scRNN-seq/tree/87e11a56acb18a86fa4fb309d33a1bc02bf38b39 |
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... | eunice012716/Intern-Training | MyLinear | false | 6,659 | [
"MIT"
] | 1 | c3bbf42448a0b41e96d88569b6cfd57d78338716 | https://github.com/eunice012716/Intern-Training/tree/c3bbf42448a0b41e96d88569b6cfd57d78338716 |
MLPPolicyNetwork | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.distributions import Normal
class MLPPolicyNetwork(nn.Module):
def __init__(self, num_inputs, num_actions, hidden_size1=1400,
hidden_size2=1024, hidden_size3=256, init_w=0.003, log_std_min=-20,
log_std_max=2):
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
from to... | SAMMiCA/DL_based_E2E_Driving | MLPPolicyNetwork | false | 17,892 | [
"MIT"
] | 4 | 01f7d74a0db7ed745cf27b9a1ebab0246015ecbd | https://github.com/SAMMiCA/DL_based_E2E_Driving/tree/01f7d74a0db7ed745cf27b9a1ebab0246015ecbd |
FastGRNNCell | # 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 ... | adityakusupati/EdgeML | FastGRNNCell | false | 3,040 | [
"MIT"
] | 0 | 65933a6fdfc38945f4311043a62e120784b2b0bf | https://github.com/adityakusupati/EdgeML/tree/65933a6fdfc38945f4311043a62e120784b2b0bf |
LayerScale_Block | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | WangFeng18/deit | LayerScale_Block | false | 11,980 | [
"Apache-2.0"
] | 0 | 62a2c54faf683af8316fbec2e99f666879949cb4 | https://github.com/WangFeng18/deit/tree/62a2c54faf683af8316fbec2e99f666879949cb4 |
NegSamplingLoss | import torch
import torch.nn as nn
class NegSamplingLoss(nn.Module):
def __init__(self):
super(NegSamplingLoss, self).__init__()
def forward(self, score, sign):
return -torch.mean(torch.sigmoid(sign * score))
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])]... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
emp... | dreaming-qin/RecBole | NegSamplingLoss | false | 12,310 | [
"MIT"
] | 0 | d6de39521484ded60c387ca604abaf86310acdbe | https://github.com/dreaming-qin/RecBole/tree/d6de39521484ded60c387ca604abaf86310acdbe |
RandomShiftsAug | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
from torch import device
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
assert_size_stride = torch._C._d... | MishaLaskin/url_benchmark | RandomShiftsAug | false | 5,614 | [
"MIT"
] | 1 | a81aed0a0aec3a7dad83d930e54d480f97cf535d | https://github.com/MishaLaskin/url_benchmark/tree/a81aed0a0aec3a7dad83d930e54d480f97cf535d |
SegmentationTestModel | from torch.nn import Module
import torch
import torch.nn as nn
from typing import Any
from typing import cast
from torch.nn.modules import Module
class SegmentationTestModel(Module):
def __init__(self, in_channels: 'int'=3, classes: 'int'=1000, **kwargs: Any
) ->None:
super().__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.nn import Module
import torch.nn as nn
from typing import Any
from to... | ethanwhite/torchgeo | SegmentationTestModel | false | 15,316 | [
"MIT"
] | 678 | cb20e1abfd9213f9ee7700df972385db13568642 | https://github.com/ethanwhite/torchgeo/tree/cb20e1abfd9213f9ee7700df972385db13568642 |
ConvExpansion | import torch
import torch.nn as nn
class ConvExpansion(nn.Module):
"""expansion 1D -> 2D"""
def __init__(self, d_features, n_channel, n_depth):
super().__init__()
self.d_features = d_features
self.n_channel = n_channel
self.n_depth = n_depth
self.conv = nn.Conv1d(1, n_... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | Jincheng-Sun/Kylearn-pytorch | ConvExpansion | false | 654 | [
"MIT"
] | 0 | e72f2ab45a3f4724e843a27bec37664d3612fdca | https://github.com/Jincheng-Sun/Kylearn-pytorch/tree/e72f2ab45a3f4724e843a27bec37664d3612fdca |
AvgPool | import torch
import torch.nn.functional as F
from torch import nn
import torch.utils.data
class AvgPool(nn.Module):
"""1-d average pooling module."""
def __init__(self, stride=None, padding=0):
super(AvgPool, self).__init__()
self.stride = stride
self.padding = padding
def forwar... | 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... | FengZiYjun/fastNLP | AvgPool | false | 5,149 | [
"Apache-2.0"
] | 1 | 3ae73ab0a05d1ceef4a5181516891a8057d7f719 | https://github.com/FengZiYjun/fastNLP/tree/3ae73ab0a05d1ceef4a5181516891a8057d7f719 |
ReOrgLayer | import torch
import torch.nn as nn
class ReOrgLayer(nn.Module):
def __init__(self, stride=2):
super(ReOrgLayer, self).__init__()
self.stride = stride
def forward(self, x):
assert x.data.dim() == 4
B, C, H, W = x.data.shape
hs = self.stride
ws = self.stride
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | AlexRogalskiy/smart-social-distancing | ReOrgLayer | false | 13,248 | [
"Apache-2.0"
] | 113 | 2def6738038035e67ac79fc9b72ba072e190321f | https://github.com/AlexRogalskiy/smart-social-distancing/tree/2def6738038035e67ac79fc9b72ba072e190321f |
ILN | # 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, math as tl_math
import torc... | Elvinky/IEGAN | ILN | false | 8,063 | [
"MIT"
] | 29 | db072e38fb022b367da24d3210c59136fbad224e | https://github.com/Elvinky/IEGAN/tree/db072e38fb022b367da24d3210c59136fbad224e |
MultipleConst | import torch
import torch.nn as nn
class MultipleConst(nn.Module):
def forward(self, data):
return 255 * data
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | IvoryCandy/neural-style | MultipleConst | false | 5,351 | [
"Apache-2.0"
] | 1 | d9d73676479e36c1cbd6c9af36d857f80099504b | https://github.com/IvoryCandy/neural-style/tree/d9d73676479e36c1cbd6c9af36d857f80099504b |
ActionMapper | import torch
import torch.nn as nn
import torch.nn.functional as F
class ActionMapper(nn.Module):
def __init__(self, feature_dim, action_dim, max_action):
super(ActionMapper, self).__init__()
self.l1 = nn.Linear(feature_dim, 300)
self.l2 = nn.Linear(300, action_dim)
self.max_actio... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | KuangenZhang/StructuredRL | ActionMapper | false | 5,453 | [
"MIT"
] | 1 | 9b05e5034ff0e045aabf83786efb0859f08e989a | https://github.com/KuangenZhang/StructuredRL/tree/9b05e5034ff0e045aabf83786efb0859f08e989a |
Connect2Model | import torch
import numpy as np
import torch.nn as nn
import torch.nn.functional as F
class Connect2Model(nn.Module):
def __init__(self, board_size, action_size, device):
super(Connect2Model, self).__init__()
self.device = device
self.size = board_size
self.action_size = action_si... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | JoshVarty/ConnectX | Connect2Model | false | 5,421 | [
"MIT"
] | 1 | 05478e250a149df46bf93a6b85282ded34afadc3 | https://github.com/JoshVarty/ConnectX/tree/05478e250a149df46bf93a6b85282ded34afadc3 |
BottleNeck | import torch
import torch.nn as nn
class BottleNeck(nn.Module):
def __init__(self):
super().__init__()
def forward(self, x):
avg = x.mean(dim=-1).unsqueeze(2)
return torch.cat((x, avg), dim=2)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
retu... | 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... | etienne87/pytorch-cifar | BottleNeck | false | 10,087 | [
"MIT"
] | 0 | d9164df8ba0cb9259daf857e006db3fecb762af7 | https://github.com/etienne87/pytorch-cifar/tree/d9164df8ba0cb9259daf857e006db3fecb762af7 |
FocalLoss | import torch
import torch.nn as nn
def _assert_inputs(pred, true):
assert pred.shape == true.shape, f'predition shape {pred.shape} is not the same as label shape {true.shape}'
class FocalLoss(nn.Module):
def __init__(self, gamma=2, binary=False):
super().__init__()
self.gamma = gamma
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert... | jokingbear/DM | FocalLoss | false | 6,977 | [
"MIT"
] | 1 | 9c4dada1756f3d866455a397511d4f3bacfadc60 | https://github.com/jokingbear/DM/tree/9c4dada1756f3d866455a397511d4f3bacfadc60 |
ChannelAttention | # 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 ... | leobean/CenterNet_simple | ChannelAttention | false | 3,965 | [
"MIT"
] | 0 | 13e2eab2c049563afde5defdf90434a310a32d02 | https://github.com/leobean/CenterNet_simple/tree/13e2eab2c049563afde5defdf90434a310a32d02 |
GraphConvolution | import torch
import torch.nn as nn
import torch.nn.init as init
class GraphConvolution(nn.Module):
def __init__(self, input_dim, output_dim, use_bias=True):
"""
图卷积: L*X*theta
:param input_dim: int 节点输入特征的维度
:param out_put_dim: int 输出特征维度
:param use_bias: boolean | opt... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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.init as init
assert_size_stride = torch._C... | acproject/knowledge-graph-learning | GraphConvolution | false | 12,051 | [
"MIT"
] | 0 | fa62db6720f6da8e35de01b68acf82f1a367671f | https://github.com/acproject/knowledge-graph-learning/tree/fa62db6720f6da8e35de01b68acf82f1a367671f |
WideResNet | # 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 math
import torch.nn a... | PavelOstyakov/pipeline | WideResNet | false | 14,167 | [
"MIT"
] | 214 | 236c050af3be9dbb534e959589040e9433501e2b | https://github.com/PavelOstyakov/pipeline/tree/236c050af3be9dbb534e959589040e9433501e2b |
ConditionTime | import torch
from torch import nn as nn
def condition_time(x, i=0, size=(12, 16), seq_len=15):
"""create one hot encoded time image-layers, i in [1, seq_len]"""
assert i < seq_len
times = torch.eye(seq_len, dtype=x.dtype, device=x.device)[i].unsqueeze(-1
).unsqueeze(-1)
ones = torch.ones(1, *s... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._emp... | ValterFallenius/metnet | ConditionTime | false | 9,652 | [
"MIT"
] | 0 | 7cde48a7b5fc0b69a8ce9083f934949362620fd5 | https://github.com/ValterFallenius/metnet/tree/7cde48a7b5fc0b69a8ce9083f934949362620fd5 |
GCN | import torch
from torch import nn
import torch.nn.functional as F
import torch.nn.parallel
import torch.utils.data
class Conv2D(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, padding=
'same', stride=1, dilation=1, groups=1):
super(Conv2D, self).__init__()
assert ty... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import 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.nn.functional as F
import torch.nn.parallel
im... | UrwLee/AdelaiDet | GCN | false | 9,645 | [
"BSD-2-Clause"
] | 0 | 4cd88a80355d21261e94400767f44701ebc4b402 | https://github.com/UrwLee/AdelaiDet/tree/4cd88a80355d21261e94400767f44701ebc4b402 |
up | # 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
import torch
assert_size_stride = ... | PorscheTan/Siam-NestedUNet | up | false | 14,231 | [
"MIT"
] | 122 | a60d3d41f0114387c57dcc7cd2de3b6b0f259ad0 | https://github.com/PorscheTan/Siam-NestedUNet/tree/a60d3d41f0114387c57dcc7cd2de3b6b0f259ad0 |
Decoder | import torch
import torch.nn
import torch.nn.functional as F
import torch.utils.data.dataset
class ResBlock(torch.nn.Module):
def __init__(self, indim, outdim=None, stride=1):
super(ResBlock, self).__init__()
if outdim is None:
outdim = indim
if indim == outdim and stride == 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
import torch.... | hzxie/RMNet | Decoder | false | 16,049 | [
"MIT"
] | 66 | 32a16f9c9473463a41dd6e95f72b06dd830fc1eb | https://github.com/hzxie/RMNet/tree/32a16f9c9473463a41dd6e95f72b06dd830fc1eb |
EqualConv2d | import torch
import torch.nn as nn
from math import sqrt
def equal_lr(module, name='weight'):
EqualLR.apply(module, name)
return module
class EqualLR:
def __init__(self, name):
self.name = name
def compute_weight(self, module):
weight = getattr(module, self.name + '_orig')
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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 math import sqrt
assert_size_stride = torch._C._dynam... | IW276/IW276SS20-P3 | EqualConv2d | false | 574 | [
"MIT"
] | 0 | 7970bd332cc021cf1879f326c444eff3cf8593a1 | https://github.com/IW276/IW276SS20-P3/tree/7970bd332cc021cf1879f326c444eff3cf8593a1 |
BasicConv | import torch
import torch.nn as nn
import torch.utils.model_zoo
class BasicConv(nn.Module):
def __init__(self, in_feature, out_feature, kernel_size, stride=1,
padding=0, dilation=1, groups=1, relu=True, bn=False, bias=False):
super(BasicConv, self).__init__()
self.conv = nn.Conv2d(in_feat... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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 ... | agusgun/EDSR-PyTorch | BasicConv | false | 18,231 | [
"MIT"
] | 6 | 38ff657e2c4e2f148d38b8792bacdf8d81f8bf9f | https://github.com/agusgun/EDSR-PyTorch/tree/38ff657e2c4e2f148d38b8792bacdf8d81f8bf9f |
ScoreLayer | # 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... | alejodosr/PoolNet | ScoreLayer | false | 12,067 | [
"MIT"
] | 0 | a6a19379933fe02c22f0eb0dd92038fe87cf0bd3 | https://github.com/alejodosr/PoolNet/tree/a6a19379933fe02c22f0eb0dd92038fe87cf0bd3 |
MaxPooling | import torch
import torch.nn as nn
class MaxPooling(nn.Module):
def __init__(self):
super(MaxPooling, self).__init__()
self.MIN = -1000000.0
"""
(item, subitem) can be (word, characters), or (sentence, words)
x: num_items x max_subitem_size x input_size
x_mask: num_items x max_... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
emp... | mpandeydev/SDnetmod | MaxPooling | false | 7,275 | [
"MIT"
] | 1 | c8cdf6150e3cd28330359a7d81df236729522a69 | https://github.com/mpandeydev/SDnetmod/tree/c8cdf6150e3cd28330359a7d81df236729522a69 |
ScaledDotProductAttention | import torch
import torch.nn.functional as F
import torch.nn as nn
class ScaledDotProductAttention(nn.Module):
""" Scaled Dot-Product Attention """
def __init__(self, temperature, attn_dropout=0.1):
super().__init__()
self.temperature = temperature
self.dropout = nn.Dropout(attn_dropo... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | AbubakrHassan/attention-is-all-you-need-pytorch | ScaledDotProductAttention | false | 11,198 | [
"MIT"
] | 0 | 2bf9a477dea6271b082556069f3665ffed2745cd | https://github.com/AbubakrHassan/attention-is-all-you-need-pytorch/tree/2bf9a477dea6271b082556069f3665ffed2745cd |
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... | Akshobhya2018eeb1137/Attendance_System_Using_Face_Recognition | ClassHead | false | 18,444 | [
"MIT"
] | 2 | a52ca53e15332ab706f6ed23045b38ea6d38dfd9 | https://github.com/Akshobhya2018eeb1137/Attendance_System_Using_Face_Recognition/tree/a52ca53e15332ab706f6ed23045b38ea6d38dfd9 |
Discriminator | import torch
import torch.nn as nn
class Discriminator(nn.Module):
def __init__(self, n_h):
super().__init__()
self.f_k = nn.Bilinear(n_h, n_h, 1)
for m in self.modules():
self.weights_init(m)
def weights_init(self, m):
if isinstance(m, nn.Bilinear):
t... | 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... | usherbob/dgcnn.pytorch | Discriminator | false | 10,954 | [
"MIT"
] | 0 | fdf5f7a470123b292ac7642f65fd4f693d9b010d | https://github.com/usherbob/dgcnn.pytorch/tree/fdf5f7a470123b292ac7642f65fd4f693d9b010d |
MultiHeadedAttentionBlock | # 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.... | cvpr22sub7201/SpeechDrivenTongueAnimation | MultiHeadedAttentionBlock | false | 6,545 | [
"MIT"
] | 1 | 82caf9d7f4331e039e3b2f0d31df6393d24ccb1c | https://github.com/cvpr22sub7201/SpeechDrivenTongueAnimation/tree/82caf9d7f4331e039e3b2f0d31df6393d24ccb1c |
PositionalEmbedding | import torch
import numpy as np
from torch import nn
class PositionalEmbedding(nn.Module):
def __init__(self, embed_dim, max_seq_len):
super(PositionalEmbedding, self).__init__()
position_encodings = np.array([[(pos / np.power(10000, 2.0 * (i //
2) / embed_dim)) for i in range(embed_... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import numpy as np
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynam... | WangDaYeeeeee/BERT-With-KnowledgeBase | PositionalEmbedding | false | 2,955 | [
"Apache-2.0"
] | 0 | 5f205295ce9b69ab0f813ef34409fdf2de3a14ca | https://github.com/WangDaYeeeeee/BERT-With-KnowledgeBase/tree/5f205295ce9b69ab0f813ef34409fdf2de3a14ca |
_ASPPModule | import torch
import torch.nn as nn
class GCT(nn.Module):
def __init__(self, num_channels, epsilon=1e-05, mode='l2', after_relu=False
):
super(GCT, self).__init__()
self.alpha = nn.Parameter(torch.ones(1, num_channels, 1, 1))
self.gamma = nn.Parameter(torch.zeros(1, num_channels, 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.... | yoxu515/CFBI | _ASPPModule | false | 16,847 | [
"BSD-3-Clause"
] | 312 | 0bab1e3c9fc3e3ba0629f716d60221e8f8d9d586 | https://github.com/yoxu515/CFBI/tree/0bab1e3c9fc3e3ba0629f716d60221e8f8d9d586 |
GenNoise | # 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.optim
import torch.nn as nn
import torch.nn.init
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_... | ChongYou/robust-image-recovery | GenNoise | false | 7,875 | [
"MIT"
] | 13 | 5bb23142509f307d31fd435de12787a70ec3a5bc | https://github.com/ChongYou/robust-image-recovery/tree/5bb23142509f307d31fd435de12787a70ec3a5bc |
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_... | SheepiesLab/plato | QNetwork | false | 12,090 | [
"Apache-2.0"
] | 0 | 9f5bbfa4b6952d1b3af24be409982d303d54a169 | https://github.com/SheepiesLab/plato/tree/9f5bbfa4b6952d1b3af24be409982d303d54a169 |
Block | import torch
import torch.nn.functional as F
from torch import nn
class LayerNorm(nn.Module):
""" LayerNorm that supports two data formats: channels_last (default) or channels_first.
The ordering of the dimensions in the inputs. channels_last corresponds to inputs with
shape (batch_size, height, width, ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.fun... | CarnoZhao/mmdetection | Block | false | 17,091 | [
"Apache-2.0"
] | 10 | b85eaffdf1af28eaffcc2263110a059237cf5b23 | https://github.com/CarnoZhao/mmdetection/tree/b85eaffdf1af28eaffcc2263110a059237cf5b23 |
output | import math
import torch
import torch.nn as nn
class output(nn.Module):
def __init__(self, scope=512):
super(output, self).__init__()
self.conv1 = nn.Conv2d(32, 1, 1)
self.sigmoid1 = nn.Sigmoid()
self.conv2 = nn.Conv2d(32, 4, 1)
self.sigmoid2 = nn.Sigmoid()
self.co... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | glc12125/EAST | output | false | 15,445 | [
"MIT"
] | 366 | cec7ae98f9c21a475b935f74f4c3969f3a989bd4 | https://github.com/glc12125/EAST/tree/cec7ae98f9c21a475b935f74f4c3969f3a989bd4 |
ReLUDeepLiftModel | import torch
import torch.nn as nn
class ReLUDeepLiftModel(nn.Module):
"""
https://www.youtube.com/watch?v=f_iAM0NPwnM
"""
def __init__(self) ->None:
super().__init__()
self.relu1 = nn.ReLU()
self.relu2 = nn.ReLU()
def forward(self, x1, x2, x3=2):
return 2 * self.... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
emp... | YNNEKUW/captum | ReLUDeepLiftModel | false | 11,981 | [
"BSD-3-Clause"
] | 0 | c8b5357b21f2ddf440e5f0ce25635977292aa5d1 | https://github.com/YNNEKUW/captum/tree/c8b5357b21f2ddf440e5f0ce25635977292aa5d1 |
MultiheadAttention | import torch
from torch import nn
from torch.nn import Parameter
import torch.nn.functional as F
class MultiheadAttention(nn.Module):
"""Multi-headed attention.
See "Attention Is All You Need" for more details.
"""
def __init__(self, embed_dim, num_heads, attn_dropout=0.0, bias=True,
add_bias... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | jiahuanluo/multi_media | MultiheadAttention | false | 10,272 | [
"MIT"
] | 0 | ac5ac59dba87d0368ca656e600a85bfd9a1da28e | https://github.com/jiahuanluo/multi_media/tree/ac5ac59dba87d0368ca656e600a85bfd9a1da28e |
AdaptiveFilterResponseNorm | # 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.... | ankmathur96/torchsupport | AdaptiveFilterResponseNorm | false | 3,168 | [
"MIT"
] | 0 | 77bf4a90b8770a408665e2604428808c3ed2f979 | https://github.com/ankmathur96/torchsupport/tree/77bf4a90b8770a408665e2604428808c3ed2f979 |
EqualizedConv2d | import math
import torch
import numpy as np
from torch import nn
import torch.nn.functional as F
import torch.utils.data
import torch.nn.functional
from typing import List
import torch.autograd
class EqualizedWeight(nn.Module):
"""
<a id="equalized_weight"></a>
## Learning-rate Equalized Weights Parameter... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
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 |
SmoothL1loss_with_weight | import torch
from torch import nn
class SmoothL1loss_with_weight(nn.Module):
def __init__(self):
super(SmoothL1loss_with_weight, self).__init__()
def forward(self, pred, targets, weights):
assert pred.shape[0] == targets.shape[0] == weights.shape[0]
loss = nn.SmoothL1Loss(reduction='... | 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... | NaCl-Ocean/Anchor_free_detection_rotation | SmoothL1loss_with_weight | false | 8,585 | [
"MIT"
] | 12 | 358d9f5df1beabc7a05a352d2cfa2283b17825a9 | https://github.com/NaCl-Ocean/Anchor_free_detection_rotation/tree/358d9f5df1beabc7a05a352d2cfa2283b17825a9 |
AGELU | # 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 math
import torch.utils.data
import torch.cuda
import torch.utils.checkp... | quanpn90/NMTGMinor | AGELU | false | 16,302 | [
"MIT"
] | 75 | 0e5f989c8bc01c6c8dc3a8c1ce7c05bfd884b796 | https://github.com/quanpn90/NMTGMinor/tree/0e5f989c8bc01c6c8dc3a8c1ce7c05bfd884b796 |
AvgConsensus | import torch
import torch.nn as nn
class AvgConsensus(nn.Module):
"""Average consensus module.
Args:
dim (int): Decide which dim consensus function to apply.
Default: 1.
"""
def __init__(self, dim=1):
super().__init__()
self.dim = dim
def forward(self, x):
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | giahaowjx/mmaction2 | AvgConsensus | false | 10,332 | [
"Apache-2.0"
] | 0 | 4f95e9b91354acdcae768ce94e01d3821bba0154 | https://github.com/giahaowjx/mmaction2/tree/4f95e9b91354acdcae768ce94e01d3821bba0154 |
Scale | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
from torch.nn import *
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._d... | kcorder/autonomous-learning-library | Scale | false | 15,780 | [
"MIT"
] | 584 | 0266195fa47564e51a32087bc007bff6dda5e263 | https://github.com/kcorder/autonomous-learning-library/tree/0266195fa47564e51a32087bc007bff6dda5e263 |
sAG | import torch
import torch.nn as nn
class sAG(nn.Module):
def __init__(self, num_channels_in_enc, num_channels_in_dec):
super(sAG, self).__init__()
self.num_channels_in_enc = num_channels_in_enc
self.num_channels_in_dec = num_channels_in_dec
self.ch_max_pool_enc = nn.MaxPool3d(kern... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | rinkwitz/Thesis_Semantic_Image_Segmentation_on_Satellite_Imagery_using_UNets | sAG | false | 7,564 | [
"MIT"
] | 1 | 75d3a4a536f6ef81fe0efd4f5fbba32b627a7472 | https://github.com/rinkwitz/Thesis_Semantic_Image_Segmentation_on_Satellite_Imagery_using_UNets/tree/75d3a4a536f6ef81fe0efd4f5fbba32b627a7472 |
ELBO | import torch
import torch.nn.functional
import torch.nn as nn
class ELBO(nn.Module):
def __init__(self, train_size, loss_function=nn.MSELoss()):
"""
Quantify the Evidence Lower Bound (ELBO) and provide the total loss.
"""
super(ELBO, self).__init__()
self.train_size = trai... | 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.functional
import torch.nn as nn
assert_size_stride = torch._C._dynamo.gu... | geek-yang/NEmo | ELBO | false | 6,731 | [
"Apache-2.0"
] | 1 | 4f310535c4865f3816155b99b4a2bbb891672cc9 | https://github.com/geek-yang/NEmo/tree/4f310535c4865f3816155b99b4a2bbb891672cc9 |
SigmoidDiceLoss | import torch
import torch.nn as nn
class DiceLoss(nn.Module):
def __init__(self, smooth=1.0):
super(DiceLoss, self).__init__()
self.smooth = smooth
def forward(self, input, target):
n = input.shape[0]
input = input.view(n, -1)
target = target.view(n, -1)
inter... | 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... | azxj/BRRNet | SigmoidDiceLoss | false | 6,318 | [
"MIT"
] | 1 | 274068efd5453f2c1fb07bfaad448d048b9c793b | https://github.com/azxj/BRRNet/tree/274068efd5453f2c1fb07bfaad448d048b9c793b |
UsBlockRes | import torch
import torch.nn as nn
def conv3x3(in_channels, out_channels, stride=1, padding=1, bias=True):
return nn.Conv3d(in_channels, out_channels, kernel_size=3, stride=
stride, padding=padding, bias=bias)
def conv1x1(in_channels, out_channels):
return nn.Conv3d(in_channels, out_channels, kernel... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | MATHplus-Young-Academy/P2-Cardiac-Motion | UsBlockRes | false | 5,564 | [
"Apache-2.0"
] | 1 | 844995e8e5760f981c425d13c0bd7f2f3bb8baec | https://github.com/MATHplus-Young-Academy/P2-Cardiac-Motion/tree/844995e8e5760f981c425d13c0bd7f2f3bb8baec |
WaveNetLayer | import torch
import typing as T
class WaveNetLayer(torch.nn.Module):
"""a single gated residual wavenet layer"""
def __init__(self, channels: 'int', kernel_size: 'int', dilation: 'int'):
super().__init__()
self._conv = torch.nn.Conv1d(in_channels=channels, out_channels=
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.triton_helpers import libdevice
assert_size_stride ... | brentspell/hifi-gan-bwe | WaveNetLayer | false | 1,590 | [
"MIT"
] | 0 | 63579ac8055c63fc0e5a20ae90e2a86575fc8e12 | https://github.com/brentspell/hifi-gan-bwe/tree/63579ac8055c63fc0e5a20ae90e2a86575fc8e12 |
AgentConvBlock | # 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... | jonhare/DifferentiableSketching | AgentConvBlock | false | 15,727 | [
"BSD-3-Clause"
] | 100 | 462551ea2c8d07125352080b0c74e39c7fcbd49e | https://github.com/jonhare/DifferentiableSketching/tree/462551ea2c8d07125352080b0c74e39c7fcbd49e |
DispAct | # 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... | jdasam/scDCC | DispAct | false | 10,235 | [
"Apache-2.0"
] | 0 | 8ebaed766db5ad56021983ebc13e9a60b6c7b453 | https://github.com/jdasam/scDCC/tree/8ebaed766db5ad56021983ebc13e9a60b6c7b453 |
ConvMeanPool | import torch
import torch.nn as nn
class CustomConv2d(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, stride=1,
padding=None, bias=True, residual_init=True):
super(CustomConv2d, self).__init__()
self.residual_init = residual_init
if padding is None:
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | ChiragCD/NR-GAN | ConvMeanPool | false | 13,476 | [
"MIT"
] | 54 | fc455c6219b09bc8bf605715504b78b2bb801e48 | https://github.com/ChiragCD/NR-GAN/tree/fc455c6219b09bc8bf605715504b78b2bb801e48 |
MaxPoolPad | # 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
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empt... | MarioProjects/pytorchlib | MaxPoolPad | false | 5,576 | [
"MIT"
] | 1 | 81ea32304d899fbd10ae1efe1d124c0d7bc96f5c | https://github.com/MarioProjects/pytorchlib/tree/81ea32304d899fbd10ae1efe1d124c0d7bc96f5c |
CmapPafHead | import torch
import torch.utils.data
import torch.nn
import torch.optim
class UpsampleCBR(torch.nn.Sequential):
def __init__(self, input_channels, output_channels, count=1, num_flat=0):
layers = []
for i in range(count):
if i == 0:
inch = input_channels
els... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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
import torch.optim
assert_size_stride = ... | intflow/trt_openpose | CmapPafHead | false | 3,764 | [
"MIT"
] | 0 | 526b1b0d463f1c86a45ca4d4cd77a41732c7654b | https://github.com/intflow/trt_openpose/tree/526b1b0d463f1c86a45ca4d4cd77a41732c7654b |
Network | import torch
import torch.nn as nn
import torch.nn.functional as F
class Network(nn.Module):
def __init__(self, input_dim):
super(Network, self).__init__()
self.first_layer = nn.Linear(input_dim, 6)
self.out_layer = nn.Linear(6, 1)
def forward(self, x):
out = self.first_layer... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | HyperScypion/KMS_Neural_Networks | Network | false | 17,409 | [
"MIT"
] | 6 | 71d0e9c6ee02ea7978ac8ab1b899290743afac7d | https://github.com/HyperScypion/KMS_Neural_Networks/tree/71d0e9c6ee02ea7978ac8ab1b899290743afac7d |
SoftClDiceLoss | import torch
import numpy as np
from torch import nn
import torch.jit
import torch.nn.functional as F
import torch.nn.functional
def sum_tensor(inp, axes, keepdim=False):
axes = np.unique(axes).astype(int)
if keepdim:
for ax in axes:
inp = inp.sum(int(ax), keepdim=True)
else:
f... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import numpy as np
from torch import nn
import torch.jit
import torch.nn.functional as F
... | CamilaGL/nnUNet | SoftClDiceLoss | false | 1,175 | [
"Apache-2.0"
] | 0 | 471ab73a6e4f67fc72d476183b5344be4cccf7ca | https://github.com/CamilaGL/nnUNet/tree/471ab73a6e4f67fc72d476183b5344be4cccf7ca |
FakeRKHSConvNet | import math
import torch
import numpy as np
import torch.nn as nn
class MaybeBatchNorm2d(nn.Module):
def __init__(self, n_ftr, affine, use_bn):
super(MaybeBatchNorm2d, self).__init__()
self.bn = nn.BatchNorm2d(n_ftr, affine=affine)
self.use_bn = use_bn
def forward(self, x):
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
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | Luab/pytorch-lightning-bolts | FakeRKHSConvNet | false | 11,713 | [
"Apache-2.0"
] | 0 | b8ac85154465956b06fd1005b21b071af5493f11 | https://github.com/Luab/pytorch-lightning-bolts/tree/b8ac85154465956b06fd1005b21b071af5493f11 |
HighwayCNN | import torch
import torch.nn as nn
class HighwayCNN(nn.Module):
def __init__(self, input_size, gate_bias=-1, activation_function=nn.
functional.relu, gate_activation=nn.functional.softmax):
super(HighwayCNN, self).__init__()
self.activation_function = activation_function
self.gate... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | okcd00/glyce | HighwayCNN | false | 10,675 | [
"Apache-2.0"
] | 0 | 010d88ac5cff4969308d2f8d105831ddcb352a02 | https://github.com/okcd00/glyce/tree/010d88ac5cff4969308d2f8d105831ddcb352a02 |
BertAttention | # 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.... | AsmitaBhat30/lxmert | BertAttention | false | 6,921 | [
"MIT"
] | 1 | 90292dc36a25c04c4f76fe9119e3141d5dc05874 | https://github.com/AsmitaBhat30/lxmert/tree/90292dc36a25c04c4f76fe9119e3141d5dc05874 |
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.... | shrishabh/cs769-assignments | BertSelfAttention | false | 12,992 | [
"MIT"
] | 0 | babce1def0d65728bf1d4e4a725d8939f1d5f9a7 | https://github.com/shrishabh/cs769-assignments/tree/babce1def0d65728bf1d4e4a725d8939f1d5f9a7 |
STFullyConnected | import time
import torch
import numpy as np
from torch import nn
from torch import optim
from torch.nn import functional as F
class Base(nn.Module):
""" This class is the base structure for all of classification/regression DNN models.
Mainly, it provides the general methods for training, evaluating model and ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | EXYNOS-999/DrugEx | STFullyConnected | false | 5,181 | [
"MIT"
] | 1 | f75a90fbc0b9863d594fbff6afecb0f866c076d6 | https://github.com/EXYNOS-999/DrugEx/tree/f75a90fbc0b9863d594fbff6afecb0f866c076d6 |
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._inductor.runtime.... | vtomi97/LHYP | Net | false | 11,088 | [
"MIT"
] | 0 | 3db91f889c0f6b866b9537975f664f072e021ea9 | https://github.com/vtomi97/LHYP/tree/3db91f889c0f6b866b9537975f664f072e021ea9 |
OrModule | import torch
import torch.nn as nn
import torch.nn
class OrModule(nn.Module):
def forward(self, attn1, attn2):
out = torch.max(attn1, attn2)
return out
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import torch.nn
assert_size_stride = torch._C._dynamo.guards.assert... | SpyrosMouselinos/DeltaFormers | OrModule | false | 5,843 | [
"Apache-2.0"
] | 1 | 38508fa9b85f2c50aa0031b67e7e8feff1a75b27 | https://github.com/SpyrosMouselinos/DeltaFormers/tree/38508fa9b85f2c50aa0031b67e7e8feff1a75b27 |
GatedConv2d | import torch
import torch.nn as nn
import torch.utils.data
class GatedConv2d(nn.Module):
def __init__(self, input_channels, output_channels, kernel_size, stride,
padding, dilation=1, activation=None):
super(GatedConv2d, self).__init__()
self.activation = activation
self.sigmoid = ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.utils.data
assert_size_stride = torch._C._dyn... | Daulbaev/IRDM | GatedConv2d | false | 17,201 | [
"MIT"
] | 10 | 4bb60191ac0072e4349ca47092675d06b39a979a | https://github.com/Daulbaev/IRDM/tree/4bb60191ac0072e4349ca47092675d06b39a979a |
CNN | import torch
import torch.nn as nn
import torch.nn.utils
class CNN(nn.Module):
def __init__(self, e_char, e_word):
""" Init CNN.
@param e_word (int): Output embedding size of target char.
@param e_word (int): Output embedding size of target word.
"""
super(CNN, self).__in... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import ... | KIONLEE/cs224n | CNN | false | 2,441 | [
"MIT"
] | 0 | 63054e187fb40d65af058673fe7aa2f22433da6e | https://github.com/KIONLEE/cs224n/tree/63054e187fb40d65af058673fe7aa2f22433da6e |
PositionalEncodingImage | import math
import torch
import torch.nn as nn
class PositionalEncodingImage(nn.Module):
"""
Learning positional embeddings for images.
Embeddings for channel, height and width are added to form the full positional embedding.
These encodings correspond to the ones from Sparse Transformers (https://arx... | 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... | Nintorac/survae_experiments | PositionalEncodingImage | false | 906 | [
"MIT"
] | 0 | d68cc25e2604aab08b53617c1f3ffe4716f166c4 | https://github.com/Nintorac/survae_experiments/tree/d68cc25e2604aab08b53617c1f3ffe4716f166c4 |
InceptionA | import torch
import torch.nn as nn
import torch.nn.functional as F
class BasicConv2d(nn.Module):
def __init__(self, in_channels, out_channels, **kwargs):
super(BasicConv2d, self).__init__()
self.conv = nn.Conv2d(in_channels, out_channels, bias=True, **kwargs)
def forward(self, x):
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 ... | Galaxies99/inception-cuda | InceptionA | false | 11,451 | [
"MIT"
] | 0 | ed8fdbe3caef415e60b52e671273be90e9423e44 | https://github.com/Galaxies99/inception-cuda/tree/ed8fdbe3caef415e60b52e671273be90e9423e44 |
LocalState | import math
import torch
from torch import nn
class LocalState(nn.Module):
"""Local state allows to have attention based only on data (no positional embedding),
but while setting a constraint on the time window (e.g. decaying penalty term).
Also a failed experiments with trying to provide some frequency ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | DilwoarH/demucs | LocalState | false | 5,108 | [
"MIT"
] | 1 | 32d21592dfa015468aa117cace52b21e7af79d71 | https://github.com/DilwoarH/demucs/tree/32d21592dfa015468aa117cace52b21e7af79d71 |
LinearZeros | # 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.... | BQZic/glow-pytorch | LinearZeros | false | 13,360 | [
"MIT"
] | 479 | 4b43042326bbe644ccfda3c81a138375321808ed | https://github.com/BQZic/glow-pytorch/tree/4b43042326bbe644ccfda3c81a138375321808ed |
UIAttention | import torch
import torch.nn as nn
import torch.nn.functional as F
class UIAttention(nn.Module):
def __init__(self, latent_dim, att_size):
super(UIAttention, self).__init__()
self.dense = nn.Linear(in_features=latent_dim * 2, out_features=
att_size)
nn.init.xavier_normal_(self... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | Hui-Li/MCRec_PyTorch | UIAttention | false | 17,393 | [
"MIT"
] | 9 | da4da77d2cade40c0a1961481c8e47ac396d12ee | https://github.com/Hui-Li/MCRec_PyTorch/tree/da4da77d2cade40c0a1961481c8e47ac396d12ee |
Mish | import torch
import torch.nn.functional as F
import torch.nn as nn
import torch.optim.lr_scheduler
import torch.utils.data
from torchvision.transforms import *
class Mish(nn.Module):
def forward(self, x):
return x.mul_(F.softplus(x).tanh())
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def ... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
import torch.nn as nn
import torch.optim.lr_scheduler
import t... | csharpshooter/DeepLearning | Mish | false | 1,747 | [
"MIT"
] | 0 | c1d20660c32076468970f7376931e1fcd0d2644e | https://github.com/csharpshooter/DeepLearning/tree/c1d20660c32076468970f7376931e1fcd0d2644e |
FeatureEmbedding | # 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.... | asifr/armisc | FeatureEmbedding | false | 3,219 | [
"MIT"
] | 0 | 486220ba498353faeb94f70cd8ffe917109526d2 | https://github.com/asifr/armisc/tree/486220ba498353faeb94f70cd8ffe917109526d2 |
PMA | # 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.... | OpenXAIProject/dac | PMA | false | 8,701 | [
"MIT"
] | 17 | 652776e21b56dcb68839363bb077d5c5ea28d81e | https://github.com/OpenXAIProject/dac/tree/652776e21b56dcb68839363bb077d5c5ea28d81e |
Mish | import torch
from torch import nn
class MishAutoFn(torch.autograd.Function):
"""Mish: A Self Regularized Non-Monotonic Neural Activation Function - https://arxiv.org/abs/1908.08681
Experimental memory-efficient variant
"""
@staticmethod
def forward(ctx, x):
ctx.save_for_backward(x)
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch import nn
assert_size_stride = torch._C._dynamo.gua... | AnikinNN/AI-58 | Mish | false | 38 | [
"MIT"
] | 0 | ca3e3e7fc4551cf23d7f76a3d4edaf0c625883b9 | https://github.com/AnikinNN/AI-58/tree/ca3e3e7fc4551cf23d7f76a3d4edaf0c625883b9 |
FiLMLayer_PreSin | # 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 numpy ... | PeterouZh/CIPS-3D | FiLMLayer_PreSin | false | 14,179 | [
"MIT"
] | 308 | 9b8bfa0fb23f642af042e150ccd70408f9d137c6 | https://github.com/PeterouZh/CIPS-3D/tree/9b8bfa0fb23f642af042e150ccd70408f9d137c6 |
AdaIN | import torch
from torch import nn
class AdaIN(nn.Module):
def __init__(self, style_dim, num_features):
super().__init__()
self.norm = nn.InstanceNorm2d(num_features, affine=False)
self.fc = nn.Linear(style_dim, num_features * 2)
def forward(self, x, s):
h = self.fc(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.triton_helpers import libdevice
from torch import n... | shaun95/StarGANv2-VC | AdaIN | false | 16,406 | [
"MIT"
] | 116 | ed20538971a03d699351a349a3631767333baeb7 | https://github.com/shaun95/StarGANv2-VC/tree/ed20538971a03d699351a349a3631767333baeb7 |
Conv_ReLU_Block | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | advaza/pytorch-vdsr | Conv_ReLU_Block | false | 12,065 | [
"MIT"
] | 0 | 8011f7323de3c7756df3828612addfb122c2bfef | https://github.com/advaza/pytorch-vdsr/tree/8011f7323de3c7756df3828612addfb122c2bfef |
TransformerNet | # 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.... | JEF1056/Reconstruction-Style | TransformerNet | false | 17,541 | [
"MIT"
] | 6 | 3430d9e9f05c6980ae251cf15b619148a2c899d6 | https://github.com/JEF1056/Reconstruction-Style/tree/3430d9e9f05c6980ae251cf15b619148a2c899d6 |
AvgPool2d | from torch.nn import Module
import torch
import torch as th
class AvgPool2d(Module):
"""
This class is the beginning of an exact python port of the torch.nn.AvgPool2d
module. Because PySyft cannot hook into layers which are implemented in C++,
our special functionalities (such as encrypted computation... | 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
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._em... | Kritikalcoder/PySyft | AvgPool2d | false | 5,447 | [
"Apache-2.0"
] | 1 | 4c418084607de74cac7b7795f91168992c555f50 | https://github.com/Kritikalcoder/PySyft/tree/4c418084607de74cac7b7795f91168992c555f50 |
MaskedInstanceNorm1d | # 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.cuda
from torch... | hamjam/NeMo | MaskedInstanceNorm1d | false | 15,487 | [
"Apache-2.0"
] | 4,145 | b3484d32e1317666151f931bfa39867d88ed8658 | https://github.com/hamjam/NeMo/tree/b3484d32e1317666151f931bfa39867d88ed8658 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.