# %% 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() # %%