Spec-Zone.ru › TensorFlow 2.4

tf.compat.v1.shape

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

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

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

Например:

t = tf.constant([[[1, 1, 1], [2, 2, 2]], [[3, 3, 3], [4, 4, 4]]])
tf.shape(t)  # [2, 2, 3]
Аргументы
input A Tensor или SparseTensor.
name Имя операции (необязательно).
out_type (Необязательно) Указанный тип выходных данных операции (int32 или int64). По умолчанию tf.int32.
Возвращаемое значение
A 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/r2.4/api_docs/python/tf/compat/v1/shape

Spec-Zone.ru

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