Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module 'paddle.fluid.core_avx' has no attribute 'save_op_version_info' #3689

Open
1 task done
HIT-liyihao opened this issue Apr 4, 2024 · 2 comments
Open
1 task done
Assignees
Labels
question Further information is requested

Comments

@HIT-liyihao
Copy link

问题确认 Search before asking

  • 我已经搜索过问题,但是没有找到解答。I have searched the question and found no related answer.

请提出你的问题 Please ask your question

While saving my module with "paddle.fluid.core.save_op_version_info(_test_program.desc)" ,i got this error:

"AttributeError: module 'paddle.fluid.core_avx' has no attribute 'save_op_version_info'"

I'm wondering if its with problem of my paddle version, while im using paddle 1.8.4.
by the way,I can't upgrade paddle version.

How can i solve it asking for HELP

当我尝试用 "paddle.fluid.core.save_op_version_info(_test_program.desc)" 保存我的模型时,报错"AttributeError: module 'paddle.fluid.core_avx' has no attribute 'save_op_version_info'" 。我使用的是飞桨1.8.4版本并且不能更新到2.X版本。请问该如何解决

@HIT-liyihao HIT-liyihao added the question Further information is requested label Apr 4, 2024
@HIT-liyihao HIT-liyihao reopened this Apr 4, 2024
@HIT-liyihao
Copy link
Author

HIT-liyihao commented Apr 4, 2024

