Git Product home page Git Product logo

different_init_regular's Introduction

different_init_regular

实验不同初始化参数、正则化方式的影响

Installation

  • python 3.7
  • jupyter notebok
  • matplotlib
  • numpy
  • sklearn

datasets

data.mat 提取密码:mp2q

result

L2正则化的结果
result_L2
dropout的结果
result

learning

L2正则化是在成本函数中增加一项L2范数,会改变成本的计算,以及后向传播
Dropout是随机失活,一般是在神经元较密集的层采用,神经元较少的层不采用,通过一个超参数keep_prob进行控制。失活率为1-keep_prob。会改变前向传播和后向传播。
1.初始化矩阵D1 = np.random.rand(..., ...)和Al相同维度,其数都是0-1之间的D1 = np.random.rand(A1.shape[0], A1.shape[1])
2.将D1的值转换为0或1(使用keep_prob作为阈值 D1 = D1 < keep_prob
3.舍弃A1的一些节点(将它的值变为0或False)A1 = A1 * D1
4.缩放未舍弃的节点(不为0)的值 A1 = A1 / keep_prob

different_init_regular's People

Contributors

initbin avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.