nerdexam
Huawei

H13-311_V3.5 · Question #367

Which method is not supported in TensorFlow to define variables?

The correct answer is D. null. Why D is correct: TensorFlow does not support initializing variables with null - variables must have a defined initial value at creation time, as TensorFlow's computation graph requires concrete tensors with known types and shapes. Why the distractors are wrong: A (Random…

Deep Learning Basics

Question

Which method is not supported in TensorFlow to define variables?

Options

  • ARandom number
  • BConstant
  • CCalculated from the initial values of other variables
  • Dnull

How the community answered

(33 responses)
  • A
    15% (5)
  • B
    9% (3)
  • C
    3% (1)
  • D
    73% (24)

Explanation

Why D is correct: TensorFlow does not support initializing variables with null - variables must have a defined initial value at creation time, as TensorFlow's computation graph requires concrete tensors with known types and shapes.

Why the distractors are wrong:

  • A (Random number): Valid - tf.Variable(tf.random.normal([3,3])) is a standard pattern for initializing weights.
  • B (Constant): Valid - tf.Variable(tf.constant(1.0)) or simply tf.Variable(1.0) works fine.
  • C (Calculated from other variables): Valid - you can derive an initial value from existing variables using TensorFlow ops before passing the result to tf.Variable().

Memory tip: Think of TensorFlow variables like strongly-typed class fields in Java or C# - they need a concrete initial value (random, constant, or computed), not a null/undefined placeholder. If it's a real value, TF takes it; if it's nothing, TF won't accept it.

Topics

#TensorFlow#Variable Definition#Variable Initialization#Framework APIs

Community Discussion

No community discussion yet for this question.

Full H13-311_V3.5 Practice