1
0
This commit is contained in:
2024-06-03 13:00:25 +08:00
parent 2d1957b8c7
commit 14a3489609
4 changed files with 13 additions and 8 deletions

View File

@@ -12,7 +12,15 @@ conda activate pt
# 安装 pytorch v1.12版本已经正式支持了用于mac m1芯片gpu加速的mps后端
conda install pytorch::pytorch torchvision torchaudio -c pytorch -y
pip install -r requirements
pip install -r requirements.txt
```
## MAC
```shell
# 安装 pytorch v1.12版本已经正式支持了用于mac m1芯片gpu加速的mps后端
conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia
pip install -r requirements.txt
```
## gpt4free

View File

@@ -42,7 +42,7 @@ def run():
learning_rate = 0.0001
initial_b = 0.0
initial_w = 0.0
num_iterations = 100000
num_iterations = 5000
[b, w] = gradient_descent_runner(points, initial_b, initial_w, learning_rate, num_iterations)
print("After gradient descent at b={0},w={1},error={2}".format(b.item(), w.item(),
compute_error_for_line_given_points(b, w, points)))

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 35 KiB

View File

@@ -1,7 +1,4 @@
pytorch::pytorch
torchvision
torchaudio
pandas
matplotlib
numpy
pillow
pandas
pillow
matplotlib