Python – tensorflow.guarantee_const()
TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning neural networks.
guarantee_const() is used to assure TensorFlow runtime that input tensor is constant.
Syntax: tensorflow.guarantee_const( input, name)
- input: It is a Tensor.
- name(optional): It defines the name for the operation
Returns: It returns a Tensor same as input Tensor.
x: tf.Tensor(5, shape=(), dtype=int32)
y: tf.Tensor([2. 4.], shape=(2, ), dtype=float32)
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course