PaddlePaddle / PaddleX

All-in-One Development Tool based on PaddlePaddle(飞桨低代码开发工具)
Apache License 2.0
4.94k stars 968 forks source link

Shape of pretrained params fc.weight doesn't match.(Pretrained: (1280, 1000), Actual: [1280, 4])Shape of pretrained params fc.bias doesn't match.(Pretrained: (1000,), Actual: [4]) #1591

Closed monkeycc closed 2 years ago

monkeycc commented 2 years ago

Checklist:

  1. 查找历史相关issue寻求解答
  2. 翻阅FAQ常见问题汇总和答疑
  3. 确认bug是否在新版本里还未修复
  4. 翻阅PaddleX API文档说明

描述问题

W0911 17:22:54.111891 18736 gpu_resources.cc:61] Please NOTE: device: 0, GPU Compute Capability: 8.6, Driver API Version: 11.6, Runtime API Version: 11.2 W0911 17:22:54.118891 18736 gpu_resources.cc:91] device: 0, cuDNN Version: 8.2. 2022-09-11 17:22:54 [INFO] Loading pretrained model from E:/MobileNetV3_large_x1_0_pretrained.pdparams

2022-09-11 17:22:54 [WARNING] [SKIP] Shape of pretrained params fc.weight doesn't match.(Pretrained: (1280, 1000), Actual: [1280, 4]) 2022-09-11 17:22:54 [WARNING] [SKIP] Shape of pretrained params fc.bias doesn't match.(Pretrained: (1000,), Actual: [4])

2022-09-11 17:22:54 [INFO] There are 268/270 variables loaded into MobileNetV3_large_x1_0. 2022-09-11 17:22:58 [INFO] [TRAIN] Epoch=1/300, Step=10/14, loss=1.480105, acc1=0.250000, acc4=1.000000, lr=0.000129, time_each_step=0.45s, eta=0:31:19 2022-09-11 17:22:59 [INFO] [TRAIN] Epoch 1 finished, loss=1.5043467, acc1=0.23095238, acc4=1.0 . 2022-09-11 17:22:59 [INFO] Start to evaluate(total_samples=242, total_steps=5)... 2022-09-11 17:23:00 [INFO] [EVAL] Finished, Epoch=1, acc1=0.423333, acc4=1.000000 . 2022-09-11 17:23:00 [INFO] Model saved in F:/trian\best_model. 2022-09-11 17:23:00 [INFO] Current evaluated best model on eval_dataset is epoch_1, acc1=0.4233333468437195


三个红色   WARNING虽然不影响  但是还是想看看怎么解决

2022-09-11 17:22:54 [INFO]      Loading pretrained model from E:/MobileNetV3_large_x1_0_pretrained.pdparams

2022-09-11 17:22:54 [WARNING]   [SKIP] Shape of pretrained params fc.weight doesn't match.(Pretrained: (1280, 1000), Actual: [1280, 4])
2022-09-11 17:22:54 [WARNING]   [SKIP] Shape of pretrained params fc.bias doesn't match.(Pretrained: (1000,), Actual: [4])

复现

  1. 您是否已经正常运行我们提供的教程

  2. 您是否在教程的基础上修改代码内容?还请您提供运行的代码

  3. 您使用的数据集是?

  4. 请提供您出现的报错信息及相关log

环境

  1. 请提供您使用的PaddlePaddle和PaddleX的版本号 paddlepaddle-gpu 2.3.2.post112 paddlex 2.1.0
  2. 请提供您使用的操作系统信息,如Linux/Windows/MacOS Windows
  3. 请问您使用的Python版本是? Python 3.7
  4. 请问您使用的CUDA/cuDNN的版本号是? cuda11.2 cudnn8.2.1
lailuboy commented 2 years ago

输入shape与预训练权重不一致,想去掉的目的是为了做什么呢?

monkeycc commented 2 years ago

看着红红的 想去除

如果不影响的话 没事