cudnn训练cifar100(摸到pytorch尾灯,54.94分)

前头用这个架构:上了47分

layers.emplace_back(std::make_shared<Conv2D>(cudnn, batch, 5, 64, 32, 32, 3, 1, 1));

layers.emplace_back(std::make_shared<residualExt22>(cudnn, batch, 64, 32, 32));

layers.emplace_back(std::make_shared<Conv2D>(cudnn, batch, 64, 128, 32, 32, 3, 2, 1));

layers.emplace_back(std::make_shared<residualExt3>(cudnn, batch, 128, 16, 16));

layers.emplace_back(std::make_shared<averPool2D>(cudnn, batch, 128, 16, 16, 2, 2, 0, 2));//改变202607120652

layers.emplace_back(std::make_shared<Linear>(cublas, batch, 128 * 64, 1000));

layers.emplace_back(std::make_shared<LeakyRL>(cudnn, batch,1000, 1, 1));

layers.emplace_back(std::make_shared<Linear>(cublas, batch, 1000, 100));


现在用这个架构:上了54.94(cifar10也用这个架构,接近85分)

layers.emplace_back(std::make_shared<Conv2D>(cudnn, batch, 5, 32, 32, 32, 3, 1, 1));

layers.emplace_back(std::make_shared<residualExt22>(cudnn, batch, 32, 32, 32));

layers.emplace_back(std::make_shared<Conv2D>(cudnn, batch, 32, 64, 32, 32, 3, 1, 1));

layers.emplace_back(std::make_shared<residualExt22>(cudnn, batch, 64, 32, 32));

layers.emplace_back(std::make_shared<Conv2D>(cudnn, batch, 64, 128, 32, 32, 3, 1, 1));

layers.emplace_back(std::make_shared<residualExt22>(cudnn, batch, 128, 32, 32));

layers.emplace_back(std::make_shared<MaxPool2D>(cudnn, batch, 128, 32, 32, 2, 2, 0, 2));

layers.emplace_back(std::make_shared<Conv2D>(cudnn, batch, 128, 256, 16, 16, 3, 1, 1));

layers.emplace_back(std::make_shared<residualExt22>(cudnn, batch, 256, 16, 16));

layers.emplace_back(std::make_shared<MaxPool2D>(cudnn, batch, 256, 16, 16, 2, 2, 0, 2));

layers.emplace_back(std::make_shared<Conv2D>(cudnn, batch, 256, 512, 8, 8, 3, 1, 1));

layers.emplace_back(std::make_shared<residualExt22SE>(cudnn, batch, 512, 8, 8));

layers.emplace_back(std::make_shared<averPool2D>(cudnn, batch, 512, 8, 8, 2, 2, 0, 2));

layers.emplace_back(std::make_shared<Linear>(cublas, batch, 512 * 16, 1000));

layers.emplace_back(std::make_shared<BN>(cudnn, batch, 1000, 1, 1));

layers.emplace_back(std::make_shared<LeakyRL>(cudnn, batch, 1000, 1, 1));

layers.emplace_back(std::make_shared<Linear>(cublas, batch, 1000, 100));

13:47 2026/8/25使用了senet以及使用mean和std

for (int j = 0; j < 32; j++)//5输入数据

for (int k = 0; k < 32; k++)

{

int n = j * 32 + k;

//0.5071, 0.4867, 0.4408//mean

int shuffle_index = n;

//0.2675, 0.2565, 0.2761//std,

imagesishuffle_index = (imagesishuffle_index - .4408) / .2761;

imagesishuffle_index + 32 \* 32 = (imagesishuffle_index + 32 \* 32 - 0.4867) / 0.2565;

imagesishuffle_index + 32 \* 32 \* 2 = (imagesishuffle_index + 32 \* 32 \* 2 - 0.5071) / 0.2675;

imagesin + 32 \* 32 \* 4 = imagesin + 32 \* 32 \* 3 = (0.3 * imagesin + 32 \* 32 \* 2 +

0.6 * imagesin + 32 \* 32 +

0.1 * imagesin);//灰度图

/* int n逆向 = j * 32 + 31 - k;//镜像

imagesin逆向 + 32 \* 32 \* 4 = imagesin + 32 \* 32 \* 3;*/

}

int w = 32;

for (int j = 1; j < (32 - 1); j++)

