Generalize classification specific code to be able to tackle regression tasks as well
This code line e.g. will cause a termination when training a regression task network.
This code line e.g. will cause a termination when training a regression task network.