When I train my custom dataset with 940*940*3 pictures, it occurs the following error. However, when i resize pictures to 64*64*3, it works.
By the way, I know the default img_size is 128. When I train my 940 dataset, I have set the img_size to 940 !
Following is the error:
Traceback (most recent call last): File "main.py", line 110, in main() File "main.py", line 91, in main gan.build_model() File "C:\Users\tt\workspace\GAN\SAGAN.py", line 244, in build_model fake_logits = self.discriminator(fake_images, reuse=True) File "C:\Users\tt\workspace\GAN\SAGAN.py", line 157, in discriminator x = fully_conneted(x, units=1, sn=self.sn, scope='D_logit') File "C:\Users\tt\workspace\GAN\ops.py", line 70, in fully_conneted initializer=weight_init, regularizer=weight_regularizer) File "C:\Users\tt\AppData\Local\conda\conda\envs\tensorflow\lib\site-packages\tensorflow\python\ops\variable_scope.py", line 1317, in get_variable constraint=constraint) File "C:\Users\tt\AppData\Local\conda\conda\envs\tensorflow\lib\site-packages\tensorflow\python\ops\variable_scope.py", line 1079, in get_variable constraint=constraint) File "C:\Users\tt\AppData\Local\conda\conda\envs\tensorflow\lib\site-packages\tensorflow\python\ops\variable_scope.py", line 425, in get_variable constraint=constraint) File "C:\Users\tt\AppData\Local\conda\conda\envs\tensorflow\lib\site-packages\tensorflow\python\ops\variable_scope.py", line 394, in _true_getter use_resource=use_resource, constraint=constraint) File "C:\Users\tt\AppData\Local\conda\conda\envs\tensorflow\lib\site-packages\tensorflow\python\ops\variable_scope.py", line 738, in _get_single_variable found_var.get_shape())) ValueError: Trying to share variable discriminator/D_logit/kernel, but specified shape (32768, 1) and found shape (73728, 1).