Tensorflow.js tf.conv2dTranspose() Function
Introduction: Tensorflow.js is an open-source library that is developed by Google for running machine learning models as well as deep learning neural networks in the browser or node environment.
The .conv2dTranspose() function is used to determine the transposed 2D convolution of an image. It is also recognized as a deconvolution.
tf.conv2dTranspose(x, filter, outputShape, strides, pad, dimRoundingMode?)
- x: The stated input image which is either of rank 3 or else rank 4 and of shape: [batch, height, width, inDepth]. Moreover, in case the rank is 3, then the batch of size 1 is presumed. It can be of type tf.Tensor3D, tf.Tensor4D, TypedArray, or Array.
- filter: The stated filter tensor of rank 4 and shape: [filterHeight, filterWidth, outDepth, inDepth]. Where, inDepth must match inDepth in input tensor. It can be of type tf.Tensor4D, TypedArray, or Array.
- outputShape: The stated output shape which is of rank 4 or else rank 3 and shape [batch, height, width, outDepth]. In case, the rank is 3, then the batch of 1 is presumed. It can be of type [number, number, number, number] or [number, number, number].
- strides: The stated strides of the original convolution of shape: [strideHeight, strideWidth]. It can be of type [number, number], or number.
- pad: The stated type of algorithm for padding which is useful in the non transpose form of the op. It can be of type valid, same, number, or ExplicitPadding.
- dimRoundingMode: A stated string out of ‘ceil’, ’round’, or ‘floor’. In case, no value is provided, then the by default value is truncate. It is optional and is of type ceil, round, or floor.
Return Value: It returns tf.Tensor3D or tf.Tensor4D.
Tensor [ [[3, 3],]]
Tensor [ [[5.7199998, -7.9199996],]]
My Personal Notes arrow_drop_up
Please Login to comment...