Procházet zdrojové kódy

Cleanup Colab

- Removed unsed imports
- Removed misleading information
Alexandre Vicenzi před 6 roky
rodič
revize
2f49b8383f
1 změnil soubory, kde provedl 9 přidání a 7 odebrání
  1. 9 7
      ImageColorizerColab.ipynb

+ 9 - 7
ImageColorizerColab.ipynb

@@ -59,8 +59,10 @@
    },
    "outputs": [],
    "source": [
-    "from os import path\n",
-    "import torch"
+    "import torch\n",
+    "\n",
+    "if not torch.cuda.is_available():\n",
+    "    print('GPU not available.')"
    ]
   },
   {
@@ -130,8 +132,8 @@
    "source": [
     "import fastai\n",
     "from fasterai.visualize import *\n",
-    "from pathlib import Path\n",
-    "torch.backends.cudnn.benchmark=True"
+    "\n",
+    "torch.backends.cudnn.benchmark = True"
    ]
   },
   {
@@ -181,11 +183,11 @@
     "Simply right click on the displayed image and click \"Save image as...\"!\n",
     "\n",
     "## Pro Tips\n",
-    "1. You can evaluate how well the image is rendered at each render_factor by using the code at the bottom (that cell under \"See how well render_factor values perform on a frame here\"). \n",
-    "2. Keep in mind again that you can go up top and set artistic to False for the colorizer to use the 'Stable' model instead.  This will often tend to do better on portraits, and natural landscapes.  \n",
+    "\n",
+    "You can evaluate how well the image is rendered at each render_factor by using the code at the bottom (that cell under \"See how well render_factor values perform on a frame here\"). \n",
     "\n",
     "## Troubleshooting\n",
-    "If you get a 'CUDA out of memory' error, you probably have the render_factor too high.  The max is 45 on 11GB video cards."
+    "If you get a 'CUDA out of memory' error, you probably have the render_factor too high."
    ]
   },
   {