Given a tensor of the form
T = tf.placeholder(tf.float32, [None, 2])
How can I separate T into two separate tensors of shape (?, 1), one for each column?
You can slice out tensors using python's slice notation.
x = T[:, 0, None]
y = T[:, 1, None]
Internally, this delegates to Tensor.__getitem__, and is evaluated as part of the graph.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With