rust
rust copied to clipboard
Test for get_bool_list/set_bool_list
Hi,
This is my first ever contribution to a rust project. Please, let me know if the code is lacking in any way.
While setting the boolean list attribute, I couldn't find/think of any attribute with a type of boolean list. So, right now, it is just given a random name attr1. Could you please suggest an appropriate attribute to use in its place?
Issue #289
Signed-off-by: Tejas Sanap [email protected]
Is there any way to create the custom operation in Python? I know python well-enough. I have never really used C++.
You mean we will have to do something like this ?
Yes, something like that would have to be done. Creating a custom op and using it is currently tricky, because it requires compiling C++ and loading a shared library. We do that for a different test elsewhere, but I would prefer a better implementation, because currently we're compiling the library manually and checking in a binary, which makes it difficult to make changes, is less safe, and causes cross-platform issues.
I'd prefer to do something like use https://crates.io/crates/cpp, but we'd have to make sure the TensorFlow headers are available, which likely requires adding it as a Git submodule.
I have very limited knowledge in terms of tensorflow, but is there no way to bypass the use of C++, at all?
As far as I'm aware, new ops can only be defined in C++. The Rust bindings rely on the C API (https://github.com/tensorflow/tensorflow/blob/master/tensorflow/c/c_api.h), and I don't see anything in there for defining new ops.