Different api for activation functions

what is difference between mx.symbol.sigmoid() and mx.symbol.Activation(x, act_type = ‘sigmoid’)
when i read them on mxnet website, the explanations are all the same.
so i want to know when to use which and are they same?

Thanks you in advance.

I’ve used both of them and found no difference. You can use whatever you want.

1 Like

As @mouryarishik mentioned, there is no really computational difference - they both should produce same numerical result. There is an API difference, though:

  1. mx.symbol.sigmoid() is just a function in mx.symbol package. When you use hybiridization, and use F-backend, it is actually would call mx.symbol.sigmoid() function or mx.nd.sigmoid() depending if your model is actually hybridized or not.

  2. mx.symbol.Activation is an operator, and usually you use it when you actually define your neural network in Symbol API.

1 Like

thank you for your explanations!