Merged
Conversation
|
Thanks for your contribution! |
Xreki
reviewed
Aug 20, 2025
graph_net/paddle/test_compiler.py
Outdated
| expected_out = expected_out.numpy() | ||
| compiled_out = compiled_out.numpy() | ||
| expected_out = [expected_out.numpy().astype("float32")] | ||
| compiled_out = [compiled_out.numpy().astype("float32")] |
| name = v["name"] | ||
| dtype = v["info"]["dtype"] | ||
| shape = v["info"]["shape"] | ||
| # print(f"-- i: {i}, v: name={name}, shape={shape}, dtype={dtype}") |
graph_net/paddle/utils.py
Outdated
|
|
||
| def convert_meta_classes_to_tensors(file_path): | ||
| for name, cls in _get_classes(file_path): | ||
| # print(f"-- name: {name}") |
graph_net/paddle/utils.py
Outdated
| unnamed = importlib.util.module_from_spec(spec) | ||
| spec.loader.exec_module(unnamed) | ||
| yield from inspect.getmembers(unnamed, inspect.isclass) | ||
| # yield from inspect.getmembers(unnamed, inspect.isclass) |
graph_net/paddle/utils.py
Outdated
| elif dtype == paddle.int32 or dtype == paddle.int64: | ||
| return paddle.cast( | ||
| paddle.randint(low=min_value, high=max_value, shape=shape, dtype="int64"), | ||
| paddle.randint(low=0, high=1, shape=shape, dtype="int64"), |
Contributor
Author
There was a problem hiding this comment.
目前binary_cross_entropy等只能用0,1 , 如果使用最大值,会导致很多程序崩溃,已稍微放宽。
JewelRoam
pushed a commit
to JewelRoam/GraphNet
that referenced
this pull request
Oct 29, 2025
* Update validate.py * minor fix * Fix test_compiler * Fix test_compiler of paddle. * fix inputs generation error and acc calculation error * minor fix * delete unused expr * delete unused expr --------- Co-authored-by: Liu Yiqun <liuyiqun01@baidu.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Category
Bug Fix
Description
修复validate test_compiler 问题