MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / transpose_last_two

Function transpose_last_two

src/models/chatterbox/s3_tokenizer_impl.cpp:99–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97 input.type);
98}
99
100engine::core::TensorValue transpose_last_two(
101 engine::core::ModuleBuildContext & ctx,
102 const engine::core::TensorValue & input) {
103 std::array<int, engine::core::kMaxTensorRank> axes = {0, 1, 2, 3};
104 const size_t last = input.shape.rank - 1;
105 const size_t second_last = input.shape.rank - 2;
106 axes[second_last] = static_cast<int>(last);
107 axes[last] = static_cast<int>(second_last);
108 return permute_tensor(ctx, input, axes);
109}
110
111engine::core::TensorValue batched_matmul(

Callers 1

batched_matmulFunction · 0.70

Calls 1

permute_tensorFunction · 0.70

Tested by

no test coverage detected