Skip to content

Commit 86576a1

Browse files
committed
Fix validate for single return.
1 parent 491bc03 commit 86576a1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

graph_net/paddle/validate.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@ def main(args):
6666
params.update(inputs)
6767
state_dict = {k: utils.replay_tensor(v) for k, v in params.items()}
6868

69-
y = model(**state_dict)[0]
69+
y = model(**state_dict)
7070

71-
print(np.argmin(y), np.argmax(y))
71+
# print(np.argmin(y), np.argmax(y))
7272
if isinstance(y, paddle.Tensor):
7373
print(y.shape)
7474
elif isinstance(y, list) or isinstance(y, tuple):
75-
print(y[0].shape if isinstance(y[0], paddle.tensor) else y[0])
75+
print(y[0].shape if isinstance(y[0], paddle.Tensor) else y[0])
7676
else:
7777
raise ValueError("Illegal return value.")
7878

0 commit comments

Comments
 (0)