The shapes of x and m look alright in case you have two classes.
Did you fail to reproduce the error? If that’s the case, it’s alright. 
I just wanted to make sure I’m not misunderstanding your normalization of the target.