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

[Bug]使用Paddle2.3.2运行Paddle报错No module named 'paddle.io.dataloader' #206

Open
HYJ1542052797 opened this issue Jul 11, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@HYJ1542052797
Copy link

使用Paddle2.3.2运行PaddleRS报错,如何进行修改?

  1. PaddleRS版本:PaddleRS develop
  2. PaddlePaddle版本:PaddlePaddle 2.3.2
  3. 操作系统信息:Windows
  4. Python版本号:Python3.9
  5. CUDA/cuDNN版本:CUDA11.1.1/cuDNN 8.1.0.77
  6. 完整的代码:

Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");

you may not use this file except in compliance with the License.

You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software

distributed under the License is distributed on an "AS IS" BASIS,

WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the License for the specific language governing permissions and

limitations under the License.

import traceback
import random

import numpy as np
from paddle.io.dataloader.collate import default_collate_fn

from .operators import Transform, Resize, ResizeByShort, _Permute, interp_dict
from .box_utils import jaccard_overlap
from paddlers.utils import logging

报错
from paddle.io.dataloader.collate import default_collate_fn
ModuleNotFoundError: No module named 'paddle.io.dataloader'

@HYJ1542052797 HYJ1542052797 added the bug Something isn't working label Jul 11, 2024
@github-actions github-actions bot added triage new issue/PR waiting to be dealed and removed triage new issue/PR waiting to be dealed labels Jul 11, 2024
@Bobholamovic
Copy link
Member

Bobholamovic commented Jul 11, 2024

你好,PaddleRS develop仅支持Paddle 2.5.0及以上版本:

image

@HYJ1542052797
Copy link
Author

我刚刚使用release-1.0,使用Paddle2.3.2也出现了错误

2024-07-11 16:45:28,657-WARNING: cannot import name 'LayerHelper' from 'paddle.framework' (D:\AGIS32\bin\Python\envs\paddle232\lib\site-packages\paddle\framework_init_.py)
2024-07-11 16:45:28,657-WARNING: If you want to use training-aware and post-training quantization, please use Paddle >= 2.3.0 or develop version
Traceback (most recent call last):
File "D:\Users\admin\Downloads\PaddleRS-release-1.0\tutorials\train\object_detection\yolov3.py", line 8, in
import paddlers as pdrs
File "D:\Users\admin\Downloads\PaddleRS-release-1.0\paddlers_init_.py", line 24, in
from . import tasks, datasets, transforms, utils, tools, models, deploy
File "D:\Users\admin\Downloads\PaddleRS-release-1.0\paddlers\tasks_init_.py", line 15, in
import paddlers.tasks.object_detector as detector
File "D:\Users\admin\Downloads\PaddleRS-release-1.0\paddlers\tasks\object_detector.py", line 34, in
from .base import BaseModel
File "D:\Users\admin\Downloads\PaddleRS-release-1.0\paddlers\tasks\base.py", line 27, in
from paddleslim import QAT
File "D:\AGIS32\bin\Python\envs\paddle232\lib\site-packages\paddleslim_init_.py", line 20, in
from paddleslim import quant
File "D:\AGIS32\bin\Python\envs\paddle232\lib\site-packages\paddleslim\quant_init_.py", line 42, in
from . import nn
File "D:\AGIS32\bin\Python\envs\paddle232\lib\site-packages\paddleslim\quant\nn_init_.py", line 15, in
from .conv_bn import QuantedConv2DBatchNorm, Conv2DBatchNormWrapper
File "D:\AGIS32\bin\Python\envs\paddle232\lib\site-packages\paddleslim\quant\nn\conv_bn.py", line 21, in
from paddle.nn.quant.format import ConvertibleQuantedLayer
ModuleNotFoundError: No module named 'paddle.nn.quant.format'

@Bobholamovic
Copy link
Member

看起来是paddleslim的报错。如果使用paddle 2.3的话,也要使用对应版本的paddleslim2.3~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants