-
Notifications
You must be signed in to change notification settings - Fork 46
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
how to solve this error. #2
Comments
I got this error too |
Probably a channel ordering mismatch in your keras backend. https://keras.io/backend/ |
I change my backend into theano, but I got another error message |
Alright, I have fixed this one.
It may help |
Hi, thank you @w007878 ,but where is the keras.json? |
@Designbook1 It is under your home directory ~/.keras |
@w007878 when I fixed the keras.json, it errors:
|
@Designbook1 I think there may be something wrong with your theano installation, how about try to reinstall it ? |
I keep getting an error too and get: Epoch 0 Traceback (most recent call last): Am I doing something wrong or do I have wrong libraries installed? |
The number of batches in your code is zero. This means lines 96-152 won't be executed and so generated_images won't be assigned resulting in the error. How many images are in your path? |
I have 11 .jpg images in my path now tree view over my directory |
Can you confirm the images are being loaded? Line 52 |
Yes now they seem to be loading (changed) my path but then I get another error.
|
You don't need to use Theano backend for it. Here is my {
"floatx": "float32",
"epsilon": 1e-07,
"backend": "tensorflow",
"image_data_format": "channels_first"
} The only difference between original Keras configuration is image data format convention: by default |
@einarkurbitur did you find the solution to your problem? |
@innarid |
@einarkurbitur thanks all the same) |
@sevazhidkov solution worked for me |
Dear sir,
when I run : python train.py --path /mnt/data1/GAN/heart --batch_size 8 --epochs 8 --TYPE train
it return error: I wanna why this happened.
Traceback (most recent call last):
File "train.py", line 196, in
train(path = args.path, batch_size = args.batch_size, EPOCHS = args.epochs)
File "train.py", line 64, in train
discriminator_on_generator = model.generator_containing_discriminator(generator, discriminator)
File "/mnt/data1/daniel/codes/GAN/GAN/model.py", line 102, in generator_containing_discriminator
model.add(discriminator)
File "/mnt/data1/daniel/Python-2.7.13/build/lib/python2.7/site-packages/keras/models.py", line 463, in add
output_tensor = layer(self.outputs[0])
File "/mnt/data1/daniel/Python-2.7.13/build/lib/python2.7/site-packages/keras/engine/topology.py", line 578, in call
output = self.call(inputs, **kwargs)
File "/mnt/data1/daniel/Python-2.7.13/build/lib/python2.7/site-packages/keras/models.py", line 520, in call
return self.model.call(inputs, mask)
File "/mnt/data1/daniel/Python-2.7.13/build/lib/python2.7/site-packages/keras/engine/topology.py", line 1989, in call
output_tensors, _, _ = self.run_internal_graph(inputs, masks)
File "/mnt/data1/daniel/Python-2.7.13/build/lib/python2.7/site-packages/keras/engine/topology.py", line 2140, in run_internal_graph
output_tensors = _to_list(layer.call(computed_tensor, **kwargs))
File "/mnt/data1/daniel/Python-2.7.13/build/lib/python2.7/site-packages/keras/layers/convolutional.py", line 164, in call
dilation_rate=self.dilation_rate)
File "/mnt/data1/daniel/Python-2.7.13/build/lib/python2.7/site-packages/keras/backend/tensorflow_backend.py", line 2893, in conv2d
data_format='NHWC')
File "/mnt/data1/daniel/tensorflow/_python_build/tensorflow/python/ops/nn_ops.py", line 650, in convolution
num_spatial_dims]))
ValueError: number of input channels does not match corresponding dimension of filter, 3 != 64
The text was updated successfully, but these errors were encountered: