Use deep copy in Clone() (#66)

This commit is contained in:
Fangjun Kuang
2023-02-26 14:54:01 +08:00
committed by GitHub
parent 475caf22f9
commit 5a8c3a6d10
7 changed files with 41 additions and 24 deletions

View File

@@ -60,8 +60,8 @@ void GetOutputNames(Ort::Session *sess, std::vector<std::string> *output_names,
void PrintModelMetadata(std::ostream &os,
const Ort::ModelMetadata &meta_data); // NOLINT
// Return a shallow copy of v
Ort::Value Clone(const Ort::Value *v);
// Return a deep copy of v
Ort::Value Clone(OrtAllocator *allocator, const Ort::Value *v);
// Print a 1-D tensor to stderr
void Print1D(Ort::Value *v);