Well, it's not a problem, I just want to get the number of samples, at StochasticSOSVM:90, int32_t N = m_model->get_num_labels(); I guess dynamic_cast(m_labels)->get_num_labels(); is also fine.