Reputation: 757
I want to add a new tensor in an existing tensor as last column. With numpy I can use np.append()
, but I'm not sure how to do this on tensors in tensorflow. Any suggestion?
>> a = np.array([[1,2], [3,4], [5,6]])
>> b = np.array([[9], [99], [999]])
>> np.append(a, b, axis=1)
array([[ 1, 2, 9],
[ 3, 4, 99],
[ 5, 6, 999]])
in tensorflow..?
>> x = tf.constant([[1.0, 2.0], [3.0, 4.0], [5.0, 6.0]], tf.float32)
>> y = tf.constant([[9.0], [99.0], [999.0]], tf.float32)
>> ???
Upvotes: 1
Views: 1658