Datawhale 学CV--task4 模型训练与验证
尝试修改网络结构的记录:
1、resnet18修改为vgg16,epoch=2时效果差点,修改:
model_conv = models.vgg16(pretrained=True)
#model_conv = models.restnet18(pretrained=True)
2、如果每个stage结构都一样,可以写如下,再传参数。
self.conv1 = nn.Sequential(
nn.Conv2d()
nn.BatchNormal()
nn.PReLU()
nn.MaxPooling()
nn.Dropout()
)
传参数:conv2d(n_in,n_out,kernel,stride,padding)
batchnormal(n_out)待处理数据的channel;batchnormal(n_out,0.1)包含了?
PRelu可以换成Relu,无参数;
Maxpooling(2)表示(2,2)的maxpooling
Dropout(0.2),网络小时取值也小,一般0.2--0.5
baseline只能到35,修改了网络也是50,不知道怎么提高。
参考:
svhn的参考net:https://github.com/aaron-xichen/pytorch-playground/blob/master/svhn/model.py(train还有Lr的变化)
sequential的定义和参数传递:(定义函数)
https://www.debugger.wiki/article/html/157249224958066
sequential和调用
https://www.cnblogs.com/wangguchangqing/p/11058525.html
https://www.cnblogs.com/darkknightzh/p/6065526.html sequential显示net的详细方法
torch 的yolo4: https://blog.csdn.net/weixin_44791964/article/details/106214657