Skip to content

Commit

Permalink
Throw Exception for Unexpected Type (openvinotoolkit#851)
Browse files Browse the repository at this point in the history
  • Loading branch information
apaniukov authored Jan 25, 2024
1 parent 71a1d2b commit 2e0bd47
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ bool SentencepieceTokenizer::evaluate(TensorVector& outputs, const TensorVector&
batch_size = static_cast<int32_t>(ov::shape_size(inputs[1].get_shape()));
} else if(input_element_type == ov::element::u8) {
parse_packed_strings(inputs[1], batch_size, begin_ids, end_ids, data);
} else {
OPENVINO_THROW("Unexpected input type during inference. SentencepieceTokenizer accepts element::u8 or element::string.");
}

#endif
Expand Down

0 comments on commit 2e0bd47

Please sign in to comment.