add 'GetOutputInfos' and 'GetInputInfos' interface (#232)

add GetOutputInfos GetInputInfos
This commit is contained in:
heliqi
2022-09-15 00:09:31 -05:00
committed by GitHub
parent 6963296a89
commit 0805ead0ed
13 changed files with 125 additions and 42 deletions

View File

@@ -13,6 +13,7 @@
// limitations under the License.
#include "fastdeploy/fastdeploy_runtime.h"
#include "fastdeploy/utils/unique_ptr.h"
#include "fastdeploy/utils/utils.h"
@@ -297,6 +298,14 @@ TensorInfo Runtime::GetOutputInfo(int index) {
return backend_->GetOutputInfo(index);
}
std::vector<TensorInfo> Runtime::GetInputInfos() {
return backend_->GetInputInfos();
}
std::vector<TensorInfo> Runtime::GetOutputInfos() {
return backend_->GetOutputInfos();
}
bool Runtime::Infer(std::vector<FDTensor>& input_tensors,
std::vector<FDTensor>* output_tensors) {
return backend_->Infer(input_tensors, output_tensors);