cjolivier01 closed pull request #9121: add MSRAPrelu initializer for cpp-package
URL: https://github.com/apache/incubator-mxnet/pull/9121
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/cpp-package/include/mxnet-cpp/initializer.h
b/cpp-package/include/mxnet-cpp/initializer.h
index 61e95469b7..021808b38e 100644
--- a/cpp-package/include/mxnet-cpp/initializer.h
+++ b/cpp-package/include/mxnet-cpp/initializer.h
@@ -195,6 +195,12 @@ class Xavier : public Initializer {
}
};
+class MSRAPrelu : public Xavier {
+ public:
+ explicit MSRAPrelu(FactorType factor_type = avg, float slope = 0.25f)
+ : Xavier(gaussian, factor_type, 2. / (1 + slope * slope)) {}
+};
+
} // namespace cpp
} // namespace mxnet
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services