Tensorflow 张量流。[batch_size,1]与&;[批量大小]
其中一项发现是:Tensorflow 张量流。[batch_size,1]与&;[批量大小],tensorflow,dimensions,Tensorflow,Dimensions,其中一项发现是: # Placeholders for inputs train_inputs = tf.placeholder(tf.int32, shape=[batch_size]) train_labels = tf.placeholder(tf.int32, shape=[batch_size, 1]) 这两个占位符之间可能有什么不同。它们不是都是批处理大小的int32列向量吗 谢谢。我通过调试找到了答案 [batch_size] = [ 0, 2, ...] [batch_size
# Placeholders for inputs
train_inputs = tf.placeholder(tf.int32, shape=[batch_size])
train_labels = tf.placeholder(tf.int32, shape=[batch_size, 1])
这两个占位符之间可能有什么不同。它们不是都是批处理大小的int32列向量吗
谢谢。我通过调试找到了答案
[batch_size] = [ 0, 2, ...]
[batch_size, 1] = [ [0], [2], ...]
尽管仍然不知道为什么要使用第二种形式。
列车输入
是行向量,而列车标签
是列向量。第二种形式是第一种形式的转置版本。