JoelKronander / TensorFlask

A simple webservice API for classifying MNIST digits from HTTP POST requests built using Flask and TensorFlow/Layer
Apache License 2.0
23 stars 6 forks source link

TensorFlow 1.0 compatibility #1

Open nengine opened 7 years ago

nengine commented 7 years ago

Hi, Please let me know this would work with TF 1.0? I am getting errors below with run with TF 1.0.

Traceback (most recent call last):
  File "train_model.py", line 111, in <module>
    train_model()
  File "train_model.py", line 41, in train_model
    ce = tf.reduce_mean(tf.nn.sparse_softmax_cross_entropy_with_logits(y, y_))
  File "C:\Users\nash\Anaconda2\envs\py35\lib\site-packages\tensorflow\python\ops\nn_ops.py", line 1684, in sparse_softmax_cross_entropy_with_logits
    labels, logits)
  File "C:\Users\nash\Anaconda2\envs\py35\lib\site-packages\tensorflow\python\ops\nn_ops.py", line 1533, in _ensure_xent_args
    "named arguments (labels=..., logits=..., ...)" % name)
ValueError: Only call `sparse_softmax_cross_entropy_with_logits` with named arguments (labels=..., logits=..., ...)
JoelKronander commented 7 years ago

Hi, just pushed a commit to fix this. Thanks for the post.

nengine commented 7 years ago

Thanks a lot.