For example; My neural network model
takes x
as input, and output two dimensional vector y = model(x)
where y = (y1,y2)
and I want to restrict the output 0< y1 < y2 < 1
. where restricting to domain (0,1)
is easy as I can just apply sigmoid()
as activation function at last but how to nicely satisfy the sign constraint and the allow backprogation?
I’m not sure if I shuffle the y
as y = sorted(y)
as last layer allows backprogration at all