Skip to content

Commit 58d39cc

Browse files
committed
Cosmetic changes.
1 parent 208615e commit 58d39cc

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

direct/data/datasets.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ def __getitem__(self, idx: int) -> Dict[str, Any]:
6969
# Some images have strange behavior.
7070
image_shape = sample["kspace"].shape
7171

72-
if image_shape[-1] < sample["reconstruction_size"][-2]: # reconstruction size is (x, y, z)
72+
if (
73+
image_shape[-1] < sample["reconstruction_size"][-2]
74+
): # reconstruction size is (x, y, z)
7375
warnings.warn(
7476
f"Encountered {sample['filename']} with header reconstruction size {sample['reconstruction_size']}, "
7577
f" yet matrix size is {image_shape}, this is a known issue in the FastMRI dataset."

direct/nn/rim/rim_engine.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,10 @@ def evaluate(
197197
data = AddNames()(data)
198198
filenames = data.pop("filename")
199199
if len(set(filenames)) != 1:
200-
raise ValueError(f"Expected a batch during validation to only contain filenames of one case. "
201-
f"Got {set(filenames)}.")
200+
raise ValueError(
201+
f"Expected a batch during validation to only contain filenames of one case. "
202+
f"Got {set(filenames)}."
203+
)
202204

203205
slice_nos = data.pop("slice_no")
204206
scaling_factors = data.pop("scaling_factor")

0 commit comments

Comments
 (0)