神經元與人工神經元

來源:互聯網
上載者:User

生物的神經元結構如下:


與人工神經元:


這種現象叫做仿生學。

可以使用代碼來實現兩個權值的感知機:

w = [0, 0]b = 0def createDataSet():    """    create dataset for test    """    return [[(3, 3), 1], [(4, 3), 1], [(1, 1), -1]]def update(item):    """    update with stochastic gradient descent    """    global w, b    w[0] += item[1] * item[0][0]    w[1] += item[1] * item[0][1]    b += item[1]def cal(item):    """    calculate the functional distance between 'item' an the dicision surface. output yi(w*xi+b).    """    res = 0    for i in range(len(item[0])):        res += item[0][i] * w[i]    res += b    res *= item[1]    return resdef check(training_set):    """    check if the hyperplane can classify the examples correctly    """    flag = False    for item in training_set:        if cal(item) <= 0:            flag = True            update(item)    if not flag:        print("RESULT: w: " + str(w) + " b: " + str(b))    return flagif __name__ == "__main__":    training_set = createDataSet()    while check(training_set):        pass

1. TensorFlow API攻略 http://edu.csdn.net/course/detail/4495
2. TensorFlow入門基本教程 http://edu.csdn.net/course/detail/4369
3. C++標準模板庫從入門到精通 
http://edu.csdn.net/course/detail/3324
4.跟老菜鳥學C++
http://edu.csdn.net/course/detail/2901 5. 跟老菜鳥學python http://edu.csdn.net/course/detail/2592 6. 在VC2015裡學會使用tinyxml庫 http://edu.csdn.net/course/detail/2590 7. 在Windows下SVN的版本管理與實戰   http://edu.csdn.net/course/detail/2579 8.Visual Studio 2015開發C++程式的基本使用  http://edu.csdn.net/course/detail/2570 9.在VC2015裡使用protobuf協議 http://edu.csdn.net/course/detail/2582 10.在VC2015裡學會使用MySQL資料庫
http://edu.csdn.net/course/detail/2672

http://www.cnblogs.com/subconscious/p/5058741.html

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.