padToSquare.d.ts 481 B

12345678910
  1. import * as tf from '@tensorflow/tfjs-core';
  2. /**
  3. * Pads the smaller dimension of an image tensor with zeros, such that width === height.
  4. *
  5. * @param imgTensor The image tensor.
  6. * @param isCenterImage (optional, default: false) If true, add an equal amount of padding on
  7. * both sides of the minor dimension oof the image.
  8. * @returns The padded tensor with width === height.
  9. */
  10. export declare function padToSquare(imgTensor: tf.Tensor4D, isCenterImage?: boolean): tf.Tensor4D;