Support setting weight vector to reference type weight vector