PaddleOCR icon indicating copy to clipboard operation
PaddleOCR copied to clipboard

ValueError: parameter name [conv1_1_weights] have be been used. In dygraph mode, the name of parameter can't be same.Please check the parameter attr value passed to self.create_parameter or constructor of dygraph Layers

Open balescream opened this issue 2 years ago • 0 comments

During distillation learning using Resnet gives the following error whereas MobilenetV1Enhance works fine(Teacher +2 Students). 请提供下述完整信息以便快速定位问题/Please provide the following information to quickly locate the problem

  • 系统环境/System Environment:CentOS Linux 7

  • 版本号/Version:Paddle:2.3.1 PaddleOCR:2.5.0(v3) 问题相关组件/Related components:

  • 运行指令/Command Code:CUDA_VISIBLE_DEVICES=0,1 python -m paddle.distributed.launch --gpus '0,1' tools/train.py -c /home///ppocr2.5/config_indic/hin_720_ResNet_DML_s1.yml -o Global.use_amp=True Global.scale_loss=1024.0 Global.use_dynamic_loss=true

  • 完整报错/Complete Error Message: File "/home/ /ppocr2.5/PaddleOCR-2.5.0/tools/train.py", line 188, in main(config, device, logger, vdl_writer) File "/home/ /ppocr2.5/PaddleOCR-2.5.0/tools/train.py", line 120, in main model = build_model(config['Architecture']) File "/home/ /ppocr2.5/PaddleOCR-2.5.0/ppocr/modeling/architectures/init.py", line 31, in build_model arch = getattr(mod, name)(config) File "/home/ /ppocr2.5/PaddleOCR-2.5.0/ppocr/modeling/architectures/distillation_model.py", line 47, in init model = BaseModel(model_config) File "/home/ /ppocr2.5/PaddleOCR-2.5.0/ppocr/modeling/architectures/base_model.py", line 50, in init self.backbone = build_backbone(config["Backbone"], model_type) File "/home/ /ppocr2.5/PaddleOCR-2.5.0/ppocr/modeling/backbones/init.py", line 63, in build_backbone module_class = eval(module_name)(**config) File "/home/ /ppocr2.5/PaddleOCR-2.5.0/ppocr/modeling/backbones/rec_resnet_vd.py", line 200, in init self.conv1_1 = ConvBNLayer( File "/home/ /ppocr2.5/PaddleOCR-2.5.0/ppocr/modeling/backbones/rec_resnet_vd.py", line 43, in init self._conv = nn.Conv2D( File "/home//.conda/envs/spaddle/lib/python3.9/site-packages/paddle/nn/layer/conv.py", line 644, in init super(Conv2D, self).init( File "/home//.conda/envs/spaddle/lib/python3.9/site-packages/paddle/nn/layer/conv.py", line 133, in init self.weight = self.create_parameter( File "/home//.conda/envs/spaddle/lib/python3.9/site-packages/paddle/fluid/dygraph/layers.py", line 423, in create_parameter
    return self._helper.create_parameter(temp_attr, shape, dtype, is_bias, File "/home//.conda/envs/spaddle/lib/python3.9/site-packages/paddle/fluid/layer_helper_base.py", line 371, in create_parameter raise ValueError( ValueError: parameter name [conv1_1_weights] have be been used. In dygraph mode, the name of parameter can't be same.Please check the parameter attr value passed to self.create_parameter or constructor of dygraph Layers

balescream avatar Aug 12 '22 12:08 balescream