什么是“参数"?咖啡层? [英] What is "Parameter" layer in caffe?

查看:71
本文介绍了什么是“参数"?咖啡层?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我遇到了 "Parameter" caffe中的图层.
似乎此层将其内部参数blob暴露给"top".

Recently I came across "Parameter" layer in caffe.
It seems like this layer exposes its internal parameter blob to "top".

该层用于什么用途?
您可以举一个用法示例吗?

What is this layer using for?
Can you give a usage example?

推荐答案

此层是在请求请求中引入的

This layer was introduced in the pull request #2079, with the following description:

此层仅保存用户定义形状的参数blob,并将其共享为单个顶部.

This layer simply holds a parameter blob of user-defined shape, and shares it as its single top.

这正是您所期望的.这是在问题#1474 的上下文中引入的,该问题基本上建议处理类似正常的底部斑点.为了说明为什么这样做有用,请考虑以下示例(摘自问题#1474 ,通过 @longjon ):

which is exactly what you expected. This was introduced in context of the issue #1474, which basically proposes to treat parameters like normal bottom blobs. To show why this can be useful, consider the following example (taken from issue #1474, by @longjon):

内部乘积层计算C = A * B,其中C是顶部Blob(输出),B是底部Blob,A 必须是参数Blob.这是非常严格的,因为这使得不可能使用内积层在两个底部斑点之间增加内积.将两个输入矩阵相乘.问题#1474 建议进行根本性的更改:使参数独立于图层.相反,请像对待普通的底部Blob一样对待它们.

The inner product layer calculates C = A * B, where C is the top blob (output), B is a bottom blob, and A must be a parameter blob. This is very restrictive, as this makes it impossible to use the inner product layer for multiplying the inner product between two bottom blobs, e.g. multiplying two input matrices. The issue #1474 suggests to make a fundamental change: make parameters independent of the layer. Instead, treat them like a normal bottom blob.

作为朝着这个方向迈出的第一步,引入了Parameter.这使您可以定义一个新参数,然后可以将其输入到另一层的底部. 拉取请求# 2166 尚未合并,截至2017年1月. 尽管尚未合并,但仍可以使用Parameter层定义新的可学习参数,以作为底部Blob馈入其他层.

As a first step in that direction, the Parameter layer was introduced. This allows you to define a new parameter, which you can then feed into the bottom of another layer. The counterpart - a method for feeding parameters into a layer as a bottom blob - is proposed in pull request #2166, which isn't merged yet, as of Jan. 2017. Though this is not merged yet, you can still use Parameter layer to define new learnable parameters to feed into other layers as bottom blob.

这篇关于什么是“参数"?咖啡层?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