-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
reduce_sum() function does not recognize 2nd argument 'axis' #186
Comments
I'm not able to reproduce this error. You should be able to use the The only thing I suspect is that you claim there is an issue in the file It seems like a sementic error to me. |
@kyungyunlee You are using too old version of tensorflow. Please update your tensorflow first. |
@kkweon |
Great! |
There seems to be an issue in reduce_sum() function in lab-06-1-softmax_classifier.py
When the second argument is "axis=1", there is a TypeError saying "unexpected keyword argument."
From my experience with python, this shouldn't be an error, but I am not sure if it is a version issue(I have the most recent one though..) or something else.
In my case, it works when I fix it from
cost = tf.reduce_mean(-tf.reduce_sum(Y * tf.log(hypothesis), axis=1))
to
cost = tf.reduce_mean(-tf.reduce_sum(Y * tf.log(hypothesis), 1))
Also a reference to tensorflow document.
https://www.tensorflow.org/api_docs/python/tf/reduce_sum
The text was updated successfully, but these errors were encountered: