tfmri.image.extract_glimpses
tfmri.image.extract_glimpses¶
- extract_glimpses(images, sizes, offsets)[source]¶
Extract glimpses (patches) from a tensor at the given offsets.
- Parameters
images – A
Tensor. Must have shape[batch_size, ..., channels], where...are theNspatial dimensions.sizes – A list of
intsof lengthN.offsets – A
Tensorof shape[M, N]containing indices into the upper-left corners of the patches to be extracted.
- Returns
A
Tensorwith shape[batch_size, M, prod(sizes) * channels], where the last dimension are the flattened glimpses.