-
-
Save altbridgetech/c2a00c0d7a8416885ee1a064d3c77d6e to your computer and use it in GitHub Desktop.
TensorRT-tar-installation
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
{ | |
"nbformat": 4, | |
"nbformat_minor": 0, | |
"metadata": { | |
"accelerator": "GPU", | |
"colab": { | |
"name": "TensorRT-mnist.ipynb のコピー", | |
"provenance": [], | |
"collapsed_sections": [] | |
}, | |
"kernelspec": { | |
"display_name": "Python 3", | |
"name": "python3" | |
} | |
}, | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "RtLo0sRUBfiP", | |
"outputId": "b09c82e9-1fff-4208-b370-8f6a8a75c5d4" | |
}, | |
"source": [ | |
"from google.colab import drive\n", | |
"drive.mount('/content/drive')" | |
], | |
"execution_count": 1, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"text": [ | |
"Mounted at /content/drive\n" | |
], | |
"name": "stdout" | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "GPA7v2LStv-u", | |
"outputId": "4f4e4221-45c2-4c40-b276-00d3c9c116f3" | |
}, | |
"source": [ | |
"!nvidia-smi" | |
], | |
"execution_count": 2, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"text": [ | |
"Mon Jul 12 08:45:53 2021 \n", | |
"+-----------------------------------------------------------------------------+\n", | |
"| NVIDIA-SMI 470.42.01 Driver Version: 460.32.03 CUDA Version: 11.2 |\n", | |
"|-------------------------------+----------------------+----------------------+\n", | |
"| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |\n", | |
"| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |\n", | |
"| | | MIG M. |\n", | |
"|===============================+======================+======================|\n", | |
"| 0 Tesla K80 Off | 00000000:00:04.0 Off | 0 |\n", | |
"| N/A 31C P8 30W / 149W | 0MiB / 11441MiB | 0% Default |\n", | |
"| | | N/A |\n", | |
"+-------------------------------+----------------------+----------------------+\n", | |
" \n", | |
"+-----------------------------------------------------------------------------+\n", | |
"| Processes: |\n", | |
"| GPU GI CI PID Type Process name GPU Memory |\n", | |
"| ID ID Usage |\n", | |
"|=============================================================================|\n", | |
"| No running processes found |\n", | |
"+-----------------------------------------------------------------------------+\n" | |
], | |
"name": "stdout" | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "6giQEmtzIDUi", | |
"outputId": "01cc5a76-4e91-49c1-aa69-8b2bf1454505" | |
}, | |
"source": [ | |
"!cat /etc/issue\n", | |
"!nvcc -V\n", | |
"!python -V\n", | |
"!dpkg -l | grep \"cudnn\"" | |
], | |
"execution_count": 4, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"text": [ | |
"Ubuntu 18.04.5 LTS \\n \\l\n", | |
"\n", | |
"nvcc: NVIDIA (R) Cuda compiler driver\n", | |
"Copyright (c) 2005-2020 NVIDIA Corporation\n", | |
"Built on Wed_Jul_22_19:09:09_PDT_2020\n", | |
"Cuda compilation tools, release 11.0, V11.0.221\n", | |
"Build cuda_11.0_bu.TC445_37.28845127_0\n", | |
"Python 3.7.10\n", | |
"ii libcudnn7 7.6.5.32-1+cuda10.1 amd64 cuDNN runtime libraries\n", | |
"ii libcudnn7-dev 7.6.5.32-1+cuda10.1 amd64 cuDNN development libraries and headers\n", | |
"hi libcudnn8 8.0.4.30-1+cuda11.0 amd64 cuDNN runtime libraries\n", | |
"ii libcudnn8-dev 8.0.4.30-1+cuda11.0 amd64 cuDNN development libraries and headers\n" | |
], | |
"name": "stdout" | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "_mf7jAur3GgO" | |
}, | |
"source": [ | |
"!tar -zxf /content/drive/MyDrive/TensorRT/TensorRT-7.2.2.3.Ubuntu-18.04.x86_64-gnu.cuda-11.0.cudnn8.0.tar.gz" | |
], | |
"execution_count": 5, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "tJMSqBCSrnYB", | |
"outputId": "de7096ca-b792-4435-eddb-255e864b9cde" | |
}, | |
"source": [ | |
"%cd /content/TensorRT-7.2.2.3/python\n", | |
"!sudo pip3 install tensorrt-7.2.2.3-cp37-none-linux_x86_64.whl" | |
], | |
"execution_count": 6, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"text": [ | |
"/content/TensorRT-7.2.2.3/python\n", | |
"Processing ./tensorrt-7.2.2.3-cp37-none-linux_x86_64.whl\n", | |
"Installing collected packages: tensorrt\n", | |
"Successfully installed tensorrt-7.2.2.3\n" | |
], | |
"name": "stdout" | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "vdARGeubrEeO", | |
"outputId": "417929ea-7a3a-4f10-8dd8-090bf72a9800" | |
}, | |
"source": [ | |
"%cd /content/TensorRT-7.2.2.3/uff\n", | |
"!sudo pip3 install uff-0.6.9-py2.py3-none-any.whl" | |
], | |
"execution_count": 7, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"text": [ | |
"/content/TensorRT-7.2.2.3/uff\n", | |
"Processing ./uff-0.6.9-py2.py3-none-any.whl\n", | |
"Requirement already satisfied: numpy>=1.11.0 in /usr/local/lib/python3.7/dist-packages (from uff==0.6.9) (1.19.5)\n", | |
"Requirement already satisfied: protobuf>=3.3.0 in /usr/local/lib/python3.7/dist-packages (from uff==0.6.9) (3.17.3)\n", | |
"Requirement already satisfied: six>=1.9 in /usr/local/lib/python3.7/dist-packages (from protobuf>=3.3.0->uff==0.6.9) (1.15.0)\n", | |
"Installing collected packages: uff\n", | |
"Successfully installed uff-0.6.9\n" | |
], | |
"name": "stdout" | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "SCo2T3TtrULp", | |
"outputId": "2020fc44-d335-4163-be97-0750fe74efd5" | |
}, | |
"source": [ | |
"%cd /content/TensorRT-7.2.2.3/graphsurgeon/\n", | |
"!sudo pip3 install graphsurgeon-0.4.5-py2.py3-none-any.whl" | |
], | |
"execution_count": 8, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"text": [ | |
"/content/TensorRT-7.2.2.3/graphsurgeon\n", | |
"Processing ./graphsurgeon-0.4.5-py2.py3-none-any.whl\n", | |
"Installing collected packages: graphsurgeon\n", | |
"Successfully installed graphsurgeon-0.4.5\n" | |
], | |
"name": "stdout" | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "YxfAXY8QrikE", | |
"outputId": "8ece264f-8720-4c07-a70b-6ef1d154b71c" | |
}, | |
"source": [ | |
"%cd /content/TensorRT-7.2.2.3/onnx_graphsurgeon/\n", | |
"!sudo pip3 install onnx_graphsurgeon-0.2.6-py2.py3-none-any.whl" | |
], | |
"execution_count": 9, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"text": [ | |
"/content/TensorRT-7.2.2.3/onnx_graphsurgeon\n", | |
"Processing ./onnx_graphsurgeon-0.2.6-py2.py3-none-any.whl\n", | |
"Requirement already satisfied: numpy in /usr/local/lib/python3.7/dist-packages (from onnx-graphsurgeon==0.2.6) (1.19.5)\n", | |
"Collecting onnx\n", | |
"\u001b[?25l Downloading https://files.pythonhosted.org/packages/3f/9b/54c950d3256e27f970a83cd0504efb183a24312702deed0179453316dbd0/onnx-1.9.0-cp37-cp37m-manylinux2010_x86_64.whl (12.2MB)\n", | |
"\u001b[K |████████████████████████████████| 12.2MB 180kB/s \n", | |
"\u001b[?25hRequirement already satisfied: protobuf in /usr/local/lib/python3.7/dist-packages (from onnx->onnx-graphsurgeon==0.2.6) (3.17.3)\n", | |
"Requirement already satisfied: six in /usr/local/lib/python3.7/dist-packages (from onnx->onnx-graphsurgeon==0.2.6) (1.15.0)\n", | |
"Requirement already satisfied: typing-extensions>=3.6.2.1 in /usr/local/lib/python3.7/dist-packages (from onnx->onnx-graphsurgeon==0.2.6) (3.7.4.3)\n", | |
"Installing collected packages: onnx, onnx-graphsurgeon\n", | |
"Successfully installed onnx-1.9.0 onnx-graphsurgeon-0.2.6\n" | |
], | |
"name": "stdout" | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "vLMYK4W6rt_e", | |
"outputId": "ef5eb702-ff89-4cde-c322-893839e71f7c" | |
}, | |
"source": [ | |
"%cd /content/TensorRT-7.2.2.3/samples/python/network_api_pytorch_mnist/\n", | |
"!python3 -m pip install -r requirements.txt" | |
], | |
"execution_count": 10, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"text": [ | |
"/content/TensorRT-7.2.2.3/samples/python/network_api_pytorch_mnist\n", | |
"Ignoring torch: markers 'python_version == \"2.7\" and platform_machine == \"x86_64\" and sys_platform == \"linux2\"' don't match your environment\n", | |
"Ignoring torchvision: markers 'python_version == \"2.7\" and platform_machine == \"x86_64\" and sys_platform == \"linux2\"' don't match your environment\n", | |
"Looking in links: https://download.pytorch.org/whl/torch_stable.html\n", | |
"Requirement already satisfied: numpy in /usr/local/lib/python3.7/dist-packages (from -r requirements.txt (line 1)) (1.19.5)\n", | |
"Collecting torch==1.5.0+cpu\n", | |
"\u001b[?25l Downloading https://download.pytorch.org/whl/cpu/torch-1.5.0%2Bcpu-cp37-cp37m-linux_x86_64.whl (127.3MB)\n", | |
"\u001b[K |████████████████████████████████| 127.3MB 45kB/s \n", | |
"\u001b[?25hCollecting torchvision==0.6.0\n", | |
"\u001b[?25l Downloading https://download.pytorch.org/whl/cu92/torchvision-0.6.0%2Bcu92-cp37-cp37m-linux_x86_64.whl (6.5MB)\n", | |
"\u001b[K |████████████████████████████████| 6.5MB 3.2MB/s \n", | |
"\u001b[?25hCollecting Pillow==6.2.2\n", | |
"\u001b[?25l Downloading https://files.pythonhosted.org/packages/c3/3f/03375124676ab49ca6e6917c0f1f663afb8354d5d24e12f4fe4587a39ae2/Pillow-6.2.2-cp37-cp37m-manylinux1_x86_64.whl (2.1MB)\n", | |
"\u001b[K |████████████████████████████████| 2.1MB 5.2MB/s \n", | |
"\u001b[?25hCollecting pycuda\n", | |
"\u001b[?25l Downloading https://files.pythonhosted.org/packages/5a/56/4682a5118a234d15aa1c8768a528aac4858c7b04d2674e18d586d3dfda04/pycuda-2021.1.tar.gz (1.7MB)\n", | |
"\u001b[K |████████████████████████████████| 1.7MB 17.8MB/s \n", | |
"\u001b[?25h Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n", | |
" Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n", | |
" Preparing wheel metadata ... \u001b[?25l\u001b[?25hdone\n", | |
"Requirement already satisfied: future in /usr/local/lib/python3.7/dist-packages (from torch==1.5.0+cpu->-r requirements.txt (line 3)) (0.16.0)\n", | |
"Requirement already satisfied: appdirs>=1.4.0 in /usr/local/lib/python3.7/dist-packages (from pycuda->-r requirements.txt (line 8)) (1.4.4)\n", | |
"Collecting pytools>=2011.2\n", | |
"\u001b[?25l Downloading https://files.pythonhosted.org/packages/52/26/c7ab098ceb4e4e3f0e66e21257a286bb455ea22af7afefbd704d9ccf324c/pytools-2021.2.7.tar.gz (63kB)\n", | |
"\u001b[K |████████████████████████████████| 71kB 7.8MB/s \n", | |
"\u001b[?25hCollecting mako\n", | |
"\u001b[?25l Downloading https://files.pythonhosted.org/packages/f3/54/dbc07fbb20865d3b78fdb7cf7fa713e2cba4f87f71100074ef2dc9f9d1f7/Mako-1.1.4-py2.py3-none-any.whl (75kB)\n", | |
"\u001b[K |████████████████████████████████| 81kB 7.8MB/s \n", | |
"\u001b[?25hRequirement already satisfied: MarkupSafe>=0.9.2 in /usr/local/lib/python3.7/dist-packages (from mako->pycuda->-r requirements.txt (line 8)) (2.0.1)\n", | |
"Building wheels for collected packages: pycuda\n", | |
" Building wheel for pycuda (PEP 517) ... \u001b[?25l\u001b[?25hdone\n", | |
" Created wheel for pycuda: filename=pycuda-2021.1-cp37-cp37m-linux_x86_64.whl size=627098 sha256=38207ebe5391c765b40b4683fb283d7d8461a097d18acf8ff3f8d5e15bbde6a1\n", | |
" Stored in directory: /root/.cache/pip/wheels/d5/55/64/fd4dddcc5f1c25eebd90b5291c3769101dc978c70165685512\n", | |
"Successfully built pycuda\n", | |
"Building wheels for collected packages: pytools\n", | |
" Building wheel for pytools (setup.py) ... \u001b[?25l\u001b[?25hdone\n", | |
" Created wheel for pytools: filename=pytools-2021.2.7-py2.py3-none-any.whl size=60644 sha256=df967e88659110443297bd6be6dceffa4a4ed4cd1bef17ddb7f030247e0d281a\n", | |
" Stored in directory: /root/.cache/pip/wheels/a0/b5/e5/e65d25997fd77729b9aa214645add18688483e48bbcbab6ffc\n", | |
"Successfully built pytools\n", | |
"\u001b[31mERROR: torchtext 0.10.0 has requirement torch==1.9.0, but you'll have torch 1.5.0+cpu which is incompatible.\u001b[0m\n", | |
"\u001b[31mERROR: bokeh 2.3.2 has requirement pillow>=7.1.0, but you'll have pillow 6.2.2 which is incompatible.\u001b[0m\n", | |
"\u001b[31mERROR: albumentations 0.1.12 has requirement imgaug<0.2.7,>=0.2.5, but you'll have imgaug 0.2.9 which is incompatible.\u001b[0m\n", | |
"Installing collected packages: torch, Pillow, torchvision, pytools, mako, pycuda\n", | |
" Found existing installation: torch 1.9.0+cu102\n", | |
" Uninstalling torch-1.9.0+cu102:\n", | |
" Successfully uninstalled torch-1.9.0+cu102\n", | |
" Found existing installation: Pillow 7.1.2\n", | |
" Uninstalling Pillow-7.1.2:\n", | |
" Successfully uninstalled Pillow-7.1.2\n", | |
" Found existing installation: torchvision 0.10.0+cu102\n", | |
" Uninstalling torchvision-0.10.0+cu102:\n", | |
" Successfully uninstalled torchvision-0.10.0+cu102\n", | |
"Successfully installed Pillow-6.2.2 mako-1.1.4 pycuda-2021.1 pytools-2021.2.7 torch-1.5.0+cpu torchvision-0.6.0+cu92\n" | |
], | |
"name": "stdout" | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "b5gMGOkPpNkZ" | |
}, | |
"source": [ | |
"import os\n", | |
"os.environ['LD_LIBRARY_PATH']='/content/TensorRT-7.2.2.3/lib'" | |
], | |
"execution_count": 11, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "bCG0tzxypTXL", | |
"outputId": "f9ce1eac-2736-48f9-d305-07b0c1d1ba0f" | |
}, | |
"source": [ | |
"!echo $LD_LIBRARY_PATH" | |
], | |
"execution_count": 12, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"text": [ | |
"/content/TensorRT-7.2.2.3/lib\n" | |
], | |
"name": "stdout" | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "FoH-Nsr8sBIh", | |
"outputId": "073cf797-e158-41c6-b733-cf838f734cd0" | |
}, | |
"source": [ | |
"%cd /content/TensorRT-7.2.2.3/samples/python/network_api_pytorch_mnist/\n", | |
"!python3 sample.py" | |
], | |
"execution_count": 17, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"text": [ | |
"/content/TensorRT-7.2.2.3/samples/python/network_api_pytorch_mnist\n", | |
"Downloading http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz to /tmp/mnist/data/MNIST/raw/train-images-idx3-ubyte.gz\n", | |
"9920512it [05:05, 33995.51it/s] Extracting /tmp/mnist/data/MNIST/raw/train-images-idx3-ubyte.gz to /tmp/mnist/data/MNIST/raw\n", | |
"Downloading http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz to /tmp/mnist/data/MNIST/raw/train-labels-idx1-ubyte.gz\n", | |
"\n", | |
"0it [00:00, ?it/s]\u001b[A\n", | |
" 0% 0/28881 [00:00<?, ?it/s]\u001b[A\n", | |
"32768it [00:00, 53952.32it/s] \n", | |
"Extracting /tmp/mnist/data/MNIST/raw/train-labels-idx1-ubyte.gz to /tmp/mnist/data/MNIST/raw\n", | |
"Downloading http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz to /tmp/mnist/data/MNIST/raw/t10k-images-idx3-ubyte.gz\n", | |
"\n", | |
"0it [00:00, ?it/s]\u001b[A\n", | |
" 0% 0/1648877 [00:00<?, ?it/s]\u001b[A\n", | |
" 1% 16384/1648877 [00:00<00:23, 68688.57it/s]\u001b[A\n", | |
" 1% 24576/1648877 [00:00<00:30, 52642.71it/s]\u001b[A\n", | |
" 2% 32768/1648877 [00:01<00:35, 45122.53it/s]\u001b[A\n", | |
" 2% 40960/1648877 [00:01<00:38, 41724.80it/s]\u001b[A\n", | |
" 3% 49152/1648877 [00:01<00:40, 39150.96it/s]\u001b[A\n", | |
" 3% 57344/1648877 [00:01<00:42, 37580.40it/s]\u001b[A\n", | |
" 4% 65536/1648877 [00:02<00:43, 36445.54it/s]\u001b[A\n", | |
" 4% 73728/1648877 [00:02<00:44, 35523.25it/s]\u001b[A\n", | |
" 5% 81920/1648877 [00:02<00:44, 35271.36it/s]\u001b[A\n", | |
" 5% 90112/1648877 [00:02<00:44, 34900.82it/s]\u001b[A\n", | |
" 6% 98304/1648877 [00:03<00:44, 34637.83it/s]\u001b[A\n", | |
" 6% 106496/1648877 [00:03<00:44, 34455.01it/s]\u001b[A\n", | |
" 7% 114688/1648877 [00:03<00:46, 32668.71it/s]\u001b[A\n", | |
" 7% 122880/1648877 [00:03<00:44, 34514.93it/s]\u001b[A\n", | |
" 8% 131072/1648877 [00:04<00:42, 35405.33it/s]\u001b[A\n", | |
" 8% 139264/1648877 [00:04<00:42, 35710.55it/s]\u001b[A\n", | |
" 9% 147456/1648877 [00:04<00:41, 35957.49it/s]\u001b[A\n", | |
" 9% 155648/1648877 [00:04<00:41, 36098.81it/s]\u001b[A\n", | |
" 10% 163840/1648877 [00:04<00:40, 36247.03it/s]\u001b[A\n", | |
" 10% 172032/1648877 [00:05<00:40, 36284.34it/s]\u001b[A\n", | |
" 11% 180224/1648877 [00:05<00:40, 36366.03it/s]\u001b[A\n", | |
" 11% 188416/1648877 [00:05<00:40, 35662.61it/s]\u001b[A\n", | |
" 12% 196608/1648877 [00:05<00:41, 35175.78it/s]\u001b[A\n", | |
" 12% 204800/1648877 [00:06<00:41, 34792.05it/s]\u001b[A\n", | |
" 13% 212992/1648877 [00:06<00:41, 34621.67it/s]\u001b[A\n", | |
" 13% 221184/1648877 [00:06<00:41, 34397.64it/s]\u001b[A\n", | |
" 14% 229376/1648877 [00:06<00:41, 34357.79it/s]\u001b[A\n", | |
" 14% 237568/1648877 [00:07<00:41, 34203.48it/s]\u001b[A\n", | |
" 15% 245760/1648877 [00:07<00:40, 34227.81it/s]\u001b[A\n", | |
" 15% 253952/1648877 [00:07<00:40, 34120.28it/s]\u001b[A\n", | |
" 16% 262144/1648877 [00:07<00:40, 34152.33it/s]\u001b[A\n", | |
" 16% 270336/1648877 [00:08<00:40, 34154.08it/s]\u001b[A\n", | |
" 17% 278528/1648877 [00:08<00:40, 33446.95it/s]\u001b[A\n", | |
" 17% 286720/1648877 [00:08<00:41, 32998.52it/s]\u001b[A\n", | |
" 18% 294912/1648877 [00:08<00:41, 32659.12it/s]\u001b[A\n", | |
" 18% 303104/1648877 [00:09<00:41, 32453.69it/s]\u001b[A\n", | |
" 19% 311296/1648877 [00:09<00:41, 32282.52it/s]\u001b[A\n", | |
" 19% 319488/1648877 [00:09<00:41, 32194.51it/s]\u001b[A\n", | |
" 20% 327680/1648877 [00:09<00:41, 32084.61it/s]\u001b[A\n", | |
" 20% 335872/1648877 [00:10<00:41, 31877.34it/s]\u001b[A\n", | |
" 21% 344064/1648877 [00:10<00:40, 32101.09it/s]\u001b[A\n", | |
" 21% 352256/1648877 [00:10<00:40, 32031.75it/s]\u001b[A\n", | |
" 22% 360448/1648877 [00:10<00:40, 32004.28it/s]\u001b[A\n", | |
" 22% 368640/1648877 [00:11<00:39, 32008.77it/s]\u001b[A\n", | |
" 23% 376832/1648877 [00:11<00:39, 31982.60it/s]\u001b[A\n", | |
" 23% 385024/1648877 [00:11<00:39, 31989.36it/s]\u001b[A\n", | |
" 24% 393216/1648877 [00:11<00:39, 31933.49it/s]\u001b[A\n", | |
" 24% 401408/1648877 [00:12<00:39, 31984.12it/s]\u001b[A\n", | |
" 25% 409600/1648877 [00:12<00:38, 31968.13it/s]\u001b[A\n", | |
" 25% 417792/1648877 [00:12<00:38, 31957.29it/s]\u001b[A\n", | |
" 26% 425984/1648877 [00:12<00:38, 31896.58it/s]\u001b[A\n", | |
"9920512it [05:20, 33995.51it/s]\n", | |
" 27% 442368/1648877 [00:13<00:37, 31974.02it/s]\u001b[A\n", | |
" 27% 450560/1648877 [00:13<00:37, 32029.01it/s]\u001b[A\n", | |
" 28% 458752/1648877 [00:13<00:37, 31971.40it/s]\u001b[A\n", | |
" 28% 466944/1648877 [00:14<00:36, 31995.74it/s]\u001b[A\n", | |
" 29% 475136/1648877 [00:14<00:36, 31937.75it/s]\u001b[A\n", | |
" 29% 483328/1648877 [00:14<00:36, 31987.75it/s]\u001b[A\n", | |
" 30% 491520/1648877 [00:14<00:36, 31971.89it/s]\u001b[A\n", | |
" 30% 499712/1648877 [00:15<00:35, 31952.60it/s]\u001b[A\n", | |
" 31% 507904/1648877 [00:15<00:35, 31869.06it/s]\u001b[A\n", | |
" 31% 516096/1648877 [00:15<00:35, 31983.51it/s]\u001b[A\n", | |
" 32% 524288/1648877 [00:15<00:35, 31976.20it/s]\u001b[A\n", | |
" 32% 532480/1648877 [00:16<00:34, 31974.52it/s]\u001b[A\n", | |
" 33% 540672/1648877 [00:16<00:34, 31938.19it/s]\u001b[A\n", | |
" 33% 548864/1648877 [00:16<00:34, 31920.36it/s]\u001b[A\n", | |
" 34% 557056/1648877 [00:17<00:34, 31967.11it/s]\u001b[A\n", | |
" 34% 565248/1648877 [00:17<00:33, 31947.44it/s]\u001b[A\n", | |
" 35% 573440/1648877 [00:17<00:33, 31961.52it/s]\u001b[A\n", | |
" 35% 581632/1648877 [00:17<00:33, 31800.41it/s]\u001b[A\n", | |
" 36% 589824/1648877 [00:18<00:33, 31995.95it/s]\u001b[A\n", | |
" 36% 598016/1648877 [00:18<00:32, 31980.23it/s]\u001b[A\n", | |
" 37% 606208/1648877 [00:18<00:32, 31970.62it/s]\u001b[A\n", | |
" 37% 614400/1648877 [00:18<00:32, 31751.50it/s]\u001b[A\n", | |
" 38% 622592/1648877 [00:19<00:32, 31867.72it/s]\u001b[A\n", | |
" 38% 630784/1648877 [00:19<00:31, 32055.02it/s]\u001b[A\n", | |
" 39% 638976/1648877 [00:19<00:31, 32018.24it/s]\u001b[A\n", | |
" 39% 647168/1648877 [00:19<00:31, 31883.78it/s]\u001b[A\n", | |
" 40% 655360/1648877 [00:20<00:31, 32021.15it/s]\u001b[A\n", | |
" 40% 663552/1648877 [00:20<00:30, 31989.55it/s]\u001b[A\n", | |
" 41% 671744/1648877 [00:20<00:31, 31236.69it/s]\u001b[A\n", | |
" 41% 679936/1648877 [00:20<00:30, 32186.38it/s]\u001b[A\n", | |
" 42% 688128/1648877 [00:21<00:29, 32120.81it/s]\u001b[A\n", | |
" 42% 696320/1648877 [00:21<00:29, 32032.21it/s]\u001b[A\n", | |
" 43% 704512/1648877 [00:21<00:29, 32034.95it/s]\u001b[A\n", | |
" 43% 712704/1648877 [00:21<00:29, 31851.44it/s]\u001b[A\n", | |
" 44% 720896/1648877 [00:22<00:29, 31914.15it/s]\u001b[A\n", | |
" 44% 729088/1648877 [00:22<00:28, 31822.87it/s]\u001b[A\n", | |
" 45% 737280/1648877 [00:22<00:28, 32080.24it/s]\u001b[A\n", | |
" 45% 745472/1648877 [00:22<00:28, 31967.19it/s]\u001b[A\n", | |
" 46% 753664/1648877 [00:23<00:27, 32003.93it/s]\u001b[A\n", | |
" 46% 761856/1648877 [00:23<00:27, 32622.54it/s]\u001b[A\n", | |
" 47% 770048/1648877 [00:23<00:26, 33009.04it/s]\u001b[A\n", | |
" 47% 778240/1648877 [00:23<00:26, 33237.67it/s]\u001b[A\n", | |
" 48% 786432/1648877 [00:24<00:25, 33632.54it/s]\u001b[A\n", | |
" 48% 794624/1648877 [00:24<00:25, 33723.40it/s]\u001b[A\n", | |
" 49% 802816/1648877 [00:24<00:25, 33797.33it/s]\u001b[A\n", | |
" 49% 811008/1648877 [00:24<00:24, 33981.21it/s]\u001b[A\n", | |
" 50% 819200/1648877 [00:25<00:24, 33971.27it/s]\u001b[A\n", | |
" 50% 827392/1648877 [00:25<00:24, 33274.42it/s]\u001b[A\n", | |
" 51% 835584/1648877 [00:25<00:24, 32928.69it/s]\u001b[A\n", | |
" 51% 843776/1648877 [00:25<00:24, 32602.80it/s]\u001b[A\n", | |
" 52% 851968/1648877 [00:26<00:24, 32000.80it/s]\u001b[A\n", | |
" 52% 860160/1648877 [00:26<00:24, 32433.17it/s]\u001b[A\n", | |
" 53% 868352/1648877 [00:26<00:24, 32289.10it/s]\u001b[A\n", | |
" 53% 876544/1648877 [00:26<00:23, 32697.38it/s]\u001b[A\n", | |
" 54% 884736/1648877 [00:27<00:23, 33217.44it/s]\u001b[A\n", | |
" 54% 892928/1648877 [00:27<00:22, 33391.43it/s]\u001b[A\n", | |
" 55% 901120/1648877 [00:27<00:22, 33568.89it/s]\u001b[A\n", | |
" 55% 909312/1648877 [00:27<00:21, 33824.95it/s]\u001b[A\n", | |
" 56% 917504/1648877 [00:28<00:21, 33900.79it/s]\u001b[A\n", | |
" 56% 925696/1648877 [00:28<00:21, 33794.63it/s]\u001b[A\n", | |
" 57% 933888/1648877 [00:28<00:21, 34035.17it/s]\u001b[A\n", | |
" 57% 942080/1648877 [00:28<00:21, 33380.91it/s]\u001b[A\n", | |
" 58% 950272/1648877 [00:29<00:21, 32924.76it/s]\u001b[A\n", | |
" 58% 958464/1648877 [00:29<00:21, 32637.90it/s]\u001b[A\n", | |
" 59% 966656/1648877 [00:29<00:21, 32394.94it/s]\u001b[A\n", | |
" 59% 974848/1648877 [00:29<00:20, 32257.29it/s]\u001b[A\n", | |
" 60% 983040/1648877 [00:30<00:20, 32163.34it/s]\u001b[A\n", | |
" 60% 991232/1648877 [00:30<00:20, 32119.69it/s]\u001b[A\n", | |
" 61% 999424/1648877 [00:30<00:20, 32062.27it/s]\u001b[A\n", | |
" 61% 1007616/1648877 [00:30<00:20, 32028.97it/s]\u001b[A\n", | |
" 62% 1015808/1648877 [00:31<00:19, 32014.44it/s]\u001b[A\n", | |
" 62% 1024000/1648877 [00:31<00:19, 31957.17it/s]\u001b[A\n", | |
" 63% 1032192/1648877 [00:31<00:19, 31986.16it/s]\u001b[A\n", | |
" 63% 1040384/1648877 [00:31<00:19, 31927.45it/s]\u001b[A\n", | |
" 64% 1048576/1648877 [00:32<00:18, 31970.84it/s]\u001b[A\n", | |
" 64% 1056768/1648877 [00:32<00:18, 31892.02it/s]\u001b[A\n", | |
" 65% 1064960/1648877 [00:32<00:18, 31988.95it/s]\u001b[A\n", | |
" 65% 1073152/1648877 [00:32<00:18, 31879.86it/s]\u001b[A\n", | |
" 66% 1081344/1648877 [00:33<00:17, 31994.49it/s]\u001b[A\n", | |
" 66% 1089536/1648877 [00:33<00:17, 31957.58it/s]\u001b[A\n", | |
" 67% 1097728/1648877 [00:33<00:17, 31986.09it/s]\u001b[A\n", | |
" 67% 1105920/1648877 [00:33<00:16, 31976.83it/s]\u001b[A\n", | |
" 68% 1114112/1648877 [00:34<00:16, 31971.22it/s]\u001b[A\n", | |
" 68% 1122304/1648877 [00:34<00:16, 31935.26it/s]\u001b[A\n", | |
" 69% 1130496/1648877 [00:34<00:16, 31946.34it/s]\u001b[A\n", | |
" 69% 1138688/1648877 [00:34<00:16, 31777.00it/s]\u001b[A\n", | |
" 70% 1146880/1648877 [00:35<00:15, 31417.72it/s]\u001b[A\n", | |
" 70% 1155072/1648877 [00:35<00:15, 31499.40it/s]\u001b[A\n", | |
" 71% 1163264/1648877 [00:35<00:15, 32311.64it/s]\u001b[A\n", | |
" 71% 1171456/1648877 [00:35<00:14, 32191.01it/s]\u001b[A\n", | |
" 72% 1179648/1648877 [00:36<00:14, 32105.31it/s]\u001b[A\n", | |
" 72% 1187840/1648877 [00:36<00:14, 31991.41it/s]\u001b[A\n", | |
" 73% 1196032/1648877 [00:36<00:14, 32067.65it/s]\u001b[A\n", | |
" 73% 1204224/1648877 [00:37<00:13, 31954.60it/s]\u001b[A\n", | |
" 74% 1212416/1648877 [00:37<00:13, 32030.41it/s]\u001b[A\n", | |
" 74% 1220608/1648877 [00:37<00:13, 31972.29it/s]\u001b[A\n", | |
" 75% 1228800/1648877 [00:37<00:13, 31964.06it/s]\u001b[A\n", | |
" 75% 1236992/1648877 [00:38<00:12, 31992.65it/s]\u001b[A\n", | |
" 76% 1245184/1648877 [00:38<00:12, 31868.23it/s]\u001b[A\n", | |
" 76% 1253376/1648877 [00:38<00:12, 31970.22it/s]\u001b[A\n", | |
" 77% 1261568/1648877 [00:38<00:12, 31967.06it/s]\u001b[A\n", | |
" 77% 1269760/1648877 [00:39<00:11, 31967.24it/s]\u001b[A\n", | |
" 78% 1277952/1648877 [00:39<00:11, 31975.81it/s]\u001b[A\n", | |
" 78% 1286144/1648877 [00:39<00:11, 31972.34it/s]\u001b[A\n", | |
" 78% 1294336/1648877 [00:39<00:11, 31869.73it/s]\u001b[A\n", | |
" 79% 1302528/1648877 [00:40<00:10, 31901.65it/s]\u001b[A\n", | |
" 79% 1310720/1648877 [00:40<00:10, 31875.45it/s]\u001b[A\n", | |
" 80% 1318912/1648877 [00:40<00:10, 32001.27it/s]\u001b[A\n", | |
" 80% 1327104/1648877 [00:40<00:10, 31989.57it/s]\u001b[A\n", | |
" 81% 1335296/1648877 [00:41<00:09, 31979.08it/s]\u001b[A\n", | |
" 81% 1343488/1648877 [00:41<00:09, 31976.62it/s]\u001b[A\n", | |
" 82% 1351680/1648877 [00:41<00:09, 31949.45it/s]\u001b[A\n", | |
" 82% 1359872/1648877 [00:41<00:09, 31956.15it/s]\u001b[A\n", | |
" 83% 1368064/1648877 [00:42<00:08, 31970.05it/s]\u001b[A\n", | |
" 83% 1376256/1648877 [00:42<00:08, 31905.09it/s]\u001b[A\n", | |
" 84% 1384448/1648877 [00:42<00:08, 31975.66it/s]\u001b[A\n", | |
" 84% 1392640/1648877 [00:42<00:08, 31957.88it/s]\u001b[A\n", | |
" 85% 1400832/1648877 [00:43<00:07, 31954.25it/s]\u001b[A\n", | |
" 85% 1409024/1648877 [00:43<00:07, 31824.22it/s]\u001b[A\n", | |
" 86% 1417216/1648877 [00:43<00:07, 31989.36it/s]\u001b[A\n", | |
" 86% 1425408/1648877 [00:43<00:07, 31834.71it/s]\u001b[A\n", | |
" 87% 1433600/1648877 [00:44<00:06, 32013.62it/s]\u001b[A\n", | |
" 87% 1441792/1648877 [00:44<00:06, 31994.63it/s]\u001b[A\n", | |
" 88% 1449984/1648877 [00:44<00:06, 31978.23it/s]\u001b[A\n", | |
" 88% 1458176/1648877 [00:44<00:05, 31785.65it/s]\u001b[A\n", | |
" 89% 1466368/1648877 [00:45<00:05, 31987.42it/s]\u001b[A\n", | |
" 89% 1474560/1648877 [00:45<00:05, 31907.18it/s]\u001b[A\n", | |
" 90% 1482752/1648877 [00:45<00:05, 32017.74it/s]\u001b[A\n", | |
" 90% 1490944/1648877 [00:45<00:04, 31919.24it/s]\u001b[A\n", | |
" 91% 1499136/1648877 [00:46<00:04, 31920.86it/s]\u001b[A\n", | |
" 91% 1507328/1648877 [00:46<00:04, 32006.41it/s]\u001b[A\n", | |
" 92% 1515520/1648877 [00:46<00:04, 31823.83it/s]\u001b[A\n", | |
" 92% 1523712/1648877 [00:46<00:03, 33251.87it/s]\u001b[A\n", | |
" 93% 1531904/1648877 [00:47<00:03, 32877.87it/s]\u001b[A\n", | |
" 93% 1540096/1648877 [00:47<00:03, 32550.60it/s]\u001b[A\n", | |
" 94% 1548288/1648877 [00:47<00:03, 32387.69it/s]\u001b[A\n", | |
" 94% 1556480/1648877 [00:47<00:02, 32767.84it/s]\u001b[A\n", | |
" 95% 1564672/1648877 [00:48<00:02, 33278.77it/s]\u001b[A\n", | |
" 95% 1572864/1648877 [00:48<00:02, 33517.76it/s]\u001b[A\n", | |
" 96% 1581056/1648877 [00:48<00:02, 33653.92it/s]\u001b[A\n", | |
" 96% 1589248/1648877 [00:48<00:01, 33785.58it/s]\u001b[A\n", | |
" 97% 1597440/1648877 [00:49<00:01, 33865.54it/s]\u001b[A\n", | |
" 97% 1605632/1648877 [00:49<00:01, 33953.46it/s]\u001b[A\n", | |
" 98% 1613824/1648877 [00:49<00:01, 33945.79it/s]\u001b[A\n", | |
" 98% 1622016/1648877 [00:49<00:00, 34031.29it/s]\u001b[A\n", | |
" 99% 1630208/1648877 [00:50<00:00, 33968.15it/s]\u001b[A\n", | |
" 99% 1638400/1648877 [00:50<00:00, 33401.37it/s]\u001b[A\n", | |
"100% 1646592/1648877 [00:50<00:00, 32929.03it/s]\u001b[A\n", | |
"1654784it [00:50, 29986.01it/s] \u001b[AExtracting /tmp/mnist/data/MNIST/raw/t10k-images-idx3-ubyte.gz to /tmp/mnist/data/MNIST/raw\n", | |
"Downloading http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz to /tmp/mnist/data/MNIST/raw/t10k-labels-idx1-ubyte.gz\n", | |
"\n", | |
"\n", | |
"0it [00:00, ?it/s]\u001b[A\u001b[A\n", | |
"\n", | |
"8192it [00:00, 18417.06it/s]\n", | |
"Extracting /tmp/mnist/data/MNIST/raw/t10k-labels-idx1-ubyte.gz to /tmp/mnist/data/MNIST/raw\n", | |
"Processing...\n", | |
"/pytorch/torch/csrc/utils/tensor_numpy.cpp:141: UserWarning: The given NumPy array is not writeable, and PyTorch does not support non-writeable tensors. This means you can write to the underlying (supposedly non-writeable) NumPy array using the tensor. You may want to copy the array to protect its data or make it writeable before converting it to a tensor. This type of warning will be suppressed for the rest of this program.\n", | |
"Done!\n", | |
"Train Epoch: 1 [0/60000 (0%)]\tLoss: 2.338660\n", | |
"Train Epoch: 1 [6400/60000 (11%)]\tLoss: 0.845277\n", | |
"\n", | |
"1654784it [01:03, 29986.01it/s]\u001b[ATrain Epoch: 1 [12800/60000 (21%)]\tLoss: 0.509347\n", | |
"Train Epoch: 1 [19200/60000 (32%)]\tLoss: 0.086940\n", | |
"Train Epoch: 1 [25600/60000 (43%)]\tLoss: 0.230161\n", | |
"Train Epoch: 1 [32000/60000 (53%)]\tLoss: 0.118194\n", | |
"Train Epoch: 1 [38400/60000 (64%)]\tLoss: 0.115939\n", | |
"Train Epoch: 1 [44800/60000 (75%)]\tLoss: 0.084920\n", | |
"Train Epoch: 1 [51200/60000 (85%)]\tLoss: 0.065683\n", | |
"Train Epoch: 1 [57600/60000 (96%)]\tLoss: 0.050990\n", | |
"\n", | |
"Test set: Average loss: 0.0827, Accuracy: 9752/10000 (98%)\n", | |
"\n", | |
"Train Epoch: 2 [0/60000 (0%)]\tLoss: 0.104688\n", | |
"Train Epoch: 2 [6400/60000 (11%)]\tLoss: 0.124440\n", | |
"Train Epoch: 2 [12800/60000 (21%)]\tLoss: 0.065664\n", | |
"Train Epoch: 2 [19200/60000 (32%)]\tLoss: 0.105990\n", | |
"Train Epoch: 2 [25600/60000 (43%)]\tLoss: 0.298882\n", | |
"Train Epoch: 2 [32000/60000 (53%)]\tLoss: 0.046234\n", | |
"Train Epoch: 2 [38400/60000 (64%)]\tLoss: 0.053398\n", | |
"Train Epoch: 2 [44800/60000 (75%)]\tLoss: 0.148264\n", | |
"Train Epoch: 2 [51200/60000 (85%)]\tLoss: 0.048250\n", | |
"Train Epoch: 2 [57600/60000 (96%)]\tLoss: 0.138816\n", | |
"\n", | |
"Test set: Average loss: 0.0533, Accuracy: 9818/10000 (98%)\n", | |
"\n", | |
"[TensorRT] WARNING: TensorRT was linked against cuDNN 8.0.5 but loaded cuDNN 8.0.4\n", | |
"[TensorRT] WARNING: TensorRT was linked against cuDNN 8.0.5 but loaded cuDNN 8.0.4\n", | |
"[TensorRT] WARNING: TensorRT was linked against cuDNN 8.0.5 but loaded cuDNN 8.0.4\n", | |
"Test Case: 1\n", | |
"Prediction: 1\n", | |
"\n", | |
"9920512it [08:36, 19192.45it/s]\n", | |
"1654784it [03:30, 7876.48it/s]\n" | |
], | |
"name": "stdout" | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment