From 735b72a43e7376ba661eb7844fd484aa926b6c19 Mon Sep 17 00:00:00 2001 From: Gregor Lenz Date: Fri, 30 Jun 2023 22:37:16 +0200 Subject: [PATCH] added NMNIST tutorial --- docs/conf.py | 1 + docs/tutorials/nmnist.ipynb | 410 +++++++++++++++++++++++++++++++++++ docs/tutorials/tutorials.rst | 1 + 3 files changed, 412 insertions(+) create mode 100644 docs/tutorials/nmnist.ipynb diff --git a/docs/conf.py b/docs/conf.py index 5c41047d..e5d1c077 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -40,6 +40,7 @@ "bptt.ipynb", "weight_transfer_mnist.ipynb", "synops_loss_ann.ipynb", + "nmnist.ipynb", ] # nb_execution_mode = "off" diff --git a/docs/tutorials/nmnist.ipynb b/docs/tutorials/nmnist.ipynb new file mode 100644 index 00000000..7358f4c1 --- /dev/null +++ b/docs/tutorials/nmnist.ipynb @@ -0,0 +1,410 @@ +{ + "cells": [ + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# End to end tutorial of training and deploying an SNN using EXODUS" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import sinabs\n", + "import sinabs.layers as sl\n", + "import torch\n", + "import torch.nn as nn\n", + "import numpy as np" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Let's visualize the neuron model that's supported on chip" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "iaf = sl.IAF(record_states=True, spike_threshold=5.)\n", + "\n", + "n_steps = 400\n", + "input_ = (torch.rand((1, n_steps, 1)) < 0.05).float()\n", + "output = iaf(input_)" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Text(0.5, 0, 'Time')" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAABM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8+XVu3bg1tS0tLU1paWixCAwAAaJUomQQAAIixnJyc0I/X65XL5QrblpaW1qRk8rLLLtPkyZM1depUdezYUdnZ2Xr66adVXV2tCRMmKD09Xb169dKiRYvCftfmzZs1ZswYpaWlKTs7WzfffLP27NkT5b8xAABAbJEQAwAASFB/+9vflJmZqU8++USTJ0/W7bffrh//+Me6+OKLtX79eo0cOVI333yzampqJEkHDhzQFVdcoXPPPVdr167V4sWLVVpaquuvvz7GfxMAAIDoIiEGAACQoAYNGqT//u//Vu/evVVQUKA2bdooMzNTt956q3r37q3p06dr79692rRpkyTpiSee0Lnnnqt7771Xffv21bnnnqtnn31Wy5Yt05dffhnjvw0AAED00EMMAAAgQQ0cODD05+TkZJ1yyikaMGBAaFt2drYkqaysTJL06aefatmyZcfsR7Z9+3b16dPH5ogBAADiAwkxAACABJWamhr22OVyhW0Lrl4ZCAQkSVVVVfrhD3+o+++/v8lndenSxcZIAQAA4gsJMQAAAIc477zz9Prrr6tHjx5KSeE0EAAAOBc9xAAAABwiPz9f+/bt04033qg1a9Zo+/bteueddzRhwgT5/f5YhwcAABA1JMQAAAAcomvXrvrwww/l9/s1cuRIDRgwQFOnTlWHDh2UlMRpIQAAcA6XYRhGrIMAAAAAAAAAooVbgQAAAAAAAHAUEmIAAAAAAABwFBJiAAAAAAAAcBQSYgAAAAAAAHAUEmIAAAAAAABwFBJiAAAAAAAAcBQSYgAAAAAAAHAUEmIAAAAAAABwFBJiAAAAAAAAcBQSYgAAAAAAAHAUEmIAAAAAAABwlP8PXTJ9m7PjCXsAAAAASUVORK5CYII=", + "text/plain": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "import matplotlib.pyplot as plt\n", + "\n", + "fig, (ax1, ax2, ax3) = plt.subplots(3, 1, sharex=True, figsize=(15,5))\n", + "\n", + "ax1.eventplot(torch.where(input_)[1])\n", + "ax1.set_ylabel(\"Input events\")\n", + "ax2.plot(iaf.recordings['v_mem'].squeeze().numpy())\n", + "ax2.set_ylabel(\"IF Vmem\")\n", + "ax3.eventplot(torch.where(output)[1])\n", + "ax3.set_ylabel(\"Output Events\")\n", + "ax3.set_xlabel(\"Time\")" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "from tonic import datasets, transforms\n", + "\n", + "trainset = datasets.NMNIST('data', train=True)\n", + "testset = datasets.NMNIST('data', train=False)" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [], + "source": [ + "transform = transforms.Compose([\n", + " transforms.ToFrame(sensor_size=trainset.sensor_size, n_time_bins=30, include_incomplete=True),\n", + " lambda x: x.astype(np.float32),\n", + "])\n", + "\n", + "events, label = trainset[0]" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(30, 2, 34, 34)" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "frames = transform(events)\n", + "frames.shape" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaAAAAGdCAYAAABU0qcqAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8o6BhiAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAfaElEQVR4nO3da3BV9dn38V84ZAOS7BggJ0kwgIJy6pRKTFWKkALpPAwIL/DQKVhuGGhwCqlV08dz24nFGUUdhBe1UKcilo6B0bnFQzRhrAmWKINgmwITGzQkVHqTHYIJIfk/L/q4724hslbY2ys7fD8za4a918Va18p/9MfKXrmS4JxzAgDgG9bPugEAwKWJAAIAmCCAAAAmCCAAgAkCCABgggACAJgggAAAJgggAICJAdYNfFVXV5caGhq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MOuvbnQtR0+fNg9+uijbu/eva6urs7t3LnTjR492k2fPt2486933333ucrKSldXV+f279/v7rvvPpeQkODeeOMN51z8rpdzzvX6AHLOuWeeecbl5OS4xMREN23aNFddXW3d0kVbvHixy8zMdImJie6KK65wixcvdocPH7Zuy7d33nnHSTpnW7JkiXPu349iP/DAAy49Pd0FAgE3a9YsV1tba9u0R193badPn3azZ892I0aMcAMHDnSjRo1yy5cv7/X/MDrf9UhymzdvDtd88cUX7ic/+Ym7/PLL3ZAhQ9wtt9zijh07Zte0Rxe6tvr6ejd9+nSXmprqAoGAGzt2rPv5z3/umpubbRu/gB//+Mdu1KhRLjEx0Y0YMcLNmjUrHD7Oxe96Oeccv44BAGCiV38GBADouwggAIAJAggAYIIAAgCYIIAAACYIIACACQIIAGCCAAIAmCCAAAAmCCAAgAkCCABgggACAJj4f+xF4/ggh5jsAAAAAElFTkSuQmCC", + "text/plain": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "plt.imshow(frames[:10, 0].sum(0))" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [], + "source": [ + "trainset = datasets.NMNIST('data', train=True, transform=transform)\n", + "testset = datasets.NMNIST('data', train=False, transform=transform)" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [], + "source": [ + "batch_size = 16\n", + "\n", + "trainloader = torch.utils.data.DataLoader(trainset, batch_size=batch_size, shuffle=True, num_workers=4, drop_last=True)\n", + "testloader = torch.utils.data.DataLoader(testset, batch_size=batch_size, num_workers=4, drop_last=True)" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "torch.Size([16, 30, 2, 34, 34])" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "frames = next(iter(trainloader))[0]\n", + "frames.shape" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [], + "source": [ + "import sinabs.exodus.layers as sel\n", + "\n", + "backend = sl # Sinabs\n", + "backend = sel # Sinabs EXODUS\n", + "\n", + "model = nn.Sequential(\n", + " sl.FlattenTime(),\n", + " nn.Conv2d(2, 8, kernel_size=3, padding=1, bias=False),\n", + " backend.IAFSqueeze(batch_size=batch_size, min_v_mem=-1),\n", + " sl.SumPool2d(2),\n", + " nn.Conv2d(8, 16, kernel_size=3, padding=1, bias=False),\n", + " backend.IAFSqueeze(batch_size=batch_size, min_v_mem=-1),\n", + " sl.SumPool2d(2),\n", + " nn.Conv2d(16, 32, kernel_size=3, padding=1, bias=False),\n", + " backend.IAFSqueeze(batch_size=batch_size, min_v_mem=-1),\n", + " sl.SumPool2d(2),\n", + " nn.Conv2d(32, 64, kernel_size=3, padding=1, bias=False),\n", + " backend.IAFSqueeze(batch_size=batch_size, min_v_mem=-1),\n", + " sl.SumPool2d(2),\n", + " nn.Conv2d(64, 10, kernel_size=2, padding=0, bias=False),\n", + " backend.IAFSqueeze(batch_size=batch_size, min_v_mem=-1),\n", + " nn.Flatten(),\n", + " sl.UnflattenTime(batch_size=batch_size),\n", + ").cuda()" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "torch.Size([16, 30, 10])" + ] + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "model(frames.cuda()).shape" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "8095803a6fd5412ba13f0ebc88ef3405", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + " 0%| | 0/3750 [00:00