Coder Social home page Coder Social logo

Comments (4)

Danzip-r avatar Danzip-r commented on July 29, 2024 1

python 3.5 trains 0.10.3rc4 ubuntu 16.04 It seems that actually plt.show() is what affects this behaviour as in with plt.show() I can see the image and without I can't

bug.txt

from clearml.

bmartinn avatar bmartinn commented on July 29, 2024 1

Hi @Danzip-r
I Tested the attached code, on Ubuntu 16.04, Python 3.5.2, Matplotlib 3.0.3, trains 0.10.3 (final),
working as expected.
Please notice that you have to call plt.show() in order to present the image (ref), without calling it, matplotlib will not actually generate a figure (regardless of the matplotlib backend you are using, Agg, QT, PyCharm, etc.)

Both

...
plt.title("prediction:{} label :{}".format(predicted[a[0]], y_test[a[0]]))
plt.imshow(X_test[a[0]].reshape([28, 28]))
plt.show()

and

...
plt.imshow(X_test[a[0]].reshape([28, 28]))
plt.title("prediction:{} label :{}".format(predicted[a[0]], y_test[a[0]]))
plt.show()

Will upload the image to the "Debug Images" section.

Could you verify again the problem exists with v0.10.3 (I believe it was fixed in the final release)

from clearml.

bmartinn avatar bmartinn commented on July 29, 2024

@Danzip-r, I can't seem to reproduce this behavior.
This code works as expected:

import matplotlib.pyplot as plt
import numpy as np
from trains import Task

task = Task.init(project_name='examples', task_name='Matplotlib imshow example')
m = np.eye(256, 256, dtype=np.uint8)
plt.title('test')
plt.imshow(m)
plt.show()
print('done')

What are the exact versions of python/trains/OS you are using?

from clearml.

Danzip-r avatar Danzip-r commented on July 29, 2024

Yup you have to call plt.show() this was our main issue

from clearml.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.