Why is there no function for minimum value between two symbols? Minimum operator currently is used to find the minimum value in an array.
Use case: reinforcement learning with Loss Function involving minimum. I will need to find the gradient of such a function.
E.g. the code below will not compile:
Symbol a = Symbol::Variable("a");
Symbol b = Symbol::Variable("b");
Symbol c = min(a*a, b);
Update: Got around this as below (dumb solution tho)
Symbol min(Symbol a, Symbol b) {
return broadcast_lesser(a,b)*a + broadcast_lesser(b,a)*b;
}