kaldi
kaldi copied to clipboard
The `Resize` function doesn't change `stride_` if resize_type == kSetZero and `rows == MatrixBase<Real>::num_rows_ && cols == MatrixBase<Real>::num_cols_`.
The `Resize` function doesn't change `stride_` if resize_type == kSetZero and `rows == MatrixBase<Real>::num_rows_ && cols == MatrixBase<Real>::num_cols_`.
The following code will crash if the column of the matrix to be loaded isn't multiple of 4
kaldi::Matrix<kaldi::BaseFloat> sli(0, 0, kaldi::kSetZero, kaldi::kStrideEqualNumCols);
std::ifstream ifs("matrix.txt");
sli.Read(ifs, false);
sli.Resize(sli.NumRows(), sli.NumCols(), kaldi::kSetZero, kaldi::kStrideEqualNumCols);
assert(sli.NumCols() == sli.Stride());
Originally posted by @moshimo2019 in https://github.com/kaldi-asr/kaldi/issues/2025#issuecomment-1912955329
This issue has been automatically marked as stale by a bot solely because it has not had recent activity. Please add any comment (simply 'ping' is enough) to prevent the issue from being closed for 60 more days if you believe it should be kept open.