美文网首页
Processing 特训(Neural Networks) -

Processing 特训(Neural Networks) -

作者: 求愚 | 来源:发表于2019-09-14 10:21 被阅读0次

    明确概念

    Strategies of learning: Supervised learning(有测试集结果), Unsupervised learning(无测试集结果), Reinforcement learning(有环境感知)

    Perception algorithm: input by its weight, sum all of the weighted inputs, Compute the perception output

    lerp: lerp(start,stop,amt), 一个变量在 start 和 stop 之间按照 amt 取值指定一个数,the lerp function is convenient for creating motion along a straight path and for drawing dotted lines.

    明确功能

    1.通过感知算法判断一个点落在线的左边还是右边

    -Provide perception inputs and known answer

    -Ask perception to guess the answer

    -Compute the error

    =desired - guess

    =input * (desired - guess)

    =weight + input * (desired - guess)

    =weight + input * (desired - guess) * learning rate

    -Adjust all the weights according to the error

    -Repeat N times to get appropriate input weights

    功能设计

    类:Perception

    属性:weights

    方法:guess, feedforward

    伪代码

    setup(){

    }

    draw(){

    }

    class Perception{

        定义属性

        Perception(){}

        定义方法

    }

    正式代码

    见:

    Processing/Neural_networks at master · JoeyQiang/Processing · GitHub

    代码优化

    1.点集出现“虚拟线”的左右两侧

    2.Neural networks diagram

    相关文章

      网友评论

          本文标题:Processing 特训(Neural Networks) -

          本文链接:https://www.haomeiwen.com/subject/ezqtyctx.html