matplotlib et mammouth / matplotlib and mammouth

10 views
Skip to first unread message

Hugo Larochelle

unread,
Oct 30, 2012, 5:57:20 PM10/30/12
to ift-72...@googlegroups.com
Bonjour à tous (English will follow),

     puisque la libraire matplotlib n'est pas installée sur mammouth, vous devrez faire un changement à vos fichiers autoencoders.py et rbm.py, afin que la librairie ne soit pas importée par défaut, mais seulement si show_filters est appelé (ce qui n'est pas le cas pour vos expériences de classification).

Pour ce faire, prenez les lignes:

from matplotlib.pylab import show, draw, ion
import mlpython.misc.visualize as mlvis

et placez les plutôt au début de la méthode show_filters, comme suit:

    def show_filters(self):
        from matplotlib.pylab import show, draw, ion
        import mlpython.misc.visualize as mlvis
        mlvis.show_filters(0.5*self.W.T,
                           200,
                           16,
                           8,
                           10,20,2)
        show()

Merci à Samuel pour avoir remarqué ce problème!

J'ai fait ces changements également dans les skelettes disponibles sur le site web du cours.

===

Hi all,

    since the matplotlib library is not installed on mammouth, you must make a change to your files autoencoders.py and rbm.py, so that the library is only imported within the show_filters method (which isn't called by your classification experiments).

To do this, take the following lines:

from matplotlib.pylab import show, draw, ion
import mlpython.misc.visualize as mlvis

and put them at the beginning of the definition of show_filters, as follows:

    def show_filters(self):
        from matplotlib.pylab import show, draw, ion
        import mlpython.misc.visualize as mlvis
        mlvis.show_filters(0.5*self.W.T,
                           200,
                           16,
                           8,
                           10,20,2)
        show()

Thanks to Sam for reporting this issue to me!

I made the same changes to the class skeletons on the website.

Mathieu Germain

unread,
Oct 31, 2012, 4:24:06 PM10/31/12
to ift-72...@googlegroups.com
Just so you know matplotlib actually is on the mammouth. If you don't see it you are probably just running on the wrong version of python.

To make sure you have the good version of python log in to the mammouth then type module list you should have python64/2.7.3 in that list.
If the version of python is not the same you should change it. First remove the old one using
module initrm <the version of python you currently have>   Ex: module initrm python/2.5.1
and then add the good one module initadd python64/2.7.3 and now you're all set!

If you want to check if matplotlib is really there you can do it by starting a python shell and then typing help('matplotlib') , if it shows you the help for matplotlib then it's installed.

Enjoy

2012/10/30 Hugo Larochelle <hugo.la...@gmail.com>

--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes IFT 725 A2012.
Pour envoyer un message à ce groupe, adressez un e-mail à ift-72...@googlegroups.com.
Pour vous désabonner de ce groupe, envoyez un e-mail à l'adresse ift-725-a201...@googlegroups.com.
Cette discussion peut être lue sur le Web à l'adresse https://groups.google.com/d/msg/ift-725-a2012/-/6Sd6ikj8nqQJ.
Pour plus d'options, visitez le site https://groups.google.com/groups/opt_out .
 
 

Reply all
Reply to author
Forward
0 new messages