Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

where is activation_fn defined? #9

Open
xinghedyc opened this issue Oct 29, 2016 · 2 comments
Open

where is activation_fn defined? #9

xinghedyc opened this issue Oct 29, 2016 · 2 comments

Comments

@xinghedyc
Copy link

Hi,everyone
I see activation_fn function in ops.py, but I can't find where it's defined and implemented.

I'm also confused about this function,
def binarize(images):
return (np.random.uniform(size=images.shape) < images).astype('float32')

Sorry, I'm really new to this architecture, could someone explain these two functions above?
Thanks all.

@anantzoid
Copy link

You can pass the activation_fn in conv2d as relu, sigmoid, tanh etc.

binarize function converts pixel intensities to binary values. Try declaring an array: ar = np.asarray([[0.12,1.2], [1.1, 0.5]]) and call the function.

@carpedm20 Have you tried using just 0.0 < images rather than np.random ? Shouldn't the former be a better choice?

@xinghedyc
Copy link
Author

Thanks a lot!@anantzoid
I get it,
but I just don't understand why np.random used in binarize function right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants