具有shape = []的Tensorflow tf.placeholder

问题描述 投票:0回答:1

我正在查看Tensorflow代码,该代码使用带有shape = []的占位符对图形进行学习率输入,如下所示:

self.lr_placeholder = tf.placeholder(dtype=tf.float32, shape=[])

我查看了Tensorflow(https://www.tensorflow.org/api_docs/python/tf/placeholder)的官方文档页面,了解什么会形状= []的意思,但无法得到形状设置为空列表的解释。如果有人能解释这是什么意思。

python tensorflow deep-learning shapes computation-graph
1个回答
1
投票

它的等级是0,即A 0-D tensor. A scalar. https://www.tensorflow.org/guide/tensors#shape

© www.soinside.com 2019 - 2024. All rights reserved.