AttributeError: 'module' object has no attribute 'relu'

1,417 views
Skip to first unread message

Eric Yuan

unread,
Oct 12, 2015, 2:02:44 AM10/12/15
to Keras-users
Hi guys, 

I got AttributeError: 'module' object has no attribute 'relu' whenever I use relu for activation method, and if I change relu into tanh, it works without error. 

My Keras is the newest version, anyone have the same problem?

Regards, 
Eric

Eric Yuan

unread,
Oct 12, 2015, 1:03:32 PM10/12/15
to Keras-users
Hi all, 

I have found out the solution of this problem. 

For using relu activation, we must install the Bleeding-edge version of Theano, because there is no relu function in the "pip version".

Use this to install/update your Theano: pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git

Thanks, 
Eric

在 2015年10月12日星期一 UTC+8下午2:02:44,Eric Yuan写道:

mi...@adatao.com

unread,
Oct 23, 2015, 2:37:23 AM10/23/15
to Keras-users
so, installing Theano from the github repo via pip didn't work for me.


gave me the answer:

// I cloned the repo and installed via the setup.py :) now it's working

this approach worked for me well.  hooray!

- Micah

刘旭

unread,
Jul 18, 2023, 4:31:26 AM7/18/23
to Keras-users
fuck......I got the same error, but after examing it, I just missed a letter.......lol
anyone meet the same error,you could check it also
3e456cdda12ee61b000cb9b4b3f6c16f.png

Lance Norskog

unread,
Jul 22, 2023, 3:08:50 PM7/22/23
to 刘旭, Keras-users
Theano? You are animating a hopping zombie.

--
You received this message because you are subscribed to the Google Groups "Keras-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keras-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keras-users/93f04427-acfd-407f-b96b-def7f3085bfbn%40googlegroups.com.


--
Lance Norskog
lance....@gmail.com
Redwood City, CA
Reply all
Reply to author
Forward
0 new messages