nfmcclure / tensorflow_cookbook

Code for Tensorflow Machine Learning Cookbook

Home Page:https://www.packtpub.com/big-data-and-business-intelligence/tensorflow-machine-learning-cookbook-second-edition

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Introductory CNN Model: MNIST Digits TypeError: The value of a feed cannot be a tf.Tensor object. Acceptable feed values include Python scalars, strings, lists, numpy ndarrays, or TensorHandles.

fanshius opened this issue · comments

The cause of this error is you are feeding two different type of data: tensor and numpy array. Try to either conver the y label to tensor or convert ran_x to np.array (by np.expand.dims)

commented

Thanks for noticing - I'll update this in the coming few months for the book v2.

commented

This should be fixed. Please repull and try again. If you still have an issue, feel free to reopen and also to let me know your TF version, Python version, and OS. Thanks!