Skip to content

[Bug Fix] Fix when tensor with shape [1] and when device in gm.code#82

Merged
lixinqi merged 1 commit intoPaddlePaddle:developfrom
ooooo-create:fix_squim_subjective
Aug 5, 2025
Merged

[Bug Fix] Fix when tensor with shape [1] and when device in gm.code#82
lixinqi merged 1 commit intoPaddlePaddle:developfrom
ooooo-create:fix_squim_subjective

Conversation

@ooooo-create
Copy link
Contributor

@ooooo-create ooooo-create commented Aug 5, 2025

PR Category

Bug Fix

Description

  1. torch.complie 提取出来的 gm.code 有时会出现 device = device(type='cuda', index=0),需要先 from torch import device
  2. 获取张量的 std info 的时候,存在张量 shape = [1] ,出现 std=nan,直接保存到 weight_meta.py 会导致 nan 未定义,所以改成了 float("nan")
  3. 问题模型在 [New Sample] Add 'squim_subjective' Model Computational Graph #83, 这里面是没修改之前的提取

@paddle-bot
Copy link

paddle-bot bot commented Aug 5, 2025

Thanks for your contribution!

@lixinqi lixinqi merged commit 57d6f99 into PaddlePaddle:develop Aug 5, 2025
3 checks passed
@ooooo-create ooooo-create deleted the fix_squim_subjective branch September 29, 2025 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor External developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants