Files
ECG_by_Diffenert_CNN_Test/some-test/softmax.py
T
weiyuqing af187d92e9 may be last version
By completing the thesis, we have corrected the deficiencies and fixed some bugs.
2023-04-18 18:43:14 +08:00

15 lines
251 B
Python

import numpy as np
import matplotlib.pyplot as plt
def softmax(x):
return np.exp(x) / np.sum(np.exp(x))
x = np.arange(-10, 10, 0.1)
y = softmax(x)
plt.plot(x, y)
plt.title('Softmax Function')
plt.xlabel('Input')
plt.ylabel('Output')
plt.show()