{

for (int k = 1; k < (32 - 1); k++)

{

int n0 = (j * 32 + k); int cons = 32 * 32 * 3;

imagesin0 + 32 \* 32 \* 4 = ((imagesin0 - w - 1 + cons + 2 * imagesin0 - w + cons + imagesin0 - w + 1 + cons +

2 * imagesin0 - 1 + cons + 4 * imagesin0 + cons + 2 * imagesin0 + 1 + cons +

imagesin0 + w - 1 + cons + 2 * imagesin0 + w + cons + imagesin0 + w + 1 + cons) / 16);//高斯图像

}

}

时间: 79424.023438 ms

train Classification result: 96.99% ok (used 49984 images)

rb均值: 1.6978888512,rb方差:5.933823585510

rb均值: 0.8804030418,rb方差:8.616032600403

rb均值: 1.7580813169,rb方差:7.949643135071

rb均值: 0.7671276331,rb方差:5.722648143768

rb均值: -0.2488478720,rb方差:5.956567764282

rb均值: 0.5359117389,rb方差:10.410669326782

rb均值: 2.0446274281,rb方差:10.887942314148

rb均值: -1.3398467302,rb方差:8.228255271912

rb均值: -6.5902991295,rb方差:9.368316650391

rb均值: -7.3488245010,rb方差:6.877065181732

时间: 5819.448242 ms

Test Classification result: 54.94% ok (used 9984 images)

learn rate:1e-05

轮次:19

时间: 79774.515625 ms

train Classification result: 97.40% ok (used 49984 images)

rb均值: 1.6980412006,rb方差:5.943639278412

rb均值: 0.8802184463,rb方差:8.593698501587

rb均值: 1.7602981329,rb方差:7.981349945068

rb均值: 0.7696452141,rb方差:5.726059913635

rb均值: -0.2493104339,rb方差:5.955167293549

rb均值: 0.5350852013,rb方差:10.439511299133

rb均值: 2.0437486172,rb方差:10.889699935913

rb均值: -1.3365424871,rb方差:8.268822669983

rb均值: -6.5940570831,rb方差:9.336331367493

rb均值: -7.3503489494,rb方差:6.866750717163

时间: 5810.639160 ms

Test Classification result: 54.89% ok (used 9984 images)

learn rate:1e-05

轮次:20

时间: 80034.343750 ms

train Classification result: 97.35% ok (used 49984 images)

rb均值: 1.6983847618,rb方差:5.943297386169

rb均值: 0.8800888062,rb方差:8.601974487305

rb均值: 1.7597543001,rb方差:7.983348369598

rb均值: 0.7693169713,rb方差:5.729268550873

rb均值: -0.2491814643,rb方差:5.956451416016

rb均值: 0.5351015925,rb方差:10.438184738159

rb均值: 2.0438706875,rb方差:10.888649940491

rb均值: -1.3371704817,rb方差:8.266029357910

rb均值: -6.5952649117,rb方差:9.339854240417

rb均值: -7.3501982689,rb方差:6.863826274872

时间: 5847.599121 ms

Test Classification result: 54.87% ok (used 9984 images)

learn rate:1e-06

轮次:21

时间: 79953.578125 ms

train Classification result: 97.34% ok (used 49984 images)

rb均值: 1.6980701685,rb方差:5.944988250732

rb均值: 0.8801177144,rb方差:8.599447250366

rb均值: 1.7604961395,rb方差:7.983133792877

rb均值: 0.7695350647,rb方差:5.727602005005

rb均值: -0.2489510328,rb方差:5.956361293793

rb均值: 0.5350140333,rb方差:10.439078330994

rb均值: 2.0438830853,rb方差:10.890143394470

rb均值: -1.3366309404,rb方差:8.267748832703

rb均值: -6.5955142975,rb方差:9.336565017700

rb均值: -7.3504004478,rb方差:6.861398696899

时间: 5817.937012 ms

Test Classification result: 54.85% ok (used 9984 images)

learn rate:1e-06

轮次:22

相关推荐
工业机器视觉设计和实现25 天前
再攻下1分!
人工智能·cudnn微积分
工业机器视觉设计和实现1 个月前
cifar10训练突破80分(三,摸到pytorch尾灯!)
人工智能·pytorch·cudnn微积分
工业机器视觉设计和实现1 个月前
动量的好处与困扰(二,摸到pytorch尾灯!)
人工智能·pytorch·cudnn微积分
工业机器视觉设计和实现1 个月前
cifar10测试79分是什么水平
cudnn微积分
工业机器视觉设计和实现1 个月前
yolo darknet的启示(残差相加放在leakrelu之后)
cudnn微积分
工业机器视觉设计和实现5 个月前
为什么bn+tanh比bn+relu效果好?
人工智能·cudnn微积分
工业机器视觉设计和实现5 个月前
人工智能的革命范式(对称美)
人工智能·cudnn微积分