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 with custom image/title #6

Closed
dmoham1476 opened this issue Jan 7, 2021 · 1 comment
Closed

Error with custom image/title #6

dmoham1476 opened this issue Jan 7, 2021 · 1 comment

Comments

@dmoham1476
Copy link

When I try to add my image and description, am seeing this error. Does the input image need to be in any specific [format/resolution?]

Text(0.5, 1.0, 'Cosine similarity between text and image features')Error in callback <function install_repl_displayhook..post_execute at 0x7fd3eb1d1730> (for post_execute):

ValueError Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/matplotlib/pyplot.py in post_execute()
107 def post_execute():
108 if matplotlib.is_interactive():
--> 109 draw_all()
110
111 # IPython >= 2

13 frames
/usr/local/lib/python3.6/dist-packages/matplotlib/colors.py in call(self, value, clip)
1015 result.fill(0) # Or should it be all masked? Or 0.5?
1016 elif vmin > vmax:
-> 1017 raise ValueError("minvalue must be less than or equal to maxvalue")
1018 else:
1019 if clip:

ValueError: minvalue must be less than or equal to maxvalue

ValueError Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/IPython/core/formatters.py in call(self, obj)
332 pass
333 else:
--> 334 return printer(obj)
335 # Finally look for special method names
336 method = get_real_method(obj, self.print_method)

14 frames
/usr/local/lib/python3.6/dist-packages/matplotlib/colors.py in call(self, value, clip)
1015 result.fill(0) # Or should it be all masked? Or 0.5?
1016 elif vmin > vmax:
-> 1017 raise ValueError("minvalue must be less than or equal to maxvalue")
1018 else:
1019 if clip:

ValueError: minvalue must be less than or equal to maxvalue

@jongwook
Copy link
Collaborator

jongwook commented Jan 8, 2021

Hi, I believe this happened while calling plt.imshow on the similarity matrix. (let me know if it wasn't)

I had only vmax=0.3 specified, and this error might have happened when the minimum value of your matrix was above 0.3.

In the latest commit (ebd0e35) I added vmin=0.1 to the imshow() call, which should prevent this error. Let me know if this fixes the problem - thanks!

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

2 participants