[Other] Optimize runtime module (#1195)

* Optimize code

* optimize code

* fix bug
This commit is contained in:
Jason
2023-01-31 10:11:16 +08:00
committed by GitHub
parent c232ceca77
commit 54ceb93670
7 changed files with 188 additions and 130 deletions

View File

@@ -203,8 +203,7 @@ FASTDEPLOY_DECL bool ReadBinaryFromFile(const std::string& file,
FASTDEPLOY_DECL std::vector<int64_t>
GetStride(const std::vector<int64_t>& dims);
template <typename T, typename std::enable_if<std::is_integral<T>::value,
bool>::type = true>
template <typename T>
std::string Str(const std::vector<T>& shape) {
std::ostringstream oss;
oss << "[ " << shape[0];