Skip to content

Squeeze the patches of masks before appending them to ndarray may be unnecessary or raise errors. #3

@CielAl

Description

@CielAl

Hi,
it appears that the slicing in numpy array would automatically remove the trailing singleton dimension.
The slice io_arr_out[:,:,:,0] is already npatches x patch_size x patch_size, given that the shape of io_arr_out is
npatches x patch_size x patch_size x 3 (for 3-channel inputs).

Also, in one of my slides, the annotated area without downsampling is already small enough, and the downsampled ROI yields a tile smaller than the patch_size, which makes its padded version of io_arr_out
to be 1x patch_size x patch_size x 3.

Using squeeze will incorrectly collapse the leading singleton dimension which we don't want to drop, and raise errors because the rank of the result will mismatch the rank of the hdf5 array.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions