tensorflow::ops::Pad
#include <array_ops.h>
Заполняет тензор нулями.
Краткое описание
Данная операция заполняет тензор нулями в соответствии с заданными вами параметрами. input — это целочисленный тензор с формой [Dn, 2], где n — ранг input. Для каждого измерения D input, paddings[D, 0] указывает количество нулей, добавляемых перед содержимым input в этом измерении, а paddings[D, 1] указывает количество нулей, добавляемых после содержимого input в этом измерении.
Размер заполненного по каждому измерению D выходного тензора:
paddings(D, 0) + input.dim_size(D) + paddings(D, 1)
Например:
# 't' is [[1, 1], [2, 2]]
# 'paddings' is [[1, 1], [2, 2]]
# rank of 't' is 2
pad(t, paddings) ==> [[0, 0, 0, 0, 0, 0]
[0, 0, 1, 1, 0, 0]
[0, 0, 2, 2, 0, 0]
[0, 0, 0, 0, 0, 0]]
Аргументы:
- scope: Объект Scope
Возвращает:
-
Output: Выходной тензор.
| Конструкторы и деструкторы | |
|---|---|
Pad(const ::tensorflow::Scope & scope, ::tensorflow::Input input, ::tensorflow::Input paddings) |
| Общедоступные атрибуты | |
|---|---|
operation | |
output | |
| Общедоступные функции | |
|---|---|
node() const | ::tensorflow::Node * |
operator::tensorflow::Input() const | |
operator::tensorflow::Output() const | |
Общедоступные атрибуты
operation
Operation operation
output
::tensorflow::Output output
Общедоступные функции
Pad
Pad( const ::tensorflow::Scope & scope, ::tensorflow::Input input, ::tensorflow::Input paddings )
node
::tensorflow::Node * node() const
operator::tensorflow::Input
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
© 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/cc/class/tensorflow/ops/pad