-
Notifications
You must be signed in to change notification settings - Fork 74k
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
Invoke get_shape() on sparse_tensor leads to feeding error #13639
Comments
The issue is that @ebrevdo, what do you think the best way of solving this is? Perhaps in the |
I'm wary of changing the SparseTensor api. what if you create 3 placeholders and create a SparseTensor from them. does this work? |
The API would not change, except that calling 3 placeholders would work (that's what |
It has been 14 days with no activity and the |
1 similar comment
It has been 14 days with no activity and the |
A member of the TensorFlow organization has replied after the stat:awaiting tensorflower label was applied. |
Assigning to @reedwm since he's already analyzed the exact problem, and seems to have a reasonable proposed fix. That said, I don't know the details here. |
I don't know enough about SparseTensor to fix this, or currently have time to look into it. Assigning to @ebrevdo for now. |
You can run sess.run(x, feed_dict={x.indices: indices, x.values: values}) without breaking shape semantics, right? |
Yes, that works, because the shape is not fed. |
Nagging Assignee: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly. |
OK great; closing. |
I have the same problem too. |
BY the way. tensorflow is really full of bugs itself, which is nothing comparable to pytorch. |
@xChenSky x = tf.sparse_placeholder(tf.float32) # work
x = tf.sparse_placeholder(tf.float32, shape=shape) # not work |
Imported from GitHub PR openxla/xla#13639 Resolves a use-after-free when matching and rewriting layer norm patterns. See #13606. Copybara import of the project: -- 91ebf7b4a2ac90ebadce27d1a73e88fb4513aed4 by Philipp Hack <phack@nvidia.com>: Resolves a use-after-free in the norm rewriter. Merging this change closes #13639 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#13639 from philipphack:u_layer_uaf_xla 91ebf7b4a2ac90ebadce27d1a73e88fb4513aed4 PiperOrigin-RevId: 642447222
Imported from GitHub PR openxla/xla#13639 Resolves a use-after-free when matching and rewriting layer norm patterns. See #13606. Copybara import of the project: -- 91ebf7b4a2ac90ebadce27d1a73e88fb4513aed4 by Philipp Hack <phack@nvidia.com>: Resolves a use-after-free in the norm rewriter. Merging this change closes #13639 PiperOrigin-RevId: 642548037
If I invoke get_shape method on sparse_tensor, the shape tensor will be added into the _unfeedable_tensors set of the current graph. Then when I feed the sparse tensor, an error occurs.
The codes below show this error
The stacktrace
System information
I do not think this bug is related to my environment.
== cat /etc/issue ===============================================
Darwin liqimaideMacBook-Pro.local 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
Mac OS X 10.12.6
== are we in docker =============================================
No
== compiler =====================================================
Apple LLVM version 9.0.0 (clang-900.0.37)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
== uname -a =====================================================
Darwin MacBook-Pro.local 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
== check pips ===================================================
numpy (1.11.3)
protobuf (3.2.0)
tensorflow (1.0.0)
== check for virtualenv =========================================
False
== tensorflow import ============================================
tf.VERSION = 1.0.0
tf.GIT_VERSION = v1.0.0-rc2-15-g47bba63-dirty
tf.COMPILER_VERSION = v1.0.0-rc2-15-g47bba63-dirty
Sanity check: array([1], dtype=int32)
== env ==========================================================
LD_LIBRARY_PATH is unset
DYLD_LIBRARY_PATH is unset
== nvidia-smi ===================================================
tf_env_collect.sh: line 105: nvidia-smi: command not found
== cuda libs ===================================================
The text was updated successfully, but these errors were encountered: