remove one_hot, first try

I'm not sure I understand this comment. If it is a regression task, that means that `y` should be considered a vector of length 1, hence the resize.
If you have such questions, please put them in a line comment, such as this one, rather than as a comment in the code. That way, we are sure not to forget to remove the comment when it has been resolved.