diff --git a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/activation/ELU.kt b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/activation/ELU.kt index 50aa2ec5f..d30ca26c9 100644 --- a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/activation/ELU.kt +++ b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/activation/ELU.kt @@ -21,6 +21,12 @@ import org.tensorflow.op.Ops * the activation closer to zero which enable faster learning as they * bring the gradient to the natural gradient. * + * __Input shape__: Arbitrary. Use the keyword argument `input_shape` + * (tuple of integers, does not include the samples axis) + * when using this layer as the first layer in a model. + * + * __Output shape__: Same shape as the input. + * * @property [alpha] Hyperparameter that controls the value to which * an ELU saturates for negative net inputs. Should be > 0. * @constructor Creates [ELU] object. diff --git a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/activation/LeakyReLU.kt b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/activation/LeakyReLU.kt index 1b44d84e9..adc8eb389 100644 --- a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/activation/LeakyReLU.kt +++ b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/activation/LeakyReLU.kt @@ -16,6 +16,13 @@ import org.tensorflow.op.Ops * f(x) = x, if x >= 0 * f(x) = alpha * x if x < 0 * ``` + * + * __Input shape:__ Arbitrary. Use the keyword argument `input_shape` + * (tuple of integers, does not include the batch axis) + * when using this layer as the first layer in a model. + * + * __Output shape:__ 2D tensor with shape `(batch_size, channels)`. + * * @property [alpha] Negative slope coefficient. Should be >= 0. * @constructor Creates [LeakyReLU] object. * @since 0.3 diff --git a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/activation/PReLU.kt b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/activation/PReLU.kt index 7c7506ad3..b40aabe6e 100644 --- a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/activation/PReLU.kt +++ b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/activation/PReLU.kt @@ -26,6 +26,12 @@ import org.tensorflow.op.Ops * ``` * where `alpha` is a learnable weight and has the same shape as `x` (i.e. input). * + * __Input shape:__ Arbitrary. Use the keyword argument `input_shape` + * (tuple of integers, does not include the samples axis) + * when using this layer as the first layer in a model. + * + * __Output shape:__ Same shape as the input. + * * @property [alphaInitializer] Initializer instance for the weights. * @property [alphaRegularizer] Regularizer instance for the weights. * @property [sharedAxes] The axes along which to share learnable parameters. diff --git a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/activation/ReLU.kt b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/activation/ReLU.kt index b00ba74e1..c27e9ba3c 100644 --- a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/activation/ReLU.kt +++ b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/activation/ReLU.kt @@ -19,6 +19,13 @@ import org.tensorflow.op.Ops * f(x) = x, if threshold <= x < maxValue * f(x) = negativeSlope * (x - threshold), if x < threshold * ``` + * + * __Input shape:__ Arbitrary. Use the keyword argument `input_shape` + * (tuple of integers, does not include the batch axis) + * when using this layer as the first layer in a model. + * + * __Output shape:__ Same shape as the input. + * * @property [maxValue] Maximum activation value. Should be >= 0. * @property [negativeSlope] Negative slope coefficient. Should be >= 0. * @property [threshold] Threshold value for threshold activation. diff --git a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/activation/Softmax.kt b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/activation/Softmax.kt index 0603f58eb..4acbb6f93 100644 --- a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/activation/Softmax.kt +++ b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/activation/Softmax.kt @@ -21,6 +21,12 @@ import org.tensorflow.op.core.ReduceSum * softmax[i, j] = exp(logits[i, j]) / sum_j(exp(logits[i, j])) * ``` * + * __Input shape:__ Arbitrary. Use the keyword argument `input_shape` + * (tuple of integers, does not include the samples axis) + * when using this layer as the first layer in a model. + * + * __Output shape:__ Same shape as the input. + * * @property [axis] along which the softmax normalization is applied. * @constructor Creates [Softmax] object * @since 0.3 diff --git a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/activation/ThresholdedReLU.kt b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/activation/ThresholdedReLU.kt index 9934a19ab..55dd6fe34 100644 --- a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/activation/ThresholdedReLU.kt +++ b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/activation/ThresholdedReLU.kt @@ -16,6 +16,13 @@ import org.tensorflow.op.Ops * f(x) = x, if x > theta * f(x) = 0 otherwise * ``` + * + * __Input shape:__ Arbitrary. Use the keyword argument `input_shape` + * (tuple of integers, does not include the samples axis) + * when using this layer as the first layer in a model. + * + * __Output shape:__ Same shape as the input. + * * @property [theta] Threshold value for activation. * @constructor Creates [ThresholdedReLU] object. * diff --git a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/convolutional/DepthwiseConv2D.kt b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/convolutional/DepthwiseConv2D.kt index 960fc60e8..b0eaf6816 100644 --- a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/convolutional/DepthwiseConv2D.kt +++ b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/convolutional/DepthwiseConv2D.kt @@ -30,6 +30,11 @@ import org.tensorflow.op.nn.DepthwiseConv2dNative * The `depthMultiplier` argument controls how many * output channels are generated per input channel in the depthwise step. * + * __Input shape:__ 4D tensor with shape `(batch_size, rows, cols, channels)`. + * + * __Output shape:__ 4D tensor with shape `(batch_size, new_rows, new_cols, channels * depth_multiplier)`. + * `rows` and `cols` values might have changed due to padding. + * * @property [kernelSize] Two long numbers, specifying the height and width of the 2D convolution window. * @property [strides] Strides of the pooling operation for each dimension of input tensor. * NOTE: Specifying any stride value != 1 is incompatible with specifying any `dilation_rate` value != 1. diff --git a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/convolutional/SeparableConv2D.kt b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/convolutional/SeparableConv2D.kt index 1650abbc4..da3191fcb 100644 --- a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/convolutional/SeparableConv2D.kt +++ b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/convolutional/SeparableConv2D.kt @@ -35,6 +35,11 @@ import kotlin.math.roundToInt * Intuitively, separable convolutions can be understood as * a way to factorize a convolution kernel into two smaller kernels, or as an extreme version of an Inception block. * + * __Input shape:__ 4D tensor with shape `(batch_size, rows, cols, channels)`. + * + * __Output shape:__ 4D tensor with shape `(batch_size, new_rows, new_cols, filters)`. + * `rows` and `cols` values might have changed due to padding. + * * @property [filters] The dimensionality of the output space (i.e. the number of filters in the convolution). * @property [kernelSize] Two long numbers, specifying the height and width of the 2D convolution window. * @property [strides] Strides of the pooling operation for each dimension of input tensor. diff --git a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/core/Dense.kt b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/core/Dense.kt index e1994f6b5..35e2e163f 100644 --- a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/core/Dense.kt +++ b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/core/Dense.kt @@ -31,6 +31,10 @@ import org.tensorflow.op.Ops * created by the layer, and `bias` is a bias vector created by the layer * (only applicable if `use_bias` is `True`). * + * __Input shape:__ 2D tensor with shape `(batch_size, input_dim)`. + * + * __Output shape:__ 2D tensor with shape `(batch_size, units)`. + * * @property [outputSize] Dimensionality of the output space. * @property [activation] Activation function. * @property [kernelInitializer] Initializer function for the 'kernel' weights matrix. diff --git a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/normalization/BatchNorm.kt b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/normalization/BatchNorm.kt index 66372cf2f..e85a9cb33 100644 --- a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/normalization/BatchNorm.kt +++ b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/normalization/BatchNorm.kt @@ -22,6 +22,12 @@ import org.tensorflow.op.core.Variable /** * NOTE: This layer is not trainable and does not update its weights. It's frozen by default. * + * __Input shape:__ Arbitrary. Use the keyword argument `input_shape` + * (tuple of integers, does not include the samples axis) + * when using this layer as the first layer in a model. + * + * __Output shape:__ Same shape as input. + * * @property [axis] Integer or a list of integers, the axis that should be normalized (typically the features' axis). * @property [momentum] Momentum for the moving average. * @property [center] If True, add offset of beta to normalized tensor. If False, beta is ignored. diff --git a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/AvgPool1D.kt b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/AvgPool1D.kt index 566a00888..d102477e0 100644 --- a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/AvgPool1D.kt +++ b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/AvgPool1D.kt @@ -17,6 +17,10 @@ import org.tensorflow.op.core.Squeeze * * Downsamples the input by taking the average over a temporal window of size [poolSize]. * + * __Input shape:__ 3D tensor with shape `(batch_size, steps, features)`. + * + * __Output shape:__ 3D tensor with shape `(batch_size, downsampled_steps, features)`. + * * @property [poolSize] Size of the temporal pooling window for each dimension of input. * @property [strides] The amount of shift for pooling window per each input dimension in each pooling step. * @property [padding] Padding strategy; can be either of [ConvPadding.VALID] which means no diff --git a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/AvgPool2D.kt b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/AvgPool2D.kt index bab5177ae..c24dcbf89 100644 --- a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/AvgPool2D.kt +++ b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/AvgPool2D.kt @@ -14,7 +14,9 @@ import org.tensorflow.op.Ops /** * Average pooling layer for 2D inputs (e.g. images). * - * NOTE: Works with tensors which must have rank 4 (batch, height, width, channels). + * __Input shape:__ 4D tensor with shape `(batch_size, rows, cols, channels)`. + * + * __Output shape:__ 4D tensor with shape `(batch_size, pooled_rows, pooled_cols, channels)`. * * @property [poolSize] The size of the sliding window for each dimension of input tensor (pool batch, pool height, pool width, pool channels). * Usually, pool batch and pool channels are equal to 1. diff --git a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/AvgPool3D.kt b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/AvgPool3D.kt index b9de75ac1..32fdabfee 100644 --- a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/AvgPool3D.kt +++ b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/AvgPool3D.kt @@ -17,6 +17,10 @@ import org.tensorflow.op.Ops * * Downsamples the input by taking the average over a window of size [poolSize]. * + * __Input shape:__ 5D tensor with shape `(batch_size, spatial_dim1, spatial_dim2, spatial_dim3, channels)`. + * + * __Output shape:__ 5D tensor with shape `(batch_size, pooled_dim1, pooled_dim2, pooled_dim3, channels)`. + * * @property [poolSize] Size of the pooling window for each dimension of input. * @property [strides] The amount of shift for pooling window per each input dimension in each pooling step. * @property [padding] Padding strategy; can be either of [ConvPadding.VALID] which means no diff --git a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/GlobalAvgPool2D.kt b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/GlobalAvgPool2D.kt index 57570a180..423335a8d 100644 --- a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/GlobalAvgPool2D.kt +++ b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/GlobalAvgPool2D.kt @@ -13,11 +13,9 @@ import org.tensorflow.op.Ops /** * Global average pooling operation for 2D data (images and so on). * - * NOTE: Works with tensors which must have rank 4 (batch, height, width, channels). + * __Input shape:__ 4D tensor with shape `(batch_size, rows, cols, channels)`. * - * Input shape: 4D tensor with shape `(batch_size, rows, cols, channels)`. - * - * Output shape: 2D tensor with shape `(batch_size, channels)`. + * __Output shape:__ 2D tensor with shape `(batch_size, channels)`. * * @property [name] Custom layer name. * @constructor Creates [GlobalAvgPool2D] object. diff --git a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/GlobalMaxPool1D.kt b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/GlobalMaxPool1D.kt index 991dd2a3b..f89d4f69a 100644 --- a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/GlobalMaxPool1D.kt +++ b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/GlobalMaxPool1D.kt @@ -14,6 +14,10 @@ import org.tensorflow.op.Ops * * Downsamples the input by taking the maximum value over time dimension. * + * __Input shape:__ 3D tensor with shape `(batch_size, steps, features)`. + * + * __Output shape:__ 2D tensor with shape `(batch_size, features)`. + * * @since 0.3 */ public class GlobalMaxPool1D( diff --git a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/GlobalMaxPool2D.kt b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/GlobalMaxPool2D.kt index e3233d453..97edb58a8 100644 --- a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/GlobalMaxPool2D.kt +++ b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/GlobalMaxPool2D.kt @@ -14,6 +14,10 @@ import org.tensorflow.op.Ops * * Downsamples the input by taking the maximum value over spatial dimensions. * + * __Input shape:__ 4D tensor with shape `(batch_size, rows, cols, channels)`. + * + * __Output shape:__ 2D tensor with shape `(batch_size, channels)`. + * * @since 0.3 */ public class GlobalMaxPool2D( diff --git a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/GlobalMaxPool3D.kt b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/GlobalMaxPool3D.kt index eb0cf503e..740e3a44d 100644 --- a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/GlobalMaxPool3D.kt +++ b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/GlobalMaxPool3D.kt @@ -14,6 +14,10 @@ import org.tensorflow.op.Ops * * Downsamples the input by taking the maximum value over spatio-temporal dimensions. * + * __Input shape:__ 5D tensor with shape `(batch_size, spatial_dim1, spatial_dim2, spatial_dim3, channels)`. + * + * __Output shape:__ 2D tensor with shape `(batch_size, channels)`. + * * @since 0.3 */ public class GlobalMaxPool3D( diff --git a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/MaxPool1D.kt b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/MaxPool1D.kt index c70c374c1..cb09c9c80 100644 --- a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/MaxPool1D.kt +++ b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/MaxPool1D.kt @@ -17,6 +17,10 @@ import org.tensorflow.op.core.Squeeze * * Downsamples the input by taking maximum value over a temporal window of size [poolSize]. * + * __Input shape:__ 3D tensor with shape `(batch_size, steps, features)`. + * + * __Output shape:__ 3D tensor with shape `(batch_size, downsampled_steps, features)`. + * * @property [poolSize] Size of the temporal pooling window for each dimension of input. * @property [strides] The amount of shift for pooling window per each input dimension in each pooling step. * @property [padding] Padding strategy; can be either of [ConvPadding.VALID] which means no padding, or diff --git a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/MaxPool2D.kt b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/MaxPool2D.kt index 52b1fce60..32ce71d5b 100644 --- a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/MaxPool2D.kt +++ b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/MaxPool2D.kt @@ -13,7 +13,9 @@ import org.tensorflow.op.Ops /** * Max pooling layer for 2D inputs (e.g. images). * - * NOTE: Works with tensors which must have rank 4 (batch, height, width, channels). + * __Input shape:__ 4D tensor with shape `(batch_size, rows, cols, channels)`. + * + * __Output shape:__ 4D tensor with shape `(batch_size, pooled_rows, pooled_cols, channels)`. * * @property [poolSize] The size of the sliding window for each dimension of input tensor (pool batch, pool height, pool width, pool channels). * Usually, pool batch and pool channels are equal to 1. diff --git a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/MaxPool3D.kt b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/MaxPool3D.kt index 5dcac40c7..67faaf9eb 100644 --- a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/MaxPool3D.kt +++ b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/pooling/MaxPool3D.kt @@ -13,7 +13,11 @@ import java.util.* /** * Max pooling operation for 3D data (spatial or spatio-temporal). - * NOTE: Works with tensors which must have rank 5 (batch, depth, height, width, channels). + * + * __Input shape:__ 5D tensor with shape `(batch_size, spatial_dim1, spatial_dim2, spatial_dim3, channels)`. + * + * __Output shape:__ 5D tensor with shape: `(batch_size, pooled_dim1, pooled_dim2, pooled_dim3, channels)`. + * * @property [poolSize] The size of the sliding window for each dimension of input tensor (pool batch, pool depth ,pool height, pool width, pool channels). * Usually, pool batch and pool channels are equal to 1. * @property [strides] Strides of the pooling operation for each dimension of input tensor. diff --git a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/reshaping/ZeroPadding1D.kt b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/reshaping/ZeroPadding1D.kt index 6f23fbd42..fe42bb798 100644 --- a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/reshaping/ZeroPadding1D.kt +++ b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/reshaping/ZeroPadding1D.kt @@ -10,6 +10,11 @@ import org.tensorflow.Shape /** * Zero-padding layer for 1D input (e.g. audio). * This layer can add zeros in the rows of the audio tensor + * + * __Input shape:__ 3D tensor with shape `(batch_size, axis_to_pad, features)`. + * + * __Output shape:__ 3D tensor with shape `(batch_size, padded_axis, features)`. + * * @property [padding] 2 numbers interpreted as `(left_pad, right_pad)`. * * @since 0.3 diff --git a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/reshaping/ZeroPadding2D.kt b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/reshaping/ZeroPadding2D.kt index b616c1dd6..4504a74d4 100644 --- a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/reshaping/ZeroPadding2D.kt +++ b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/reshaping/ZeroPadding2D.kt @@ -12,6 +12,11 @@ import org.tensorflow.Shape /** * Zero-padding layer for 2D input (e.g. picture). * This layer can add rows and columns of zeros at the top, bottom, left and right side of an image tensor. + * + * __Input shape:__ 4D tensor with shape `(batch_size, rows, cols, channels)`. + * + * __Output shape:__ 4D tensor with shape `(batch_size, padded_rows, padded_cols, channels)`. + * * @property [padding] 4 numbers interpreted as `(top_pad, bottom_pad, left_pad, right_pad)`. */ public class ZeroPadding2D : AbstractZeroPadding { diff --git a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/reshaping/ZeroPadding3D.kt b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/reshaping/ZeroPadding3D.kt index 49552d282..ac197e5d9 100644 --- a/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/reshaping/ZeroPadding3D.kt +++ b/tensorflow/src/main/kotlin/org/jetbrains/kotlinx/dl/api/core/layer/reshaping/ZeroPadding3D.kt @@ -10,6 +10,11 @@ import org.tensorflow.Shape /** * Zero-padding layer for 3D input (e.g. video). * This layer can add zeros in the rows, cols and depth of a video tensor. + * + * __Input shape:__ 5D tensor with shape `(batch_size, first_axis_to_pad, second_axis_to_pad, third_axis_to_pad, depth)`. + * + * __Output shape:__ 5D tensor with shape `(batch_size, first_padded_axis, second_padded_axis, third_axis_to_pad, depth)`. + * * @property [padding] 6 numbers interpreted as `(left_dim1_pad, right_dim1_pad, left_dim2_pad, right_dim2_pad, left_dim3_pad, right_dim3_pad)`. * * @since 0.3