Skip to content

Conversation

@Xreki
Copy link
Collaborator

@Xreki Xreki commented Oct 11, 2025

PR Category

Bug Fix

Description

  1. Torch样本在保存meta信息时,fp32类型没有保存max_val、min_val信息,像bn的running_var参数必须大于0,否则会sqrt会出现nan。本PR快速修复该问题,在初始化参数时对name进行判断,running_var clip掉小于0的数据。
  2. test_compiler输出max_diff、mean_diff数据,好快速判断是否出现nan。

@paddle-bot
Copy link

paddle-bot bot commented Oct 11, 2025

Thanks for your contribution!

@lixinqi lixinqi merged commit b35eece into PaddlePaddle:develop Oct 13, 2025
3 checks passed
@Xreki Xreki deleted the fix_torch_init branch October 20, 2025 03:41
Dayuxiaoshui pushed a commit to Dayuxiaoshui/GraphNet that referenced this pull request Oct 25, 2025
- Remove temporary workaround code from PR PaddlePaddle#301
- Add min_val constraint handling in replay_tensor function
- Update convert_meta_classes_to_tensors to read min_val from weight_meta
- Batch update 801 weight_meta.py files to add min_val=0 for all running_var parameters
- Fix resolves nan issue in max_diff and mean_diff for 150 samples with batch_norm

Verification: max_diff and mean_diff changed from nan to 0.0, all allclose checks pass
Dayuxiaoshui added a commit to Dayuxiaoshui/GraphNet that referenced this pull request Oct 25, 2025
- Remove temporary workaround code from PR PaddlePaddle#301
- Add min_val constraint handling in replay_tensor function
- Update convert_meta_classes_to_tensors to read min_val from weight_meta
- Batch update 801 weight_meta.py files to add min_val=0 for all running_var parameters
- Fix resolves nan issue in max_diff and mean_diff for 150 samples with batch_norm

Verification: max_diff and mean_diff changed from nan to 0.0, all allclose checks pass
Dayuxiaoshui added a commit to Dayuxiaoshui/GraphNet that referenced this pull request Oct 27, 2025
- Remove temporary workaround code from PR PaddlePaddle#301
- Add min_val constraint handling in replay_tensor function
- Update convert_meta_classes_to_tensors to read min_val from weight_meta
- Batch update 801 weight_meta.py files to add min_val=0 for all running_var parameters
- Fix resolves nan issue in max_diff and mean_diff for 150 samples with batch_norm

Verification: max_diff and mean_diff changed from nan to 0.0, all allclose checks pass
Xreki pushed a commit that referenced this pull request Oct 29, 2025
…an (#315)

- Remove temporary workaround code from PR #301
- Add min_val constraint handling in replay_tensor function
- Update convert_meta_classes_to_tensors to read min_val from weight_meta
- Batch update 801 weight_meta.py files to add min_val=0 for all running_var parameters
- Fix resolves nan issue in max_diff and mean_diff for 150 samples with batch_norm

Verification: max_diff and mean_diff changed from nan to 0.0, all allclose checks pass
JewelRoam pushed a commit to JewelRoam/GraphNet that referenced this pull request Oct 29, 2025
…er than 0. (PaddlePaddle#301)

* Restrict the running_var parameter of BatchNorm to be greater than 0.

* Add TODO.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants