This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
# 활성화 함수와 그 도함수 | |
def sigmoid(x): | |
return 1 / (1 + np.exp(-x)) | |
def sigmoid_derivative(x): | |
return x * (1 - x) | |
# 학습 데이터 (하나의 샘플) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def arrowed_spines(fig, ax, remove_ticks=False): | |
""" | |
좌표축 화살표를 그리기 위한 함수 | |
https://stackoverflow.com/questions/33737736/matplotlib-axis-arrow-tip | |
""" | |
xmin, xmax = ax.get_xlim() | |
ymin, ymax = ax.get_ylim() | |
# removing the default axis on all sides: | |
for side in ['bottom','right','top','left']: |
OlderNewer