Skip to content

Commit

Permalink
Autoformat with black
Browse files Browse the repository at this point in the history
  • Loading branch information
brainless-bot[bot] committed Nov 18, 2024
1 parent 9357760 commit dc356a2
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions dqe.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,18 @@
"metadata": {},
"outputs": [],
"source": [
"#use case for data loader\n",
"# use case for data loader\n",
"\n",
"center_of_mass = compute_center_of_mass(gt_segmentation)\n",
"\n",
"seg_slices = get_center_of_mass_slices(file=gt_segmentation, center_of_mass=center_of_mass)\n",
"seg_slices = get_center_of_mass_slices(\n",
" file=gt_segmentation, center_of_mass=center_of_mass\n",
")\n",
"\n",
"t1c_slices = get_center_of_mass_slices(file=t1c_file, center_of_mass=center_of_mass)\n",
"t1_slices = get_center_of_mass_slices(file=t1_file, center_of_mass=center_of_mass)\n",
"t2_slices = get_center_of_mass_slices(file=t2_file, center_of_mass=center_of_mass)\n",
"fla_slices = get_center_of_mass_slices(file=fla_file, center_of_mass=center_of_mass)\n"
"fla_slices = get_center_of_mass_slices(file=fla_file, center_of_mass=center_of_mass)"
]
},
{
Expand Down Expand Up @@ -197,7 +199,7 @@
],
"source": [
"for d in dicts:\n",
" print(d[\"view\"], d.keys()) "
" print(d[\"view\"], d.keys())"
]
},
{
Expand Down Expand Up @@ -252,7 +254,9 @@
}
],
"source": [
"ds = get_dataset(t1c=t1c_file, t1=t1_file, t2=t2_file, fla=fla_file, seg=gt_segmentation)\n",
"ds = get_dataset(\n",
" t1c=t1c_file, t1=t1_file, t2=t2_file, fla=fla_file, seg=gt_segmentation\n",
")\n",
"for d in ds:\n",
" for k, v in d.items():\n",
" print(k, v.shape if not isinstance(v, View) else v)"
Expand Down Expand Up @@ -395,7 +399,9 @@
}
],
"source": [
"dl = get_data_loader(t1c=t1c_file, t1=t1_file, t2=t2_file, fla=fla_file, seg=gt_segmentation)\n",
"dl = get_data_loader(\n",
" t1c=t1c_file, t1=t1_file, t2=t2_file, fla=fla_file, seg=gt_segmentation\n",
")\n",
"for batch in dl:\n",
" print(batch.keys())\n",
" print(batch[\"view\"])\n",
Expand Down Expand Up @@ -481,7 +487,7 @@
"\n",
" # we compute it patch wise instead\n",
" outputs = model(inputs)\n",
" \n",
"\n",
" results.append(outputs)"
]
},
Expand Down

0 comments on commit dc356a2

Please sign in to comment.