distances = [torch.sum(torch.sqrt((target_rates - avg_rates) ** 2))]
rewards = [reward]
spike_record = {layer : torch.zeros(plot_interval, n) for layer in network.layers}
print()
for i in range(i):
After Change
ax.set_aspect("auto")
ax.set_title("Difference between target and actual firing rates.")
cbar = plt.colorbar(im)
plt.tight_layout()
fig2, ax2 = plt.subplots()
line2, = ax2.semilogy(distances, label="Distance")
ax2.axhline(0, ls="--", c="r")