diff --git a/python/mxnet/kvstore.py b/python/mxnet/kvstore.py index 190a9c0ad2e3..126c85c7ed9e 100644 --- a/python/mxnet/kvstore.py +++ b/python/mxnet/kvstore.py @@ -6,7 +6,7 @@ import pickle from .ndarray import NDArray from .base import _LIB -from .base import check_call, c_array, c_str, string_types, mx_uint, py_str, integer_types +from .base import check_call, c_array, c_str, string_types, mx_uint, py_str from .base import NDArrayHandle, KVStoreHandle from . import optimizer as opt diff --git a/python/mxnet/module/module.py b/python/mxnet/module/module.py index 519499ebcf7f..7e42bfcbb111 100644 --- a/python/mxnet/module/module.py +++ b/python/mxnet/module/module.py @@ -8,7 +8,6 @@ import warnings from .. import context as ctx -from .. import ndarray as nd from .. import optimizer as opt from .executor_group import DataParallelExecutorGroup diff --git a/python/mxnet/ndarray/op.py b/python/mxnet/ndarray/op.py index 5e4c0855714f..525095b97205 100644 --- a/python/mxnet/ndarray/op.py +++ b/python/mxnet/ndarray/op.py @@ -7,7 +7,7 @@ from ..ndarray_doc import _build_doc -# Use different verison of SymbolBase +# Use different version of SymbolBase # When possible, use cython to speedup part of computation. # pylint: disable=unused-import try: diff --git a/python/mxnet/optimizer.py b/python/mxnet/optimizer.py index cc6542b4d61f..d7c0574f962d 100644 --- a/python/mxnet/optimizer.py +++ b/python/mxnet/optimizer.py @@ -346,7 +346,8 @@ def create_state(self, index, weight): "multi-precision doesn't supprot non-default weight yet" weight_master_copy = array(weight, ctx=weight.context, dtype=numpy.float32) if self.momentum != 0.0: - momentum = zeros(weight.shape, weight.context, dtype=numpy.float32, stype=weight.stype) + momentum = zeros(weight.shape, weight.context, dtype=numpy.float32, + stype=weight.stype) return (momentum, weight_master_copy) if weight.dtype == numpy.float16 and not self.multi_precision: warnings.warn("Accumulating with float16 in optimizer can lead to "