Discussion:
[theano-users] How to implement binary activation in theano?
z***@gmail.com
2017-07-12 17:27:31 UTC
Permalink
In the binarized network github code (), Matthieu used stochastic
binarization. I'm wondering how to define just a simple binary activation
instead of stochastic in theano?
--
---
You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jesse Livezey
2017-07-12 19:57:57 UTC
Permalink
Do you need to take derivatives through the activation? If not, then you
could use switch, i.e.

x = some theano variable
threshold = .5
x_binary = T.switch(x > theshold, 1., 0.)
Post by z***@gmail.com
In the binarized network github code (), Matthieu used stochastic
binarization. I'm wondering how to define just a simple binary activation
instead of stochastic in theano?
--
---
You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
z***@gmail.com
2017-07-12 20:11:32 UTC
Permalink
I see. I'll try that. Thanks.
Post by Jesse Livezey
Do you need to take derivatives through the activation? If not, then you
could use switch, i.e.
x = some theano variable
threshold = .5
x_binary = T.switch(x > theshold, 1., 0.)
Post by z***@gmail.com
In the binarized network github code (), Matthieu used stochastic
binarization. I'm wondering how to define just a simple binary activation
instead of stochastic in theano?
--
---
You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...