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.
For batch processing,
dolphin-dnn
deals with matrices in which each row represents one input instance. However,Matrix
interface and jblas library on whichMatrixJBLASImpl
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.