serizba / cppflow

Run TensorFlow models in C++ without installation and without Bazel
https://serizba.github.io/cppflow/
MIT License
788 stars 178 forks source link

add TString deallocation step #128

Closed dskkato closed 2 years ago

dskkato commented 3 years ago

When I compare TString usage in cppflow and tensorflow's unittest, it seems that deallocation step may be required. But I did not check actual implementation of TString, so if I am wrong, please let it go.

https://github.com/tensorflow/tensorflow/blob/2305f9d0a58921987788fbd1d8fa43eda888233f/tensorflow/core/platform/ctstring_test.cc#L34-L68

ljn917 commented 3 years ago

I believe this should be merged, though not tested. Thanks.

In addition, we also need to add test cases for the string typed tensor.

serizba commented 2 years ago

This solution does not work, as it deallocates before using the tensor.