Ask questionstf.strings.split bug
<em>Please make sure that this is a bug. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:bug_template</em>
You can collect some of this information using our environment capture
You can also obtain the TensorFlow version with: 1. TF 1.0:
python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)" 2. TF 2.0:
python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VERSION)"
Describe the current behavior AttributeError: 'tensorflow.python.framework.ops.EagerTensor' object has no attribute 'to_sparse' Describe the expected behavior The op should return SparseTensor or RaggedTensor Code to reproduce the issue Provide a reproducible test case that is the bare minimum necessary to generate the problem.
import tensorflow as tf tf.strings.split('a b')
Other info / logs Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.
Answer questions blairhan
You need brackets for the input. Try this:
c = tf.strings.split(['a b']) c.values