#!/usr/bin/python3
# Simple while loop
a = 0
while a < 15:
print(a, end=' ')
if a == 10:
print("made it to ten!!")
a = a + 1
print()
Hybrid Front-End
A new hybrid front-end provides ease-of-use and flexibility in eager mode, while seamlessly transitioning to graph mode for speed, optimization, and functionality in C++ runtime environments.
Distributed Training
Take advantage of native support for asynchronous execution of collective operations and peer-to-peer communication that is accessible from both Python and C++.
#!/usr/bin/python3
# Simple while loop
a = 0
while a < 15:
print(a, end=' ')
if a == 10:
print("made it to ten!!")
a = a + 1
print()
#!/usr/bin/python3
# Simple while loop
a = 0
while a < 15:
print(a, end=' ')
if a == 10:
print("made it to ten!!")
a = a + 1
print()
Python-First
Deep integration into Python allows popular libraries and packages to be used, while a new pure C++ interface (beta) enables performance-critical research.
Tools & Libraries
Access a rich ecosystem of tools and libraries to extend PyTorch and support development in areas from computer vision to reinforcement learning.
#!/usr/bin/python3
# Simple while loop
a = 0
while a < 15:
print(a, end=' ')
if a == 10:
print("made it to ten!!")
a = a + 1
print()
#!/usr/bin/python3
# Simple while loop
a = 0
while a < 15:
print(a, end=' ')
if a == 10:
print("made it to ten!!")
a = a + 1
print()
Native ONNX Support
Export models in the standard ONNX (Open Neural Network Exchange) format for direct access to ONNX-compatible platforms, runtimes, visualizers, and more.
Cloud Partners
Get up and running quickly with PyTorch through cloud platforms for training and inference.
#!/usr/bin/python3
# Simple while loop
a = 0
while a < 15:
print(a, end=' ')
if a == 10:
print("made it to ten!!")
a = a + 1
print()