You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by gi...@git.apache.org on 2017/08/17 07:42:17 UTC

[GitHub] xhpohanka opened a new issue #7508: Importing caffe in python causes mxnet leaky relu to output wrong results

xhpohanka opened a new issue #7508: Importing caffe in python causes mxnet leaky relu to output wrong results
URL: https://github.com/apache/incubator-mxnet/issues/7508
 
 
   I have very strange issue on my workstation
   After importing caffe python module any slope less than `1.0` causes results to be zero. Please check example below.
   I have also another installation of mxnet on another machine (almost same) and there everything works fine.
   
   ```
   import mxnet as mx
   import numpy as np
   d = np.ones((1, 3, 5,5))*-1
   dd = mx.nd.array(d)
   mx.nd.LeakyReLU(data=dd, act_type='leaky', slope=0.2).asnumpy()
   array([[[[-0.2, -0.2, -0.2, -0.2, -0.2],
            [-0.2, -0.2, -0.2, -0.2, -0.2],
            [-0.2, -0.2, -0.2, -0.2, -0.2],
            [-0.2, -0.2, -0.2, -0.2, -0.2],
            [-0.2, -0.2, -0.2, -0.2, -0.2]],
   
           [[-0.2, -0.2, -0.2, -0.2, -0.2],
            [-0.2, -0.2, -0.2, -0.2, -0.2],
            [-0.2, -0.2, -0.2, -0.2, -0.2],
            [-0.2, -0.2, -0.2, -0.2, -0.2],
            [-0.2, -0.2, -0.2, -0.2, -0.2]],
   
           [[-0.2, -0.2, -0.2, -0.2, -0.2],
            [-0.2, -0.2, -0.2, -0.2, -0.2],
            [-0.2, -0.2, -0.2, -0.2, -0.2],
            [-0.2, -0.2, -0.2, -0.2, -0.2],
            [-0.2, -0.2, -0.2, -0.2, -0.2]]]], dtype=float32)
   
   import caffe
   mx.nd.LeakyReLU(data=dd, act_type='leaky', slope=0.2).asnumpy()
   array([[[[-0., -0., -0., -0., -0.],
            [-0., -0., -0., -0., -0.],
            [-0., -0., -0., -0., -0.],
            [-0., -0., -0., -0., -0.],
            [-0., -0., -0., -0., -0.]],
   
           [[-0., -0., -0., -0., -0.],
            [-0., -0., -0., -0., -0.],
            [-0., -0., -0., -0., -0.],
            [-0., -0., -0., -0., -0.],
            [-0., -0., -0., -0., -0.]],
   
           [[-0., -0., -0., -0., -0.],
            [-0., -0., -0., -0., -0.],
            [-0., -0., -0., -0., -0.],
            [-0., -0., -0., -0., -0.],
            [-0., -0., -0., -0., -0.]]]], dtype=float32)
   ```
   
   
   For bugs or installation issues, please provide the following information.
   The more information you provide, the more likely people will be able to help you.
   
   ## Environment info
   Operating System:
   Arch linux
   Compiler:
   
   Package used (Python/R/Scala/Julia):
   Python
   MXNet version:
   0.10.0.post2 from pip
   Caffe version:
   1.0 compiled from source with gcc 5.4.0
   
   Python version and distribution:
   Python 2.7.13 (default, Jul 21 2017, 03:24:34) 
   [GCC 7.1.1 20170630] on linux2
   
   
 
----------------------------------------------------------------
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