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

Error visualizing results in generate_components.py : TypeError: Invalid shape (64, 64, 1) for image data #18

Open
himmetozcan opened this issue Sep 25, 2022 · 0 comments

Comments

@himmetozcan
Copy link

When I run the script "generate_components.py" I get this error below. Can you help?

Traceback (most recent call last):
  File "generate_components.py", line 112, in <module>
    visualize_alpha(f'{sample_outdir}/depth_{component_index}_{component_name}.jpg', depths[component_index][0])
  File "generate_components.py", line 43, in visualize_alpha
    fig = plt.matshow(tensor, cmap="inferno")
  File "/usr/local/lib/python3.7/dist-packages/matplotlib/pyplot.py", line 2116, in matshow
    im = ax.matshow(A, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/matplotlib/axes/_axes.py", line 7791, in matshow
    im = self.imshow(Z, **kw)
  File "/usr/local/lib/python3.7/dist-packages/matplotlib/__init__.py", line 1565, in inner
    return func(ax, *map(sanitize_sequence, args), **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/matplotlib/cbook/deprecation.py", line 358, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/matplotlib/cbook/deprecation.py", line 358, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/matplotlib/axes/_axes.py", line 5626, in imshow
    im.set_data(X)
  File "/usr/local/lib/python3.7/dist-packages/matplotlib/image.py", line 699, in set_data
    .format(self._A.shape))
TypeError: Invalid shape (64, 64, 1) for image data
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