Boolean as a model input #208
Answered
by
serizba
salehisaeed
asked this question in
Q&A
|
Hi all, I have a basic question regarding loading a trained model using CppFlow. So, my multi-input model should be called through: Any idea or help would be much appreciated. |
Answered by
serizba
Aug 2, 2022
Replies: 2 comments 8 replies
|
Hi @salehisaeed Perhaps the best way to get a bool tensor is to use cast: unsigned char mytensor = 0;
auto c = cppflow::tensor(mytensor);
cppflow::cast(mytensor, TF_UINT8, TF_BOOL); |
8 replies
Answer selected by
salehisaeed
|
@serizba, does it make sense to upstream the support of bool tensors with the overhead of extra copy? I can prepare PR. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @salehisaeed
Perhaps the best way to get a bool tensor is to use cast: