how to classify Iris flowers
The iris dataset is meant to be used for classification. You have 3 separate classes of irises and attempting to solve it as a regression problem would be a mistake.

Think about your proposed solution, you want the output to be -1,0 or +1 (for classes a,b and c). But this implies that class a is more similar to class b than to c, and by the same principal that class c resembles class b more than a. You are adding a prior to the model that was not there before, and you should not do that (unless you are an iris specialist).

you need to take your class output labels and convert them to a one-hot-encoding representation:
class a = [1,0,0]
class b = [0,1,0]
class c = [0,0,1]

Then use categorical cross entropy for your loss function.