float_ref here refers to a reference to float, i.e. your Tensorflow x floating variable.
As explained here , you encountered this error because you cannot simultaneously assign and transfer the variable as a file feed in the same session as you do in this statement:
val = s.run([calculate], {a: 1., b: 2., x: 0.})
This becomes more apparent when you resolve this statement in the end:
val = s.run([x.assign( a + b)], {a: 1., b: 2., x: 0.})
source share