Skip to content

Commit

Permalink
fix transforms in notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
a-kore committed Nov 21, 2023
1 parent 7b179bc commit 4e2de73
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions docs/source/tutorials/nihcxr/cxr_classification.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,9 @@
" allow_missing_keys=True,\n",
" ),\n",
" Lambdad(\n",
" (\"image\",),\n",
" func=lambda x: np.mean(x, axis=0)[np.newaxis, :] if x.shape[0] != 1 else x,\n",
" keys=(\"image\",),\n",
" func=lambda x: x[0][np.newaxis, :] if x.shape[0] != 1 else x,\n",
" allow_missing_keys=True,\n",
" ),\n",
" ],\n",
")"
Expand Down
2 changes: 1 addition & 1 deletion docs/source/tutorials/nihcxr/generate_nihcxr_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
),
Lambdad(
keys=("image",),
func=lambda x: np.mean(x, axis=0)[np.newaxis, :] if x.shape[0] != 1 else x,
func=lambda x: x[0][np.newaxis, :] if x.shape[0] != 1 else x,
),
],
)
Expand Down

0 comments on commit 4e2de73

Please sign in to comment.