zoukankan      html  css  js  c++  java
  • Neural Networks for Machine Learning by Geoffrey Hinton (4)

    一种能够学习家谱关系的简单神经网络

    血缘一共同拥有12种关系:

    son, daughter, nephew, niece, father, mother, uncle, aunt, brother, sister, husband, wife

    有1个英国家庭以及1个意大利家庭,每一个家庭有12个人。

    各种家庭关系都是可用三元数组表示。即( Agent / Relation / Patient ) 结构:

    • (colin has-father james)
    • (colin has-mother victoria)
    • (james has-wife victoria) 能够由上述关系推导得到

    该网络由5层结构组成,如图1所看到的


    图1
    图1

    • 网络底层左右两边各有12个神经元。

    • 第1层左側神经元输入 Agent 向量,每次仅仅有一个为1,如000100000000。
    • 第1层右側神经元输入 Relation 向量。每次也仅仅有一个为1。
    • 第2层左側神经元用来序列化 Agent 向量,右側神经元用来序列化 Relation 向量。

    • 第3层用以学习 Agent 与 Relation 的关系,预測出 Patient。
    • 第4层解析出 Patient 向量。
    • 第5层是预測出的实际 Patient。其每次的激活值可能不仅仅一个。
      比如:Andrew has-aunt ? 可能相应多个 aunt。

    网络学到了什么?

    以序列化输入 Agent 的 6 个神经元为例。如图2.
    - 1号神经元对不同国籍的输入非常敏感。能够进行区分。
    - 2号神经元对每次输入 Agent 所属的辈分(Generation)非常敏感。
    - 6号神经元对每次输入 Agent 所属的家庭非常敏感。


    这里写图片描写叙述
    图2

    关于 概念(Concepts) 的两种理论

    • 特征理论(The Feature Theory)

      概念是语义特征的集合。
      A concept is a set of semantic features.


    因此概念就能够用特征的向量来表示

    • 结构主义理论(The Structuralist Theory)

      概念的意义存在于概念与概念之间的关系。
      The meaning of a concept lies in its relationships to other concepts.


    因此概念能够用关系图模型表达。 Hinton 觉得 *Both sides are wrong* ,由于

    神经网络能够使用语义特征来实现关系图模型

    Softmax 输出函数

    均方误差有下面缺陷

    • 假设目标是1而如今的实际输出是0.00000001。那么返回给神经元的梯度差点儿为0.
    • 强制指定所属各类概率就会剥夺网络的学习能力。
      Softmax作为逻辑回归的推广,能够非常好解决这些问题。

    构造公式

    yi=ezijgroupezi

    梯度公式

    yizi=yi(1yi)

    代价函数依旧使用相互熵

    dC / dy 的陡峭正好抵消了 dy / dz 的平坦。

    相互熵

    C=jtjlogyj

    梯度

    Czi=jCyjyjzi=yiti

    Theano相应函数

    x,y,b = T.dvectors('x','y','b')
    W = T.dmatrix('W')
    y = T.nnet.softmax(T.dot(W,x) + b)
  • 相关阅读:
    JavaScript的由来, 浏览器的20年
    WEB界面onload前的加载流程❤❤
    HTML5文件系统API和资料整理
    No enclosing instance of type is accessible. Must qualify the allocation with an enclosing instance of type LeadRestControllerTest (e.g. x.new A() where x is an instance of ).
    Git Gerrit Code Review
    Nginx Configuring HTTPS servers
    自签名证书 nginx tomcat
    centos yum install nginx
    局域网 服务器 https
    分布式重复提交
  • 原文地址:https://www.cnblogs.com/cynchanpin/p/7290057.html
Copyright © 2011-2022 走看看