|
67 | 67 | "outputs": [], |
68 | 68 | "source": [ |
69 | 69 | "# Install PyTorch\n", |
70 | | - "!conda install pytorch=1.10.0 torchvision cudatoolkit=11.1 -c pytorch\n", |
| 70 | + "!pip install torch==1.12.0 torchvision --extra-index-url https://download.pytorch.org/whl/cu113\n", |
71 | 71 | "# Install MMCV\n", |
72 | | - "!pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.10/index.html" |
| 72 | + "!pip install openmim\n", |
| 73 | + "!mim install mmcv-full==1.6.0" |
73 | 74 | ] |
74 | 75 | }, |
75 | 76 | { |
|
439 | 440 | "outputs": [], |
440 | 441 | "source": [ |
441 | 442 | "from mmseg.apis import set_random_seed\n", |
| 443 | + "from mmseg.utils import get_device\n", |
442 | 444 | "\n", |
443 | 445 | "# Since we use only one GPU, BN is used instead of SyncBN\n", |
444 | 446 | "cfg.norm_cfg = dict(type='BN', requires_grad=True)\n", |
|
526 | 528 | "cfg.seed = 0\n", |
527 | 529 | "set_random_seed(0, deterministic=False)\n", |
528 | 530 | "cfg.gpu_ids = range(1)\n", |
| 531 | + "cfg.device = get_device()\n", |
529 | 532 | "\n", |
530 | 533 | "# Let's have a look at the final config used for training\n", |
531 | 534 | "print(f'Config:\\n{cfg.pretty_text}')" |
|
618 | 621 | "provenance": [] |
619 | 622 | }, |
620 | 623 | "kernelspec": { |
621 | | - "display_name": "Python 3", |
| 624 | + "display_name": "Python 3.10.4 ('colab')", |
622 | 625 | "language": "python", |
623 | 626 | "name": "python3" |
624 | 627 | }, |
|
632 | 635 | "name": "python", |
633 | 636 | "nbconvert_exporter": "python", |
634 | 637 | "pygments_lexer": "ipython3", |
635 | | - "version": "3.7.0" |
| 638 | + "version": "3.10.4" |
636 | 639 | }, |
637 | 640 | "pycharm": { |
638 | 641 | "stem_cell": { |
|
642 | 645 | }, |
643 | 646 | "source": [] |
644 | 647 | } |
| 648 | + }, |
| 649 | + "vscode": { |
| 650 | + "interpreter": { |
| 651 | + "hash": "407d2a53ddc3f8f7c4edd35e4d9b95b1c1ccdf5b3711df67dd21487022baf36e" |
| 652 | + } |
645 | 653 | } |
646 | 654 | }, |
647 | 655 | "nbformat": 4, |
|
0 commit comments