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

模型测试问题 #186

Closed
cctx1 opened this issue Mar 3, 2024 · 5 comments
Closed

模型测试问题 #186

cctx1 opened this issue Mar 3, 2024 · 5 comments
Assignees
Labels
bug Something isn't working triage new issue/PR waiting to be dealed

Comments

@cctx1
Copy link

cctx1 commented Mar 3, 2024

使用PaddleRS训练出来的模型,如果单独写代码(如图1)进行测试,会报错,报错结果如图2所示。但是如果在训练的代码后面补上测试的代码(即模型训练与模型测试一起进行),则没有问题。请教这是为什么呢?
图1:
image
图2:
image

欢迎您的提问。辛苦您提供以下信息,以方便我们快速定位和解决问题:

  1. PaddleRS版本:PaddleRS-1.0.0
  2. PaddlePaddle版本:PaddlePaddle 2.4.0
  3. 操作系统信息:Windows
  4. Python版本号:Python3.7
  5. CUDA/cuDNN版本:CUDA11.6/cuDNN 8.4.0
@cctx1 cctx1 added the question Further information is requested label Mar 3, 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 Mar 3, 2024
@Bobholamovic Bobholamovic added bug Something isn't working and removed question Further information is requested labels Mar 4, 2024
@Bobholamovic
Copy link
Member

你好,这是一个已知bug,目前可以采用如下方式绕过:

  • 在调用model.evaluate之前执行model.metrics = model.default_metric()

@cctx1
Copy link
Author

cctx1 commented Mar 4, 2024

已成功解决,感谢开发者的回复

@cctx1 cctx1 closed this as completed Mar 4, 2024
@cctx1 cctx1 reopened this Mar 9, 2024
@cctx1 cctx1 closed this as completed Mar 9, 2024
@github-actions github-actions bot added the triage new issue/PR waiting to be dealed label Mar 9, 2024
@cctx1 cctx1 reopened this Mar 9, 2024
@cctx1
Copy link
Author

cctx1 commented Mar 9, 2024

使用PaddleRS对训练出来的deeplabv3p模型进行评估,但是报错,报错结果如图3所示。若是按之前开发者说的在调用model.evaluate之前执行model.metrics = model.default_metric()则会报错AttributeError: 'DeepLabV3P' object has no attribute 'default_metric'。整体的evaluate代码如图4所示。
图3:
image
图4:
image

@Bobholamovic
Copy link
Member

请去掉T.ArrangeClassifier这个操作(因为这是专属于分类任务的操作)。另外,model.metrics = model.default_metric()仅适用于处理分类任务的bug,检测任务并没有这个问题~

@cctx1
Copy link
Author

cctx1 commented Mar 12, 2024

谢谢开发者的回复,已经成功解决~

@cctx1 cctx1 closed this as completed Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage new issue/PR waiting to be dealed
Projects
None yet
Development

No branches or pull requests

2 participants