• Pads the smaller dimension of an image tensor with zeros, such that width === height.

    Parameters

    • imgTensor: Tensor4D

      The image tensor.

    • isCenterImage: boolean = false

      (optional, default: false) If true, add an equal amount of padding on both sides of the minor dimension oof the image.

    Returns Tensor4D

    The padded tensor with width === height.