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

@@ -85,7 +85,7 @@ TensorInfo PaddleBackend::GetInputInfo(int index) {
return inputs_desc_[index];
}
std::vector<TensorInfo> PaddleBackend::GetInputInfo() { return inputs_desc_; }
std::vector<TensorInfo> PaddleBackend::GetInputInfos() { return inputs_desc_; }
TensorInfo PaddleBackend::GetOutputInfo(int index) {
FDASSERT(index < NumOutputs(),
@@ -94,7 +94,9 @@ TensorInfo PaddleBackend::GetOutputInfo(int index) {
return outputs_desc_[index];
}
std::vector<TensorInfo> PaddleBackend::GetOutputInfo() { return outputs_desc_; }
std::vector<TensorInfo> PaddleBackend::GetOutputInfos() {
return outputs_desc_;
}
bool PaddleBackend::Infer(std::vector<FDTensor>& inputs,
std::vector<FDTensor>* outputs) {