Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[DOC] Add relu #20193

Merged
merged 1 commit into from
Apr 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/python_docs/python/api/npx/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ More operators
:toctree: generated/

sigmoid
relu
smooth_l1
softmax
log_softmax
Expand Down
3 changes: 3 additions & 0 deletions src/operator/numpy/np_elemwise_unary_op_basic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ namespace op {

MXNET_OPERATOR_REGISTER_UNARY(_npx_relu)
.describe(R"code(Computes rectified linear activation.

.. math::

max(features, 0)

)code" ADD_FILELINE)
.set_attr<FCompute>("FCompute<cpu>", UnaryOp::Compute<cpu, mshadow_op::relu>)
.set_attr<nnvm::FGradient>("FGradient", ElemwiseGradUseOut{"_backward_relu"});
Expand Down