snuspl / dolphin

14 stars 2 forks source link

Save input instances in columns of input batch matrices #155

Closed beomyeol closed 8 years ago

beomyeol commented 8 years ago

For batch processing, dolphin-dnn deals with matrices in which each row represents one input instance. However, Matrix interface and jblas library on which MatrixJBLASImpl depends, use column-major arrays for saving elements. Because of this inconsistency, some operations that can be commonly used, will be inefficient. For example, getting one instance (row) in a batch matrix should access and concatenate not contiguous parts of the inner array. Matlab, Fortran libraries, and other BLAS libraries including JBLAS and Breeze use column-major array. Thus, we should consider saving each instance in columns of input batch matrices.

beomyeol commented 8 years ago

netlib-java also uses column-major array.