Contents

unsqueeze(axis:)

Adds an unsqueeze operation in the graph.

Declaration

func unsqueeze(axis: Int) -> BNNSGraph.Builder.Tensor<T>

Parameters

  • axis:

    The axis at which the operation inserts the dimension.

Discussion

This operation creates a dimension of size 1 at the given index, i.e. the output tensor will have the new dimension of size 1 at the given index.