ひとり勉強ログ

ITエンジニアの勉強したことメモ

2022-07-01から1ヶ月間の記事一覧

【ゼロから作るDeepLearning】2章パーセプトロン

2.1 パーセプトロンとは def AND(x1, x2): w1, w2, theta = 0.5, 0.5, 0.7 tmp = x1*w1 + x2*w2 if tmp <= theta: return 0 elif tmp > theta: return 1 print(AND(0, 0)) print(AND(1, 0)) print(AND(0, 1)) print(AND(1, 1)) パラメータのw1、w2、thetaは…

【ゼロから作るDeepLearning】1章 python入門

1.5 Numpy 1.5.5 ブロードキャスト >>> import numpy as np >>> A = np.array([[1,2], [3,4]]) >>> B = np.array([10,20]) >>> A*B array([[10, 40], [30, 80]]) 1.6 Matplotlib 1.6.1 単純なグラフの描画 >>> import numpy as np >>> import matplotlib.pyp…