jacobgil / keras-dcgan

Keras implementation of Deep Convolutional Generative Adversarial Networks
974 stars 413 forks source link

Assertion Error #3

Open joakimlustig opened 8 years ago

joakimlustig commented 8 years ago

I get an Assertion Error when compiling the model, haven't changed anything in the code.

Do you know that the problem might be?

Traceback (most recent call last):
  File "dcgan.py", line 155, in <module>
    train(path = args.path, BATCH_SIZE = args.batch_size)
  File "dcgan.py", line 87, in train
    discriminator_on_generator.compile(loss='binary_crossentropy', optimizer=adam)
  File "/usr/local/lib/python3.4/dist-packages/keras/models.py", line 467, in compile
    self.y_train = self.get_output(train=True)
  File "/usr/local/lib/python3.4/dist-packages/keras/layers/containers.py", line 128, in get_output
    return self.layers[-1].get_output(train)
  File "/usr/local/lib/python3.4/dist-packages/keras/layers/containers.py", line 128, in get_output
    return self.layers[-1].get_output(train)
  File "/usr/local/lib/python3.4/dist-packages/keras/layers/core.py", line 679, in get_output
    X = self.get_input(train)
  File "/usr/local/lib/python3.4/dist-packages/keras/layers/core.py", line 175, in get_input
    previous_output = self.previous.get_output(train=train)
  File "/usr/local/lib/python3.4/dist-packages/keras/layers/core.py", line 970, in get_output
    X = self.get_input(train)
  File "/usr/local/lib/python3.4/dist-packages/keras/layers/core.py", line 175, in get_input
    previous_output = self.previous.get_output(train=train)
  File "/usr/local/lib/python3.4/dist-packages/keras/layers/core.py", line 842, in get_output
    X = self.get_input(train)
  File "/usr/local/lib/python3.4/dist-packages/keras/layers/core.py", line 175, in get_input
    previous_output = self.previous.get_output(train=train)
  File "/usr/local/lib/python3.4/dist-packages/keras/layers/advanced_activations.py", line 28, in get_output
    X = self.get_input(train)
  File "/usr/local/lib/python3.4/dist-packages/keras/layers/core.py", line 175, in get_input
    previous_output = self.previous.get_output(train=train)
  File "/usr/local/lib/python3.4/dist-packages/keras/layers/normalization.py", line 71, in get_output
    X = self.get_input(train)
  File "/usr/local/lib/python3.4/dist-packages/keras/layers/core.py", line 175, in get_input
    previous_output = self.previous.get_output(train=train)
  File "/usr/local/lib/python3.4/dist-packages/keras/layers/convolutional.py", line 312, in get_output
    X = self.get_input(train)
  File "/usr/local/lib/python3.4/dist-packages/keras/layers/core.py", line 175, in get_input
    previous_output = self.previous.get_output(train=train)
  File "/usr/local/lib/python3.4/dist-packages/keras/layers/advanced_activations.py", line 28, in get_output
    X = self.get_input(train)
  File "/usr/local/lib/python3.4/dist-packages/keras/layers/core.py", line 175, in get_input
    previous_output = self.previous.get_output(train=train)
  File "/usr/local/lib/python3.4/dist-packages/keras/layers/normalization.py", line 71, in get_output
    X = self.get_input(train)
  File "/usr/local/lib/python3.4/dist-packages/keras/layers/core.py", line 175, in get_input
    previous_output = self.previous.get_output(train=train)
  File "/usr/local/lib/python3.4/dist-packages/keras/layers/convolutional.py", line 312, in get_output
    X = self.get_input(train)
  File "/usr/local/lib/python3.4/dist-packages/keras/layers/core.py", line 175, in get_input
    previous_output = self.previous.get_output(train=train)
  File "/usr/local/lib/python3.4/dist-packages/keras/layers/advanced_activations.py", line 28, in get_output
    X = self.get_input(train)
  File "/usr/local/lib/python3.4/dist-packages/keras/layers/core.py", line 175, in get_input
    previous_output = self.previous.get_output(train=train)
  File "/usr/local/lib/python3.4/dist-packages/keras/layers/normalization.py", line 71, in get_output
    X = self.get_input(train)
  File "/usr/local/lib/python3.4/dist-packages/keras/layers/core.py", line 175, in get_input
    previous_output = self.previous.get_output(train=train)
  File "/usr/local/lib/python3.4/dist-packages/keras/layers/convolutional.py", line 312, in get_output
    X = self.get_input(train)
  File "/usr/local/lib/python3.4/dist-packages/keras/layers/core.py", line 175, in get_input
    previous_output = self.previous.get_output(train=train)
  File "/usr/local/lib/python3.4/dist-packages/keras/layers/normalization.py", line 71, in get_output
    X = self.get_input(train)
  File "/usr/local/lib/python3.4/dist-packages/keras/layers/core.py", line 175, in get_input
    previous_output = self.previous.get_output(train=train)
  File "/usr/local/lib/python3.4/dist-packages/keras/layers/advanced_activations.py", line 28, in get_output
    X = self.get_input(train)
  File "/usr/local/lib/python3.4/dist-packages/keras/layers/core.py", line 175, in get_input
    previous_output = self.previous.get_output(train=train)
  File "/usr/local/lib/python3.4/dist-packages/keras/layers/convolutional.py", line 317, in get_output
    filter_shape=self.W_shape)
  File "/usr/local/lib/python3.4/dist-packages/keras/backend/theano_backend.py", line 596, in conv2d
    assert(strides == (1, 1))
AssertionError