(02)pynq 簡易圖像識別(2GraphicRecognition)

# numpy provides arrays and useful functions for working with them
import numpy
# scipy.special for the sigmoid function expit()
import scipy.special
# scipy.ndimage for rotating image arrays
import scipy.ndimage
import matplotlib.pyplot
# ensure the plots are inside this notebook, not an external window
%matplotlib inline
import imageio

#########################
#########################
#########################
# (一)引入神經網絡
# (1)定義神經網絡
# neuralNetwork輸入參數:
# inputnodes, hiddennodes,outputnodes, learningrate
# wih == 輸入層權重     who == 輸出層權重
# activation function == sigmoid函數(S激活函數)
# inverse_activation_function == sigmoid的反函數
class neuralNetwork:
    def __init__(self, inputnodes, hiddennodes, outputnodes, learningrate):
        self.inodes = inputnodes
        self.hnodes = hiddennodes
        self.onodes = outputnodes        
     

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章