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

LCA tutorial nbatch and command line arguments #234

Closed peteschultz closed 6 years ago

peteschultz commented 7 years ago

In the LCA tutorial, the nbatch parameter was recently changed from 32 to 25, to be a divisor of the number of CIFAR images (50,000). However, the text description above the command line in the tutorial wiki page https://github.com/PetaVision/OpenPV/wiki/LCA-CIFAR-Tutorial still reflects the old values.

The text also suggests that np and batchwidth can be adjusted to suit a system's architecture, but with nbatch=25, the only possibilities for batchwidth are 1, 5, and 25. The text should also explain the connections between np, batchwidth, and nbatch.

@garkenyon suggested that the command line should be -rows 2 -columns 2 -batchwidth 2, so that the tutorial introduces these configuration settings. However, the text states that doing so is not optimal for the small layer sizes in CIFAR (the image layer is 32x32, and the V1 layer is 16x16).

I would like to suggest that nbatch be changed to 20, and that the command line have either -rows 2 -columns 2 -batchwidth 2, if we want to introduce model parallelism; or either -batchwidth 10 or -batchwidth 5 if we still want to keep a single MPI row and column. In the latter case, there should be another tutorial that introduces the -columns and -rows configuration settings.

garkenyon commented 7 years ago

Sounds good. Maybe rows and columns could be equal to 2 and batchwidth equal to 4 and set the number of threads to nproc / no, where nproc is the number of logical processors

On Aug 9, 2017 11:21 AM, "peteschultz" notifications@github.com wrote:

In the LCA tutorial, the nbatch parameter was recently changed from 32 to 25, to be a divisor of the number of CIFAR images (50,000). However, the text description above the command line in the tutorial wiki page https://github.com/PetaVision/OpenPV/wiki/LCA-CIFAR-Tutorial still reflects the old values.

The text also suggests that np and batchwidth can be adjusted to suit a system's architecture, but with nbatch=25, the only possibilities for batchwidth are 1, 5, and 25. The text should also explain the connections between np, batchwidth, and nbatch.

@garkenyon https://github.com/garkenyon suggested that the command line should be -rows 2 -columns 2 -batchwidth 2, so that the tutorial introduces these configuration settings. However, the text states that doing so is not optimal for the small layer sizes in CIFAR (the image layer is 32x32, and the V1 layer is 16x16).

I would like to suggest that nbatch be changed to 20, and that the command line have either -rows 2 -columns 2 -batchwidth 2, if we want to introduce model parallelism; or either -batchwidth 10 or -batchwidth 5 if we still want to keep a single MPI row and column. In the latter case, there should be another tutorial that introduces the -columns and -rows configuration settings.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PetaVision/OpenPV/issues/234, or mute the thread https://github.com/notifications/unsubscribe-auth/AAzCwlgFIe3YZ23uUNWXJ55vslaiCfkgks5sWepwgaJpZM4OyYqo .

peteschultz commented 6 years ago

LCA_Cifar.lua and LCA-CIFAR-Tutorial.md have been updated per this issue.