Fix assertion.
Added/refactored sampling and exhaustive functions, tests.
Merge pull request #309 from dwf/dropout_averaging

Dropout averaging