Add Streaming zipformer (#50)

This commit is contained in:
Fangjun Kuang
2023-02-21 20:00:03 +08:00
committed by GitHub
parent 8d1be0945e
commit 3ea6aa949d
20 changed files with 1576 additions and 99 deletions

View File

@@ -56,7 +56,23 @@ void PrintModelMetadata(std::ostream &os,
const Ort::ModelMetadata &meta_data); // NOLINT
// Return a shallow copy of v
Ort::Value Clone(Ort::Value *v);
Ort::Value Clone(const Ort::Value *v);
// Print a 1-D tensor to stderr
void Print1D(Ort::Value *v);
// Print a 2-D tensor to stderr
void Print2D(Ort::Value *v);
// Print a 3-D tensor to stderr
void Print3D(Ort::Value *v);
template <typename T = float>
void Fill(Ort::Value *tensor, T value) {
auto n = tensor->GetTypeInfo().GetTensorTypeAndShapeInfo().GetElementCount();
auto p = tensor->GetTensorMutableData<T>();
std::fill(p, p + n, value);
}
} // namespace sherpa_onnx