-
Notifications
You must be signed in to change notification settings - Fork 422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TensorArray and ops::tensor_array_write* shorthand function are broken #358
Comments
I was able to work around this by manually creating outputs after using some reflection on the tensorflow objects to find the outputs then indexing the Outputs from the object (method table?)
however this does not close this issue. |
|
is there any plan for making Operation Output returns a little more ergonomic? I currently have to count the position of an Operation's Outputs then index it according to C++ documentation. I think I can write some bindgen for each output with .get_output_* methods but I am still learning the codebase. |
Can we close this with Operation instances? |
I will be referencing the following documentation:
https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/tensor-array
https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/tensor-array-write
as well as the following source code:
src/graph.rs @ line 1195 function get_attr_metadata and the following get_attr_*
src/ops/ops_impl @ line 123054 struct TensorArrayWriteV3 and the implementations
TensorArray is expected to return handle and flow according to the C++ API
These Output types are required for tensor_array_write (tensor_array_write_v3 in my case).
However, going through the source in graph.rs I can only read attributes as native type to recover these outputs, e.g.: &str and f32. TensorArrayV3,s constructor only returns one Output type.
tensor_array_write_v3() has all its generics set as into which is correct, but I cannot retrieve these outputs from the TensorArrayV3::build() constructor which only returns one Output type.
I have tried passing this Output type into tensor_array_write_v3 by cloning my TensorArray object for handle and flow parameters, hoping Tensorflow will associate the handle and flow attributes as Output types but this throws an internal error that is
for posterity, this is my function being developed and tested:
The text was updated successfully, but these errors were encountered: