InterviewSolution
| 1. |
d) All of the above. |
|
Answer» Answer: 0, 1, 2 The RESULT will print 0 to 2. The variable is first defined using tf.Variable() and it is initialized with 0. Then in order to counter from the initial value, tf.assign() function is used. It TAKES two arguments – the reference_variable as 1st argument and value_to_update as a 2nd argument. Variables must be initialized by running an INITIALIZATION operation after having launched the graph. We first have to add the initialization operation to the graph. We then START a session to run the graph, first initialize the variables, then print the initial value of the state variable, and then run the operation of updating the state variable and printing the result after each update. |
|