Skip to content

Instantly share code, notes, and snippets.

@NTT123
Created October 11, 2018 04:57
Show Gist options
  • Save NTT123/618d3ae7ea15506d1396691ee10dcdf5 to your computer and use it in GitHub Desktop.
Save NTT123/618d3ae7ea15506d1396691ee10dcdf5 to your computer and use it in GitHub Desktop.
Mixture Density Network.ipynb
Display the source blob
Display the rendered blob
Raw
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "Mixture Density Network.ipynb",
"version": "0.3.2",
"provenance": [],
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
}
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"[View in Colaboratory](https://colab.research.google.com/gist/NTT123/618d3ae7ea15506d1396691ee10dcdf5/mixture-density-network.ipynb)"
]
},
{
"metadata": {
"id": "XrsUUHizruIm",
"colab_type": "text"
},
"cell_type": "markdown",
"source": [
"# 2D Mixture Density Network!"
]
},
{
"metadata": {
"id": "dS8brYDAro5z",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"# http://pytorch.org/\n",
"from os import path\n",
"from wheel.pep425tags import get_abbr_impl, get_impl_ver, get_abi_tag\n",
"platform = '{}{}-{}'.format(get_abbr_impl(), get_impl_ver(), get_abi_tag())\n",
"\n",
"accelerator = 'cu80' if path.exists('/opt/bin/nvidia-smi') else 'cpu'\n",
"\n",
"!pip install -q http://download.pytorch.org/whl/{accelerator}/torch-0.4.1-{platform}-linux_x86_64.whl torchvision\n",
"import torch\n",
"import torch.nn as nn\n",
"device = torch.device(\"cpu\")\n",
"import math\n",
"import numpy as np\n",
"\n",
"import matplotlib.pyplot as plt\n",
"import matplotlib.colors as mcolors\n",
"from pylab import rcParams\n",
"\n",
"plt.style.use('ggplot')\n",
"rcParams['figure.figsize'] = 3,3"
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "Iho8bIrtr8DN",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"# 10 Gaussian mixtures\n",
"M = 10\n",
"weights = (0.2*torch.rand(M)).softmax(dim=0)\n",
"means = 20* (torch.rand(M, 2) - 0.5)\n",
"covs = [ torch.randn(2,2) for _ in range(M) ]\n",
"covs = [ torch.matmul(A, A.t()) + 0.1*torch.eye(2) for A in covs ]\n",
"Zs = [ torch.distributions.MultivariateNormal(loc=means[c], \n",
" covariance_matrix=covs[c]) for c in range(M) ]\n"
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "1iiMtqvCA03D",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"# Generate data\n",
"N = 100000\n",
"choices = np.random.choice(range(M), size=N, p=weights.numpy())\n",
"D = torch.empty( (N, 2) )\n",
"\n",
"for id, c in enumerate(choices): \n",
" D[id,: ] = Zs[c].sample()"
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "E-2dQjFMHfTX",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"# zero mean, 1 std\n",
"D = (D - D.mean(dim=0)) / D.std(dim=0)"
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "zrs8N6UrITsa",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 34
},
"outputId": "743de01a-6f63-4c8a-984f-a62a1dc29bc2"
},
"cell_type": "code",
"source": [
"D.std(dim=0)"
],
"execution_count": 5,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"tensor([1., 1.])"
]
},
"metadata": {
"tags": []
},
"execution_count": 5
}
]
},
{
"metadata": {
"id": "mC5AoMj7vDDM",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 215
},
"outputId": "6c72bcd7-3f0a-4416-c55f-a6d9abf46ef4"
},
"cell_type": "code",
"source": [
"\n",
"\n",
"\n",
"_ = plt.hist2d(D[:, 0].numpy(), D[:, 1].numpy(), bins=100, range=[[-3, 3],[-3,3]])"
],
"execution_count": 6,
"outputs": [
{
"output_type": "display_data",
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAMgAAADGCAYAAACXUs/uAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAGr9JREFUeJztnVtsVNX3x79z74WWtlw1WBARFEkQ\nL/HuCzz48EsgUR81JPjgg755Qa3GRNEYXyU8GOMl6IMkaBQvidp4SRRiUBK0qJiqiFoohSl02rme\n83+Y/9pds8+e3enpKTNzZn0SMtMzZ87ZZ9hrr7X2WnvtiOu6LgRBMBKtdwMEoZERAREECyIggmBB\nBEQQLIiACIIFERBBsBD386VcLofdu3djfHwchUIBd999N66//vqg2yYIdceXgBw+fBhXXHEFtm7d\nitHRUTz//PMiIEIo8SUgt956q3o/NjaGvr6+wBokCI2ELwEhBgYGMDY2hp07dwbVHkFoKCJzTTX5\n888/8corr+Dll19GJBIJql2C0BD4msUaHh7GmTNnAACrVq1CqVTC+fPnA22YIDQCvgRkaGgIBw4c\nAACk02lks1l0dXUF2jBBaAR8mVj5fB579uzB2NgY8vk87rnnHtxwww3z0T5BqCtz9kEEIcxIJF0Q\nLIiACIIFERBBsCACIggWREAEwYIIiCBYEAERBAsiIIJgQQREECyIgAiCBREQQbAgAiIIFkRABMGC\nCIggWBABEQQLIiCCYEEERBAsiIAIgoU51cXau3cvjh07BsdxsG3bNtx0001BtUsQGgLfAvLTTz/h\n77//xq5du3DhwgU89thjIiBC6PAtIOvXr8eaNWsAAJ2dncjlcnAcB9GoWG31xnVdKeIXEL57czQa\nRVtbGwBgcHAQmzZtEuEQQsece/T333+PwcFB7NixI4j2CAEg2iM45uSkHzlyBPv378dTTz2Fjo6O\noNokVKGa6USlzeizWk0sW0m0SCTi+Xyma+rtmO3njYhvAZmcnMTevXvx9NNPY8GCBUG2qaXhndJx\nHACoMF2p8+fzeQCVna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qam8MwzzwTZJkFoGGY0sWylRwHghx9+\nwMcffywmlhBKfPkgQ0ND6O/vV/tn79ixA6+99lrgjROEeuNrmvfQoUP46quvAAAnTpzAokWLAm2U\nIDQKvjTI+fPnsXv3bmSzWRQKBWzfvh1r166dj/YJQl2R0qOCYEEi6YJgQQREECyEcr+CMO/C+8Yb\nb+D48eOIRCLYvn071qxZU+8mBcrevXtx7NgxOI6Dbdu24aabbqpvg9wQMjg46L766quu67ruiRMn\n3J07d9a5RcHw888/uy+++KLruq77999/u08++WSdWxQsR48edV944QXXdV33/Pnz7oMPPljnFrlu\nKDVIWHfhPXr0KG688UYAwIoVK5DJZDA5OYmOjo46tywY1q9frzRiZ2cncrkcHMdR+7TXg1D6IPF4\nXG0NF6ZdeNPpNLq7u9Xf3d3dSKfTdWxRsESjUbS1tQEo74G5adOmugoHEAIfpJV34XVDOkP//fff\nY3BwsCHSl5peQDZv3ozNmzd7jg8ODuLw4cN49NFHQ7N3Ym9vb4XGOHfuHHp7e+vYouA5cuQI9u/f\nj6eeeqohTMdQmlhh3YV348aNOHjwIABgeHgYvb29aG9vr3OrgmNychJ79+7Fzp07VZ5fvQllJD3M\nu/C+/fbbOHbsGCKRCHbs2IFVq1bVu0mB8fnnn2Pfvn245JJL1LGHHnqo4v/xYhNKARGEoAiliSUI\nQSECIggWREAEwYIIiCBYEAERBAsiIIJgQQREECyIgAiChf8DbPqn+VlkhIAAAAAASUVORK5CYII=\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x7f007f2517b8>"
]
},
"metadata": {
"tags": []
}
}
]
},
{
"metadata": {
"id": "sDs1xFODJO1u",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"class MDN(nn.Module):\n",
" def __init__(self, m):\n",
" super().__init__()\n",
" \n",
" self.fc1 = nn.Linear(2, 100)\n",
" self.selu1 = nn.Tanh()\n",
" self.m = m\n",
" \n",
" s = 6 * m # weight, meanx, meany, varx, vary rho\n",
" self.fc2 = nn.Linear(100, s)\n",
" \n",
" def forward(self, x):\n",
" x = self.selu1(self.fc1(x))\n",
" out = self.fc2(x)\n",
" \n",
" return out\n"
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "3HciA4LwKvxk",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"m = 40\n",
"model = MDN(m).to(device) # 20 mixtures"
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "BP7U8pi9K0Hg",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"py"
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "w1u0wdOPK-Ol",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"inp = torch.randn(10, 2).to(device)\n",
"out = model(inp)"
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "28xTSSPYOJjg",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"target = torch.randn(10,2).to(device)"
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "RKl3hPGXLEtL",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 34
},
"outputId": "05b14ec8-9c9e-4816-ab68-44576b3c3e60"
},
"cell_type": "code",
"source": [
"myloss(out, target)"
],
"execution_count": 31,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"tensor(2.6001, grad_fn=<NegBackward>)"
]
},
"metadata": {
"tags": []
},
"execution_count": 31
}
]
},
{
"metadata": {
"id": "KbZ5klceQfqa",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
""
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "RoQBSJ_cLWix",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"from torch.utils.data import DataLoader\n",
"from torch.utils.data.dataset import Dataset\n",
"\n",
"class Mydataset(Dataset):\n",
"\n",
" def __init__(self, dt):\n",
" self.mydt = dt\n",
"\n",
" def __getitem__(self, index): \n",
" return self.mydt[index]\n",
"\n",
" def __len__(self):\n",
" return len(self.mydt)\n"
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "8sALjPAoQzYu",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"optimizer = torch.optim.SGD(model.parameters(), lr=1e-1)\n",
"lr = torch.optim.lr_scheduler.ExponentialLR(optimizer, 0.8)"
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "Ywvu2fJRQ6LU",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 2057
},
"outputId": "9e291393-2eb8-4a3d-d2a0-c68f878f3569"
},
"cell_type": "code",
"source": [
"model.train()\n",
"zer = torch.ones(32, 2).to(device).data\n",
"\n",
"for epoch in range(20):\n",
" train_loader = DataLoader( Mydataset(D), batch_size=32, shuffle=True)\n",
" lr.step()\n",
" me = 0.0\n",
" for batch_idx, data in enumerate(train_loader):\n",
" #print(data.size())\n",
" inp = data.to(device).data\n",
" output = model(zer)\n",
" loss = myloss(output, inp)\n",
" optimizer.zero_grad()\n",
" loss.backward()\n",
" optimizer.step()\n",
" \n",
" me = me + loss.item()\n",
" \n",
" if batch_idx % 500 == 499:\n",
" print(\"[%d : %d : %0.5f]: %0.5f\" % (epoch, batch_idx+1, lr.get_lr()[0], me / 500))\n",
" me = 0.0\n",
" \n",
" "
],
"execution_count": 42,
"outputs": [
{
"output_type": "stream",
"text": [
"[0 : 500 : 0.00115]: 1.63789\n",
"[0 : 1000 : 0.00115]: 1.64484\n",
"[0 : 1500 : 0.00115]: 1.62631\n",
"[0 : 2000 : 0.00115]: 1.63024\n",
"[0 : 2500 : 0.00115]: 1.63827\n",
"[0 : 3000 : 0.00115]: 1.64013\n",
"[1 : 500 : 0.00092]: 1.63638\n",
"[1 : 1000 : 0.00092]: 1.64615\n",
"[1 : 1500 : 0.00092]: 1.62593\n",
"[1 : 2000 : 0.00092]: 1.64217\n",
"[1 : 2500 : 0.00092]: 1.64123\n",
"[1 : 3000 : 0.00092]: 1.63096\n",
"[2 : 500 : 0.00074]: 1.63961\n",
"[2 : 1000 : 0.00074]: 1.62615\n",
"[2 : 1500 : 0.00074]: 1.64420\n",
"[2 : 2000 : 0.00074]: 1.63097\n",
"[2 : 2500 : 0.00074]: 1.63210\n",
"[2 : 3000 : 0.00074]: 1.64108\n",
"[3 : 500 : 0.00059]: 1.63530\n",
"[3 : 1000 : 0.00059]: 1.63679\n",
"[3 : 1500 : 0.00059]: 1.63642\n",
"[3 : 2000 : 0.00059]: 1.63991\n",
"[3 : 2500 : 0.00059]: 1.62682\n",
"[3 : 3000 : 0.00059]: 1.63724\n",
"[4 : 500 : 0.00047]: 1.63613\n",
"[4 : 1000 : 0.00047]: 1.62351\n",
"[4 : 1500 : 0.00047]: 1.63250\n",
"[4 : 2000 : 0.00047]: 1.65049\n",
"[4 : 2500 : 0.00047]: 1.63226\n",
"[4 : 3000 : 0.00047]: 1.63578\n",
"[5 : 500 : 0.00038]: 1.63465\n",
"[5 : 1000 : 0.00038]: 1.63242\n",
"[5 : 1500 : 0.00038]: 1.64190\n",
"[5 : 2000 : 0.00038]: 1.63781\n",
"[5 : 2500 : 0.00038]: 1.62324\n",
"[5 : 3000 : 0.00038]: 1.63544\n",
"[6 : 500 : 0.00030]: 1.62171\n",
"[6 : 1000 : 0.00030]: 1.63752\n",
"[6 : 1500 : 0.00030]: 1.63910\n",
"[6 : 2000 : 0.00030]: 1.63945\n",
"[6 : 2500 : 0.00030]: 1.62989\n",
"[6 : 3000 : 0.00030]: 1.64226\n",
"[7 : 500 : 0.00024]: 1.62444\n",
"[7 : 1000 : 0.00024]: 1.63705\n",
"[7 : 1500 : 0.00024]: 1.63977\n",
"[7 : 2000 : 0.00024]: 1.63628\n",
"[7 : 2500 : 0.00024]: 1.62043\n",
"[7 : 3000 : 0.00024]: 1.64010\n",
"[8 : 500 : 0.00019]: 1.62927\n",
"[8 : 1000 : 0.00019]: 1.63880\n",
"[8 : 1500 : 0.00019]: 1.63094\n",
"[8 : 2000 : 0.00019]: 1.63817\n",
"[8 : 2500 : 0.00019]: 1.63298\n",
"[8 : 3000 : 0.00019]: 1.63939\n",
"[9 : 500 : 0.00015]: 1.63136\n",
"[9 : 1000 : 0.00015]: 1.63009\n",
"[9 : 1500 : 0.00015]: 1.63269\n",
"[9 : 2000 : 0.00015]: 1.62601\n",
"[9 : 2500 : 0.00015]: 1.63500\n",
"[9 : 3000 : 0.00015]: 1.64604\n",
"[10 : 500 : 0.00012]: 1.62533\n",
"[10 : 1000 : 0.00012]: 1.63037\n",
"[10 : 1500 : 0.00012]: 1.64502\n",
"[10 : 2000 : 0.00012]: 1.62350\n",
"[10 : 2500 : 0.00012]: 1.63908\n",
"[10 : 3000 : 0.00012]: 1.64397\n",
"[11 : 500 : 0.00010]: 1.63478\n",
"[11 : 1000 : 0.00010]: 1.63547\n",
"[11 : 1500 : 0.00010]: 1.62571\n",
"[11 : 2000 : 0.00010]: 1.63491\n",
"[11 : 2500 : 0.00010]: 1.63768\n",
"[11 : 3000 : 0.00010]: 1.63386\n",
"[12 : 500 : 0.00008]: 1.64252\n",
"[12 : 1000 : 0.00008]: 1.62689\n",
"[12 : 1500 : 0.00008]: 1.64115\n",
"[12 : 2000 : 0.00008]: 1.63263\n",
"[12 : 2500 : 0.00008]: 1.62448\n",
"[12 : 3000 : 0.00008]: 1.63734\n",
"[13 : 500 : 0.00006]: 1.62581\n",
"[13 : 1000 : 0.00006]: 1.64151\n",
"[13 : 1500 : 0.00006]: 1.64488\n",
"[13 : 2000 : 0.00006]: 1.62632\n",
"[13 : 2500 : 0.00006]: 1.62985\n",
"[13 : 3000 : 0.00006]: 1.62826\n",
"[14 : 500 : 0.00005]: 1.64410\n",
"[14 : 1000 : 0.00005]: 1.62550\n",
"[14 : 1500 : 0.00005]: 1.62725\n",
"[14 : 2000 : 0.00005]: 1.64097\n",
"[14 : 2500 : 0.00005]: 1.63846\n",
"[14 : 3000 : 0.00005]: 1.62461\n",
"[15 : 500 : 0.00004]: 1.63615\n",
"[15 : 1000 : 0.00004]: 1.64376\n",
"[15 : 1500 : 0.00004]: 1.62264\n",
"[15 : 2000 : 0.00004]: 1.64407\n",
"[15 : 2500 : 0.00004]: 1.63888\n",
"[15 : 3000 : 0.00004]: 1.62125\n",
"[16 : 500 : 0.00003]: 1.63551\n",
"[16 : 1000 : 0.00003]: 1.61353\n",
"[16 : 1500 : 0.00003]: 1.64195\n",
"[16 : 2000 : 0.00003]: 1.65160\n",
"[16 : 2500 : 0.00003]: 1.63209\n",
"[16 : 3000 : 0.00003]: 1.62860\n",
"[17 : 500 : 0.00003]: 1.63436\n",
"[17 : 1000 : 0.00003]: 1.62711\n",
"[17 : 1500 : 0.00003]: 1.64353\n",
"[17 : 2000 : 0.00003]: 1.62368\n",
"[17 : 2500 : 0.00003]: 1.63820\n",
"[17 : 3000 : 0.00003]: 1.63200\n",
"[18 : 500 : 0.00002]: 1.63967\n",
"[18 : 1000 : 0.00002]: 1.63210\n",
"[18 : 1500 : 0.00002]: 1.62567\n",
"[18 : 2000 : 0.00002]: 1.63931\n",
"[18 : 2500 : 0.00002]: 1.63535\n",
"[18 : 3000 : 0.00002]: 1.63514\n",
"[19 : 500 : 0.00002]: 1.63749\n",
"[19 : 1000 : 0.00002]: 1.61178\n",
"[19 : 1500 : 0.00002]: 1.63418\n",
"[19 : 2000 : 0.00002]: 1.63456\n",
"[19 : 2500 : 0.00002]: 1.63777\n",
"[19 : 3000 : 0.00002]: 1.63995\n"
],
"name": "stdout"
}
]
},
{
"metadata": {
"id": "Gzy5cICTMa00",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"output = model( torch.ones(1, 2).to(device)).cpu()\n",
"w, mx, my, logvarx, logvary, rho = output.split(m, dim=1)\n",
"w = w.softmax(dim=1)\n",
"varx = logvarx.exp()\n",
"vary = logvary.exp()\n",
"rho = rho.tanh()\n"
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "JFowKk3NVdWX",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"mx = mx.view(-1)\n",
"my = my.view(-1)\n",
"varx = varx.view(-1)\n",
"vary = vary.view(-1)\n",
"rho = rho.view(-1)\n",
"w = w.view(-1)"
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "z8ztybkZV4Fm",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"# Generate data\n",
"N = 100000\n",
"M=40\n",
"choices = np.random.choice(range(M), size=N, p=w.data.view(-1).numpy())\n",
"KK = torch.empty( (N, 2) )\n",
"\n",
"\n",
"means = torch.empty(M,2)\n",
"means[:,0] = mx\n",
"means[:,1] = my\n",
"\n",
"covs = [ torch.Tensor( [ [varx[i] , rho[i]*torch.sqrt(varx[i]*vary[i]) ], \n",
" [rho[i]*torch.sqrt(varx[i]*vary[i]), vary[i]] ] ) for i in range(M) ]\n",
"Zs = [ torch.distributions.MultivariateNormal(loc=means[c], \n",
" covariance_matrix=covs[c]) for c in range(M) ]\n",
"\n",
"for id, c in enumerate(choices): \n",
" KK[id,: ] = Zs[c].sample()"
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "m3KUwzTgXBfl",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 215
},
"outputId": "7a819661-6eed-4c5b-fd47-59ee229057c3"
},
"cell_type": "code",
"source": [
"plt.style.use('ggplot')\n",
"plt.minorticks_off()\n",
"rcParams['figure.figsize'] = 3,3\n",
"\n",
"\n",
"_ = plt.hist2d(KK[:, 0].numpy(), KK[:, 1].numpy(), bins=100 , range=[[-3, 3],[-3,3]])\n",
"rcParams['figure.figsize'] = 3,3\n"
],
"execution_count": 46,
"outputs": [
{
"output_type": "display_data",
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAMgAAADGCAYAAACXUs/uAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBo\ndHRwOi8vb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GwIAIiCBZEQATBggiIIFgQAREE\nCyIggmBBBEQQLIiACIIFERBBsCACIggWREAEwYIIiCBY8DWJfGJiAnv27EGxWESpVMIjjzyi1o0Q\nhDDha076gQMHsHz5ctx1110YHh7G/v37MTg4uBjjE4Sm4kuD3Hfffer3CxcuoK+vL7ABCUIr4btP\nz/j4OF577TVks1m88MILQY5JEFqGuiaWrfUoAHz77bf417/+JSaWEEp8+SDDw8NYv349li5dCgDY\nsWMH3nrrrcAHJwjNxleY93//+x8+++wzAMCpU6dwxRVXBDooQWgVfGmQyclJ7NmzB7lcDsViEdu3\nb8fVV1+9GOMThKYirUcFwYJk0gXBggiIIFgI5XoFYV6F95133sHx48fhOA62b9+OzZs3N3tIgbJv\n3z4cO3YMlUoF999/P26//fbmDsgNIUNDQ+6bb77puq7rnjp1yt21a1eTRxQMP/zwg/vqq6+6ruu6\np0+fdp999tkmjyhYjh496r7yyiuu67ru5OSk+9hjjzV5RK4bSg0S1lV4jx49ittuuw0AsG7dOszM\nzCCTyaCrq6vJIwuGrVu3Ko3Y3d2NfD6PSqXS1IVFQ+mDxGIxtTRcmFbhHR8fR29vr/q7t7cX4+Pj\nTRxRsEQiEaRSKQCza2DedNNNTV91t+01SCevwuuGNEL/9ddfY2hoqCXKl9peQAYGBjAwMFCzfWho\nCIcPH8aTTz4ZmrUT0+l0lcYYGxtDOp1u4oiC58iRI9i/fz+ee+65ljAdQ2lihXUV3m3btuHQoUMA\ngJGREaTTaSxZsqTJowqOTCaDffv2YdeuXarOr9mEMpMe5lV433vvPRw7dgyO42DHjh3YuHFjs4cU\nGJ9++ik++OADrFmzRm17/PHHq/4fLzehFBBBCIpQmliCEBQiIIJgQQREECyIgAiCBREQQbAgAiII\nFkRABMGCCIggWPg/z6DsqCIcwuQAAAAASUVORK5CYII=\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x7f007c9087f0>"
]
},
"metadata": {
"tags": []
}
}
]
},
{
"metadata": {
"id": "NowyX10fvalC",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 215
},
"outputId": "82dfa6b4-e7df-44a9-e51c-4eacb7436e84"
},
"cell_type": "code",
"source": [
"plt.style.use('ggplot')\n",
"plt.minorticks_off()\n",
"rcParams['figure.figsize'] = 3,3\n",
"\n",
"\n",
"_ = plt.hist2d(D[:, 0].numpy(), D[:, 1].numpy(), bins=100, range=[[-3, 3],[-3,3]])"
],
"execution_count": 47,
"outputs": [
{
"output_type": "display_data",
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAMgAAADGCAYAAACXUs/uAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAGr9JREFUeJztnVtsVNX3x79z74WWtlw1WBARFEkQ\nL/HuCzz48EsgUR81JPjgg755Qa3GRNEYXyU8GOMl6IMkaBQvidp4SRRiUBK0qJiqiFoohSl02rme\n83+Y/9pds8+e3enpKTNzZn0SMtMzZ87ZZ9hrr7X2WnvtiOu6LgRBMBKtdwMEoZERAREECyIggmBB\nBEQQLIiACIIFERBBsBD386VcLofdu3djfHwchUIBd999N66//vqg2yYIdceXgBw+fBhXXHEFtm7d\nitHRUTz//PMiIEIo8SUgt956q3o/NjaGvr6+wBokCI2ELwEhBgYGMDY2hp07dwbVHkFoKCJzTTX5\n888/8corr+Dll19GJBIJql2C0BD4msUaHh7GmTNnAACrVq1CqVTC+fPnA22YIDQCvgRkaGgIBw4c\nAACk02lks1l0dXUF2jBBaAR8mVj5fB579uzB2NgY8vk87rnnHtxwww3z0T5BqCtz9kEEIcxIJF0Q\nLIiACIIFERBBsCACIggWREAEwYIIiCBYEAERBAsiIIJgQQREECyIgAiCBREQQbAgAiIIFkRABMGC\nCIggWBABEQQLIiCCYEEERBAsiIAIgoU51cXau3cvjh07BsdxsG3bNtx0001BtUsQGg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mdADAwMFB1b21BaFYk1UQQLEgkXRAsiIAIggUREEGwIAIiCBZEQATBggiIIFgQ\nAREECyIggmBBBEQQLIiACIIFERBBsCACIggWREAEwYIIiCBYEAERBAsiIIJgQQREECyIgAiCBV+L\nyMfHx7F7924UCgUUi0Xcf//9uPLKK4NumyDUHV9r0g8cOICenh7cfvvtGBoawv79+zEwMDAf7ROE\nuuJLg/zvf/9T78+cOYO+vr7AGiQIjYTvOj3pdBovvfQSpqam8MwzzwTZJkFoGGY0sWylRwHghx9+\nwMcffywmlhBKfPkgQ0ND6O/vV/tn79ixA6+99lrgjROEeuNrmvfQoUP46quvAAAnTpzAokWLAm2U\nIDQKvjTI+fPnsXv3bmSzWRQKBWzfvh1r166dj/YJQl2R0qOCYEEi6YJgQQREECyEcr+CMO/C+8Yb\nb+D48eOIRCLYvn071qxZU+8mBcrevXtx7NgxOI6Dbdu24aabbqpvg9wQMjg46L766quu67ruiRMn\n3J07d9a5RcHw888/uy+++KLruq77999/u08++WSdWxQsR48edV944QXXdV33/Pnz7oMPPljnFrlu\nKDVIWHfhPXr0KG688UYAwIoVK5DJZDA5OYmOjo46tywY1q9frzRiZ2cncrkcHMdR+7TXg1D6IPF4\nXG0NF6ZdeNPpNLq7u9Xf3d3dSKfTdWxRsESjUbS1tQEo74G5adOmugoHEAIfpJV34XVDOkP//fff\nY3BwsCHSl5peQDZv3ozNmzd7jg8ODuLw4cN49NFHQ7N3Ym9vb4XGOHfuHHp7e+vYouA5cuQI9u/f\nj6eeeqohTMdQmlhh3YV348aNOHjwIABgeHgYvb29aG9vr3OrgmNychJ79+7Fzp07VZ5fvQllJD3M\nu/C+/fbbOHbsGCKRCHbs2IFVq1bVu0mB8fnnn2Pfvn245JJL1LGHHnqo4v/xYhNKARGEoAiliSUI\nQSECIggWREAEwYIIiCBYEAERBAsiIIJgQQREECyIgAiChf8DbPqn+VlkhIAAAAAASUVORK5CYII=\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x7f007c8a2630>"
]
},
"metadata": {
"tags": []
}
}
]
},
{
"metadata": {
"id": "PVRLi_Tjg7IN",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
""
],
"execution_count": 0,
"outputs": []
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment