26 lines
325 B
Markdown
26 lines
325 B
Markdown
# pytorch install
|
|
|
|
## create venv
|
|
|
|
```bash
|
|
python -m venv ./.venv
|
|
source ./.venv/bin/activate
|
|
```
|
|
|
|
## install pytorch
|
|
> https://pytorch.org/get-started/locally/
|
|
|
|
```bash
|
|
pip install torch torchvision torchaudio
|
|
```
|
|
|
|
## test pytorch install
|
|
|
|
```python
|
|
import torch
|
|
x = torch.rand(5, 3)
|
|
print(x)
|
|
|
|
torch.cuda.is_available()
|
|
```
|