IO

public class IO

A IO class represent the abstract input / output for a model. It can correspond to one or more tensors when the model is materialized.

  • Reshape an IO to a new dimension. You cannot reshape data types.

    Declaration

    Swift

    public func reshape(_ dimensions: [Int], offset: [Int]? = nil, increments: [Int]? = nil)
      -> Model.IO

    Parameters

    dimensions

    The new dimensions for the input.

    offset

    Whether apply certain offset for each dimension.

    increments

    What’s the step size for each dimension.

  • Undocumented

    Declaration

    Swift

    public func transpose(_ axisA: Int, _ axisB: Int) -> Model.IO