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

Commit

Permalink
Fix basic_layers.py import
Browse files Browse the repository at this point in the history
  • Loading branch information
larroy committed May 21, 2019
1 parent 8848226 commit 3615916
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/mxnet/gluon/contrib/nn/basic_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
'PixelShuffle3D']

import warnings
from .... import nd, test_utils
from .... import nd, context
from ...block import HybridBlock, Block
from ...nn import Sequential, HybridSequential, BatchNorm

Expand Down Expand Up @@ -233,7 +233,7 @@ def _get_num_devices(self):
warnings.warn("Caution using SyncBatchNorm: "
"if not using all the GPUs, please mannually set num_devices",
UserWarning)
num_devices = mx.context.num_gpus()
num_devices = context.num_gpus()
num_devices = num_devices if num_devices > 0 else 1
return num_devices

Expand Down

0 comments on commit 3615916

Please sign in to comment.