Skip to content

Commit

Permalink
Update NMNIST.ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentperrinet committed Dec 6, 2023
1 parent d723f37 commit 44779a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/dataloaders/NMNIST.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,12 @@
"\n",
"# flatten on-spikes and off-spikes into one channel\n",
"# a = (train_dl.dataset[n][0][:, 0] + train_dl.dataset[n][0][:, 1])\n",
"data = (data>=1).float() # some spikes are equal to 2...\n",
"a = (data[:, 0, :, :] - data[:, 1, :, :])\n",
"# a = np.swapaxes(a, 0, -1)\n",
"# Plot\n",
"fig, ax = plt.subplots()\n",
"anim = splt.animator(a, fig, ax, interval=30)\n",
"anim = splt.animator(a, fig, ax, interval=30, cmap='seismic')\n",
"HTML(anim.to_html5_video())\n",
"# anim.save('nmnist_animation.mp4', writer = 'ffmpeg', fps=50) "
]
Expand Down

0 comments on commit 44779a9

Please sign in to comment.