I am working on simple MLP neural network for MNIST dataset using tensorflow as my homework. in the question we should implement a multilayer perceptron with tanh as activation function. I should use the data label with [-1,+1].For example for number 3 we have:
[-1,-1,-1,+1,-1,-1,-1,-1,-1,-1]
I know that for sigmoid function we can use on_hot such as:
mnist = input_data.read_data_sets("/tmp/data/", one_hot=True)
in order to putting data in [0,1] like the following for number 3:
[0,0,0,1,0,0,0,0,0,0]
how can I encode label between [-1 ,+1]. thanks in advance for every help