Skip to content

Commit aa2d594

Browse files
committed
Fix paddle.to_tensor.
1 parent 92dd5e4 commit aa2d594

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

graph_net/paddle/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@ def convert_meta_classes_to_tensors(file_path):
132132
if isinstance(attrs.get("data"), str):
133133
raise ValueError("Unimplemented")
134134
else:
135-
data_value = paddle.tensor(attrs["data"], dtype=data_type).reshape(
136-
attrs.get("shape"), []
137-
)
135+
data_value = paddle.to_tensor(
136+
attrs.get("data"), dtype=data_type
137+
).reshape(attrs.get("shape"), [])
138138
yield {
139139
"info": {
140140
"shape": attrs.get("shape", []),

0 commit comments

Comments
 (0)