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 2018/03/29 21:44:07 UTC
[GitHub] szha commented on a change in pull request #10285: [MXNET-241] Module API for distributed training w/ row_sparse weight
szha commented on a change in pull request #10285: [MXNET-241] Module API for distributed training w/ row_sparse weight
URL: https://github.com/apache/incubator-mxnet/pull/10285#discussion_r178189782
##########
File path: python/mxnet/module/base_module.py
##########
@@ -740,14 +760,19 @@ def install_monitor(self, mon):
################################################################################
# Computations
################################################################################
- def prepare(self, data_batch):
+ def prepare(self, data_batch, row_id_generator=None):
'''Prepares the module for processing a data batch.
Usually involves switching bucket and reshaping.
Parameters
----------
data_batch : DataBatch
+
+ row_id_generator : A callback function
+ The function takes `data_batch` as an input and returns a dict of
+ str -> NDArray. The resulting dict is used for pulling row_sparse
+ parameters from the kvstore.
'''
pass
Review comment:
`warnings.warn` when `row_id_generator` is not `None`.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services