pix2pix-tensorflow icon indicating copy to clipboard operation
pix2pix-tensorflow copied to clipboard

errors with gray scale input or output or both

Open eyaler opened this issue 8 years ago • 5 comments

i am seeing errors when either input_c_dim=1 or output_c_dim=1 or both of them =1

only input or output ==1 and the other==3: ValueError: Trying to share variable d_h0_conv/w, but specified shape (5, 5, 6, 64) and found shape (5, 5, 4, 64).

both ==1: ValueError: Cannot feed value of shape (1, 256, 256, 1, 6) for Tensor 'real_A_and_B_images:0', which has shape '(1, 256, 256, 2)'

eyaler avatar Dec 22 '16 16:12 eyaler

i fixed this on my fork. if interested i can make a PR

eyaler avatar Dec 27 '16 17:12 eyaler

@eyaler I experienced the same problem. How did you fix it?

danmic avatar Feb 17 '17 15:02 danmic

i have the same problem, have you solved it?

yangjax avatar Apr 14 '17 10:04 yangjax

I changed the parameters of the init function like this:

def __init__(self, sess, db_path, image_size=256, batch_size=1, sample_size=1, output_size=256, gf_dim=64, df_dim=64, L1_lambda=100, input_c_dim=1, output_c_dim=1, dataset_name='data', checkpoint_dir=None, sample_dir=None):

which sounds quite strange because I passed the parameters in the main... You may also need to change something else in the code, I don't remember if it worked directly with this trick.

danmic avatar Apr 14 '17 10:04 danmic

I was having similar issue and submitted #34 with a potential fix. HTH

joschkazj avatar Jan 29 '18 08:01 joschkazj