text-to-image icon indicating copy to clipboard operation
text-to-image copied to clipboard

Dimension Error: Stage II

Open riteshsonavane opened this issue 5 years ago • 0 comments

Getting an error. After training images in Stage I with 64x64.

In run.py Keeping dataset = TextDataset(datadir, 64)

Output

ValueError: Cannot feed value of shape (8, 64, 64, 3) for Tensor 'real_images:0', which has shape '(8, 256, 256, 3)'

In flowers.yml

MODEL:
  Z_DIM: 100 # Dimension of the noise vector
  OUTPUT_SIZE: 256 # The output size of the image (e.g. 64x64)
  EMBED_DIM: 1024 # The dimension of the embedding before compression (as given by the cnn-rnn encoder)
  COMPRESSED_EMBED_DIM: 128 # The dimension of the embedding after compression
  GF_DIM: 128 # The number of filters in the first convolutional layer of the generator
  DF_DIM: 64 # The number of filters in the first convolutional layer of the discriminator
  IMAGE_SHAPE:
    W: 256
    H: 256
    D: 3

Output

ValueError: Dimension 1 in both shapes must be equal, but are 1 and 4. Shapes are [8,1,1] and [8,4,4]. for 'stageII_d_net_1/concat' (op: 'ConcatV2') with input shapes: [8,1,1,512], [8,4,4,128], [] and with computed input tensors: input[2] = <3>.

In flowers.yml

MODEL:
  Z_DIM: 100 # Dimension of the noise vector
  OUTPUT_SIZE: 256 # The output size of the image (e.g. 64x64)
  EMBED_DIM: 1024 # The dimension of the embedding before compression (as given by the cnn-rnn encoder)
  COMPRESSED_EMBED_DIM: 128 # The dimension of the embedding after compression
  GF_DIM: 128 # The number of filters in the first convolutional layer of the generator
  DF_DIM: 64 # The number of filters in the first convolutional layer of the discriminator
  IMAGE_SHAPE:
    W: 64
    H: 64
    D: 3

riteshsonavane avatar Oct 31 '20 17:10 riteshsonavane