Let's suppose that I have a matrix like this:
Where p, z are some variables to be optimized. This matrix is supposed to to take part in some heavy algebraic shenanigans and in the end I want only p and z to get their new values. That's it, all other elements in the matrix/tensor should remain constant.
Ideally I would like to do something like this:
p = tf.get_variable('p', ())
z = tf.get_variable('z', ())
m = tf.constant(matrix)
m[0,1] = p
m[1,1] = 2 * p
m[1,2] = z
m[2,1] = z - p
Unfortunately, such a point-wise operation seems to be impossible in a Tensorflow. Is there a workaround for this?