<s>
PyTorch	B-Algorithm
is	O
a	O
machine	O
learning	O
framework	B-Architecture
based	O
on	O
the	O
Torch	B-Algorithm
library	B-Library
,	O
used	O
for	O
applications	O
such	O
as	O
computer	B-Application
vision	I-Application
and	O
natural	B-Language
language	I-Language
processing	I-Language
,	O
originally	O
developed	O
by	O
Meta	O
AI	O
and	O
now	O
part	O
of	O
the	B-Operating_System
Linux	I-Operating_System
Foundation	I-Operating_System
umbrella	O
.	O
</s>
<s>
It	O
is	O
free	B-License
and	I-License
open-source	I-License
software	I-License
released	O
under	O
the	O
modified	O
BSD	O
license	O
.	O
</s>
<s>
Although	O
the	O
Python	B-Language
interface	O
is	O
more	O
polished	O
and	O
the	O
primary	O
focus	O
of	O
development	O
,	O
PyTorch	B-Algorithm
also	O
has	O
a	O
C++	B-Language
interface	O
.	O
</s>
<s>
A	O
number	O
of	O
pieces	O
of	O
deep	B-Algorithm
learning	I-Algorithm
software	O
are	O
built	O
on	O
top	O
of	O
PyTorch	B-Algorithm
,	O
including	O
Tesla	O
Autopilot	O
,	O
Uber	B-Application
's	O
Pyro	O
,	O
Hugging	O
Face	O
's	O
Transformers	O
,	O
PyTorch	B-Library
Lightning	I-Library
,	O
and	O
Catalyst	O
.	O
</s>
<s>
PyTorch	B-Algorithm
provides	O
two	O
high-level	O
features	O
:	O
</s>
<s>
Meta	O
(	O
formerly	O
known	O
as	O
Facebook	O
)	O
operates	O
both	O
PyTorch	B-Algorithm
and	O
Convolutional	O
Architecture	O
for	O
Fast	O
Feature	O
Embedding	O
(	O
Caffe2	B-Algorithm
)	O
,	O
but	O
models	O
defined	O
by	O
the	O
two	O
frameworks	O
were	O
mutually	O
incompatible	O
.	O
</s>
<s>
The	O
Open	B-Application
Neural	I-Application
Network	I-Application
Exchange	I-Application
(	O
ONNX	B-Application
)	O
project	O
was	O
created	O
by	O
Meta	O
and	O
Microsoft	O
in	O
September	O
2017	O
for	O
converting	O
models	O
between	O
frameworks	O
.	O
</s>
<s>
Caffe2	B-Algorithm
was	O
merged	O
into	O
PyTorch	B-Algorithm
at	O
the	O
end	O
of	O
March	O
2018	O
.	O
</s>
<s>
In	O
September	O
2022	O
,	O
Meta	O
announced	O
that	O
PyTorch	B-Algorithm
would	O
be	O
governed	O
by	O
PyTorch	B-Algorithm
Foundation	O
,	O
a	O
newly	O
created	O
independent	O
organizationa	O
subsidiary	O
of	O
Linux	B-Operating_System
Foundation	I-Operating_System
.	O
</s>
<s>
PyTorch	B-Algorithm
2.0	O
has	O
been	O
released	O
on	O
15	O
March	O
2023	O
.	O
</s>
<s>
PyTorch	B-Algorithm
defines	O
a	O
class	O
called	O
Tensor	B-Device
(	O
torch.Tensor	O
)	O
to	O
store	O
and	O
operate	O
on	O
homogeneous	O
multidimensional	O
rectangular	O
arrays	O
of	O
numbers	O
.	O
</s>
<s>
PyTorch	B-Algorithm
Tensors	B-Device
are	O
similar	O
to	O
NumPy	B-Application
Arrays	O
,	O
but	O
can	O
also	O
be	O
operated	O
on	O
a	O
CUDA-capable	O
NVIDIA	O
GPU	B-Architecture
.	O
</s>
<s>
PyTorch	B-Algorithm
has	O
also	O
been	O
developing	O
support	O
for	O
other	O
GPU	B-Architecture
platforms	O
,	O
for	O
example	O
,	O
AMD	O
's	O
ROCm	B-Operating_System
and	O
Apple	O
's	O
Metal	B-Library
Framework	I-Library
.	I-Library
</s>
<s>
PyTorch	B-Algorithm
supports	O
various	O
sub-types	O
of	O
Tensors	B-Device
.	O
</s>
<s>
Note	O
that	O
the	O
term	O
"	O
tensor	B-Device
"	O
here	O
does	O
not	O
carry	O
the	O
same	O
meaning	O
as	O
tensor	B-Device
in	O
mathematics	O
or	O
physics	O
.	O
</s>
<s>
The	O
meaning	O
of	O
the	O
word	O
in	O
those	O
areas	O
,	O
that	O
is	O
,	O
a	O
certain	O
kind	O
of	O
object	O
in	O
linear	B-Language
algebra	I-Language
,	O
is	O
only	O
tangentially	O
related	O
to	O
the	O
one	O
in	O
Machine	O
Learning	O
.	O
</s>
<s>
PyTorch	B-Algorithm
uses	O
a	O
method	O
called	O
automatic	B-Algorithm
differentiation	I-Algorithm
.	O
</s>
<s>
torch.optim	O
is	O
a	O
module	O
that	O
implements	O
various	O
optimization	O
algorithms	O
used	O
for	O
building	O
neural	O
networks	O
.	O
</s>
<s>
PyTorch	B-Algorithm
autograd	O
makes	O
it	O
easy	O
to	O
define	O
computational	O
graphs	O
and	O
take	O
gradients	O
,	O
but	O
raw	O
autograd	O
can	O
be	O
a	O
bit	O
too	O
low-level	O
for	O
defining	O
complex	O
neural	O
networks	O
.	O
</s>
<s>
PyTorch	B-Algorithm
also	O
contains	O
many	O
other	O
useful	O
submodules	O
such	O
as	O
data	O
loading	O
utilities	O
and	O
distributed	O
training	O
functions	O
.	O
</s>
