Exemplo n.º 1
0
 def __init__(self,
              npoint=None,
              radii=None,
              nsample=None,
              down_conv_nn=None,
              bn=True,
              activation="LeakyReLU",
              use_xyz=True,
              **kwargs):
     assert len(radii) == len(nsample) == len(down_conv_nn)
     super(PointNetMSGDown,
           self).__init__(DenseFPSSampler(num_to_sample=npoint),
                          DenseRadiusNeighbourFinder(radii, nsample),
                          **kwargs)
     self.use_xyz = use_xyz
     self.npoint = npoint
     self.mlps = nn.ModuleList()
     for i in range(len(radii)):
         mlp_spec = down_conv_nn[i]
         if self.use_xyz:
             mlp_spec[0] += 3
         self.mlps.append(
             pt_utils.SharedMLP(down_conv_nn[i],
                                bn=bn,
                                activation=get_activation(activation)))
Exemplo n.º 2
0
    def __init__(self,
                 up_conv_nn,
                 bn=True,
                 bias=False,
                 activation="LeakyReLU",
                 **kwargs):
        super(DenseFPModule, self).__init__(None, **kwargs)

        self.nn = pt_utils.SharedMLP(up_conv_nn,
                                     bn=bn,
                                     activation=get_activation(activation))
Exemplo n.º 3
0
 def __init__(self,
              nn,
              aggr="max",
              bn=True,
              activation="LeakyReLU",
              **kwargs):
     super(GlobalDenseBaseModule, self).__init__()
     self.nn = pt_utils.SharedMLP(nn,
                                  bn=bn,
                                  activation=get_activation(activation))
     if aggr.lower() not in ["mean", "max"]:
         raise Exception(
             "The aggregation provided is unrecognized {}".format(aggr))
     self._aggr = aggr.lower()