CLAM
CLAM copied to clipboard
fix:score2percentile()
This fixed a broadcasting error for me:
Traceback (most recent call last):
File "CLAM/create_heatmaps.py", line 371, in <module>
compute_from_patches(wsi_object=wsi_object, clam_pred=Y_hats[0], model=model, feature_extractor=feature_extractor, batch_size=exp_args.batch_size, **wsi_kwargs,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "CLAM/vis_utils/heatmap_utils.py", line 77, in compute_from_patches
A[score_idx] = score2percentile(A[score_idx], ref_scores)
~^^^^^^^^^^^
ValueError: could not broadcast input array from shape (195,) into shape (1,)
possibly fixes https://github.com/mahmoodlab/CLAM/issues/153