I have a tensor “idx” that is returned as the result of the code below. The code uses three other tensors called “result”, “theta”, and “user” which are all described by the output below. I’m very new to tensorflow and I’m trying to understand what idx is, the documentation is a little unclear on what shape=(1,) would be. Is it a vector, or a matrix? Is there a way to access the elements of idx? I tried idx[1], or idx[1,] but I get out of bound errors.
Any tips are greatly appreciated.
Code:
result
Output:
<tf.Tensor 'DVBPR_1/Add_2:0' shape=(1, 100) dtype=float32>
Code:
thetau
Output:
<tf.Variable 'DVBPR/Variable:0' shape=(20, 100) dtype=float32_ref>
Code:
user
Output:
<tf.Tensor 'Placeholder_3:0' shape=(1,) dtype=int32>
Code:
idx = tf.reduce_sum(tf.matmul(result,tf.transpose(tf.gather(thetau,user))),1)
idx
Output:
<tf.Tensor 'Sum_1:0' shape=(1,) dtype=float32>