function relu($x) { return max(0, $x); } function un_relu($x) { if ($x > 0) { return 1; } else { return 0; } }