Skip to content

Commit dbf4e01

Browse files
Suharsh Sivakumartensorflower-gardener
authored andcommitted
Fix error message in direct_session.
Change: 144749245
1 parent bc2e763 commit dbf4e01

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

tensorflow/core/common_runtime/direct_session.cc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -739,8 +739,7 @@ Status DirectSession::SendInputs(const NamedTensorList& inputs,
739739
for (const auto& input : inputs) {
740740
auto it = executors_and_keys->input_keys.find(input.first);
741741
if (it == executors_and_keys->input_keys.end()) {
742-
return errors::InvalidArgument("'", input.first,
743-
"' is not a pre-defined feed!");
742+
return errors::Internal("'", input.first, "' is not a pre-defined feed.");
744743
}
745744
const string& input_key = it->second;
746745

@@ -775,9 +774,8 @@ Status DirectSession::RecvOutputs(const std::vector<string>& output_names,
775774
const string& output_name = output_names[output_offset];
776775
auto it = executors_and_keys->output_keys.find(output_name);
777776
if (it == executors_and_keys->output_keys.end()) {
778-
return errors::InvalidArgument("'", output_name,
779-
"' was not defined as a fetch"
780-
" target in PRunSetup.");
777+
return errors::Internal("'", output_name,
778+
"' is not a pre-defined fetch.");
781779
}
782780
const string& output_key = it->second;
783781
Tensor output_tensor;

0 commit comments

Comments
 (0)