You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mxnet.apache.org by GitBox <gi...@apache.org> on 2020/10/29 02:56:03 UTC

[GitHub] [incubator-mxnet] pengzhao-intel commented on issue #19430: CPP resnet examples training acc does not increase,loss does not decrease

pengzhao-intel commented on issue #19430:
URL: https://github.com/apache/incubator-mxnet/issues/19430#issuecomment-718327035


   > I don't know if you're using example from _cpp-package/example/resnet.cpp_, but I couldn't run this example - I fixed it by replacing
   > `Xavier xavier = Xavier(Xavier::gaussian, Xavier::in, 2);`
   > with:
   > `Xavier xavier = Xavier(Xavier::gaussian, Xavier::out, 2);`
   > First run worked fine and net was learning, but second run shows similar issue with yours.
   > Probably it's problem with parameter initialization.
   > I fixed it by replacing:
   > 
   > ```
   >   //Xavier xavier = Xavier(Xavier::gaussian, Xavier::out, 2); <- Replace xavier with default Initializer
   >   Initializer init = Initializer();
   >   for (auto &arg : args_map) {
   >     std::cout << arg.first << std::endl;
   >     init(arg.first, &arg.second); // <- changed variable name
   >   }
   > ```
   
   Do you check-in the fix?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org