chsin commented on a change in pull request #9809: fix optimizer bug in 
CPP-Package
URL: https://github.com/apache/incubator-mxnet/pull/9809#discussion_r169996703
 
 

 ##########
 File path: cpp-package/include/mxnet-cpp/optimizer.hpp
 ##########
 @@ -125,13 +125,16 @@ inline float Optimizer::GetWD_(int index) {
 }
 
 inline Optimizer* OptimizerRegistry::Find(const std::string& name) {
-  MXNETCPP_REGISTER_OPTIMIZER(sgd, SGDOptimizer);
-  MXNETCPP_REGISTER_OPTIMIZER(ccsgd, SGDOptimizer);  // For backward 
compatibility
-  MXNETCPP_REGISTER_OPTIMIZER(rmsprop, RMSPropOptimizer);
-  MXNETCPP_REGISTER_OPTIMIZER(adam, AdamOptimizer);
-  MXNETCPP_REGISTER_OPTIMIZER(adagrad, AdaGradOptimizer);
-  MXNETCPP_REGISTER_OPTIMIZER(adadelta, AdaDeltaOptimizer);
-  MXNETCPP_REGISTER_OPTIMIZER(signum, SignumOptimizer);
+  if (cmap().empty()) {
 
 Review comment:
   I'm not exactly sure what you mean, but it sounds like you want to revert to 
the original code, but that would break #5545.  @sifmelcara why in #5545 did you
   "3. In optimizer.hpp, I delayed the registration of sgd optimizer to the 
first call of OptimizerRegistry::Find."?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to