Learn Before
Code
tf.constant()
In TensorFlow, the tf.constant() function creates a constant tensor from an array-like object, such as a NumPy array. During data preprocessing, this operation is commonly used to load numerical features and target values into TensorFlow's native format for model training.
0
1
Updated 2026-05-01
Tags
D2L
Dive into Deep Learning @ D2L