Closed bbbxixixixi closed 1 year ago
@bbbxixixixi Hi, if the pdparams has not been downloaded properly, please download it into the local directory manually.
@bbbxixixixi Hi, if the pdparams has not been downloaded properly, please download it into the local directory manually.
I downloaded the tar file and change model config to model: type: OCRNet backbone: type: MobileNetV3_small_x1_0 pretrained: /home/aistudio/MobileNetV3_small_x1_0_ssld_pretrained.tar num_classes: 2 backbone_indices: [0]
error occurs
ValueError: paddle.load
can not parse the file:/home/aistudio/MobileNetV3_small_x1_0_ssld_pretrained.tar.
I unzip the tar file to a folder. It contains many weights files like conv9_expand_bn_scale. I change the config to model: type: OCRNet backbone: type: MobileNetV3_small_x1_0 pretrained: /home/aistudio/MobileNetV3_small_x1_0_ssld_pretrained num_classes: 2 backbone_indices: [0]
error occurs
2021-09-08 16:10:19 [WARNING] conv12.linear_conv.bn._mean is not in pretrained model
2021-09-08 16:10:19 [WARNING] conv12.linear_conv.bn._variance is not in pretrained model
2021-09-08 16:10:19 [INFO] There are 0/206 variables loaded into MobileNetV3.
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/nn/layer/norm.py:641: UserWarning: When training, we now always track global mean and variance.
"When training, we now always track global mean and variance.")
Traceback (most recent call last):
File "/home/aistudio/PaddleSeg-release-2.2-trim/train.py", line 190, in
there are no pretrained variables loaded. The pretrained model link ' https://paddle-imagenet-models-name.bj.bcebos.com/MobileNetV3_small_x1_0_ssld_pretrained.tar' is from legacy/pretrained_model/download_model.py. It may not be suitable for current version 2.2. Do you have a new pretrained model file format for version 2.2? And another problem is hard_sigmoid, aistudio paddle version is 2.1.2 python 3.7. Maybe the movilev3 backbone is not functional under current version?
@bbbxixixixi Hi, currently we have not provided the pretrained model. You may download it from PaddleClas, https://github.com/PaddlePaddle/Paddleclas/tree/dygraph-dev#Mobile_series
@bbbxixixixi Hi, currently we have not provided the pretrained model. You may download it from PaddleClas, https://github.com/PaddlePaddle/Paddleclas/tree/dygraph-dev#Mobile_series
the pretrained model is ok
some codes in mobilenetv3.py need to modify
line 311 outputs = F.hard_sigmoid(outputs) return paddle.multiply(x=inputs, y=outputs, axis=0) should be outputs = F.hardsigmoid(outputs) return paddle.multiply(x=inputs, y=outputs)
@bbbxixixixi Yes, the paddle api is changed in recent versions. Could you please submit the modification PR? Thanks.
@bbbxixixixi Yes, the paddle api is changed in recent versions. Could you please submit the modification PR? Thanks.
@bbbxixixixi Yes, the paddle api is changed in recent versions. Could you please submit the modification PR? Thanks.
1332
@bbbxixixixi Thanks. Could you sign Contributor License Agreement before merging you pr?
@bbbxixixixi Yes, the paddle api is changed in recent versions. Could you please submit the modification PR? Thanks.
1332
@bbbxixixixi Thanks. Could you sign Contributor License Agreement before merging you pr?
done
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
aistudio环境, paddleseg2.2
model的配置如下 model: type: OCRNet backbone: type: MobileNetV3_small_x1_0 pretrained: https://paddle-imagenet-models-name.bj.bcebos.com/MobileNetV3_small_x1_0_ssld_pretrained.tar num_classes: 2 backbone_indices: [0]
异常信息 2021-09-08 11:23:51 [INFO] Loading pretrained model from https://paddle-imagenet-models-name.bj.bcebos.com/MobileNetV3_small_x1_0_ssld_pretrained.tar Connecting to https://paddle-imagenet-models-name.bj.bcebos.com/MobileNetV3_small_x1_0_ssld_pretrained.tar Downloading MobileNetV3_small_x1_0_ssld_pretrained.tar [==================================================] 100.00% Uncompress MobileNetV3_small_x1_0_ssld_pretrained.tar [==================================================] 100.00% Traceback (most recent call last): File "/home/aistudio/PaddleSeg-release-2.2-trim/train.py", line 190, in
main(args)
File "/home/aistudio/PaddleSeg-release-2.2-trim/train.py", line 170, in main
cfg.model,
File "/home/aistudio/PaddleSeg-release-2.2-trim/paddleseg/cvlibs/config.py", line 291, in model
self._model = self._load_object(model_cfg)
File "/home/aistudio/PaddleSeg-release-2.2-trim/paddleseg/cvlibs/config.py", line 349, in _load_object
params[key] = self._load_object(val)
File "/home/aistudio/PaddleSeg-release-2.2-trim/paddleseg/cvlibs/config.py", line 358, in _load_object
return component(params)
File "/home/aistudio/PaddleSeg-release-2.2-trim/paddleseg/models/backbones/mobilenetv3.py", line 332, in MobileNetV3_small_x1_0
model = MobileNetV3(model_name="small", scale=1.0, kwargs)
File "/home/aistudio/PaddleSeg-release-2.2-trim/paddleseg/models/backbones/mobilenetv3.py", line 159, in init
self.init_weight()
File "/home/aistudio/PaddleSeg-release-2.2-trim/paddleseg/models/backbones/mobilenetv3.py", line 189, in init_weight
utils.load_pretrained_model(self, self.pretrained)
File "/home/aistudio/PaddleSeg-release-2.2-trim/paddleseg/utils/utils.py", line 94, in load_pretrained_model
pretrained_model))
ValueError: The pretrained model directory is not Found: /home/aistudio/.paddleseg/pretrained_model/MobileNetV3_small_x1_0_ssld_pretrained/model.pdparams