-
Notifications
You must be signed in to change notification settings - Fork 238
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
Change type double to int16_t #57
Comments
You're going to need to change the activation function too. You could do that just by scaling everything. I.e. instead of having it expect most values between 0 and 1, change it so your values are normalized between 0 and 10000. |
This activation function does not work. Can you help why ?
|
I can't do it for you. You'll have to actually read the code and try to understand. Think what happens with the exp() function. What happens when you pass in a large value? I know your username is lazy-dude, but come on. What's the point of what you're trying to do anyway? You didn't even try to remove floats from that code, so why not just use floats? |
Hi, After doing some other jobs I am back. As why I do not use floats in my code, that is because I prefer it to run as fast as possible. Performance is an issue here. Even with a little loss of accuracy. So I have this genann_train function. Still not the right job here though: part of genann.h
The function for now used with
|
Hi,
I want to change all data types from
double
toint16_t
. Ingenann.h
addition :typedef int16_t ann_t;
Then change every occurrence of
double
toann_t
. Now modifyingexample1.c
:I also use
%hd
for printf.And then , compiling the file
example1.c
I get the output:$ ./example1
GENANN example 1.
Train a small ANN to the XOR function using backpropagation.
Output for [0, 0] is 0.
Output for [0, 1] is 0.
Output for [1, 0] is 0.
Output for [1, 1] is 0.
What can I do to get the examples provided to work correctly with new type ?
The text was updated successfully, but these errors were encountered: