Check for error condition in CNTKEval/EvalWriter

This commit is contained in:
Jasha Droppo 2015-08-18 17:32:16 -07:00
Родитель 00491575f0
Коммит 7013d5c140
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -35,6 +35,12 @@ public:
// figure out the dimension of the data // figure out the dimension of the data
const std::wstring& val = iter->first; const std::wstring& val = iter->first;
size_t count = (*outputs)[val]->size(); size_t count = (*outputs)[val]->size();
if (dimensions->find(val) == dimensions->end())
{
RuntimeError("Output %ls not found in CNTK model.", val.c_str());
}
size_t rows = (*dimensions)[val]; size_t rows = (*dimensions)[val];
size_t recordCount = count/rows; size_t recordCount = count/rows;