[GitHub] cjolivier01 commented on a change in pull request #9793: Enable the reporting of cross-entropy or nll loss value when training CNN network using the models defined by example/image-classifica
cjolivier01 commented on a change in pull request #9793: Enable the reporting of cross-entropy or nll loss value when training CNN network using the models defined by example/image-classification URL: https://github.com/apache/incubator-mxnet/pull/9793#discussion_r168325934 ## File path: example/image-classification/common/fit.py ## @@ -117,6 +117,8 @@ def add_fit_args(parser): help='load the model on an epoch using the model-load-prefix') train.add_argument('--top-k', type=int, default=0, help='report the top-k accuracy. 0 means no report.') +train.add_argument('--loss', type=str, + help='report the cross-entropy or nll-loss. ce means cross-entropy, nll-loss means likelihood loss') Review comment: This seems a little confusing to me, as in what's the actual expected loss string. Maybe something like: "report the loss. Options are ce (cross-entropy) or nll-loss (likelihood loss) ? 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
[GitHub] cjolivier01 commented on a change in pull request #9793: Enable the reporting of cross-entropy or nll loss value when training CNN network using the models defined by example/image-classifica
cjolivier01 commented on a change in pull request #9793: Enable the reporting of cross-entropy or nll loss value when training CNN network using the models defined by example/image-classification URL: https://github.com/apache/incubator-mxnet/pull/9793#discussion_r168324964 ## File path: example/image-classification/common/fit.py ## @@ -260,6 +262,18 @@ def fit(args, network, data_loader, **kwargs): eval_metrics.append(mx.metric.create( 'top_k_accuracy', top_k=args.top_k)) +supported_loss = ['ce', 'nll_loss'] +if args.loss: Review comment: would len(args.loss) > 0 or come other non-implied boolean test read more easily? 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
[GitHub] cjolivier01 commented on a change in pull request #9793: Enable the reporting of cross-entropy or nll loss value when training CNN network using the models defined by example/image-classifica
cjolivier01 commented on a change in pull request #9793: Enable the reporting of cross-entropy or nll loss value when training CNN network using the models defined by example/image-classification URL: https://github.com/apache/incubator-mxnet/pull/9793#discussion_r168325934 ## File path: example/image-classification/common/fit.py ## @@ -117,6 +117,8 @@ def add_fit_args(parser): help='load the model on an epoch using the model-load-prefix') train.add_argument('--top-k', type=int, default=0, help='report the top-k accuracy. 0 means no report.') +train.add_argument('--loss', type=str, + help='report the cross-entropy or nll-loss. ce means cross-entropy, nll-loss means likelihood loss') Review comment: This seems a little confusing to me, as in what's the actual expected loss string. Maybe something like: "report the loss. Options are ce (cross-entropy) or nll-loss (likelihood loss) ? ? 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