functions
=None) core.Global.functions(name, network
Allows to access a global function declared with add_function
and use it from Python using arrays after compilation.
The name of the function is not added to the global namespace to avoid overloading.
"logistic(x) = 1. / (1. + exp(-x))")
add_function(
compile()
ann.
= functions('logistic')([0., 1., 2., 3., 4.]) result
Only lists or 1D Numpy arrays can be passed as arguments, not single values nor multidimensional arrays.
When passing several arguments, make sure they have the same size.
Parameters
Name | Type | Description | Default |
---|---|---|---|
name | str | name of the function. | required |