Returns OK if the input and output batch sizes match.
| 36 | |
| 37 | // Returns OK if the input and output batch sizes match. |
| 38 | Status BatchSizesMatch(const Tensor& input, const Tensor& output) { |
| 39 | // Ensure the number of outputs match the number of inputs. |
| 40 | if (input.dim_size(0) != output.dim_size(0)) { |
| 41 | return errors::Internal(strings::StrCat( |
| 42 | "Input batch size did not match output batch size: ", input.dim_size(0), |
| 43 | " vs. ", output.dim_size(0))); |
| 44 | } |
| 45 | return Status::OK(); |
| 46 | } |
| 47 | } // namespace |
| 48 | |
| 49 | Status GetSignatures(const tensorflow::MetaGraphDef& meta_graph_def, |
no test coverage detected