diegovalsesia / GraphCNN-GAN

Graph-convolutional GAN for point cloud generation. Code from ICLR 2019 paper Learning Localized Generative Models for 3D Point Clouds via Graph Convolution
57 stars 9 forks source link

self.upsampling = [False] + [False]*4 + [False] #4

Open sohee-zoe opened 4 years ago

sohee-zoe commented 4 years ago

Hello. I want no upsampling. but, I have issues.

config.py

self.upsampling = [False] + [False]*4 + [False]

bash launch_gconv_train.sh

chair 6778 pclouds were loaded. They belong in 1 shape-classes.

Traceback (most recent call last): File "/home/sohee/anaconda3/envs/python3/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1659, in _create_c_op c_op = c_api.TF_FinishOperation(op_desc) tensorflow.python.framework.errors_impl.InvalidArgumentError: Dimensions must be equal, but are 2048 and 128 for 'add_33' (op: 'Add') with input shapes: [?,2048,3], [?,128,3].

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "gconv_code/main.py", line 55, in model = GAN(config) File "/home/sohee/coding/PointCloud/GraphCNN-GAN/gconv_code/gan.py", line 161, in init self.__make_compute_graph() File "/home/sohee/coding/PointCloud/GraphCNN-GAN/gconv_code/gan.py", line 582, in make_compute_graph self.x_int = epsilon self.x + (1 - epsilon) self.x_hat File "/home/sohee/anaconda3/envs/python3/lib/python3.6/site-packages/tensorflow/python/ops/math_ops.py", line 812, in binary_op_wrapper return func(x, y, name=name) File "/home/sohee/anaconda3/envs/python3/lib/python3.6/site-packages/tensorflow/python/ops/gen_math_ops.py", line 365, in add "Add", x=x, y=y, name=name) File "/home/sohee/anaconda3/envs/python3/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 788, in _apply_op_helper op_def=op_def) File "/home/sohee/anaconda3/envs/python3/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 507, in new_func return func(*args, **kwargs) File "/home/sohee/anaconda3/envs/python3/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3300, in create_op op_def=op_def) File "/home/sohee/anaconda3/envs/python3/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1823, in init__ control_input_ops) File "/home/sohee/anaconda3/envs/python3/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1662, in _create_c_op raise ValueError(str(e)) ValueError: Dimensions must be equal, but are 2048 and 128 for 'add_33' (op: 'Add') with input shapes: [?,2048,3], [?,128,3].

sohee-zoe commented 4 years ago

Can you check if I modified the config.py appropriately?

# input and layer params
        self.z_size = 128
        # self.N = [128, 128, 256, 512, 1024, 2048, 2048]
        self.N = [2048, 2048, 2048, 2048, 2048, 2048, 2048]

        # self.gen_FC_layers = [self.z_size, self.N[0]*96]
        self.gen_FC_layers = [self.z_size, self.N[0] * 32]
        # self.gen_conv_layers = [96, 48, 32, 16, 8, 3, 3]
        self.gen_conv_layers = [32, 32, 24, 16, 8, 3, 3]
        # self.gen_fnet_layers = [[96, 1024, 96*48],[48, 768, 48*32],[32, 256, 32*16],[16, 64, 16*8],[8, 16, 8*3],[3, 6, 3*3]]
        self.gen_fnet_layers = [[32, 1024, 32 * 32], [32, 768, 32 * 24], [24, 384, 24 * 16], [16, 64, 16 * 8],[8, 16, 8 * 3], [3, 6, 3 * 3]]
        self.dis_SFC_layers = [3, 64, 128, 256, 512]
        self.dis_FC_layers = [512, 128, 64, 1]
        self.dis_convkernel_width = 1
        self.signal_size = [2048, 3]   
        self.radius = 0.025 # max distance between neighbours
        self.min_nn = [15, 15, 15, 15, 15, 15] # min no. of neighbours (<)
        # self.min_nn = [20, 20, 20, 20, 20, 20]  # min no. of neighbours (<)
        self.upsampling = [False] + [False]*4 + [False]
        self.upsamp_method = 'aggr' # 'aggr', 'gauss', 'triangle', 'perturb'
        self.upsamp_aggr_method = 'diag' # 'full', 'diag', 'scalar'
        self.upsamp_aggr_nn = 15
        self.sigma_init = 0.1 # for perturb method