ほとんどの場合、このチュートリアルのコピーペーストがウェブサイトにあります。私はエラーを取得しています:私のcsvファイルのTensorFlowのcsvリーダーには何が欠けていますか?
Invalid argument: ConcatOp : Expected concatenating dimensions in the range [0, 0), but got 0 [[Node: concat = Concat[N=4, T=DT_INT32, _device="/job:localhost/replica:0/task:0/cpu:0"](concat/concat_dim, DecodeCSV, DecodeCSV:1, DecodeCSV:2, DecodeCSV:3)]]
内容は次のとおりです。
3,4,1,8,4
import tensorflow as tf
filename_queue = tf.train.string_input_producer(["test2.csv"])
reader = tf.TextLineReader()
key, value = reader.read(filename_queue)
# Default values, in case of empty columns. Also specifies the type of the
# decoded result.
record_defaults = [[1], [1], [1], [1], [1]]
col1, col2, col3, col4, col5 = tf.decode_csv(
value, record_defaults=record_defaults)
# print tf.shape(col1)
features = tf.concat(0, [col1, col2, col3, col4])
with tf.Session() as sess:
# Start populating the filename queue.
coord = tf.train.Coordinator()
threads = tf.train.start_queue_runners(coord=coord)
for i in range(1200):
# Retrieve a single instance:
example, label = sess.run([features, col5])
coord.request_stop()
coord.join(threads)
サンプルコードは(http://tensorflow.org/how_tos/reading_data/index.md)このエラー –