Contents

init(shape:sampleMode:alignsCorners:)

Creates an upsample layer with the shape, upsampling algorithm, and corner alignment option you specify.

Declaration

convenience init?(shape: [Int], sampleMode: MLCSampleMode, alignsCorners: Bool)

Parameters

  • shape:

    An array representing the dimensions of the result tensor.

  • sampleMode:

    The upsampling algorithm type; the default value is nearest.

  • alignsCorners:

    A Boolean that indicates whether the layer aligns the corner pixels of the input and output tensors.

See Also

Creating Upsample Layers