Neighborhood components analysis fails and creates a segmentation fault. #279

Closed
rcurtin opened this Issue Dec 29, 2014 · 1 comment

Projects

None yet

1 participant

@rcurtin
Member
rcurtin commented Dec 29, 2014

Reported by marcus on 18 Feb 43388785 08:25 UTC
The executable for neighborhood components analysis fails and creates a segmentation fault. The error is caused by a wrong reference created by labels.unsafe_col(0).

NCA<LMetric<2> > nca(data, labels.unsafe_col(0)); // this line produce the error
NCA<LMetric<2>, L_BFGS> nca(data, labels.unsafe_col(0)); // this line produce the error
// everything is fine
arma::uvec labels_col = labels.unsafe_col(0);   
NCA<LMetric<2> > nca(data, labels_col); 
NCA<LMetric<2>, L_BFGS> nca(data, labels_col);

Command: nca -i fisheriris_data.csv -l fisheriris_label.csv -o output.csv -O sgd

Data-set and patch is added.

@rcurtin rcurtin self-assigned this Dec 29, 2014
@rcurtin rcurtin closed this Dec 29, 2014
@rcurtin
Member
rcurtin commented Dec 30, 2014

Commented by rcurtin on 1 Apr 43388800 21:47 UTC
Patch applied, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment