PetaVision / OpenPV

PetaVision is a C++ library for designing and deploying large-scale neurally-inspired computational models.
http://petavision.github.io
Eclipse Public License 1.0
40 stars 13 forks source link

Analysis tools for fundamental OpenPV operations #86

Open wshainin opened 8 years ago

wshainin commented 8 years ago

We've mentioned this many times, but I'm putting this here because I want to start a discussion. Also because I closed issue #14, which mentioned adding analysis.

I think we should at least add methods to pvtools in Python that can plot image reconstructions, dictionaries, energy (and components of energy), etc.

wshainin commented 8 years ago

26 Is closely related to this.

peteschultz commented 8 years ago

A few days ago, I added a couple of simple utilities to mlab/util, imagetopvp.m and imagelisttopvp.m, that I think would be worth converting to python. The first takes an image file (anything that can be read by imread) and converts it to a single-frame pvp file. The second takes a list of filenames, i.e. the inputPath for a Movie layer, and converts it to a multiple-frame pvp file that can be the inputPath for a MoviePvp layer. Such a tool might have a lot in common with a tool that plots an image, as Will mentioned, since the only difference is where the data goes, the screen or a file. Or, it might be that both of these just call pvpFile.py and then either create a file or a window on the screen.

The reverse utilities might also be worthwhile.

peteschultz commented 8 years ago

pvpFile loads in a single file. Would it be worthwhile to have functionality that can load in an entire checkpoint at once?

When doing a run from within the python binding, after calling the pyHyPerCol run method, is the state of the HyPerCol available in the python process's memory? If so, the state of the HyPerCol should have the same representation whether being loaded from checkpoint or being run from HyPerCol::run.

slundqui commented 8 years ago

While I believe this functionality is useful, I dislike the idea of implementing more functionality into the pvpFile object, as it was built with low-level functionality of reading and writing a PVP file in mind. Rather, I'd prefer if other Python scripts were built on top of pvpFile to achieve these utilities.

peteschultz commented 8 years ago

I agree with this. I didn't mean to suggest that loading a checkpoint would be part of pvpFile, just that it should be available in the pvtools module.