The exception thrown inside run method now contains detailed message
that comes from TensorFlow itself.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
TF_DeleteSessionOptions(options);
if (TF_GetCode(_status) != TF_OK)
- throw std::runtime_error("Error while creating a new session");
+ throw std::runtime_error(TF_Message(_status));
TF_SessionRun(_sess,
nullptr, // Run options.
);
if (TF_GetCode(_status) != TF_OK)
- throw std::runtime_error("Error while running a session");
+ throw std::runtime_error(TF_Message(_status));
TF_CloseSession(_sess, _status);
TF_DeleteSession(_sess, _status);