[python]常にニューラルネットワーク03を実装


最初から最後までニューラルネットワーク03を実施
  • MathUtilsの追加パラメータの記述
  • %run /content/MathUtils.ipynb
  • init param関数の作成
  • def init_param():
        global weight, bias 
    
        weight_initial = []
        bias_initial   = []
        
        # 평균이 RND_MEAN이고 표준편차가 RND_STD인 input_cnt행 output_cnt열 가중치 행렬 생성
        weight = np.random.normal(RND_MEAN, RND_STD, size = [input_cnt, output_cnt])
        
        # 값이 0인 output_cnt개 편향 행 생성
        bias   = np.zeros([output_cnt])
        
        print("Initial Weight Value : \n{}".format(weight))
        print("Initial Bias Value : \n{}".format(bias))
        weight_initial.append(weight)
        bias_initial.append(bias)
    
        return weight_initial, bias_initial
  • 関数実行結果:
  • weight_initial, bias_initial = init_param()