Skip to content

Instantly share code, notes, and snippets.

@lolz0r
lolz0r / basis.py
Created January 22, 2019 17:06
Learned basis function, pytorch
class ConvSeluSVD(nn.Module):
def __init__(self, inputSize, outputSize, stride=1, maxpool=False, ownBasis=False):
super(ConvSeluSVD, self).__init__()
self.inputSize = inputSize
self.outputSize = outputSize
self.stride = stride
self.params = Parameter( torch.Tensor(outputSize * inputSize, 1,3).normal_(0, .02))