Skip to content
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

TypeError: Image data of dtype object cannot be converted to float For Handwritten Generation #312

Open
cramraj8 opened this issue Jul 18, 2023 · 0 comments

Comments

@cramraj8
Copy link

cramraj8 commented Jul 18, 2023

I am getting None for returned image when I use handwritten generation option. And when I visualize the image using plt function, I get following error.

plt.imshow(img)
plt.show()
    697 self._A = cbook.safe_masked_invalid(A, copy=True)
    699 if (self._A.dtype != np.uint8 and
    700         not np.can_cast(self._A.dtype, float, "same_kind")):
--> 701     raise TypeError("Image data of dtype {} cannot be converted to "
    702                     "float".format(self._A.dtype))
    704 if self._A.ndim == 3 and self._A.shape[-1] == 1:
    705     # If just one dimension assume scalar and apply colormap
    706     self._A = self._A[:, :, 0]

TypeError: Image data of dtype object cannot be converted to float

Anyone faced similar issue ? I am facing the issue with both versions
version-1: python=3.7 tensorflow=1.13.1
version-2: python=3.8 tensorflow=2.13.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant