• Permutes the dimensions of the input according to a given pattern.

    Useful for, e.g., connecting RNNs and convnets together.

    Example:

    const model = tf.sequential();
    model.add(tf.layers.permute({
    dims: [2, 1],
    inputShape: [10, 64]
    }));
    console.log(model.outputShape);
    // Now model's output shape is [null, 64, 10], where null is the
    // unpermuted sample (batch) dimension.

    Input shape: Arbitrary. Use the configuration field inputShape when using this layer as the first layer in a model.

    Output shape: Same rank as the input shape, but with the dimensions re-ordered (i.e., permuted) according to the dims configuration of this layer.

    Parameters

    • args: PermuteLayerArgs

    Returns Permute

    Doc

Generated using TypeDoc