def __init__(self): super(get_model, self).__init__() self.part_num = 3 self.resolution = 150 self.dimension = 3 self.reps = 2 #Conv block repetition factor self.m = 32 #Unet number of features self.nPlanes = [ self.m, 2 * self.m, 3 * self.m, 4 * self.m, 5 * self.m ] #UNet number of features per level self.sparseModel = scn.Sequential().add( scn.InputLayer( self.dimension, torch.LongTensor([self.resolution * 8 + 15] * 3), mode=3)).add( scn.SubmanifoldConvolution( self.dimension, 1, self.m, 3, False)).add( scn.FullyConvolutionalNet( self.dimension, self.reps, self.nPlanes, residual_blocks=False, downsample=[3, 2])).add( scn.BatchNormReLU(sum(self.nPlanes))).add( scn.OutputLayer(self.dimension)) self.nc = 64 self.linear = nn.Linear(sum(self.nPlanes), self.nc) self.convs1 = torch.nn.Conv1d(self.nc * 3, 128, 1) self.convs2 = torch.nn.Conv1d(128, 64, 1) self.convs3 = torch.nn.Conv1d(64, self.part_num, 1) self.bns1 = nn.BatchNorm1d(128) self.bns2 = nn.BatchNorm1d(64)
def __init__(self): nn.Module.__init__(self) self.sparseModel = scn.Sequential().add( scn.InputLayer(dimension, data.spatialSize, mode=3)).add( scn.SubmanifoldConvolution(dimension, 1, m, 3, False)).add( scn.FullyConvolutionalNet( dimension, reps, nPlanes, residual_blocks=False, downsample=[3, 2])).add(scn.BatchNormReLU( sum(nPlanes))).add(scn.OutputLayer(dimension)) self.linear = nn.Linear(sum(nPlanes), data.nClassesTotal)
def __init__(self): nn.Module.__init__(self) self.sparseModel = scn.Sequential().add( scn.InputLayer(dimension, full_scale, mode=4)).add( scn.SubmanifoldConvolution(dimension, 3, m, 3, False)).add( scn.FullyConvolutionalNet( dimension, block_reps, [m, 2 * m, 3 * m, 4 * m, 5 * m, 6 * m, 7 * m], residual_blocks)).add(scn.BatchNormReLU(448)).add( scn.OutputLayer(dimension)) self.linearx = nn.Linear(448, 448) for _, para in enumerate(self.sparseModel.parameters()): para.requires_grad = False
def __init__(self, nf_in, nf, nf_out, max_data_size): nn.Module.__init__(self) data_dim = 3 self.p0 = scn.InputLayer(data_dim, max_data_size, mode=0) self.p1 = scn.SubmanifoldConvolution(data_dim, nf_in, nf, filter_size=FSIZE0, bias=False) self.p2 = scn.FullyConvolutionalNet( data_dim, reps=1, nPlanes=[nf, nf, nf], residual_blocks=True ) #nPlanes=[nf, nf*2, nf*2], residual_blocks=True) self.p3 = scn.BatchNormReLU(nf * 3) self.p4 = scn.OutputLayer(data_dim) self.linear = nn.Linear(nf * 3, nf_out)
def __init__(self, nf_in, nf, pass_occ, pass_feats, max_data_size, truncation=3): nn.Module.__init__(self) data_dim = 3 self.pass_occ = pass_occ self.pass_feats = pass_feats self.nf_in = nf_in self.nf = nf self.truncation = truncation self.p0 = scn.InputLayer(data_dim, max_data_size, mode=0) self.p1 = scn.SubmanifoldConvolution(data_dim, nf_in, nf, filter_size=FSIZE0, bias=False) self.p2 = scn.FullyConvolutionalNet(data_dim, reps=1, nPlanes=[nf, nf, nf], residual_blocks=True) self.p3 = scn.BatchNormReLU(nf * 3) self.p4 = scn.OutputLayer(data_dim) # upsampled self.n0 = scn.InputLayer(data_dim, max_data_size, mode=0) self.n1 = scn.SubmanifoldConvolution(data_dim, nf * 3, nf, filter_size=FSIZE0, bias=False) self.n2 = scn.BatchNormReLU(nf) self.n3 = scn.OutputLayer(data_dim) self.linear = nn.Linear(nf, 1) self.linearsdf = nn.Linear(nf, 1)