The factory functions you'll use every day
TF gives you a small but complete set of constructors. Knowing which to reach for saves both code and bugs.
tf.constant creates an immutable tensor from any Python value, list, or NumPy array. tf.zeros, tf.ones, tf.fill create tensors of fixed values for initialization. tf.eye gives you an identity matrix. tf.range gives you a sequence (like Python's range). The *_like variants — tf.zeros_like, tf.ones_like — match another tensor's shape and dtype, which prevents an entire category of bugs.
For weight initialization, you almost always want tf.random.truncated_normal rather than tf.random.normal — the truncated version clips outliers beyond 2σ, which prevents unstable initial gradients without biasing the mean.
tf.random.set_seed(42) at the top of any script you want to be deterministic. For graph-mode reproducibility (under @tf.function), use tf.random.stateless_normal with an explicit seed=[a, b] argument — global state is unreliable inside compiled graphs.