Hw5 Q1 Binary class 1 and 0

Does it matter if I set the two classes to be 1 and 0, instead of 1 and -1? For some reason, the accuracy is way higher when I implement concise Softmax regression with the two classes being 1 and 0.