if (error_is_large) {
good_output = false;
if (verbose) {
- std::cerr << " index " << i << ": " << reference
- << " != " << computed << std::endl;
+ std::cerr << " index " << i << ": got " << computed
+ << ", but expected " << reference << std::endl;
}
}
}
void TfLiteDriver::SetExpectation(int id, const string& csv_values) {
if (!IsValid()) return;
auto* tensor = interpreter_->tensor(id);
+ if (expected_output_.count(id) != 0) {
+ fprintf(stderr, "Overriden expectation for tensor %d\n", id);
+ Invalidate("Overriden expectation");
+ }
expected_output_[id].reset(new Expectation);
switch (tensor->type) {
case kTfLiteFloat32: