Conv3DTranspose 类tf_keras.layers.Conv3DTranspose(
filters,
kernel_size,
strides=(1, 1, 1),
padding="valid",
output_padding=None,
data_format=None,
dilation_rate=(1, 1, 1),
activation=None,
use_bias=True,
kernel_initializer="glorot_uniform",
bias_initializer="zeros",
kernel_regularizer=None,
bias_regularizer=None,
activity_regularizer=None,
kernel_constraint=None,
bias_constraint=None,
**kwargs
)
转置卷积层(有时称为反卷积)。
转置卷积的需求通常源于希望使用与正常卷积相反方向的变换,即从具有某些卷积输出形状的东西变换到具有其输入形状的东西,同时保持与该卷积兼容的连接模式。
当将此层用作模型的第一个层时,请提供关键字参数 input_shape(整数或 None 元组,不包括样本轴),例如,对于具有 3 个通道的 128x128x128 体积,如果 data_format="channels_last",则为 input_shape=(128, 128, 128, 3)。
参数
dilation_rate 值不兼容。"valid" 或 "same" 之一(不区分大小写)。"valid" 表示不进行填充。"same" 会在输入的左/右或上/下均匀地填充零,从而使输出具有与输入相同的宽度/高度维度。None(默认值),则推断输出形状。channels_last(默认)或 channels_first。输入的维度顺序。channels_last 对应于形状为 (batch_size, depth, height, width, channels) 的输入,而 channels_first 对应于形状为 (batch_size, channels, depth, height, width) 的输入。如果未指定,则使用 Keras 配置文件 ~/.keras/keras.json(如果存在)中的 image_data_format 值,否则为 'channels_last'。默认为 'channels_last'。dilation_rate 值都与指定任何大于 1 的步幅值不兼容。keras.activations)。kernel 权重矩阵的初始化器(请参阅 keras.initializers)。默认为 'glorot_uniform'。keras.initializers)。默认为 'zeros'。kernel 权重矩阵的正则化函数(请参阅 keras.regularizers)。keras.regularizers)。keras.regularizers)。keras.constraints)。keras.constraints)。输入形状
5D 张量,形状为:如果 data_format='channels_first',则为 (batch_size, channels, depth, rows, cols);如果 data_format='channels_last',则为 (batch_size, depth, rows, cols, channels)。
输出形状
5D 张量,形状为:如果 data_format='channels_first',则为 (batch_size, filters, new_depth, new_rows, new_cols);如果 data_format='channels_last',则为 (batch_size, new_depth, new_rows, new_cols, filters)。depth、rows 和 cols 的值可能因填充而改变。如果指定了 output_padding:
new_depth = ((depth - 1) * strides[0] + kernel_size[0] - 2 * padding[0] +
output_padding[0])
new_rows = ((rows - 1) * strides[1] + kernel_size[1] - 2 * padding[1] +
output_padding[1])
new_cols = ((cols - 1) * strides[2] + kernel_size[2] - 2 * padding[2] +
output_padding[2])
返回
一个秩为 5 的张量,表示 activation(conv3dtranspose(inputs, kernel) + bias)。
引发
padding 为 "causal"。 ("因果")strides > 1 且 dilation_rate > 1 时。参考文献