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

Added scripts to analyze errors and plot weights #303

Closed mantier closed 4 years ago

mantier commented 4 years ago

Added scripts that I have been using for analyzing running PetaVision runs.

How to use

Clone files to your local PetaVision folder (where your input, output and other folders are located).

In general the scripts are started by .sh files. They have the extension .sh.template in the repository. Delete the extension part ".template" and change settings locally. These local files are ignored by git (.gitignore)

errorcurve.sh

Plots the L1-norm (i.e. sum) of the activity, the L2-norm of the reconstruction error (i.e. vector length) and a weighted sum for both. Three windows are going to appear: one with the first n display periods, one with the last m display periods and one with an overall error curve for only the settled value just before the next display period (shows wether the error improves over all). Settings can be adjusted for n and m. Attention: display period has to be set manually! Otherwise, the wrong overall curve will be plotted!

weightsplot.sh

Creates folder ./weights_movie and creates one plots of weights per checkpoint. In the case of fish data, additionaly a vector fiel plot for each receptive field is created for the last checkpoint.

sortweightsplot.sh

Like weightsplot.sh but sorted by average activity, gathered from the activity file of the HyperLCA-layer (V1.pvp, Pretectum.pvp)

peteschultz commented 4 years ago

I apologize for the long delay in getting to your pull request. Thank for adding it; it's very useful. I made some minor changes in the main repo. In older versions of octave (including the octave supplied by Ubuntu 16.04), mkdir doesn't create intermediate directories so I added a workaround. Also the fullscreen figures in errorcurve were causing problems on my machine, so I left the figures at the default size. Finally, I made some edits to the comments in the m-files and in the readme file.

Thanks again.

mantier commented 4 years ago

Sorry also from my side for late reply to the reply. I am happy you find my scripts useful and that you included them into the master. I have been using PetaVision throughout my PhD and it has been very useful for my work. I used it as it was for LCA sparse-coding. However, over time I wrote these scripts for analysis. I am happy I could give back at least a bit by sharing them. Thanks again for PetaVision, it has been very important for my work.

Best Gerrit