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/07/26 09:40:04 UTC

[GitHub] [incubator-mxnet] ngunauj opened a new issue #15665: syncbatchnorm0_gamma' has not been initialized yet because initialization was deferred

ngunauj opened a new issue #15665: syncbatchnorm0_gamma' has not been initialized yet because initialization was deferred
URL: https://github.com/apache/incubator-mxnet/issues/15665
 
 
   The part of forward..
   ```
       def forward(self, x):
           x = self.conv1(x)
           x = self.bn1(x)
           x = self.relu(x)
           x = self.conv2(x)
           x = self.bn2(x)
           x = self.relu(x)
   ```
   The part of define..
   ```
           self.conv1 = nn.Conv2D(
               channels=64,
               kernel_size=3,
               strides=2,
               padding=1,
               in_channels=3,
               use_bias=False)
           self.bn1 = BatchNorm2d(in_channels=64, momentum=BN_MOMENTUM)
           self.conv2 = nn.Conv2D(
               channels=64,
               kernel_size=3,
               strides=2,
               padding=1,
               in_channels=64,
               use_bias=False)
           self.bn2 = BatchNorm2d(in_channels=64, momentum=BN_MOMENTUM)
           self.relu = nn.Activation('relu')
   ```
   
   the BatchNorm2d is
   ```
   from mxnet.gluon.contrib.nn import SyncBatchNorm
   BatchNorm2d = functools.partial(SyncBatchNorm, num_devices=4)
   ```
   when run the cod, the error is `syncbatchnorm0_gamma' has not been initialized yet because initialization was deferred`.
   when i change the SyncBatchNorm to BatchNorm is ok....
   

----------------------------------------------------------------
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