代码拉取完成,页面将自动刷新
神经网络是由一堆权重数字组成(一般是由高斯随机数组成的矩阵),训练前需要加载初始化权重参数 net.load(weight),以下神经网络隐藏层需要权重参数
名称 | 说明 | 长度 |
---|---|---|
conv2d |
卷积神经网络 | 权重数量 = 神经元数量 + 余数 |
separableConv2d |
可分离卷积神经网络 | 权重数量 = 深度卷积神经元数量 + 点积神经元数量 + 余数 |
batchNorm |
BN层 | sub尺寸 + truediv尺寸 |
const config = [{
"type": "separableConv2d",
"pad": [
[0, 0],
[1, 1],
[1, 1],
[0, 0]
],
"depthwise_filter": [3, 3, 3, 1],
"pointwise_filter": [1, 1, 3, 16],
"strides": [1, 1],
"padding": "valid"
}, {
"type": "leakyRelu",
"slope": 0.10000000149011612
}, {
"type": "maxPool",
"size": [2, 2],
"strides": [2, 2],
"padding": "same"
}, {
"type": "separableConv2d",
"pad": [
[0, 0],
[1, 1],
[1, 1],
[0, 0]
],
"depthwise_filter": [3, 3, 16, 1],
"pointwise_filter": [1, 1, 16, 32],
"strides": [1, 1],
"padding": "valid"
}, {
"type": "leakyRelu",
"slope": 0.10000000149011612
}, {
"type": "maxPool",
"size": [2, 2],
"strides": [2, 2],
"padding": "same"
}, {
"type": "separableConv2d",
"pad": [
[0, 0],
[1, 1],
[1, 1],
[0, 0]
],
"depthwise_filter": [3, 3, 32, 1],
"pointwise_filter": [1, 1, 32, 64],
"strides": [1, 1],
"padding": "valid"
}, {
"type": "leakyRelu",
"slope": 0.10000000149011612
}, {
"type": "maxPool",
"size": [2, 2],
"strides": [2, 2],
"padding": "same"
}, {
"type": "separableConv2d",
"pad": [
[0, 0],
[1, 1],
[1, 1],
[0, 0]
],
"depthwise_filter": [3, 3, 64, 1],
"pointwise_filter": [1, 1, 64, 128],
"strides": [1, 1],
"padding": "valid"
}, {
"type": "leakyRelu",
"slope": 0.10000000149011612
}, {
"type": "maxPool",
"size": [2, 2],
"strides": [2, 2],
"padding": "same"
}, {
"type": "separableConv2d",
"pad": [
[0, 0],
[1, 1],
[1, 1],
[0, 0]
],
"depthwise_filter": [3, 3, 128, 1],
"pointwise_filter": [1, 1, 128, 256],
"strides": [1, 1],
"padding": "valid"
}, {
"type": "leakyRelu",
"slope": 0.10000000149011612
}, {
"type": "maxPool",
"size": [2, 2],
"strides": [2, 2],
"padding": "same"
}, {
"type": "separableConv2d",
"pad": [
[0, 0],
[1, 1],
[1, 1],
[0, 0]
],
"depthwise_filter": [3, 3, 256, 1],
"pointwise_filter": [1, 1, 256, 512],
"strides": [1, 1],
"padding": "valid"
}, {
"type": "leakyRelu",
"slope": 0.10000000149011612
}, {
"type": "maxPool",
"size": [2, 2],
"strides": [1, 1],
"padding": "same"
}, {
"type": "separableConv2d",
"pad": [
[0, 0],
[1, 1],
[1, 1],
[0, 0]
],
"depthwise_filter": [3, 3, 512, 1],
"pointwise_filter": [1, 1, 512, 1024],
"strides": [1, 1],
"padding": "valid"
}, {
"type": "leakyRelu",
"slope": 0.10000000149011612
}, {
"type": "separableConv2d",
"pad": [
[0, 0],
[1, 1],
[1, 1],
[0, 0]
],
"depthwise_filter": [3, 3, 1024, 1],
"pointwise_filter": [1, 1, 1024, 1024],
"strides": [1, 1],
"padding": "valid"
}, {
"type": "leakyRelu",
"slope": 0.10000000149011612
}, {
"type": "conv2d",
"pad": [],
"filter": [1, 1, 1024, 25],
"strides": [1, 1],
"padding": "valid"
}];
// 声明权重工具类
const initWeights = new yolo.InitWeights();
// 获取YOLO初始化权重
const weights = initWeights.init(config).getData();
console.log(weights); // => [Guss Random]
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。