反向传播、卷积、反卷积一些要点

假设s这里误差单位1,到达,z 1(3),error is δ 1(3) =1 ,因为最后一个神经元没有非线性变换。

到达a1(2),  error is      δ 1(3)*w12  

越过神经元maps z12 to a12,δ 1(2) = w1(2)* σ一撇  (z1 (2))

 

卷积的一些要点:

输入32*32*3,参数个数:5*5 (模板)* 3(前一通道厚度)=75 

输入7*7  模板3*3 stride1,输出大小5*5;stride2,,输出3*3

input (不care前一层,只care有多少个模板) 32*32*3 receptive fields 5*5 stride 1 number neurons 5 output volume?

out = 28*28*5  weights :5*5*3*5 = 75 

input 7*7   核 3*3  stride 1  pad with1 pixel 输出 7*7

227 *227 *3  11*11 1个  stride 4 no zero pad 输出:55*55  (227-11)/4+1,每一个卷积模板参数:11*11*3

例题;pytorch :nn.conv16 33 3 stride=2 ,pad =1),input = torch.randn(20,16,50,100)

output 20(batchsize )*33(output channel)*25*50

(3、2、1组合通常下采样2倍,3、1、1原来比例)

import torch
import torch.nn as nn

x = torch.randn(20, 16, 50, 100) # batch, channel , height , width
print(x.shape)
m = nn.Conv2d(16, 33, (3), (2),padding =1)  # in_channel, out_channel ,kennel_size,stride
print(m)
y = m(x)
print(y.shape)

                

 

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值