[Solved] Keep getting a SyntaxError message in Tensorflow [closed]


That print statement will give you an error in Python 3.X because it is no longer a statement, it is a function call.

print('{0} {1} {2} {3}'.format(step, sess.run(cost), sess.run(W), sess.run(b)))

See the python documentation or here for more information.

EDIT: As per late comments above, try changing xrange() to range(), since xrange does not exist in Python 3.

solved Keep getting a SyntaxError message in Tensorflow [closed]