Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Question: What is a TensorFlow variable and how is it different from a constant?
Answer: A TensorFlow variable is a mutable tensor that can be modified during program execution. Unlike constants, their values can be changed using operations like assign.

Example:

weight = tf.Variable(initial_value=tf.random_normal(shape=(input_size, output_size)))

Is it helpful? Yes No

Most helpful rated by users:

©2025 WithoutBook