Neuron and artificial neuron

Source: Internet
Author: User

The neuron structure of the organism is as follows:


and artificial neurons:


This phenomenon is called bionics.

You can use code to implement two weights of the Perceptron:

W = [0, 0] b = 0 def createdataset (): "" "" "" Create DataSet for Test "" [[3, 3), 1], [(4, 3), 1], [ (1, 1),-1]] def update (item): "" "Update with stochastic gradient descent" "" Global W, b w[0] + it EM[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] ret URN Res def check (training_set): "" "Check if the hyperplane can classify the examples correctly" "FLA
    g = 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 flag if __name__ = = "__main__": Trai
 Ning_set = CreateDataSet () while check (Training_set): Pass

1. TensorFlow API Introduction http://edu.csdn.net/course/detail/4495
2. Basic TensorFlow Introductory Tutorials http://edu.csdn.net/course/detail/4369
3. C + + Standard Template Library from getting started to mastering
http://edu.csdn.net/course/detail/3324
4. Learn C + + with old rookie
http://edu.csdn.net/course/detail/2901 5. Learn python http://edu.csdn.net/course/detail/2592 6 with old rookie . Learn to use TinyXML library http://edu.csdn.net/course/detail/2590 7 in VC2015 . SVN version Management and actual combat in Windows http:// edu.csdn.net/course/detail/2579 8.Visual Studio 2015 The basic use of developing C + + programs http://edu.csdn.net/course/ detail/2570 9. Use the PROTOBUF protocol http://edu.csdn.net/course/detail/2582 10 in VC2015 . Learn to use MySQL database in VC2015
http://edu.csdn.net/course/detail/2672

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.