Skip to content

Commit

Permalink
[Fix] Fix colab mmcv installation (#1779)
Browse files Browse the repository at this point in the history
* fix mmcv installation

* add torch version and mmcv version

* fix typo
  • Loading branch information
xiexinch authored Jul 15, 2022
1 parent 0e37281 commit 336435b
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions demo/MMSegmentation_Tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,10 @@
"outputs": [],
"source": [
"# Install PyTorch\n",
"!conda install pytorch=1.10.0 torchvision cudatoolkit=11.1 -c pytorch\n",
"!pip install torch==1.12.0 torchvision --extra-index-url https://download.pytorch.org/whl/cu113\n",
"# Install MMCV\n",
"!pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.10/index.html"
"!pip install openmim\n",
"!mim install mmcv-full==1.6.0"
]
},
{
Expand Down Expand Up @@ -439,6 +440,7 @@
"outputs": [],
"source": [
"from mmseg.apis import set_random_seed\n",
"from mmseg.utils import get_device\n",
"\n",
"# Since we use only one GPU, BN is used instead of SyncBN\n",
"cfg.norm_cfg = dict(type='BN', requires_grad=True)\n",
Expand Down Expand Up @@ -526,6 +528,7 @@
"cfg.seed = 0\n",
"set_random_seed(0, deterministic=False)\n",
"cfg.gpu_ids = range(1)\n",
"cfg.device = get_device()\n",
"\n",
"# Let's have a look at the final config used for training\n",
"print(f'Config:\\n{cfg.pretty_text}')"
Expand Down Expand Up @@ -618,7 +621,7 @@
"provenance": []
},
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3.10.4 ('colab')",
"language": "python",
"name": "python3"
},
Expand All @@ -632,7 +635,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.0"
"version": "3.10.4"
},
"pycharm": {
"stem_cell": {
Expand All @@ -642,6 +645,11 @@
},
"source": []
}
},
"vscode": {
"interpreter": {
"hash": "407d2a53ddc3f8f7c4edd35e4d9b95b1c1ccdf5b3711df67dd21487022baf36e"
}
}
},
"nbformat": 4,
Expand Down

0 comments on commit 336435b

Please sign in to comment.