PySpikeBySpike_04_2025/plot_test.py
2025-04-08 15:21:11 +02:00

10 lines
194 B
Python

# %%
import torch
import matplotlib.pyplot as plt
x = (torch.arange(0, 10000) / 1000) - 5.0
beta = 10.0
plt.plot(x, torch.nn.functional.relu(0.5 + 0.5 * torch.tanh(beta * x)))
plt.show()
# %%