Skip to content

Commit

Permalink
Fix training notebook bug related to larger batch size
Browse files Browse the repository at this point in the history
  • Loading branch information
wigginno committed Jan 27, 2024
1 parent 2fc347e commit 6195f5d
Showing 1 changed file with 22 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "view-in-github"
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/github/fogg-lab/tissue-model-analysis-tools/blob/main/notebooks/microvessels_segmentation_training/train_binary_segmentation.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
Expand Down Expand Up @@ -39,7 +39,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
Expand Down Expand Up @@ -487,7 +487,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
Expand Down Expand Up @@ -554,7 +554,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {
"id": "ZsraYg1EH0iN"
},
Expand Down Expand Up @@ -586,7 +586,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"metadata": {
"id": "3hZ4rclKIItR"
},
Expand All @@ -608,7 +608,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"metadata": {
"id": "KBnYCIlVZDo3"
},
Expand Down Expand Up @@ -636,7 +636,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"metadata": {
"id": "LHtbr58qGY_u"
},
Expand Down Expand Up @@ -667,7 +667,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
Expand Down Expand Up @@ -722,7 +722,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"metadata": {
"id": "Fo6FQg9XMeUJ"
},
Expand Down Expand Up @@ -757,7 +757,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
Expand Down Expand Up @@ -790,7 +790,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
Expand Down Expand Up @@ -831,7 +831,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": null,
"metadata": {
"id": "fAZ_UNB2JbRr"
},
Expand All @@ -857,7 +857,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": null,
"metadata": {
"id": "qqr7yKMlMWfg"
},
Expand Down Expand Up @@ -904,7 +904,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": null,
"metadata": {
"id": "4XL-75mJMWmG"
},
Expand Down Expand Up @@ -935,7 +935,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
Expand Down Expand Up @@ -1046,7 +1046,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
Expand Down Expand Up @@ -1139,7 +1139,7 @@
],
"source": [
"X, y, _ = val_gen[1]\n",
"for i in range(batch_size):\n",
"for i in range(min(batch_size, len(X))):\n",
" fig, ax = plt.subplots(1, 2, figsize=(10, 5))\n",
" ax[0].imshow(X[i][:,:,0], cmap='gray')\n",
" ax[1].imshow(y[i][:,:,0], cmap='gray')\n",
Expand Down Expand Up @@ -1180,7 +1180,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
Expand Down Expand Up @@ -1496,8 +1496,8 @@
"accelerator": "GPU",
"colab": {
"gpuClass": "premium",
"include_colab_link": true,
"provenance": []
"provenance": [],
"include_colab_link": true
},
"gpuClass": "premium",
"kernelspec": {
Expand All @@ -1519,4 +1519,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}

0 comments on commit 6195f5d

Please sign in to comment.