tf.TensorArraySpec
| Просмотреть исходный код на GitHub |
Спецификация типа для tf.TensorArray.
Наследуется от: TypeSpec
tf.TensorArraySpec(
element_shape=None, dtype=tf.dtypes.float32, dynamic_size=False,
infer_shape=True
)
| Аргументы | |
|---|---|
element_shape | Форма каждого элемента в TensorArray. |
dtype | Тип данных TensorArray. |
dynamic_size | Может ли TensorArray увеличиваться за пределы своего начального размера. |
infer_shape | Включено ли вычисление формы. |
| Атрибуты | |
|---|---|
value_type | |
Методы
from_value
@staticmethod
from_value(
value
)
is_compatible_with
is_compatible_with(
other
)
Возвращает true, если spec_or_value совместим с этим TypeSpec.
most_specific_compatible_type
most_specific_compatible_type(
other
)
Возвращает наиболее конкретную TypeSpec, совместимую с self и other.
| Аргументы | |
|---|---|
other | A TypeSpec. |
| Исключения | |
|---|---|
ValueError | Если нет TypeSpec, совместимого с self и other. |
__eq__
__eq__(
other
)
Возвращает self==value.
__ne__
__ne__(
other
)
Возвращает self!=value.
© 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/TensorArraySpec