File size: 1,066 Bytes
f0d8a66
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
"""spconv.pytorch stub."""
import torch
import torch.nn as nn
from enum import IntEnum

class ConvAlgo:
    Native = 0
    MaskImplicitGemm = 1

class SparseConvTensor:
    def __init__(self, features=None, indices=None, spatial_shape=None, batch_size=1):
        self.features = features
        self.indices = indices
        self.spatial_shape = spatial_shape
        self.batch_size = batch_size

def SubMConv3d(in_channels, out_channels, kernel_size, bias=True, indice_key=None, algo=None, **kw):
    raise NotImplementedError("spconv stub: SubMConv3d not implemented for ZeroGPU")

def SparseConv3d(in_channels, out_channels, kernel_size, stride=1, padding=0, bias=True, indice_key=None, algo=None, **kw):
    raise NotImplementedError("spconv stub: SparseConv3d not implemented for ZeroGPU")

def SparseInverseConv3d(in_channels, out_channels, kernel_size, indice_key=None, bias=True, algo=None, **kw):
    raise NotImplementedError("spconv stub: SparseInverseConv3d not implemented for ZeroGPU")

def SparseSequential(*args):
    return nn.Sequential(*args)