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

Output momentum #314

Closed peteschultz closed 2 years ago

peteschultz commented 3 years ago

This pull requests adds the ability to initialize the prev_dW values of MomentumConn. There are two new parameters for MomentumConn, initPrev_dWFile, which specifies a .pvp weights file to read, and prev_dWFrameNumber, which specifies the (zero-indexed) framenumber of the .pvp file to select.

The prev_dW values are written to .prevDelta.pvp in the outputPath, using the same writeStep and initialWriteTime parameters that the weights use.

There is also a system test, MomentumInitializeTest. It runs for 100 timesteps, then starts a new run of 50 timesteps, initializing the input layer and the MomentumConn to the value of the first run after 50 timesteps, to verify that the results of the two runs are the same.