Lambda를 활용한 Activate Function
import matplotlib.pyplot as plt import numpy as np %matplotlib inline x = list(range(-100,100)) step_y = list(map(lambda a : 1 if a>0 else 0, x)) sign_y = list(map(lambda a : 1 if a>0 else -1, x)) sign_y[100] = 0 #lambda는 elif가 없음. sigmoid_y = list(map(lambda a : 1 / (1 + np.exp(-a)), (x))) relu_y = list(map(lambda a : a if a>0 else 0, x)) fig, (ax1, ax2, ax3, ax4) = plt.subplots(figsize = (18, ..
2021. 2. 12.