-
-
Notifications
You must be signed in to change notification settings - Fork 663
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
Train Error #48
Comments
*****/AnimeGAN-master/tools/data_loader.py", line 45, in read_image image1[:,:,0] += self.data_mean[2]。 |
Dear author, thank you for your timely answer。However, I'm not quite sure what you mean. Are you saying that we should convert self.data_mean[2] from str to numpy array when calculating it?Could you give a detailed example?Thank you very much! |
Have you solved this problem? I have the same error. |
Same error here- I just hard coded the data mean values for my dataset into data_loader and it ran fine. image1[:,:,0] += 13.136 #self.data_mean[2] |
The following worked for me. Change the argparser for
And then you can run training like this:
|
Yes, you are right. data_mean is used as an additional data preprocessing, it is not necessary. It was not mentioned in the original paper, because it was added later. Since its role is not obvious, I will delete this preprocessing later. |
Hi
I download and open project with pycharm. I configured the environment as README required(1080Ti), running edge-smooth.py and data_mean.py has no problem, however , when I ran main.py, something wrong:
[*] Reading checkpoints...
[*] Failed to find a checkpoint
[!] Load failed...
2021-04-12 13:15:23.718658: W tensorflow/core/framework/op_kernel.cc:1306] Invalid argument: UFuncTypeError: Cannot cast ufunc 'add' output from dtype('<U32') to dtype('float32') with casting rule 'same_kind'
Traceback (most recent call last):
File "****/anaconda3/envs/anime/lib/python3.6/site-packages/tensorflow/python/ops/script_ops.py", line 157, in __call__ ret = func(*args)
File "*****/AnimeGAN-master/tools/data_loader.py", line 70, in load_image image1, image2 = self.read_image(img1)
File "*****/AnimeGAN-master/tools/data_loader.py", line 45, in read_image image1[:,:,0] += self.data_mean[2]
numpy.core._exceptions._UFuncOutputCastingError: Cannot cast ufunc 'add' output from dtype('<U32') to dtype('float32') with casting rule 'same_kind'
Could you please help solve this problem or give some advice?
Best wishes!
The text was updated successfully, but these errors were encountered: