Skip to content

Conversation

@joey12300
Copy link
Collaborator

@joey12300 joey12300 commented Aug 10, 2022

PR types

New features

PR changes

APIs

Describe

Add Transpose function

Usage

FDTensor input, output;
std::vector<float> inputs = {2, 4, 3, 7, 1, 5};
input.SetExternalData({2, 3}, FDDataType::FP32, inputs.data());
// Transpose the input tensor with axis {1, 0}.
// The output result would be [[2, 7], [4, 1], [3, 5]]
Transpose(input, &output, {1, 0});

@joey12300 joey12300 marked this pull request as ready for review August 10, 2022 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants