0

I have been using tensor flow to implement a neural network, but I am not sure what is happening but I am getting this error message:

h1=tf.nn.elu(tf.matmul(X,w_h1)+b_h1)  
AttributeError: 'module' object has no attribute 'elu'

If I replace tf.nn.elu(tf.matmul(X,w_h1)+b_h1) by tf.nn.relu(tf.matmul(X,w_h1)+b_h1) it works well.

However, the activation function elu is listed here.

Does anybody know what must be happening?

Clock Slave
  • 7,627
  • 15
  • 68
  • 109
DanielTheRocketMan
  • 3,199
  • 5
  • 36
  • 65
  • 2
    Is your TensorFlow version older than 0.6? In this case you might fix it with an upgrade (this error has been reported here: https://github.com/tensorflow/tensorflow/issues/495). – ml4294 Aug 26 '17 at 06:18
  • How do I know the version? I think it is up to date. But I am not sure. I tried print tensorflow.__version__ but it does not have this attribute. – DanielTheRocketMan Aug 26 '17 at 18:29
  • 1
    Then it is probably an old one. I recommend upgrading to a newer version and checking whether the issue still exists. – ml4294 Aug 26 '17 at 18:34

1 Answers1

1

enter image description here

the error must happened by tensorflow's version

Timi
  • 892
  • 1
  • 8
  • 17