rust icon indicating copy to clipboard operation
rust copied to clipboard

Test for get_bool_list/set_bool_list

Open whereistejas opened this issue 4 years ago • 5 comments

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]

whereistejas avatar Jan 07 '21 18:01 whereistejas

Is there any way to create the custom operation in Python? I know python well-enough. I have never really used C++.

whereistejas avatar Jan 08 '21 06:01 whereistejas

You mean we will have to do something like this ?

whereistejas avatar Jan 08 '21 06:01 whereistejas

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.

adamcrume avatar Jan 16 '21 17:01 adamcrume

I have very limited knowledge in terms of tensorflow, but is there no way to bypass the use of C++, at all?

whereistejas avatar Jan 16 '21 17:01 whereistejas

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.

adamcrume avatar Jan 22 '21 04:01 adamcrume