Skip to content

Commit

Permalink
Add pytorch part.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mansterteddy committed Sep 10, 2020
1 parent 6920cbb commit cc7281f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pytorch/Basic/Tensor/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
There are two things that pytorch Tensors have that numpy arrays lack:
1. pytorch Tensors can live on either GPU or CPU (numpy is cpu-only);
2. pytorch can automatically track tensor computations to enable automatic differentiation;

5 changes: 5 additions & 0 deletions pytorch/Basic/Tensor/tensor.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import math
import numpy as np
import torch
from matplotlib import pyplot as plt

0 comments on commit cc7281f

Please sign in to comment.