Deep learning libraries TensorFlow and PyTorch are commonly used for machine learning. TensorFlow was developed by Google and has a faster compilation time than Keras or PyTorch. It supports CPUs and GPUs and uses data flow graphs with nodes and edges. PyTorch was originally developed as a Python wrapper for Torch and is pythonic in nature with dynamic computation graphs. Both support tensor computations and automatic differentiation, with PyTorch having richer APIs but fewer built-in tools than TensorFlow.