You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/05/01 03:32:13 UTC
[GitHub] [incubator-mxnet] szha commented on a change in pull request
#14849: [Fit API] update estimator
szha commented on a change in pull request #14849: [Fit API] update estimator
URL: https://github.com/apache/incubator-mxnet/pull/14849#discussion_r279999602
##########
File path: python/mxnet/gluon/contrib/estimator/estimator.py
##########
@@ -88,12 +88,17 @@ def _check_metrics(self, metrics):
return metrics
def _check_context(self, context):
- # handle context
- if isinstance(context, Context):
- context = [context]
- elif isinstance(context, list) and all([isinstance(c, Context) for c in context]):
- context = context
- elif not context:
+ if context:
+ # check context values, only accept Context or a list of Context
+ if isinstance(context, Context):
+ context = [context]
+ elif isinstance(context, list) and all([isinstance(c, Context) for c in context]):
+ context = context
Review comment:
cpu(65536) is actually valid in mxnet regardless of the number of physical CPUs
----------------------------------------------------------------
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
With regards,
Apache Git Services