以下是完整报错
{'AUG': {'AUG_METHOD': 'unpadding',
'FIX_RESIZE_SIZE': (512, 512),
'FLIP': False,
'FLIP_RATIO': 0.5,
'INF_RESIZE_VALUE': 500,
'MAX_RESIZE_VALUE': 600,
'MAX_SCALE_FACTOR': 2.0,
'MIN_RESIZE_VALUE': 400,
'MIN_SCALE_FACTOR': 0.5,
'MIRROR': True,
'RICH_CROP': {'ASPECT_RATIO': 0.33,
'BLUR': False,
'BLUR_RATIO': 0.1,
'BRIGHTNESS_JITTER_RATIO': 0.2,
'CONTRAST_JITTER_RATIO': 0.2,
'ENABLE': True,
'MAX_ROTATION': 15,
'MIN_AREA_RATIO': 0.5,
'SATURATION_JITTER_RATIO': 0.2},
'SCALE_STEP_SIZE': 0.25,
'TO_RGB': False},
'BATCH_SIZE': 4,
'DATALOADER': {'BUF_SIZE': 256, 'NUM_WORKERS': 8},
'DATASET': {'DATA_DIM': 3,
'DATA_DIR': '/home/aistudio/work/PaddleSeg/dataset/chest/',
'IGNORE_INDEX': 255,
'IMAGE_TYPE': 'rgb',
'NUM_CLASSES': 2,
'PADDING_VALUE': [127.5, 127.5, 127.5],
'SEPARATOR': ' ',
'TEST_FILE_LIST': '/home/aistudio/work/PaddleSeg/dataset/chest/val_list.txt',
'TEST_TOTAL_IMAGES': 44,
'TRAIN_FILE_LIST': '/home/aistudio/work/PaddleSeg/dataset/chest/train_list.txt',
'TRAIN_TOTAL_IMAGES': 394,
'VAL_FILE_LIST': '/home/aistudio/work/PaddleSeg/dataset/chest/val_list.txt',
'VAL_TOTAL_IMAGES': 44,
'VIS_FILE_LIST': '/home/aistudio/work/PaddleSeg/dataset/chest/val_list.txt'},
'EVAL_CROP_SIZE': (512, 512),
'FREEZE': {'MODEL_FILENAME': 'model',
'PARAMS_FILENAME': 'params',
'SAVE_DIR': 'freeze_model'},
'MEAN': [0.5, 0.5, 0.5],
'MODEL': {'BN_MOMENTUM': 0.99,
'DEEPLAB': {'ASPP_WITH_SEP_CONV': True,
'BACKBONE': 'xception_65',
'BACKBONE_LR_MULT_LIST': None,
'DECODER': {'CONV_FILTERS': 256,
'OUTPUT_IS_LOGITS': False,
'USE_SUM_MERGE': False},
'DECODER_USE_SEP_CONV': True,
'DEPTH_MULTIPLIER': 1.0,
'ENABLE_DECODER': True,
'ENCODER': {'ADD_IMAGE_LEVEL_FEATURE': True,
'ASPP_CONVS_FILTERS': 256,
'ASPP_RATIOS': None,
'ASPP_WITH_CONCAT_PROJECTION': True,
'ASPP_WITH_SE': False,
'POOLING_CROP_SIZE': None,
'POOLING_STRIDE': [1, 1],
'SE_USE_QSIGMOID': False},
'ENCODER_WITH_ASPP': True,
'OUTPUT_STRIDE': 16},
'DEFAULT_EPSILON': 1e-05,
'DEFAULT_GROUP_NUMBER': 32,
'DEFAULT_NORM_TYPE': 'bn',
'FP16': False,
'HRNET': {'STAGE2': {'NUM_CHANNELS': [40, 80], 'NUM_MODULES': 1},
'STAGE3': {'NUM_CHANNELS': [40, 80, 160],
'NUM_MODULES': 4},
'STAGE4': {'NUM_CHANNELS': [40, 80, 160, 320],
'NUM_MODULES': 3}},
'ICNET': {'DEPTH_MULTIPLIER': 0.5, 'LAYERS': 50},
'MODEL_NAME': 'unet',
'MULTI_LOSS_WEIGHT': [1.0],
'OCR': {'OCR_KEY_CHANNELS': 256, 'OCR_MID_CHANNELS': 512},
'PSPNET': {'DEPTH_MULTIPLIER': 1, 'LAYERS': 50},
'SCALE_LOSS': 'DYNAMIC',
'UNET': {'UPSAMPLE_MODE': 'bilinear'}},
'NUM_TRAINERS': 1,
'SLIM': {'KNOWLEDGE_DISTILL': False,
'KNOWLEDGE_DISTILL_IS_TEACHER': False,
'KNOWLEDGE_DISTILL_TEACHER_MODEL_DIR': '',
'NAS_ADDRESS': '',
'NAS_IS_SERVER': True,
'NAS_PORT': 23333,
'NAS_SEARCH_STEPS': 100,
'NAS_SPACE_NAME': '',
'NAS_START_EVAL_EPOCH': 0,
'PREPROCESS': False,
'PRUNE_PARAMS': '',
'PRUNE_RATIOS': []},
'SOLVER': {'BEGIN_EPOCH': 1,
'CROSS_ENTROPY_WEIGHT': None,
'DECAY_EPOCH': [10, 20],
'GAMMA': 0.1,
'LOSS': ['softmax_loss'],
'LOSS_WEIGHT': {'BCE_LOSS': 1,
'DICE_LOSS': 1,
'LOVASZ_HINGE_LOSS': 1,
'LOVASZ_SOFTMAX_LOSS': 1,
'SOFTMAX_LOSS': 1},
'LR': 0.001,
'LR_POLICY': 'poly',
'LR_WARMUP': False,
'LR_WARMUP_STEPS': 2000,
'MOMENTUM': 0.9,
'MOMENTUM2': 0.999,
'NUM_EPOCHS': 500,
'OPTIMIZER': 'adam',
'POWER': 0.9,
'WEIGHT_DECAY': 4e-05},
'STD': [0.5, 0.5, 0.5],
'TEST': {'TEST_MODEL': '/home/aistudio/work/saved_model/unet_optic/final'},
'TRAIN': {'MODEL_SAVE_DIR': '/home/aistudio/work/saved_model/unet_optic/',
'PRETRAINED_MODEL_DIR': '/home/aistudio/work/PaddleSeg/pretrained_model/unet_bn_coco/',
'RESUME_MODEL_DIR': '',
'SNAPSHOT_EPOCH': 15,
'SYNC_BATCH_NORM': False},
'TRAINER_ID': 0,
'TRAIN_CROP_SIZE': (512, 512)}
#Device count: 1
batch_size_per_dev: 4
2024-04-05 01:20:17,193-INFO: If regularizer of a Parameter has been set by 'fluid.ParamAttr' or 'fluid.WeightNormParamAttr' already. The Regularization[L2Decay, regularization_coeff=0.000040] in Optimizer will not take effect, and it will only be applied to other Parameters!
W0405 01:20:17.484263 3407 device_context.cc:252] Please NOTE: device: 0, CUDA Capability: 70, Driver API Version: 12.0, Runtime API Version: 9.0
W0405 01:20:17.490731 3407 device_context.cc:260] device: 0, cuDNN Version: 7.6.
[SKIP] Shape of pretrained weight /home/aistudio/work/PaddleSeg/pretrained_model/unet_bn_coco//logit/weights doesn't match.(Pretrained: (21, 64, 3, 3), Actual: (2, 64, 3, 3))
2024-04-05 01:20:20,100-WARNING: /home/aistudio/work/PaddleSeg/pretrained_model/unet_bn_coco/.pdparams not found, try to load model file saved with [ save_params, save_persistables, save_vars ]
There are 90/91 varaibles in /home/aistudio/work/PaddleSeg/pretrained_model/unet_bn_coco/ are loaded.
Use multi-thread reader
epoch=1 step=10 lr=0.00100 loss=0.2914 step/sec=2.971 | ETA 04:34:47
epoch=1 step=20 lr=0.00100 loss=0.1847 step/sec=3.638 | ETA 03:44:25
... ...
epoch=15 step=1470 lr=0.00097 loss=0.1460 step/sec=3.537 | ETA 03:43:57
Save model checkpoint to /home/aistudio/work/saved_model/unet_optic/15
Traceback (most recent call last):
File "/home/aistudio/work/PaddleSeg/pdseg/train.py", line 469, in
main(args)
File "/home/aistudio/work/PaddleSeg/pdseg/train.py", line 455, in main
train(cfg)
File "/home/aistudio/work/PaddleSeg/pdseg/train.py", line 404, in train
save_infer_program(test_prog, ckpt_dir)
File "/home/aistudio/work/PaddleSeg/pdseg/train.py", line 167, in save_infer_program
paddle.fluid.core.save_op_version_info(_test_program.desc)
AttributeError: module 'paddle.fluid.core_avx' has no attribute 'save_op_version_info'

@shiyutang
Copy link
Collaborator

Hi, currently paddlepaddle have released 2.6.0 and paddle.fluid is not supported anymore, please try to use the dynamic graph version of paddlepaddle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants