Begin to support CTC models (#119)
Please see https://k2-fsa.github.io/sherpa/onnx/pretrained_models/offline-ctc/nemo/index.html for a list of pre-trained CTC models from NeMo.
This commit is contained in:
@@ -10,13 +10,23 @@ namespace sherpa_onnx {
|
||||
/** Transpose a 3-D tensor from shape (B, T, C) to (T, B, C).
|
||||
*
|
||||
* @param allocator
|
||||
* @param v A 3-D tensor of shape (B, T, C). Its dataype is T.
|
||||
* @param v A 3-D tensor of shape (B, T, C). Its dataype is type.
|
||||
*
|
||||
* @return Return a 3-D tensor of shape (T, B, C). Its datatype is T.
|
||||
* @return Return a 3-D tensor of shape (T, B, C). Its datatype is type.
|
||||
*/
|
||||
template <typename T = float>
|
||||
template <typename type = float>
|
||||
Ort::Value Transpose01(OrtAllocator *allocator, const Ort::Value *v);
|
||||
|
||||
/** Transpose a 3-D tensor from shape (B, T, C) to (B, C, T).
|
||||
*
|
||||
* @param allocator
|
||||
* @param v A 3-D tensor of shape (B, T, C). Its dataype is type.
|
||||
*
|
||||
* @return Return a 3-D tensor of shape (B, C, T). Its datatype is type.
|
||||
*/
|
||||
template <typename type = float>
|
||||
Ort::Value Transpose12(OrtAllocator *allocator, const Ort::Value *v);
|
||||
|
||||
} // namespace sherpa_onnx
|
||||
|
||||
#endif // SHERPA_ONNX_CSRC_TRANSPOSE_H_
|
||||
|
||||
Reference in New Issue
Block a user