Skip to content

Commit fad6927

Browse files
authored
[Example]modify log msg to string of Catheter example (#1069)
1 parent 22231b5 commit fad6927

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

examples/catheter/catheter.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,10 @@ def evaluate(cfg: DictConfig):
203203
.numpy()
204204
.flatten()
205205
)
206-
logger.info(
207-
"rel. error is ",
208-
np.linalg.norm(y_test_pred - y_test[sample_id, :].flatten())
209-
/ np.linalg.norm(y_test[sample_id, :].flatten()),
210-
)
206+
error = np.linalg.norm(
207+
y_test_pred - y_test[sample_id, :].flatten()
208+
) / np.linalg.norm(y_test[sample_id, :].flatten())
209+
logger.info(f"rel. error is {error}")
211210
xx = np.linspace(-500, 0, 2001)
212211
plt.figure(figsize=(5, 4))
213212

0 commit comments

Comments
 (0)