mirror of
https://github.com/This-weiyuqing/ECG_by_Diffenert_CNN_Test.git
synced 2026-10-18 03:13:39 +08:00
By completing the thesis, we have corrected the deficiencies and fixed some bugs.
15 lines
251 B
Python
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()
|