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
Issue with run_generator.py #46
Comments
Please provide your code if you have modified it |
Here is my changed run_generator script
|
You need to make the image's shape to [1, 3, 256, 256] and the mask's shape to [1, 1, 256, 256]. In your code you should call img[np.newaxis] and mask[1][np.newaxis] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have trained my own dataset by using the
dataset_tools/create_from_images.py
and when running therun_generator.py
, I get the issuewhen using
fake = Gs.run(latent, None, real, mask, truncation_psi=truncation)[0]
Error:
return tf_session.TF_SessionRun_wrapper(self._session, options, feed_dict, tensorflow.python.framework.errors_impl.InvalidArgumentError: 2 root error(s) found. (0) Invalid argument: input must be 4-dimensional[1,512,256] [[{{node Gs/_Run/Gs/G_synthesis/E_256x256/FromRGB/Conv2D}}]] [[Gs/_Run/Gs/images_out/_1407]] (1) Invalid argument: input must be 4-dimensional[1,512,256] [[{{node Gs/_Run/Gs/G_synthesis/E_256x256/FromRGB/Conv2D}}]] 0 successful operations. 0 derived errors ignored.
when using
fake = Gs.run(latent, None, real[np.newaxis], mask, truncation_psi=truncation)[0]
Error:
return tf_session.TF_SessionRun_wrapper(self._session, options, feed_dict, tensorflow.python.framework.errors_impl.InvalidArgumentError: 2 root error(s) found. (0) Invalid argument: ConcatOp : Ranks of all input tensors should match: shape[0] = [1,256,256] vs. shape[1] = [1,3,256,256] [[{{node Gs/_Run/Gs/G_synthesis/concat}}]] [[Gs/_Run/Gs/images_out/_1407]] (1) Invalid argument: ConcatOp : Ranks of all input tensors should match: shape[0] = [1,256,256] vs. shape[1] = [1,3,256,256] [[{{node Gs/_Run/Gs/G_synthesis/concat}}]] 0 successful operations. 0 derived errors ignored.
Details:
Real image shape : [3,256,256]
Mask shape : [1,256,256]
Dynamic range applied on real image
The text was updated successfully, but these errors were encountered: