tf.raw_ops.Size
Возвращает размер тензора.
tf.raw_ops.Size(
input,
out_type=tf.dtypes.int32,
name=None
)
Эта операция возвращает целое число, представляющее количество элементов в input.
Например:
# 't' is [[[1, 1,, 1], [2, 2, 2]], [[3, 3, 3], [4, 4, 4]]]] size(t) ==> 12
| Аргументы | |
|---|---|
input | A Tensor. |
out_type | Необязательный tf.DType из: tf.int32, tf.int64. По умолчанию tf.int32. |
name | Имя операции (необязательно). |
| Возвращаемое значение | |
|---|---|
A Tensor типа out_type. |
© 2022 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 4.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/raw_ops/Size