Ver Fonte

Removing pytorch from requirements.txt and setup

Jason Antic há 6 anos atrás
pai
commit
5867d017d8
3 ficheiros alterados com 20 adições e 3 exclusões
  1. 18 0
      DeOldify_colab.ipynb
  2. 1 2
      requirements.txt
  3. 1 1
      setup.py

+ 18 - 0
DeOldify_colab.ipynb

@@ -49,6 +49,24 @@
     "!git clone https://github.com/jantic/DeOldify.git DeOldify"
    ]
   },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "from os import path\n",
+    "from wheel.pep425tags import get_abbr_impl, get_impl_ver, get_abi_tag\n",
+    "platform = '{}{}-{}'.format(get_abbr_impl(), get_impl_ver(), get_abi_tag())\n",
+    "\n",
+    "accelerator = 'cu80' if path.exists('/opt/bin/nvidia-smi') else 'cpu'\n",
+    "\n",
+    "!pip install -q http://download.pytorch.org/whl/{accelerator}/torch-0.4.1-{platform}-linux_x86_64.whl torchvision\n",
+    "import torch\n",
+    "print(torch.__version__)\n",
+    "print(torch.cuda.is_available())"
+   ]
+  },
   {
    "cell_type": "code",
    "execution_count": null,

+ 1 - 2
requirements.txt

@@ -28,12 +28,11 @@ pandas>=0.20.3
 pexpect>=4.2.1
 pickleshare>=0.7.4
 Pillow==4.1.1
-prompt-toolkit>=1.0.15
+prompt-toolkit==2.0.0
 Pygments>=2.2.0
 pyparsing>=2.2.0
 pytest>=3.5.0
 python-dateutil>=2.6.1
-pytorch>=0.4.1
 pytz>=2017.2
 PyYAML>=3.12
 pyzmq>=16.0.2

+ 1 - 1
setup.py

@@ -21,7 +21,7 @@ setup(
       'ipykernel', 'ipython', 'ipython-genutils', 'ipywidgets', 'isoweek', 'jedi', 'Jinja2', 'jsonschema', 'jupyter',
       'MarkupSafe', 'matplotlib', 'numpy', 'opencv-python', 'pandas',
       'pandas_summary', 'pickleshare', 'Pillow', 'plotnine',
-      'pytorch', 'Pygments', 'pyparsing', 'python-dateutil', 'pytz', 'PyYAML', 'pyzmq', 'scipy',
+      'Pygments', 'pyparsing', 'python-dateutil', 'pytz', 'PyYAML', 'pyzmq', 'scipy',
       'seaborn', 'simplegeneric', 'sklearn_pandas', 'testpath', 'torchtext', 'torchvision', 'tornado', 'tqdm',
       'traitlets', 'wcwidth', 'webencodings', 'widgetsnbextension'],
     keywords = ['deeplearning', 'pytorch', 'machinelearning'],