From c8bc4402508e5337388451082bdfeb98906ce770 Mon Sep 17 00:00:00 2001 From: panxl Date: Thu, 26 Oct 2023 16:05:41 -0500 Subject: [PATCH] Update --- .github/workflows/deploy.yml | 6 +++--- Lesson1_FNN.ipynb | 15 +++++++++++---- requirements.txt | 3 ++- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8a2c220..aee2a6e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,13 +13,13 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: [3.9] + python-version: [3.10] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 # Install dependencies - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/Lesson1_FNN.ipynb b/Lesson1_FNN.ipynb index 7e1e233..688ae0d 100644 --- a/Lesson1_FNN.ipynb +++ b/Lesson1_FNN.ipynb @@ -314,7 +314,7 @@ "torch.manual_seed(314)\n", "\n", "# Hyperparameters\n", - "batch_size = 8\n", + "batch_size = 32\n", "epochs = 1000\n", "learning_rate = 1e-2\n", "n_hidden = 20\n", @@ -426,7 +426,7 @@ }, { "cell_type": "code", - "execution_count": 74, + "execution_count": null, "metadata": { "id": "Ks_KCDRQ3tDk" }, @@ -484,7 +484,7 @@ "\n", "# Hyperparameters\n", "batch_size = 32\n", - "epochs = 1000\n", + "epochs = 500\n", "learning_rate = 1e-2\n", "n_hidden = 20\n", "\n", @@ -652,7 +652,7 @@ "torch.manual_seed(314)\n", "\n", "# Hyperparameters\n", - "batch_size = 8\n", + "batch_size = 32\n", "epochs = 1000\n", "learning_rate = 1e-3\n", "n_hidden = 20\n", @@ -685,6 +685,13 @@ "plot_contour_map(X, Y, Z_pred, title='(b) Predicted')\n", "plot_contour_map(X, Y, Z_diff, title='(c) Difference', levels=[-4, -2, 0, 2, 4])" ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { diff --git a/requirements.txt b/requirements.txt index 77c7c1c..9a57c27 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,9 @@ jupyter-book matplotlib +plotly numpy pandas -plotly torch lightning kora +--extra-index-url https://download.pytorch.org/whl/cpu