tensor::get_data<bool>() call fails. Because internally it calls deduce_tf_type(), but here for bool type TF_BOOL is never returned because of the preceding if block
template<typename T>
TF_DataType deduce_tf_type() {
// ...
// As std::is_same<unsigned char, uint8_t>::value is true this condition becomes true here.
if (std::is_same<T, uint8_t>::value)
return TF_UINT8;
// ...
// This if condition NEVER executes because of the condition above
if (std::is_same<T, unsigned char>::value)
return TF_BOOL;
// ...
tensor::get_data<bool>()
call fails. Because internally it callsdeduce_tf_type()
, but here forbool
type TF_BOOL is never returned because of the precedingif
blockThis line
Changing it to the following works for me (for inference),
Thanks for looking into it.