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