Skip to content

Instantly share code, notes, and snippets.

@manzke
Created February 11, 2022 23:56
Show Gist options
  • Save manzke/32425fcaa88e33492c211b9bdd8adf6c to your computer and use it in GitHub Desktop.
Save manzke/32425fcaa88e33492c211b9bdd8adf6c to your computer and use it in GitHub Desktop.
projected_gan.ipynb
Display the source blob
Display the rendered blob
Raw
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "projected_gan.ipynb",
"provenance": [],
"collapsed_sections": [],
"machine_shape": "hm",
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
},
"accelerator": "GPU"
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/gist/manzke/32425fcaa88e33492c211b9bdd8adf6c/projected_gan.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "RUaixszCnlKd"
},
"source": [
"\n",
"# Training Projected GAN\n",
"This is a self-contained notebook for training Projected GAN.\n",
"\n",
"# TODOs\n",
"- picture alignment\n",
"- background removal\n",
"- augmentation configuration\n",
"- copy_from only do once\n",
"- training configuration\n",
"- resize configuration\n",
"\n",
"# FIXME\n",
"- wget not working"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "SBwzYACTn05w"
},
"source": [
"## Setup Environment\n",
"\n",
"Make sure you're running a GPU runtime; if not, select \"GPU\" as the hardware accelerator in Runtime > Change Runtime Type in the menu. \n",
"\n",
"Now, get the repo and install missing dependencies."
]
},
{
"cell_type": "code",
"source": [
"#@title (optional) use conda?\n",
"\n",
"# @markdown Install and use conda?\n",
"use_conda = True #@param {type: 'boolean'}"
],
"metadata": {
"cellView": "form",
"id": "b3pv7XoKZiRk"
},
"execution_count": 1,
"outputs": []
},
{
"cell_type": "code",
"source": [
"#@title (optional) install conda\n",
"if use_conda:\n",
" !pip install -q condacolab\n",
" import condacolab\n",
" condacolab.install()"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "c4jwwWFtI8vl",
"outputId": "1e1e22a1-0928-4459-efe5-5e33b8cbeef6"
},
"execution_count": 2,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"✨🍰✨ Everything looks OK!\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"#@title (optional) check conda\n",
"if use_conda:\n",
" import condacolab\n",
" condacolab.check()"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "W9-ljl_8YoBy",
"outputId": "3c4bb10e-5c39-4fa0-8493-e6668477ecb2"
},
"execution_count": 3,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"✨🍰✨ Everything looks OK!\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "82kU-W1NcNTW",
"cellView": "form",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "da0dd79c-616d-48e8-bfec-d287446abf9d"
},
"source": [
"# @title Mount Google Drive\n",
"# @markdown Mount Google Drive onto `/content/gdrive`. You can skip this if running locally.\n",
"\n",
"from google.colab import drive\n",
"\n",
"try:\n",
" drive.mount('/content/drive', force_remount=True)\n",
" COLAB = True\n",
" print(\"Note: using Google CoLab\")\n",
"except:\n",
" print(\"Note: not using Google CoLab\")\n",
" COLAB = False"
],
"execution_count": 4,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Mounted at /content/drive\n",
"Note: using Google CoLab\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"#@title checking environment\n",
"!nvidia-smi -L\n",
"\n",
"gpu_info = !nvidia-smi\n",
"gpu_info = '\\n'.join(gpu_info)\n",
"if gpu_info.find('failed') >= 0:\n",
" print('Not connected to a GPU')\n",
"else:\n",
" print(gpu_info)\n",
"\n",
"from psutil import virtual_memory\n",
"ram_gb = virtual_memory().total / 1e9\n",
"print('Your runtime has {:.1f} gigabytes of available RAM\\n'.format(ram_gb))\n",
"\n",
"if ram_gb < 20:\n",
" print('Not using a high-RAM runtime')\n",
"else:\n",
" print('You are using a high-RAM runtime!') \n",
"\n",
"import tensorflow as tf\n",
"print('Tensorflow version: {}'.format(tf.__version__) ) \n",
"print('GPU Identified at: {}'.format(tf.test.gpu_device_name()))\n",
"\n",
"!which python # should return /usr/local/bin/python\n",
"!python --version"
],
"metadata": {
"id": "Bc6y0qTD5uuI",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "fbb2c8c7-1c06-4227-96ee-9d153a211d37",
"cellView": "form"
},
"execution_count": 5,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"GPU 0: Tesla P100-PCIE-16GB (UUID: GPU-86445b03-9575-cd3b-07a7-80ae06c6202f)\n",
"Fri Feb 11 16:13:47 2022 \n",
"+-----------------------------------------------------------------------------+\n",
"| NVIDIA-SMI 460.32.03 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 P100-PCIE... Off | 00000000:00:04.0 Off | 0 |\n",
"| N/A 33C P0 29W / 250W | 0MiB / 16280MiB | 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",
"Your runtime has 54.8 gigabytes of available RAM\n",
"\n",
"You are using a high-RAM runtime!\n",
"Tensorflow version: 2.7.0\n",
"GPU Identified at: /device:GPU:0\n",
"/usr/local/bin/python\n",
"Python 3.7.10\n"
]
}
]
},
{
"cell_type": "markdown",
"source": [
"Based on https://colab.research.google.com/notebooks/forms.ipynb"
],
"metadata": {
"id": "M5Fd399DiJk4"
}
},
{
"cell_type": "markdown",
"source": [
"## Project Preparation\n",
"We need to download and prepare the data. In this example, we use the few-shot datasets of the [FastGAN repo](https://github.com/odegeasslbc/FastGAN-pytorch)."
],
"metadata": {
"id": "QJaSpNnUadRj"
}
},
{
"cell_type": "code",
"metadata": {
"id": "VZ3pwUJSoOdO",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "b96822c0-fa27-426f-98c9-45968190e405"
},
"source": [
"#@title Clone Repository\n",
"repo = 'https://github.com/autonomousvision/projected_gan.git' #@param {type: \"string\"}\n",
"branch = 'main' #@param {type: \"string\"}\n",
"\n",
"# clone repo\n",
"!git clone $repo -b $branch repo\n",
"#!conda install timm dill -n base"
],
"execution_count": 6,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Cloning into 'repo'...\n",
"remote: Enumerating objects: 123, done.\u001b[K\n",
"remote: Counting objects: 100% (34/34), done.\u001b[K\n",
"remote: Compressing objects: 100% (31/31), done.\u001b[K\n",
"remote: Total 123 (delta 14), reused 8 (delta 3), pack-reused 89\u001b[K\n",
"Receiving objects: 100% (123/123), 741.43 KiB | 17.24 MiB/s, done.\n",
"Resolving deltas: 100% (38/38), done.\n",
"Collecting package metadata (current_repodata.json): - \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\bdone\n",
"Solving environment: \\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\bdone\n",
"\n",
"## Package Plan ##\n",
"\n",
" environment location: /usr/local\n",
"\n",
" added / updated specs:\n",
" - dill\n",
" - timm\n",
"\n",
"\n",
"The following packages will be downloaded:\n",
"\n",
" package | build\n",
" ---------------------------|-----------------\n",
" _openmp_mutex-4.5 | 1_llvm 5 KB conda-forge\n",
" ca-certificates-2021.10.8 | ha878542_0 139 KB conda-forge\n",
" certifi-2021.10.8 | py37h89c1867_1 145 KB conda-forge\n",
" conda-4.11.0 | py37h89c1867_0 16.9 MB conda-forge\n",
" cudatoolkit-11.1.1 | h6406543_8 1.20 GB conda-forge\n",
" dill-0.3.4 | pyhd8ed1ab_0 62 KB conda-forge\n",
" freetype-2.10.4 | h0708190_1 890 KB conda-forge\n",
" future-0.18.2 | py37h89c1867_4 713 KB conda-forge\n",
" jpeg-9e | h7f98852_0 269 KB conda-forge\n",
" libblas-3.9.0 | 8_mkl 12 KB conda-forge\n",
" libcblas-3.9.0 | 8_mkl 11 KB conda-forge\n",
" libgcc-ng-11.2.0 | h1d223b6_12 904 KB conda-forge\n",
" liblapack-3.9.0 | 8_mkl 11 KB conda-forge\n",
" libpng-1.6.37 | h21135ba_2 306 KB conda-forge\n",
" libprotobuf-3.16.0 | h780b84a_0 2.5 MB conda-forge\n",
" libtiff-4.0.10 | hc3755c2_1005 602 KB conda-forge\n",
" libzlib-1.2.11 | h36c2ea0_1013 59 KB conda-forge\n",
" llvm-openmp-13.0.1 | hf817b99_0 3.4 MB conda-forge\n",
" mkl-2020.4 | h726a3e6_304 215.6 MB conda-forge\n",
" ninja-1.10.2 | h4bd325d_0 2.4 MB conda-forge\n",
" numpy-1.20.3 | py37h038b26d_1 5.7 MB conda-forge\n",
" olefile-0.46 | pyh9f0ad1d_1 32 KB conda-forge\n",
" openssl-1.1.1l | h7f98852_0 2.1 MB conda-forge\n",
" pillow-6.2.1 | py37h6b7be26_0 637 KB conda-forge\n",
" python_abi-3.7 | 2_cp37m 4 KB conda-forge\n",
" pytorch-1.9.0 |cpu_py37hd5260e0_0 46.8 MB conda-forge\n",
" sleef-3.5.1 | h9b69904_2 1.5 MB conda-forge\n",
" timm-0.4.12 | pyhd8ed1ab_0 245 KB conda-forge\n",
" torchvision-0.9.1 |py37h2413bea_1_cpu 6.6 MB conda-forge\n",
" typing_extensions-4.0.1 | pyha770c72_0 26 KB conda-forge\n",
" zlib-1.2.11 | h36c2ea0_1013 86 KB conda-forge\n",
" ------------------------------------------------------------\n",
" Total: 1.50 GB\n",
"\n",
"The following NEW packages will be INSTALLED:\n",
"\n",
" cudatoolkit conda-forge/linux-64::cudatoolkit-11.1.1-h6406543_8\n",
" dill conda-forge/noarch::dill-0.3.4-pyhd8ed1ab_0\n",
" freetype conda-forge/linux-64::freetype-2.10.4-h0708190_1\n",
" future conda-forge/linux-64::future-0.18.2-py37h89c1867_4\n",
" jpeg conda-forge/linux-64::jpeg-9e-h7f98852_0\n",
" libblas conda-forge/linux-64::libblas-3.9.0-8_mkl\n",
" libcblas conda-forge/linux-64::libcblas-3.9.0-8_mkl\n",
" liblapack conda-forge/linux-64::liblapack-3.9.0-8_mkl\n",
" libpng conda-forge/linux-64::libpng-1.6.37-h21135ba_2\n",
" libprotobuf conda-forge/linux-64::libprotobuf-3.16.0-h780b84a_0\n",
" libtiff conda-forge/linux-64::libtiff-4.0.10-hc3755c2_1005\n",
" libzlib conda-forge/linux-64::libzlib-1.2.11-h36c2ea0_1013\n",
" llvm-openmp conda-forge/linux-64::llvm-openmp-13.0.1-hf817b99_0\n",
" mkl conda-forge/linux-64::mkl-2020.4-h726a3e6_304\n",
" ninja conda-forge/linux-64::ninja-1.10.2-h4bd325d_0\n",
" numpy conda-forge/linux-64::numpy-1.20.3-py37h038b26d_1\n",
" olefile conda-forge/noarch::olefile-0.46-pyh9f0ad1d_1\n",
" pillow conda-forge/linux-64::pillow-6.2.1-py37h6b7be26_0\n",
" pytorch conda-forge/linux-64::pytorch-1.9.0-cpu_py37hd5260e0_0\n",
" sleef conda-forge/linux-64::sleef-3.5.1-h9b69904_2\n",
" timm conda-forge/noarch::timm-0.4.12-pyhd8ed1ab_0\n",
" torchvision conda-forge/linux-64::torchvision-0.9.1-py37h2413bea_1_cpu\n",
" typing_extensions conda-forge/noarch::typing_extensions-4.0.1-pyha770c72_0\n",
"\n",
"The following packages will be REMOVED:\n",
"\n",
" libgomp-9.3.0-h2828fa1_18\n",
"\n",
"The following packages will be UPDATED:\n",
"\n",
" ca-certificates 2020.12.5-ha878542_0 --> 2021.10.8-ha878542_0\n",
" certifi 2020.12.5-py37h89c1867_1 --> 2021.10.8-py37h89c1867_1\n",
" conda 4.9.2-py37h89c1867_0 --> 4.11.0-py37h89c1867_0\n",
" libgcc-ng 9.3.0-h2828fa1_18 --> 11.2.0-h1d223b6_12\n",
" openssl 1.1.1j-h7f98852_0 --> 1.1.1l-h7f98852_0\n",
" python_abi 3.7-1_cp37m --> 3.7-2_cp37m\n",
" zlib 1.2.11-h516909a_1010 --> 1.2.11-h36c2ea0_1013\n",
"\n",
"The following packages will be DOWNGRADED:\n",
"\n",
" _openmp_mutex 4.5-1_gnu --> 4.5-1_llvm\n",
"\n",
"\n",
"\n",
"Downloading and Extracting Packages\n",
"mkl-2020.4 | 215.6 MB | : 100% 1.0/1 [00:35<00:00, 35.78s/it] \n",
"typing_extensions-4. | 26 KB | : 100% 1.0/1 [00:00<00:00, 18.96it/s]\n",
"openssl-1.1.1l | 2.1 MB | : 100% 1.0/1 [00:00<00:00, 2.09it/s]\n",
"ninja-1.10.2 | 2.4 MB | : 100% 1.0/1 [00:00<00:00, 2.67it/s]\n",
"cudatoolkit-11.1.1 | 1.20 GB | : 100% 1.0/1 [02:37<00:00, 157.15s/it] \n",
"certifi-2021.10.8 | 145 KB | : 100% 1.0/1 [00:00<00:00, 12.18it/s]\n",
"_openmp_mutex-4.5 | 5 KB | : 100% 1.0/1 [00:00<00:00, 19.70it/s]\n",
"libgcc-ng-11.2.0 | 904 KB | : 100% 1.0/1 [00:00<00:00, 6.97it/s]\n",
"freetype-2.10.4 | 890 KB | : 100% 1.0/1 [00:00<00:00, 5.64it/s]\n",
"pytorch-1.9.0 | 46.8 MB | : 100% 1.0/1 [00:09<00:00, 9.52s/it] \n",
"jpeg-9e | 269 KB | : 100% 1.0/1 [00:00<00:00, 10.00it/s]\n",
"pillow-6.2.1 | 637 KB | : 100% 1.0/1 [00:00<00:00, 6.84it/s]\n",
"llvm-openmp-13.0.1 | 3.4 MB | : 100% 1.0/1 [00:00<00:00, 2.01it/s]\n",
"libpng-1.6.37 | 306 KB | : 100% 1.0/1 [00:00<00:00, 8.30it/s]\n",
"zlib-1.2.11 | 86 KB | : 100% 1.0/1 [00:00<00:00, 20.89it/s]\n",
"olefile-0.46 | 32 KB | : 100% 1.0/1 [00:00<00:00, 18.66it/s]\n",
"liblapack-3.9.0 | 11 KB | : 100% 1.0/1 [00:00<00:00, 22.99it/s]\n",
"dill-0.3.4 | 62 KB | : 100% 1.0/1 [00:00<00:00, 18.84it/s]\n",
"sleef-3.5.1 | 1.5 MB | : 100% 1.0/1 [00:00<00:00, 3.36it/s]\n",
"libprotobuf-3.16.0 | 2.5 MB | : 100% 1.0/1 [00:00<00:00, 2.25it/s]\n",
"libzlib-1.2.11 | 59 KB | : 100% 1.0/1 [00:00<00:00, 19.96it/s]\n",
"torchvision-0.9.1 | 6.6 MB | : 100% 1.0/1 [00:00<00:00, 1.29it/s]\n",
"timm-0.4.12 | 245 KB | : 100% 1.0/1 [00:00<00:00, 7.39it/s]\n",
"conda-4.11.0 | 16.9 MB | : 100% 1.0/1 [00:03<00:00, 3.16s/it] \n",
"numpy-1.20.3 | 5.7 MB | : 100% 1.0/1 [00:01<00:00, 1.08s/it] \n",
"libblas-3.9.0 | 12 KB | : 100% 1.0/1 [00:00<00:00, 24.92it/s]\n",
"libcblas-3.9.0 | 11 KB | : 100% 1.0/1 [00:00<00:00, 25.61it/s]\n",
"python_abi-3.7 | 4 KB | : 100% 1.0/1 [00:00<00:00, 39.12it/s]\n",
"libtiff-4.0.10 | 602 KB | : 100% 1.0/1 [00:00<00:00, 7.82it/s]\n",
"ca-certificates-2021 | 139 KB | : 100% 1.0/1 [00:00<00:00, 17.85it/s]\n",
"future-0.18.2 | 713 KB | : 100% 1.0/1 [00:00<00:00, 5.47it/s]\n",
"Preparing transaction: \\ \b\b| \b\b/ \b\bdone\n",
"Verifying transaction: \\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\bdone\n",
"Executing transaction: | \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ By downloading and using the CUDA Toolkit conda packages, you accept the terms and conditions of the CUDA End User License Agreement (EULA): https://docs.nvidia.com/cuda/eula/index.html\n",
"\n",
"\b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\bdone\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "i4N21o-gzMjB",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "347e8312-2675-4717-dd42-4b8ed07d67da"
},
"source": [
"%cd repo"
],
"execution_count": 8,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"/content/repo\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"if use_conda:\n",
" !source activate && conda env update -n base -f environment.yml"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "_zrkgLB0Ysfh",
"outputId": "807d43bb-7890-4076-ff9d-3958ea08240d"
},
"execution_count": 9,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Collecting package metadata (repodata.json): - \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\bdone\n",
"Solving environment: - \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ WARNING conda.core.solve:_add_specs(611): pinned spec python=3.7 conflicts with explicit specs. Overriding pinned spec.\n",
"\b\b- \b\b\\ \b\b| WARNING conda.core.solve:_add_specs(611): pinned spec python_abi=3.7[build=*cp37*] conflicts with explicit specs. Overriding pinned spec.\n",
"\b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\bdone\n",
"\n",
"Downloading and Extracting Packages\n",
"werkzeug-2.0.1 | 219 KB | : 100% 1.0/1 [00:00<00:00, 7.04it/s] \n",
"zstd-1.4.9 | 480 KB | : 100% 1.0/1 [00:00<00:00, 6.31it/s]\n",
"pyu2f-0.1.5 | 31 KB | : 100% 1.0/1 [00:00<00:00, 20.92it/s]\n",
"fonttools-4.25.0 | 632 KB | : 100% 1.0/1 [00:00<00:00, 7.66it/s]\n",
"dill-0.3.2 | 65 KB | : 100% 1.0/1 [00:00<00:00, 19.09it/s]\n",
"libffi-3.3 | 54 KB | : 100% 1.0/1 [00:00<00:00, 18.25it/s]\n",
"google-auth-oauthlib | 19 KB | : 100% 1.0/1 [00:00<00:00, 17.27it/s]\n",
"ld_impl_linux-64-2.3 | 586 KB | : 100% 1.0/1 [00:00<00:00, 9.22it/s]\n",
"brotlipy-0.7.0 | 324 KB | : 100% 1.0/1 [00:00<00:00, 8.80it/s]\n",
"markdown-3.3.6 | 67 KB | : 100% 1.0/1 [00:00<00:00, 20.37it/s]\n",
"yarl-1.7.2 | 138 KB | : 100% 1.0/1 [00:00<00:00, 13.78it/s]\n",
"kiwisolver-1.3.1 | 80 KB | : 100% 1.0/1 [00:00<00:00, 8.36it/s]\n",
"setuptools-58.0.4 | 790 KB | : 100% 1.0/1 [00:00<00:00, 7.08it/s]\n",
"zlib-1.2.11 | 120 KB | : 100% 1.0/1 [00:00<00:00, 13.96it/s]\n",
"numpy-1.21.2 | 23 KB | : 100% 1.0/1 [00:00<00:00, 10.24it/s]\n",
"libwebp-base-1.2.0 | 437 KB | : 100% 1.0/1 [00:00<00:00, 8.81it/s]\n",
"mamba-0.9.0 | 638 KB | : 100% 1.0/1 [00:00<00:00, 7.43it/s]\n",
"matplotlib-3.4.2 | 26 KB | : 100% 1.0/1 [00:00<00:00, 9.33it/s]\n",
"numpy-base-1.21.2 | 4.9 MB | : 100% 1.0/1 [00:00<00:00, 3.09it/s]\n",
"click-8.0.3 | 79 KB | : 100% 1.0/1 [00:00<00:00, 9.32it/s]\n",
"tornado-6.1 | 595 KB | : 100% 1.0/1 [00:00<00:00, 7.79it/s]\n",
"pyqt-5.9.2 | 4.7 MB | : 100% 1.0/1 [00:00<00:00, 3.83it/s]\n",
"munkres-1.1.4 | 13 KB | : 100% 1.0/1 [00:00<00:00, 23.61it/s]\n",
"cachetools-4.2.4 | 12 KB | : 100% 1.0/1 [00:00<00:00, 15.34it/s]\n",
"async-timeout-3.0.1 | 11 KB | : 100% 1.0/1 [00:00<00:00, 28.85it/s]\n",
"zipp-3.6.0 | 12 KB | : 100% 1.0/1 [00:00<00:00, 17.37it/s]\n",
"six-1.16.0 | 18 KB | : 100% 1.0/1 [00:00<00:00, 10.71it/s]\n",
"libgfortran-ng-7.5.0 | 22 KB | : 100% 1.0/1 [00:00<00:00, 7.71it/s]\n",
"requests-2.26.0 | 59 KB | : 100% 1.0/1 [00:00<00:00, 10.78it/s]\n",
"python_abi-3.9 | 4 KB | : 100% 1.0/1 [00:00<00:00, 20.89it/s]\n",
"tqdm-4.62.2 | 96 KB | : 100% 1.0/1 [00:00<00:00, 8.26it/s]\n",
"intel-openmp-2021.4. | 4.2 MB | : 100% 1.0/1 [00:00<00:00, 5.01it/s]\n",
"torchvision-0.10.1 | 8.2 MB | : 100% 1.0/1 [00:01<00:00, 1.04s/it] \n",
"google-auth-2.3.3 | 83 KB | : 100% 1.0/1 [00:00<00:00, 15.75it/s]\n",
"lcms2-2.12 | 312 KB | : 100% 1.0/1 [00:00<00:00, 10.21it/s]\n",
"pysocks-1.7.1 | 31 KB | : 100% 1.0/1 [00:00<00:00, 10.49it/s]\n",
"libpng-1.6.37 | 364 KB | : 100% 1.0/1 [00:00<00:00, 8.26it/s]\n",
"expat-2.4.1 | 168 KB | : 100% 1.0/1 [00:00<00:00, 9.93it/s]\n",
"cycler-0.10.0 | 16 KB | : 100% 1.0/1 [00:00<00:00, 8.87it/s]\n",
"conda-package-handli | 1005 KB | : 100% 1.0/1 [00:00<00:00, 5.88it/s]\n",
"libblas-3.9.0 | 12 KB | : 100% 1.0/1 [00:00<00:00, 14.81it/s]\n",
"liblapack-3.9.0 | 12 KB | : 100% 1.0/1 [00:00<00:00, 20.68it/s]\n",
"dataclasses-0.8 | 10 KB | : 100% 1.0/1 [00:00<00:00, 22.79it/s]\n",
"sqlite-3.36.0 | 990 KB | : 100% 1.0/1 [00:00<00:00, 7.89it/s]\n",
"olefile-0.46 | 34 KB | : 100% 1.0/1 [00:00<00:00, 10.30it/s]\n",
"aiohttp-3.7.0 | 614 KB | : 100% 1.0/1 [00:00<00:00, 5.64it/s]\n",
"grpcio-1.38.1 | 2.3 MB | : 100% 1.0/1 [00:00<00:00, 2.33it/s] \n",
"jpeg-9d | 232 KB | : 100% 1.0/1 [00:00<00:00, 9.65it/s]\n",
"libuv-1.40.0 | 933 KB | : 100% 1.0/1 [00:00<00:00, 5.15it/s]\n",
"importlib-metadata-4 | 33 KB | : 100% 1.0/1 [00:00<00:00, 12.64it/s]\n",
"pytorch-1.9.1 | 770.4 MB | : 100% 1.0/1 [01:42<00:00, 102.42s/it] \n",
"libgcc-ng-11.2.0 | 887 KB | : 100% 1.0/1 [00:00<00:00, 4.06it/s]\n",
"wheel-0.37.0 | 33 KB | : 100% 1.0/1 [00:00<00:00, 8.14it/s]\n",
"pytorch-gpu-1.9.1 | 13 KB | : 100% 1.0/1 [00:00<00:00, 28.16it/s]\n",
"imageio-2.9.0 | 3.0 MB | : 100% 1.0/1 [00:00<00:00, 7.65it/s]\n",
"tzdata-2021e | 112 KB | : 100% 1.0/1 [00:00<00:00, 7.83it/s]\n",
"pyjwt-2.3.0 | 18 KB | : 100% 1.0/1 [00:00<00:00, 25.62it/s]\n",
"mkl_fft-1.3.1 | 182 KB | : 100% 1.0/1 [00:00<00:00, 9.90it/s]\n",
"lz4-c-1.9.3 | 185 KB | : 100% 1.0/1 [00:00<00:00, 9.15it/s]\n",
"conda-4.9.2 | 3.0 MB | : 100% 1.0/1 [00:00<00:00, 1.65it/s]\n",
"python-3.9.7 | 18.6 MB | : 100% 1.0/1 [00:00<00:00, 1.72it/s] \n",
"psutil-5.8.0 | 342 KB | : 100% 1.0/1 [00:00<00:00, 5.37it/s] \n",
"pillow-8.3.1 | 648 KB | : 100% 1.0/1 [00:00<00:00, 7.86it/s]\n",
"mkl_random-1.2.2 | 309 KB | : 100% 1.0/1 [00:00<00:00, 8.00it/s]\n",
"gstreamer-1.14.0 | 3.2 MB | : 100% 1.0/1 [00:00<00:00, 5.40it/s]\n",
"pyparsing-3.0.4 | 81 KB | : 100% 1.0/1 [00:00<00:00, 9.81it/s]\n",
"cudnn-8.2.1.32 | 673.9 MB | : 100% 1.0/1 [01:28<00:00, 88.42s/it] \n",
"pycosat-0.6.3 | 107 KB | : 100% 1.0/1 [00:00<00:00, 9.03it/s]\n",
"rsa-4.8 | 31 KB | : 100% 1.0/1 [00:00<00:00, 17.53it/s]\n",
"libgomp-11.2.0 | 427 KB | : 100% 1.0/1 [00:00<00:00, 10.24it/s]\n",
"pcre-8.45 | 207 KB | : 100% 1.0/1 [00:00<00:00, 9.37it/s]\n",
"mkl-service-2.4.0 | 59 KB | : 100% 1.0/1 [00:00<00:00, 9.77it/s]\n",
"brotli-1.0.9 | 402 KB | : 100% 1.0/1 [00:00<00:00, 9.36it/s]\n",
"python-dateutil-2.8. | 233 KB | : 100% 1.0/1 [00:00<00:00, 8.98it/s]\n",
"chardet-3.0.4 | 170 KB | : 100% 1.0/1 [00:00<00:00, 10.69it/s]\n",
"charset-normalizer-2 | 35 KB | : 100% 1.0/1 [00:00<00:00, 9.36it/s]\n",
"ninja-1.10.2 | 1.5 MB | : 100% 1.0/1 [00:00<00:00, 6.41it/s]\n",
"cudatoolkit-11.1.74 | 1.19 GB | : 100% 1.0/1 [02:45<00:00, 165.01s/it]\n",
"sip-4.19.13 | 279 KB | : 100% 1.0/1 [00:00<00:00, 8.35it/s]\n",
"libtiff-4.2.0 | 502 KB | : 100% 1.0/1 [00:00<00:00, 9.03it/s]\n",
"glib-2.69.1 | 1.7 MB | : 100% 1.0/1 [00:00<00:00, 6.34it/s]\n",
"certifi-2021.10.8 | 145 KB | : 100% 1.0/1 [00:00<00:00, 12.07it/s]\n",
"libstdcxx-ng-11.2.0 | 4.2 MB | : 100% 1.0/1 [00:00<00:00, 1.64it/s]\n",
"icu-58.2 | 22.7 MB | : 100% 1.0/1 [00:03<00:00, 3.29s/it] \n",
"oauthlib-3.1.1 | 87 KB | : 100% 1.0/1 [00:00<00:00, 15.30it/s]\n",
"libuuid-1.0.3 | 17 KB | : 100% 1.0/1 [00:00<00:00, 10.33it/s]\n",
"openjpeg-2.4.0 | 331 KB | : 100% 1.0/1 [00:00<00:00, 6.35it/s]\n",
"pyasn1-0.4.8 | 58 KB | : 100% 1.0/1 [00:00<00:00, 18.83it/s]\n",
"libxcb-1.14 | 610 KB | : 100% 1.0/1 [00:00<00:00, 5.40it/s]\n",
"cryptography-35.0.0 | 1.3 MB | : 100% 1.0/1 [00:00<00:00, 7.15it/s]\n",
"gst-plugins-base-1.1 | 4.9 MB | : 100% 1.0/1 [00:00<00:00, 4.61it/s]\n",
"libprotobuf-3.18.0 | 2.6 MB | : 100% 1.0/1 [00:00<00:00, 1.89it/s] \n",
"matplotlib-base-3.4. | 5.6 MB | : 100% 1.0/1 [00:00<00:00, 3.81it/s]\n",
"blas-1.0 | 6 KB | : 100% 1.0/1 [00:00<00:00, 26.57it/s]\n",
"mkl-2021.4.0 | 142.6 MB | : 100% 1.0/1 [00:04<00:00, 4.11s/it]\n",
"requests-oauthlib-1. | 21 KB | : 100% 1.0/1 [00:00<00:00, 26.54it/s]\n",
"attrs-21.2.0 | 44 KB | : 100% 1.0/1 [00:00<00:00, 19.19it/s]\n",
"pyasn1-modules-0.2.7 | 63 KB | : 100% 1.0/1 [00:00<00:00, 16.01it/s]\n",
"freetype-2.11.0 | 618 KB | : 100% 1.0/1 [00:00<00:00, 8.40it/s]\n",
"tk-8.6.11 | 3.0 MB | : 100% 1.0/1 [00:00<00:00, 4.95it/s]\n",
"tensorboard-data-ser | 3.3 MB | : 100% 1.0/1 [00:00<00:00, 1.65it/s]\n",
"ruamel_yaml-0.15.80 | 268 KB | : 100% 1.0/1 [00:00<00:00, 10.91it/s]\n",
"dbus-1.13.18 | 586 KB | : 100% 1.0/1 [00:00<00:00, 8.33it/s]\n",
"multidict-5.2.0 | 64 KB | : 100% 1.0/1 [00:00<00:00, 16.62it/s]\n",
"scipy-1.7.1 | 16.9 MB | : 100% 1.0/1 [00:00<00:00, 1.53it/s] \n",
"libxml2-2.9.12 | 1.2 MB | : 100% 1.0/1 [00:00<00:00, 6.50it/s]\n",
"tensorboard-2.7.0 | 5.2 MB | : 100% 1.0/1 [00:00<00:00, 1.46it/s]\n",
"future-0.18.2 | 715 KB | : 100% 1.0/1 [00:00<00:00, 5.52it/s]\n",
"idna-3.3 | 49 KB | : 100% 1.0/1 [00:00<00:00, 9.89it/s]\n",
"blinker-1.4 | 13 KB | : 100% 1.0/1 [00:00<00:00, 25.77it/s]\n",
"cffi-1.14.6 | 225 KB | : 100% 1.0/1 [00:00<00:00, 8.82it/s]\n",
"c-ares-1.18.1 | 113 KB | : 100% 1.0/1 [00:00<00:00, 17.48it/s]\n",
"protobuf-3.18.0 | 341 KB | : 100% 1.0/1 [00:00<00:00, 8.17it/s]\n",
"tensorboard-plugin-w | 670 KB | : 100% 1.0/1 [00:00<00:00, 7.05it/s]\n",
"libgfortran4-7.5.0 | 995 KB | : 100% 1.0/1 [00:00<00:00, 7.89it/s]\n",
"qt-5.9.7 | 68.5 MB | : 100% 1.0/1 [00:02<00:00, 2.13s/it] \n",
"ncurses-6.3 | 782 KB | : 100% 1.0/1 [00:00<00:00, 3.94it/s]\n",
"xz-5.2.5 | 438 KB | : 100% 1.0/1 [00:00<00:00, 9.01it/s]\n",
"urllib3-1.26.7 | 111 KB | : 100% 1.0/1 [00:00<00:00, 8.68it/s]\n",
"absl-py-1.0.0 | 95 KB | : 100% 1.0/1 [00:00<00:00, 10.41it/s]\n",
"magma-2.5.4 | 104.7 MB | : 100% 1.0/1 [00:12<00:00, 12.88s/it] \n",
"fontconfig-2.13.1 | 250 KB | : 100% 1.0/1 [00:00<00:00, 9.37it/s]\n",
"pyopenssl-21.0.0 | 49 KB | : 100% 1.0/1 [00:00<00:00, 9.73it/s]\n",
"typing_extensions-3. | 31 KB | : 100% 1.0/1 [00:00<00:00, 7.39it/s]\n",
"pip-21.2.4 | 1.8 MB | : 100% 1.0/1 [00:00<00:00, 5.33it/s]\n",
"pycparser-2.21 | 94 KB | : 100% 1.0/1 [00:00<00:00, 9.87it/s]\n",
"readline-8.1 | 362 KB | : 100% 1.0/1 [00:00<00:00, 5.59it/s]\n",
"nccl-2.11.4.1 | 174.2 MB | : 100% 1.0/1 [00:21<00:00, 21.30s/it] \n",
"Preparing transaction: \\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\bdone\n",
"Verifying transaction: \\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\bdone\n",
"Executing transaction: - \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ By downloading and using the CUDA Toolkit conda packages, you accept the terms and conditions of the CUDA End User License Agreement (EULA): https://docs.nvidia.com/cuda/eula/index.html\n",
"\n",
"\b\b| \b\b/ \b\b- By downloading and using the cuDNN conda packages, you accept the terms and conditions of the NVIDIA cuDNN EULA -\n",
" https://docs.nvidia.com/deeplearning/cudnn/sla/index.html\n",
"\n",
"\b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\bdone\n",
"Installing pip dependencies: | \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ Ran pip subprocess with arguments:\n",
"['/usr/local/bin/python', '-m', 'pip', 'install', '-U', '-r', '/content/repo/condaenv.kqrfcqgr.requirements.txt']\n",
"Pip subprocess output:\n",
"Collecting glfw==2.2.0\n",
" Downloading glfw-2.2.0-py2.py27.py3.py30.py31.py32.py33.py34.py35.py36.py37.py38-none-manylinux2014_x86_64.whl (204 kB)\n",
"Collecting imageio-ffmpeg==0.4.3\n",
" Downloading imageio_ffmpeg-0.4.3-py3-none-manylinux2010_x86_64.whl (26.9 MB)\n",
"Collecting imgui==1.3.0\n",
" Downloading imgui-1.3.0-cp39-cp39-manylinux1_x86_64.whl (2.9 MB)\n",
"Collecting pyopengl==3.1.5\n",
" Downloading PyOpenGL-3.1.5-py3-none-any.whl (2.4 MB)\n",
"Collecting pyspng==0.1.0\n",
" Downloading pyspng-0.1.0-cp39-cp39-manylinux2010_x86_64.whl (195 kB)\n",
"Requirement already satisfied: numpy in /usr/local/lib/python3.9/site-packages (from pyspng==0.1.0->-r /content/repo/condaenv.kqrfcqgr.requirements.txt (line 5)) (1.21.2)\n",
"Installing collected packages: pyspng, pyopengl, imgui, imageio-ffmpeg, glfw\n",
"Successfully installed glfw-2.2.0 imageio-ffmpeg-0.4.3 imgui-1.3.0 pyopengl-3.1.5 pyspng-0.1.0\n",
"\n",
"\b\bdone\n",
"#\n",
"# To activate this environment, use\n",
"#\n",
"# $ conda activate base\n",
"#\n",
"# To deactivate an active environment, use\n",
"#\n",
"# $ conda deactivate\n",
"\n"
]
}
]
},
{
"cell_type": "markdown",
"source": [
"## Project Configuration"
],
"metadata": {
"id": "hpkfgacgatMF"
}
},
{
"cell_type": "code",
"metadata": {
"id": "5NR5OGyeUOKU",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "e53e2f34-6fde-45d0-bc53-c4c213786e88"
},
"source": [
"# @title Configure dataset directories\n",
"from pathlib import Path\n",
"import numpy as np\n",
"\n",
"# @markdown Project name used for folders as well\n",
"project_name = 'projected_gan' #@param {type: 'string'}\n",
"\n",
"# @markdown Your magic number :)\n",
"random_seed = 168369 # @param {type: 'integer'}\n",
"#todo add function for making sure all seeds are set\n",
"np.random.seed(random_seed)\n",
"\n",
"# @markdown Image Size expected from input and used for output\n",
"img_dim = 1024 # @param {type: 'integer'}\n",
"prep_images = 'expand' # @param [\"none\", \"resize\", \"expand\"]\n",
"metrics = 'none' # @param [\"none\", \"fid50k_full\"]\n",
"\n",
"# @markdown The base directory for all captures. This can be anything if you're running this notebook on your own Jupyter runtime.\n",
"root_dir = '/content/drive/MyDrive' # @param {type: 'string'}\n",
"root_dir = Path(root_dir)\n",
"root_dir.mkdir(exist_ok=True, parents=True)\n",
"\n",
"project_dir = root_dir / project_name\n",
"\n",
"data_dir = 'data' # @param {type: 'string'}\n",
"data_dir = project_dir / data_dir\n",
"data_dir.mkdir(exist_ok=True, parents=True)\n",
"\n",
"prepared_dir = 'prep' # @param {type: 'string'}\n",
"prepared_dir = project_dir / prepared_dir\n",
"prepared_dir.mkdir(exist_ok=True, parents=True)\n",
"\n",
"dataset_fname = f'dataset-{img_dim}x{img_dim}.zip'\n",
"dataset_fname = project_dir / dataset_fname\n",
"\n",
"output_dir = 'output' # @param {type: 'string'}\n",
"output_dir = project_dir / output_dir\n",
"output_dir.mkdir(exist_ok=True, parents=True)\n",
"\n",
"# @markdown How the input data is supplied\n",
"upload_method = 'none' # @param [\"none\", \"upload_images\", \"upload_dataset\", \"download\", \"copy_from\"]\n",
"download_url = '' # @param {type: 'string'}\n",
"copy_from_location = '/content/drive/Shareddrives/Customer Data/Images/Clothing/Women/Dresses/casual/front' # @param {type: 'string'}\n",
"\n",
"print(f\"\"\"Directories configured:\n",
" root_dir = {root_dir}\n",
" data_dir = {data_dir}\n",
" prepared_dir = {prepared_dir}\n",
" dataset_fname = {dataset_fname}\n",
" img_dim = {img_dim}\n",
" upload_method = {upload_method}\n",
" download_url = {download_url}\n",
" copy_from_location = {copy_from_location}\n",
"\"\"\")\n"
],
"execution_count": 17,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Directories configured:\n",
" root_dir = /content/drive/MyDrive\n",
" data_dir = /content/drive/MyDrive/projected_gan/data\n",
" prepared_dir = /content/drive/MyDrive/projected_gan/prep\n",
" dataset_fname = /content/drive/MyDrive/projected_gan/dataset-1024x1024.zip\n",
" img_dim = 1024\n",
" upload_method = none\n",
" download_url = \n",
" copy_from_location = /content/drive/Shareddrives/Customer Data/Images/Clothing/Women/Dresses/casual/front\n",
"\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"import wget\n",
"from shutil import copyfile\n",
"import shutil\n",
"from os import listdir\n",
"from os.path import isfile, join\n",
"import os\n",
"from tqdm.notebook import tqdm\n",
"\n",
"# @title (optional) Upload or copy your content\n",
"# @markdown Select a video file (.mp4, .mov, etc.) from your disk. This will upload it to the local Colab working directory.\n",
"from google.colab import files\n",
"\n",
"if upload_method == 'none':\n",
" !ls \"$data_dir\"\n",
"elif upload_method == 'copy_from':\n",
" files = [f for f in listdir(copy_from_location) if isfile(join(copy_from_location, f))]\n",
" for file in tqdm(files):\n",
" file2 = os.path.join(copy_from_location, file)\n",
" copyfile(file2, data_dir / file) \n",
"elif upload_method == 'upload_images':\n",
" uploaded = files.upload()\n",
" for upload in uploaded:\n",
" copyfile(upload, data_dir / upload)\n",
"elif upload_method == 'upload_dataset':\n",
" uploaded = files.upload()\n",
" copyfile(uploaded, project_dir / dataset_fname)\n",
"elif upload_method == 'download':\n",
" fname = wget.download(download_url)\n",
" copyfile(fname, data_dir / fname)"
],
"metadata": {
"id": "yZbiiDjH6LrN",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 472
},
"outputId": "68d61408-63c4-4df1-ceae-4a5de2ab129d"
},
"execution_count": 14,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Collecting package metadata (current_repodata.json): - \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\bdone\n",
"Solving environment: \\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\bdone\n",
"\n",
"# All requested packages already installed.\n",
"\n"
]
},
{
"output_type": "error",
"ename": "ModuleNotFoundError",
"evalue": "ignored",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-14-f9affc2add4c>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0mget_ipython\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msystem\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'source activate && conda install wget'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0;32mimport\u001b[0m \u001b[0mwget\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mshutil\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mcopyfile\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mshutil\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mos\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mlistdir\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'wget'",
"",
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0;32m\nNOTE: If your import is failing due to a missing package, you can\nmanually install dependencies using either !pip or !apt.\n\nTo view examples of installing some common dependencies, click the\n\"Open Examples\" button below.\n\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n"
],
"errorDetails": {
"actions": [
{
"action": "open_url",
"actionText": "Open Examples",
"url": "/notebooks/snippets/importing_libraries.ipynb"
}
]
}
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "G0hD7dKQR00t"
},
"source": [
"## Data Preparation\n",
"We are preparing our data for the training."
]
},
{
"cell_type": "code",
"source": [
"# @title Cleaning Helpers\n",
"import cv2\n",
"import os\n",
"import os.path\n",
"from os import path\n",
"import numpy as np\n",
"import scipy\n",
"from scipy.interpolate import UnivariateSpline\n",
"import shutil\n",
"\n",
"def resize_and_pad(desired_size, im):\n",
" old_size = im.shape[:2] # old_size is in (height, width) format\n",
"\n",
" ratio = float(desired_size)/max(old_size)\n",
" new_size = tuple([int(x*ratio) for x in old_size])\n",
"\n",
" im = cv2.resize(im, (new_size[1], new_size[0])) #respects the ratio\n",
"\n",
" delta_w = desired_size - new_size[1]\n",
" delta_h = desired_size - new_size[0]\n",
" top, bottom = delta_h//2, delta_h-(delta_h//2)\n",
" left, right = delta_w//2, delta_w-(delta_w//2)\n",
"\n",
" new_im = cv2.copyMakeBorder(im, top, bottom, left, right, cv2.BORDER_REPLICATE)\n",
" return new_im\n",
"\n",
"def read_image(path):\n",
" img = cv2.imread(path)\n",
" if img is not None:\n",
" print(f'adding {path}')\n",
" return img\n",
" else:\n",
" print(f'image read failed for {path}') \n",
"\n",
"def write_image(image, folder, filename):\n",
" if(not path.exists(folder)):\n",
" try:\n",
" os.makedirs(folder)\n",
" except:\n",
" print(f'creation failed {folder}') #ignore\n",
"\n",
" cv2.imwrite(os.path.join(folder, filename), image)\n"
],
"metadata": {
"id": "5vaej9L20hJJ"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [
"# @title General Helpers\n",
"from IPython.display import Image, display\n",
"def imshow(image):\n",
" \"\"\"Shows images in one figure.\"\"\"\n",
" disp = display(Image(image))\n",
" return disp"
],
"metadata": {
"cellView": "form",
"id": "eqzc6wvBoBa1"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "QuWfEfEoColz"
},
"outputs": [],
"source": [
"# @title Check if readable and resizable\n",
"from os import listdir\n",
"from os.path import isfile, join\n",
"import os\n",
"from tqdm.notebook import tqdm\n",
"\n",
"if upload_method == 'upload_dataset':\n",
" print('skipping because of prepared dataset')\n",
"elif upload_method == 'none':\n",
" print('skipping because of mode is none') \n",
"else:\n",
" files = [f for f in listdir(data_dir) if isfile(join(data_dir, f))]\n",
"\n",
" for file in tqdm(files):\n",
" file2 = os.path.join(data_dir, file)\n",
" img = read_image(file2)\n",
"\n",
" if prep_images == 'expand':\n",
" new_img = resize_and_pad(img_dim, img)\n",
" else:\n",
" new_img = img\n",
" write_image(new_img, prepared_dir, file)\n",
"\n",
"\n"
]
},
{
"cell_type": "code",
"metadata": {
"id": "_TnMmxJrPFZs"
},
"source": [
"# @title Run dataset tool to prepare the data\n",
"if upload_method == 'upload_dataset':\n",
" print('skipping because of prepared dataset')\n",
"elif upload_method == 'none':\n",
" print('skipping because of mode is none')\n",
"else:\n",
" !python dataset_tool.py --source=\"$prepared_dir\" --dest=\"$dataset_fname\" --resolution=\"$img_dim\"x\"$img_dim\""
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "OcS63jN9RMdy"
},
"source": [
"## Training\n",
"\n",
"Now that the data is prepared, we can start training! The training loop tracks FID, but the computations seems to lead to problems in colab. Hence, it is disable by default (```metrics=[]```). The loop also generates fixed noise samples after a defined amount of ticks, eg. below ```--snap=1```."
]
},
{
"cell_type": "code",
"source": [
"!source activate && python train.py --outdir=\"$output_dir\" --resume \"/content/drive/MyDrive/projected_gan/output/00001-stylegan2-dataset-1024x1024-gpus1-batch64/network-snapshot.pkl\" --metrics=$metrics --seed=$random_seed --cfg=stylegan2 --data=\"$dataset_fname\" --gpus=1 --batch=64 --batch-gpu=4 --snap=5"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "EHVvIYImiXVC",
"outputId": "330c2dd3-ce7f-45ad-8266-96b211b58877"
},
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"\n",
"Training options:\n",
"{\n",
" \"G_kwargs\": {\n",
" \"class_name\": \"pg_modules.networks_stylegan2.Generator\",\n",
" \"z_dim\": 64,\n",
" \"w_dim\": 128,\n",
" \"mapping_kwargs\": {\n",
" \"num_layers\": 2\n",
" },\n",
" \"channel_base\": 32768,\n",
" \"channel_max\": 512,\n",
" \"fused_modconv_default\": \"inference_only\"\n",
" },\n",
" \"G_opt_kwargs\": {\n",
" \"class_name\": \"torch.optim.Adam\",\n",
" \"betas\": [\n",
" 0,\n",
" 0.99\n",
" ],\n",
" \"eps\": 1e-08,\n",
" \"lr\": 0.002\n",
" },\n",
" \"D_opt_kwargs\": {\n",
" \"class_name\": \"torch.optim.Adam\",\n",
" \"betas\": [\n",
" 0,\n",
" 0.99\n",
" ],\n",
" \"eps\": 1e-08,\n",
" \"lr\": 0.002\n",
" },\n",
" \"data_loader_kwargs\": {\n",
" \"pin_memory\": true,\n",
" \"prefetch_factor\": 2,\n",
" \"num_workers\": 3\n",
" },\n",
" \"training_set_kwargs\": {\n",
" \"class_name\": \"training.dataset.ImageFolderDataset\",\n",
" \"path\": \"/content/drive/MyDrive/projected_gan/dataset-1024x1024.zip\",\n",
" \"use_labels\": false,\n",
" \"max_size\": 1267,\n",
" \"xflip\": false,\n",
" \"resolution\": 1024,\n",
" \"random_seed\": 168369\n",
" },\n",
" \"num_gpus\": 1,\n",
" \"batch_size\": 64,\n",
" \"batch_gpu\": 4,\n",
" \"metrics\": [],\n",
" \"total_kimg\": 25000,\n",
" \"kimg_per_tick\": 4,\n",
" \"image_snapshot_ticks\": 5,\n",
" \"network_snapshot_ticks\": 5,\n",
" \"random_seed\": 168369,\n",
" \"ema_kimg\": 20.0,\n",
" \"resume_pkl\": \"/content/drive/MyDrive/projected_gan/output/00001-stylegan2-dataset-1024x1024-gpus1-batch64/network-snapshot.pkl\",\n",
" \"ema_rampup\": null,\n",
" \"restart_every\": 9999999,\n",
" \"loss_kwargs\": {\n",
" \"class_name\": \"training.loss.ProjectedGANLoss\"\n",
" },\n",
" \"D_kwargs\": {\n",
" \"class_name\": \"pg_modules.discriminator.ProjectedDiscriminator\",\n",
" \"diffaug\": true,\n",
" \"interp224\": false,\n",
" \"backbone_kwargs\": {\n",
" \"cout\": 64,\n",
" \"expand\": true,\n",
" \"proj_type\": 2,\n",
" \"num_discs\": 4,\n",
" \"separable\": true,\n",
" \"cond\": false\n",
" }\n",
" },\n",
" \"run_dir\": \"/content/drive/MyDrive/projected_gan/output/00001-stylegan2-dataset-1024x1024-gpus1-batch64\"\n",
"}\n",
"\n",
"Output directory: /content/drive/MyDrive/projected_gan/output/00001-stylegan2-dataset-1024x1024-gpus1-batch64\n",
"Number of GPUs: 1\n",
"Batch size: 64 images\n",
"Training duration: 25000 kimg\n",
"Dataset path: /content/drive/MyDrive/projected_gan/dataset-1024x1024.zip\n",
"Dataset size: 1267 images\n",
"Dataset resolution: 1024\n",
"Dataset labels: False\n",
"Dataset x-flips: False\n",
"\n",
"Creating output directory...\n",
"Launching processes...\n",
"Loading training set...\n",
"\n",
"Num images: 1267\n",
"Image shape: [3, 1024, 1024]\n",
"Label shape: [0]\n",
"\n",
"Constructing networks...\n",
"Resuming from \"/content/drive/MyDrive/projected_gan/output/00001-stylegan2-dataset-1024x1024-gpus1-batch64/network-snapshot.pkl\"\n",
"Setting up PyTorch plugin \"bias_act_plugin\"... Done.\n",
"Setting up PyTorch plugin \"upfirdn2d_plugin\"... Done.\n",
"\n",
"Generator Parameters Buffers Output shape Datatype\n",
"--- --- --- --- --- \n",
"mapping.fc0 8320 - [4, 128] float32 \n",
"mapping.fc1 16512 - [4, 128] float32 \n",
"mapping - 128 [4, 18, 128] float32 \n",
"synthesis.b4.conv1 2425857 32 [4, 512, 4, 4] float32 \n",
"synthesis.b4.torgb 67587 - [4, 3, 4, 4] float32 \n",
"synthesis.b4:0 8192 16 [4, 512, 4, 4] float32 \n",
"synthesis.b4:1 - - [4, 3, 4, 4] float32 \n",
"synthesis.b8.conv0 2425857 80 [4, 512, 8, 8] float32 \n",
"synthesis.b8.conv1 2425857 80 [4, 512, 8, 8] float32 \n",
"synthesis.b8.torgb 67587 - [4, 3, 8, 8] float32 \n",
"synthesis.b8:0 - 16 [4, 512, 8, 8] float32 \n",
"synthesis.b8:1 - - [4, 3, 8, 8] float32 \n",
"synthesis.b16.conv0 2425857 272 [4, 512, 16, 16] float32 \n",
"synthesis.b16.conv1 2425857 272 [4, 512, 16, 16] float32 \n",
"synthesis.b16.torgb 67587 - [4, 3, 16, 16] float32 \n",
"synthesis.b16:0 - 16 [4, 512, 16, 16] float32 \n",
"synthesis.b16:1 - - [4, 3, 16, 16] float32 \n",
"synthesis.b32.conv0 2425857 1040 [4, 512, 32, 32] float32 \n",
"synthesis.b32.conv1 2425857 1040 [4, 512, 32, 32] float32 \n",
"synthesis.b32.torgb 67587 - [4, 3, 32, 32] float32 \n",
"synthesis.b32:0 - 16 [4, 512, 32, 32] float32 \n",
"synthesis.b32:1 - - [4, 3, 32, 32] float32 \n",
"synthesis.b64.conv0 2425857 4112 [4, 512, 64, 64] float32 \n",
"synthesis.b64.conv1 2425857 4112 [4, 512, 64, 64] float32 \n",
"synthesis.b64.torgb 67587 - [4, 3, 64, 64] float32 \n",
"synthesis.b64:0 - 16 [4, 512, 64, 64] float32 \n",
"synthesis.b64:1 - - [4, 3, 64, 64] float32 \n",
"synthesis.b128.conv0 1245953 16400 [4, 256, 128, 128] float16 \n",
"synthesis.b128.conv1 623105 16400 [4, 256, 128, 128] float16 \n",
"synthesis.b128.torgb 33795 - [4, 3, 128, 128] float16 \n",
"synthesis.b128:0 - 16 [4, 256, 128, 128] float16 \n",
"synthesis.b128:1 - - [4, 3, 128, 128] float32 \n",
"synthesis.b256.conv0 328065 65552 [4, 128, 256, 256] float16 \n",
"synthesis.b256.conv1 164097 65552 [4, 128, 256, 256] float16 \n",
"synthesis.b256.torgb 16899 - [4, 3, 256, 256] float16 \n",
"synthesis.b256:0 - 16 [4, 128, 256, 256] float16 \n",
"synthesis.b256:1 - - [4, 3, 256, 256] float32 \n",
"synthesis.b512.conv0 90305 262160 [4, 64, 512, 512] float16 \n",
"synthesis.b512.conv1 45185 262160 [4, 64, 512, 512] float16 \n",
"synthesis.b512.torgb 8451 - [4, 3, 512, 512] float16 \n",
"synthesis.b512:0 - 16 [4, 64, 512, 512] float16 \n",
"synthesis.b512:1 - - [4, 3, 512, 512] float32 \n",
"synthesis.b1024.conv0 26721 1048592 [4, 32, 1024, 1024] float16 \n",
"synthesis.b1024.conv1 13377 1048592 [4, 32, 1024, 1024] float16 \n",
"synthesis.b1024.torgb 4227 - [4, 3, 1024, 1024] float16 \n",
"synthesis.b1024:0 - 16 [4, 32, 1024, 1024] float16 \n",
"synthesis.b1024:1 - - [4, 3, 1024, 1024] float32 \n",
"--- --- --- --- --- \n",
"Total 24803852 2796720 - - \n",
"\n",
"\n",
"ProjectedDiscriminator Parameters Buffers Output shape Datatype\n",
"--- --- --- --- --- \n",
"feature_network.pretrained.layer0.0 864 - [4, 32, 512, 512] float32 \n",
"feature_network.pretrained.layer0.1 64 65 [4, 32, 512, 512] float32 \n",
"feature_network.pretrained.layer0.3 896 98 [4, 16, 512, 512] float32 \n",
"feature_network.pretrained.layer0.4 13968 1062 [4, 24, 256, 256] float32 \n",
"feature_network.pretrained.layer1.0 39712 1702 [4, 40, 128, 128] float32 \n",
"feature_network.pretrained.layer2.0 198480 5289 [4, 80, 64, 64] float32 \n",
"feature_network.pretrained.layer2.1 446784 7977 [4, 112, 64, 64] float32 \n",
"feature_network.pretrained.layer3.0 1652640 18060 [4, 192, 32, 32] float32 \n",
"feature_network.pretrained.layer3.1 605440 5251 [4, 320, 32, 32] float32 \n",
"feature_network.scratch.layer0_ccm 1600 - [4, 64, 256, 256] float32 \n",
"feature_network.scratch.layer1_ccm 5248 - [4, 128, 128, 128] float32 \n",
"feature_network.scratch.layer2_ccm 28928 - [4, 256, 64, 64] float32 \n",
"feature_network.scratch.layer3_ccm 164352 - [4, 512, 32, 32] float32 \n",
"feature_network.scratch.layer3_csm.out_conv 131328 - [4, 256, 64, 64] float32 \n",
"feature_network.scratch.layer2_csm.skip_add.activation_post_process - - [4, 256, 64, 64] float32 \n",
"feature_network.scratch.layer2_csm.out_conv 32896 - [4, 128, 128, 128] float32 \n",
"feature_network.scratch.layer1_csm.skip_add.activation_post_process - - [4, 128, 128, 128] float32 \n",
"feature_network.scratch.layer1_csm.out_conv 8256 - [4, 64, 256, 256] float32 \n",
"feature_network.scratch.layer0_csm.skip_add.activation_post_process - - [4, 64, 256, 256] float32 \n",
"feature_network.scratch.layer0_csm.out_conv 4160 - [4, 64, 512, 512] float32 \n",
"discriminator.mini_discs.0.main 190848 12137 [4, 1, 29, 29] float32 \n",
"discriminator.mini_discs.1.main 186048 11807 [4, 1, 29, 29] float32 \n",
"discriminator.mini_discs.2.main 177024 11285 [4, 1, 29, 29] float32 \n",
"discriminator.mini_discs.3.main 142592 10251 [4, 1, 29, 29] float32 \n",
"discriminator - - [4, 3364] float32 \n",
"--- --- --- --- --- \n",
"Total 4032128 84984 - - \n",
"\n",
"Distributing across 1 GPUs...\n",
"Setting up training phases...\n",
"Exporting sample images...\n",
"Initializing logs...\n",
"Training for 25000 kimg...\n",
"\n",
"tick 2 kimg 12.2 time 23m 21s sec/tick 1377.6 sec/kimg 341.66 maintenance 23.9 cpumem 5.17 gpumem 14.06 reserved 14.46 \n",
"tick 3 kimg 16.2 time 46m 15s sec/tick 1373.2 sec/kimg 340.58 maintenance 0.1 cpumem 5.17 gpumem 13.26 reserved 14.46 \n",
"tick 4 kimg 20.2 time 1h 09m 09s sec/tick 1373.6 sec/kimg 340.67 maintenance 0.1 cpumem 5.17 gpumem 13.26 reserved 14.46 \n",
"tick 5 kimg 24.3 time 1h 32m 03s sec/tick 1373.9 sec/kimg 340.76 maintenance 0.1 cpumem 5.17 gpumem 13.26 reserved 14.46 \n",
"tick 6 kimg 28.3 time 1h 55m 14s sec/tick 1374.0 sec/kimg 340.78 maintenance 17.1 cpumem 5.22 gpumem 13.26 reserved 14.46 \n",
"tick 7 kimg 32.3 time 2h 18m 07s sec/tick 1372.9 sec/kimg 340.51 maintenance 0.1 cpumem 5.22 gpumem 13.26 reserved 14.46 \n",
"tick 8 kimg 36.4 time 2h 41m 00s sec/tick 1373.2 sec/kimg 340.58 maintenance 0.1 cpumem 5.22 gpumem 13.26 reserved 14.46 \n",
"tick 9 kimg 40.4 time 3h 03m 54s sec/tick 1373.6 sec/kimg 340.68 maintenance 0.1 cpumem 5.22 gpumem 13.26 reserved 14.46 \n",
"tick 10 kimg 44.4 time 3h 26m 48s sec/tick 1373.8 sec/kimg 340.73 maintenance 0.1 cpumem 5.22 gpumem 13.26 reserved 14.46 \n",
"tick 11 kimg 48.4 time 3h 49m 56s sec/tick 1373.8 sec/kimg 340.73 maintenance 14.2 cpumem 5.55 gpumem 13.26 reserved 14.46 \n",
"tick 12 kimg 52.5 time 4h 12m 50s sec/tick 1373.9 sec/kimg 340.75 maintenance 0.1 cpumem 5.55 gpumem 13.26 reserved 14.46 \n",
"tick 13 kimg 56.5 time 4h 35m 44s sec/tick 1374.0 sec/kimg 340.79 maintenance 0.1 cpumem 5.55 gpumem 13.26 reserved 14.46 \n",
"tick 14 kimg 60.5 time 4h 58m 37s sec/tick 1373.3 sec/kimg 340.61 maintenance 0.1 cpumem 5.55 gpumem 13.26 reserved 14.46 \n",
"tick 15 kimg 64.6 time 5h 21m 31s sec/tick 1373.5 sec/kimg 340.64 maintenance 0.1 cpumem 5.55 gpumem 13.26 reserved 14.46 \n",
"tick 16 kimg 68.6 time 5h 44m 30s sec/tick 1373.9 sec/kimg 340.76 maintenance 5.1 cpumem 5.55 gpumem 13.26 reserved 14.46 \n",
"tick 17 kimg 72.6 time 6h 07m 24s sec/tick 1374.0 sec/kimg 340.76 maintenance 0.1 cpumem 5.55 gpumem 13.26 reserved 14.46 \n"
]
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "MqYeDzg3KUMG"
},
"source": [
"To inspect the samples, click on the folder symbol on the left and navigate to \n",
"\n",
"```projected_gan/training-runs/YOUR_RUN```\n",
"\n",
"The files ```fakesXXXXXX.png``` are the samples for a fixed noise vector at point."
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment