Tensorflow reading data from tfrecords into mini batches properly

后端 未结 1 1663
天涯浪人
天涯浪人 2021-01-16 01:49

I am trying to convert data from csv to tfrecords then read it out in mini batches and do a simple MLP but I am getting some errors that I can\'t figure out.

1条回答
  •  伪装坚强ぢ
    2021-01-16 02:12

    Placeholders are one way of getting data into your model. Queue's are another. You can override the value in a tensor generated by a queue runner like any other tensor (e.g. placeholders), but you can't feed the results from a tensor into a placeholder in the same graph/session run.

    In other words, rather than creating placeholders, just use the output of your tf.train.shuffle_batch call:

    X = avgs_batch
    Y = pdiff_batch
    

    (or replace all references to X and Y with avgs_batch and pdiff_batch respectively)

    0 讨论(0)
提交回复
热议问题