-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
180 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,180 @@ | ||
{ | ||
"nbformat": 4, | ||
"nbformat_minor": 0, | ||
"metadata": { | ||
"colab": { | ||
"provenance": [], | ||
"authorship_tag": "ABX9TyNemOhSsYE1xA2E8N1PpX6x", | ||
"include_colab_link": true | ||
}, | ||
"kernelspec": { | ||
"name": "python3", | ||
"display_name": "Python 3" | ||
}, | ||
"language_info": { | ||
"name": "python" | ||
} | ||
}, | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": { | ||
"id": "view-in-github", | ||
"colab_type": "text" | ||
}, | ||
"source": [ | ||
"<a href=\"https://colab.research.google.com/github/Voyageran/StartNN/blob/main/DnCNN.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 4, | ||
"metadata": { | ||
"colab": { | ||
"base_uri": "https://localhost:8080/" | ||
}, | ||
"id": "V7Bg-FF7VaSG", | ||
"outputId": "62c2aa8c-1b08-405d-d4ac-710a2641e567" | ||
}, | ||
"outputs": [ | ||
{ | ||
"output_type": "stream", | ||
"name": "stdout", | ||
"text": [ | ||
"Mounted at /content/gdrive\n", | ||
"'/content/gdrive/MyDrive/Colab Notebooks/d2l' -> '/content/d2l'\n", | ||
"'/content/gdrive/MyDrive/Colab Notebooks/d2l/paddle.py' -> '/content/d2l/paddle.py'\n", | ||
"'/content/gdrive/MyDrive/Colab Notebooks/d2l/mxnet.py' -> '/content/d2l/mxnet.py'\n", | ||
"'/content/gdrive/MyDrive/Colab Notebooks/d2l/tensorflow.py' -> '/content/d2l/tensorflow.py'\n", | ||
"'/content/gdrive/MyDrive/Colab Notebooks/d2l/torch.py' -> '/content/d2l/torch.py'\n", | ||
"'/content/gdrive/MyDrive/Colab Notebooks/d2l/__init__.py' -> '/content/d2l/__init__.py'\n", | ||
"'/content/gdrive/MyDrive/Colab Notebooks/d2l/__pycache__' -> '/content/d2l/__pycache__'\n", | ||
"'/content/gdrive/MyDrive/Colab Notebooks/d2l/__pycache__/mxnet.cpython-310.pyc' -> '/content/d2l/__pycache__/mxnet.cpython-310.pyc'\n", | ||
"'/content/gdrive/MyDrive/Colab Notebooks/d2l/__pycache__/__init__.cpython-310.pyc' -> '/content/d2l/__pycache__/__init__.cpython-310.pyc'\n", | ||
"'/content/gdrive/MyDrive/Colab Notebooks/d2l/__pycache__/torch.cpython-310.pyc' -> '/content/d2l/__pycache__/torch.cpython-310.pyc'\n", | ||
"'/content/gdrive/MyDrive/Colab Notebooks/d2l/__pycache__/tensorflow.cpython-310.pyc' -> '/content/d2l/__pycache__/tensorflow.cpython-310.pyc'\n", | ||
"'/content/gdrive/MyDrive/Colab Notebooks/d2l/__pycache__/paddle.cpython-310.pyc' -> '/content/d2l/__pycache__/paddle.cpython-310.pyc'\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"import sys\n", | ||
"from google.colab import drive\n", | ||
"drive.mount('/content/gdrive')\n", | ||
"sys.path.insert(0,\"/content/content/notebooks/colabInstallPackage\")\n", | ||
"\n", | ||
"!cp -av '/content/gdrive/MyDrive/Colab Notebooks/d2l' '/content/'" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"source": [ | ||
"**AlexNet最大的问题**:不规则" | ||
], | ||
"metadata": { | ||
"id": "PiX5KA-WVdhS" | ||
} | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"source": [ | ||
"import torch\n", | ||
"import tensorflow as tf\n", | ||
"\n", | ||
"torch.__version__, tf.__version__" | ||
], | ||
"metadata": { | ||
"id": "7U0nmQO6VdMU", | ||
"colab": { | ||
"base_uri": "https://localhost:8080/" | ||
}, | ||
"outputId": "0b404a47-7e21-4348-8253-1ab845f5d00a" | ||
}, | ||
"execution_count": 19, | ||
"outputs": [ | ||
{ | ||
"output_type": "execute_result", | ||
"data": { | ||
"text/plain": [ | ||
"('2.0.1+cu118', '2.12.0')" | ||
] | ||
}, | ||
"metadata": {}, | ||
"execution_count": 19 | ||
} | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"source": [ | ||
"!git clone https://github.com/yjn870/DnCNN-pytorch.git" | ||
], | ||
"metadata": { | ||
"colab": { | ||
"base_uri": "https://localhost:8080/" | ||
}, | ||
"id": "Q2eepCLaSTdH", | ||
"outputId": "390ee656-8c6c-4ad0-fdfa-e5c43f58ff9c" | ||
}, | ||
"execution_count": 20, | ||
"outputs": [ | ||
{ | ||
"output_type": "stream", | ||
"name": "stdout", | ||
"text": [ | ||
"Cloning into 'DnCNN-pytorch'...\n", | ||
"remote: Enumerating objects: 23, done.\u001b[K\n", | ||
"remote: Total 23 (delta 0), reused 0 (delta 0), pack-reused 23\u001b[K\n", | ||
"Receiving objects: 100% (23/23), 4.18 MiB | 34.25 MiB/s, done.\n", | ||
"Resolving deltas: 100% (4/4), done.\n" | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"source": [ | ||
"!pip install tensorboardX" | ||
], | ||
"metadata": { | ||
"id": "dgbNVb0JSiss" | ||
}, | ||
"execution_count": null, | ||
"outputs": [] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"source": [], | ||
"metadata": { | ||
"colab": { | ||
"base_uri": "https://localhost:8080/" | ||
}, | ||
"id": "jdjKslmiTf7Z", | ||
"outputId": "8bbba824-245f-4aaf-d6f0-e7c0ec3ac7fc" | ||
}, | ||
"execution_count": 25, | ||
"outputs": [ | ||
{ | ||
"output_type": "stream", | ||
"name": "stdout", | ||
"text": [ | ||
"Collecting tensorboardX\n", | ||
" Downloading tensorboardX-2.6.1-py2.py3-none-any.whl (101 kB)\n", | ||
"\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/101.6 kB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K \u001b[91m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[90m╺\u001b[0m\u001b[90m━━━\u001b[0m \u001b[32m92.2/101.6 kB\u001b[0m \u001b[31m3.3 MB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m\r\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m101.6/101.6 kB\u001b[0m \u001b[31m2.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", | ||
"\u001b[?25hRequirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from tensorboardX) (1.22.4)\n", | ||
"Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from tensorboardX) (23.1)\n", | ||
"Collecting protobuf>=4.22.3 (from tensorboardX)\n", | ||
" Downloading protobuf-4.23.4-cp37-abi3-manylinux2014_x86_64.whl (304 kB)\n", | ||
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m304.5/304.5 kB\u001b[0m \u001b[31m9.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", | ||
"\u001b[?25hInstalling collected packages: protobuf, tensorboardX\n", | ||
" Attempting uninstall: protobuf\n", | ||
" Found existing installation: protobuf 3.20.3\n", | ||
" Uninstalling protobuf-3.20.3:\n", | ||
" Successfully uninstalled protobuf-3.20.3\n", | ||
"Successfully installed protobuf-4.23.4 tensorboardX-2.6.1\n" | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |