Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: Dimensions must be equal, but are 8 and 128 for 'Generator.1.Shortcut/Conv2D' (op: 'Conv2D') with input shapes: [?,128,8,8], [1,1,128,128]. #21

Open
rookiexiao123 opened this issue Dec 26, 2019 · 1 comment

Comments

@rookiexiao123
Copy link

hi, I was using WGAN to run your code with the learned model.but did't success.the error is the title.

`def Generator_Resnet_32(cfg, n_samples, labels, noise=None, is_training=True):

if noise is None:
noise = tf.random_normal([n_samples, 128])
add_dim = 0
if cfg.LAYER_COND:
y = labels
noise = tflib.ops.concat.concat([noise, y], 1)
add_dim = cfg.N_LABELS
output = lib.ops.linear.Linear('Generator.Input', 128 + add_dim, 4 * 4 * cfg.DIM_G, noise)
output = tf.reshape(output, [-1, cfg.DIM_G, 4, 4])`

in conv2d.py, the filters and the inputs had the problem.

def Generator_Resnet_32(cfg, n_samples, labels, noise=None, is_training=True):
if noise is None:
noise = tf.random_normal([n_samples, 128])
add_dim = 0
if cfg.LAYER_COND:
y = labels
noise = tflib.ops.concat.concat([noise, y], 1)
add_dim = cfg.N_LABELS
output = lib.ops.linear.Linear('Generator.Input', 128 + add_dim, 4 * 4 * cfg.DIM_G, noise)
output = tf.reshape(output, [-1, cfg.DIM_G, 4, 4])
print(output)
output = ResidualBlock(cfg, 'Generator.1', cfg.DIM_G, cfg.DIM_G, 3, output, resample='up', labels=labels,
is_training=is_training)
print('Generator_Resnet_32 !!!')

the ResidualBlock can't go on.what should I do something? Can you give me some advice?

@rookiexiao123
Copy link
Author

Hi, your gpu is 16g?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant