How to have access to activation functions' name in neural networks?

22 views (last 30 days)
Hi,
I want to know if it is possible to have have access to activation functions' name in Neural Networks in the same way that one can retrieve the input weight matrix, layer weight matrices, bias, etc. (i.e. Network_name.IW, Network_name.LW, Network_name.b, etc.) ?
If the answer is no, let's say that we save the name of these functions in a vector. This would be a string. Is it possible to make it functional in order to apply it on a vector Z to get the vector A? something like:
A = activation_function(1)(Z)

Answers (1)

Sanjana
Sanjana on 3 Mar 2023
Hi Mary,
It is not possible to access the activation function name through network object properties, as per the official documentation.
And if you want to use activation functions like "relu" in neural networks, you can utilize neural network transfer functions defined in MATLAB to perform operations on vectors. You can refer to this example for more information. Also, you can find a list of transfer functions available in MATLAB in this link: https://www.mathworks.com/matlabcentral/answers/421958-where-can-i-find-a-neural-network-transfer-functions-list
Hope this helps!

Categories

Find more on Install Products in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!