Skip to content

Commit

Permalink
Merge branch 'add_ReLUSquaredActivation' of https://github.com/Oneflo…
Browse files Browse the repository at this point in the history
…w-Inc/oneflow into add_ReLUSquaredActivation
  • Loading branch information
xiezipeng-ML committed Aug 21, 2023
2 parents 9b6cc38 + e0614b6 commit 8ac041c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion oneflow/core/autograd/gradient_funcs/activation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class SquareReLU : public OpExprGradFunction<SquareReLUCaptureState> {

Maybe<void> Capture(SquareReLUCaptureState* ctx, const TensorTuple& inputs,
const TensorTuple& outputs, const AttrMap& attrs) const override {
CHECK_EQ_OR_RETURN(inputs.size(), 1); // NOLINT(maybe-need-error-msg)
CHECK_EQ_OR_RETURN(inputs.size(), 1); // NOLINT(maybe-need-error-msg)
CHECK_EQ_OR_RETURN(outputs.size(), 1); // NOLINT(maybe-need-error-msg)
ctx->requires_grad = inputs.at(0)->requires_grad();
if (!ctx->requires_grad) { return Maybe<void>::Ok(); }
Expand Down

0 comments on commit 8ac041c

Please sign in to comment.