Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Commit 71141db

Browse files
committed
fix for ch11 (#15244)
1 parent af9d82b commit 71141db

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

python/mxnet/gluon/parameter.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ def _reduce(self):
369369
ctx = context.cpu()
370370
if self._stype == 'default':
371371
block = self.list_data()
372-
data = ndarray.add_n(*(w.copyto(ctx) for w in block)) / len(block)
372+
data = ndarray.add_n(*(w.copyto(ctx).as_nd_ndarray() for w in block)) / len(block)
373373
else:
374374
# fetch all rows for 'row_sparse' param
375375
all_row_ids = ndarray.arange(0, self.shape[0], dtype='int64', ctx=ctx)

python/mxnet/numpy_extension/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@
2828
from ..util import use_np_shape, np_shape, is_np_shape
2929
from ..util import use_np_array, np_array, is_np_array
3030
from ..util import set_np, use_np, reset_np
31+
from ..ndarray import waitall
3132

3233
__all__ = []

0 commit comments

Comments
 (0)