chiphuyen / stanford-tensorflow-tutorials

This repository contains code examples for the Stanford's course: TensorFlow for Deep Learning Research.
http://cs20.stanford.edu
MIT License
10.32k stars 4.32k forks source link

Can not convert a BatchDataset into a Tensor or Operation #134

Open Ruchit1395 opened 6 years ago

Ruchit1395 commented 6 years ago

while I am trying to run this code, I am not able to perform self.img = tf.reshape(img, [-1,28,28,1]). I am getting this error -

TypeError: Fetch argument <BatchDataset shapes: ((?, 28, 28), (?, 10)), types: (tf.float32, tf.float64)> has invalid type <class 'tensorflow.python.data.ops.dataset_ops.BatchDataset'>, must be a string or Tensor. (Can not convert a BatchDataset into a Tensor or Operation.)

rjurney commented 3 years ago

I am here too. Once you have a BatchDataset it is like you're in an API ghetto.