-
Notifications
You must be signed in to change notification settings - Fork 741
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
03_05_vae_faces_train Error durinig training #83
Comments
As far as I found out, this is connected to the fact that the number of input images is not an integer multiple of the batch size. It works if the number of input images is for example 32,... 192,... Non integer multiple sizes behave as followed: 200 input images:
600 input images:
Please let me know if you manage to make it work for input counts that are non-integer multiples of the batch size!!!!!! :) |
I got another problem: What's wrong? Thanks! |
Revise the code:
|
What's my case? ValueError: operands could not be broadcast together with shapes (32,) (7,) (32,) |
@daiyl consider decreasing your number of input images by 7, or increase it by 25. |
@Zindyrella Thanks for your reply. However, where can I control the number of input images? I cannot find the control code. The ValueError case seems to happen randomly. |
@daiyl - Just in case if you are still having this issue, the below are the steps how I created a work around: DATA_FOLDER = '/content/data_faces/img_align_celeba/' # assuming that you have your images in this folder print(' -- NUM_IMAGES :', NUM_IMAGES) Now, assuming that the sample output is as below: So we have 0.21875 * 32 = 7 excess images OR (1-0.21875) * 32 = 25 images less for forming whole-batches. So please use the Jupyter magic commands ( %cd etc) to either create 25 dummy images as below. Alternatively you can delete 7 images. Since the data set is huge, adding 25 dummy images may not skew the results nor does removing 7 images !cp 000001.jpg D1.jpg This may not be a good solution, but a quick fix to move ahead. Thanks |
i have the same error, the update can not work! |
I try to run this on Google Colab (TF 2.3) (Branch=tensorflow_2)
I downloaded the image from https://www.kaggle.com/jessicali9530/celeba-dataset
and only placed about 1000 jpg files and changed epoch to 10 from 200.
The image is 178 x 218 Pixcls
I got the following error,
I am not sure if this is bug of util code, does anybody try this sucessfuly ?
(I am wondering if the number of image is too little or something else)
The text was updated successfully, but these errors were encountered: