Python – tensorflow.DeviceSpec.from_string()
TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning neural networks.
from_string is used to generate DeviceSpec from string.
Syntax: tensorflow.DeviceSpec.from_string( spec )
- spec: It is a string of the form /job:/replica:/task:/device:CPU: or /job:/replica:/task:/device:GPU with all entries being optional.
Returns: It returns a DeviceSpec object generated by the string.
Device Spec: <tensorflow.python.framework.device_spec.DeviceSpecV2 object at 0x7fadb9428168>
Device Spec: <tensorflow.python.framework.device_spec.DeviceSpecV2 object at 0x7fadb9428228>
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