Spec-Zone.ru › TensorFlow 1.15

tf.compat.v2.shape

Возвращает форму тензора.

tf.compat.v2.shape(
    input, out_type=tf.dtypes.int32, name=None
)

Эта операция возвращает 1-мерный целочисленный тензор, представляющий форму input.

Например:

t = tf.constant([[[1, 1, 1], [2, 2, 2]], [[3, 3, 3], [4, 4, 4]]])
tf.shape(t)  # [2, 2, 3]
Аргументы
input Tensor или SparseTensor.
out_type (Необязательно) Указанный тип выходных данных операции (int32 или int64). По умолчанию tf.int32.
name Имя операции (необязательно).
Возвращаемое значение
Tensor типа out_type.

© 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/compat/v2/shape

Spec-Zone.ru

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