how do I assign a value to a tensor in order to prevent this error: TypeError: 'RefVariable' object does not support item assignment?
问题 I have a function that has one two inputs and both of them are tensor. I need to do some processes on these inputs and then used the output in my network. one of these inputs is the output of the convolution layer and I do not know how do I solve this error! I put the function below: the below code implements this equation, G , C(u) and C(v) are numbers. enter image description here def DCT(a, b): for u in range(8): for v in range(8): for x in range(8): for y in range(8): b[u,v] = b[u, v] + 0