Design
Models
API
API Mapping
Migration Guide
Syntax Support
Environment Variables
FAQ
RELEASE NOTES
Gets the activation function.
name (str) – The name of the activation function.
prim_name (Union[str, None]) – The name of primitive. Default: None .
None
Function, the activation function.
Ascend GPU CPU
Ascend
GPU
CPU
Examples
>>> import mindspore.nn as nn >>> sigmoid = nn.get_activation('sigmoid') >>> print(sigmoid) Sigmoid<>