fixed code and updated unit tests to accomodate auto-reshaping graphs, to unlock full validation (#1808)
This commit is contained in:
@@ -24,7 +24,9 @@ MKLDNNPlugin::MKLDNNInferRequest::MKLDNNInferRequest(InferenceEngine::InputsData
|
||||
|
||||
if (execNetwork->_graphs.size() == 0)
|
||||
THROW_IE_EXCEPTION << "No graph was found";
|
||||
const int seq = (_networkInputs.cbegin()->second->getTensorDesc().getDims())[1];
|
||||
const int seq = execNetwork->_graphs.begin()->size() > 1
|
||||
? _networkInputs.cbegin()->second->getTensorDesc().getDims()[1]
|
||||
: 0;
|
||||
graph = execNetwork->_graphs.begin()->at(seq).get();
|
||||
for (const auto& it : _networkInputs) {
|
||||
InferenceEngine::Blob::Ptr blob;
|
||||
|
||||
@@ -162,7 +162,12 @@ Engine::LoadExeNetworkImpl(const InferenceEngine::ICNNNetwork &network, const st
|
||||
const InputsDataMap inputInfo = localNetwork.getInputsInfo();
|
||||
ICNNNetwork::InputShapes shapes = localNetwork.getInputShapes();
|
||||
ReshapedCNNNetworks reshapedNetworks;
|
||||
int seq = shapes.at(inputInfo.cbegin()->first)[1];
|
||||
int seq = 0;
|
||||
if (conf.dynamicSequence) {
|
||||
if (shapes.at(inputInfo.cbegin()->first).size() < 2)
|
||||
THROW_IE_EXCEPTION << "Auto-reshaping of the network with no sequence (first input is scalar or channels-only)!";
|
||||
seq = shapes.at(inputInfo.cbegin()->first)[1];
|
||||
}
|
||||
do {
|
||||
CNNNetwork clonedNetwork(cloneNetwork(network));
|
||||
if (conf.dynamicSequence) {
|
||||
|
||||
Reference in New Issue
Block a user