The following doesn't work
using ExaModels
relu3(x) = x > 0 ? x^3 : zero(x)
drelu3(x) = x > 0 ? 3*x^2 : zero(x)
ddrelu3(x) = x > 0 ? 6*x : zero(x)
@register_univariate(relu3, drelu3, ddrelu3)
#try to implement this example
N=10
c = ExaCore()
x = variable(c, N)
objective(c, relu3(x[i]) for i = 1:N)
But the following does
relu3(x::Float64) = x > 0 ? x^3 : zero(x)
drelu3(x::Float64) = x > 0 ? 3*x^2 : zero(x)
ddrelu3(x::Float64) = x > 0 ? 6*x : zero(x)
The following doesn't work
But the following does