# How should I make output layer of my neural network so that I can get outputs ranging from [-20,-1]

I am trying to make a neural network which takes in 0 and 1 as it's input and should give me output ranging from [-20,-1].I am using three layers with sigmoid as the activation function .How should I design my output layer?Any sort of code snippet from your side will be helpful .I am using tensorflow.Please help me out with the same

• You can use $tanh$ function as the activation for the output and then the result would be $y = 9.5 \cdot tanh(x) - 10.5$. That way when $tanh$ gives output $1$ , $y$ would be $-1$ and when $tanh$ gives $-1$ output would be $-20$ and anything in $[-1, 1]$ would be in $[-20, -1]$. – Brale Nov 16 '19 at 11:36
• Thanks.:)..I just tried adding it but still my network is not learning at all. – Aggraj Gupta Nov 16 '19 at 12:00
• Try using MinMaxScaler to normalize target values. And then you can use the inverse transform of the output after training. – serali Nov 16 '19 at 13:05