For the script:
import tensorflow as tf
class ZeroOutTest(tf.test.TestCase): zero_out_module = zero_out_module = tf.load_op_library('/Users/sahilsingla/tensorflow/bazel-bin/tensorflow/core/user_ops/zero_out.so') def testZeroOut(self): with self.test_session(): result = zero_out_module.zero_out([5, 4, 3, 2, 1]) value = result.eval() self.assertAllEqual(value, [5, 0, 0, 0, 0])
if name == "main": tf.test.main()
When I run: bazel test tensorflow/python/kernel_tests:zero_out_op_test
I get the error: tensorflow.python.framework.errors.NotFoundError: dlopen(zero_out.so, 6): image not found.
The funny thing is this does load when I do : python -c "import tensorflow as tf; zero_out_module = tf.load_op_library('/Users/sahilsingla/tensorflow/bazel-bin/tensorflow/core/user_ops/zero_out.so')" but doesn't load with bazel test.
Aucun commentaire:
Enregistrer un commentaire