megnet.activations module

get(identifier: Union[str, Callable[[…], Any], None] = None) → Callable[[…], Any][source]

Get activations by identifier

Parameters

identifier (str or callable) – the identifier of activations

Returns

callable activation

softplus2(x)[source]

out = log(exp(x)+1) - log(2) softplus function that is 0 at x=0, the implementation aims at avoiding overflow

Parameters

x – (Tensor) input tensor

Returns

(Tensor) output tensor