Spec-Zone.ru › TensorFlow 1.15

tf.contrib.framework.get_placeholders

Получение плейсхолдеров графа.

tf.contrib.framework.get_placeholders(
    graph
)

Например:

a = tf.compat.v1.placeholder(dtype=tf.float32, shape=[2, 2], name='a')
a = tf.compat.v1.placeholder(dtype=tf.int32, shape=[3, 2], name='b')

tf.contrib.framework.get_placeholders(tf.compat.v1.get_default_graph())
# Returns:
#  [<tf.Tensor 'a:0' shape=(2, 2) dtype=float32>,
#   <tf.Tensor 'b:0' shape=(3, 2) dtype=int32>]
Аргументы
graph Объект tf.Graph.
Возвращаемое значение
Список, содержащий все плейсхолдеры заданного графа.
Исключения
TypeError Если graph не является графом TensorFlow.

© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/framework/get_placeholders

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API