AttributeError: module 'paddle.fluid' has no attribute 'load_dygraph'
我在进行paddle转成pytorch模型的时候,遇到这个报错信息:
Traceback (most recent call last):
File "./converter/ch_ppocr_v4_rec_server_converter.py", line 112, in
可能是新版paddle去掉这个接口了
That's true! Then, how can we convert with the newest version of paddle (without degrading ther version)?
您好!我遇到了相似的问题。使用的是paddlepaddle==2.5.2, paddleocr>2.6。 当用 python ./converter/ch_ppocr_v4_det_converter.py --yaml_path ./configs/det/ch_PP-OCRv4/ch_PP-OCRv4_det_student.yml --src_model_path ppocr_models/ch_PP-OCRv4_det_train 跑之后, 出现如下报错:AttributeError: module 'paddle.fluid' has no attribute 'load_dygraph'。 请问load_dygraph 可以用其他function代替吗?
By the way, I got it working by using the following package version combination, you can try it out: python 3.9, pip <22.0.4, paddlepaddle 2.4.1, paddleocr 2.10.0, packaging 24.2. fluid was deprecated after paddlepaddle 2.5, so you have to use the 2.4.x version or lower. I hope this will fix your problem.