-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show tensors shaped [H, W, 1, 1] as images (and more!) (#2075)
* Ignore trailing tensor dimension when determining whether a tensor is an image. Fixes #1871 Quite a bit of nuance to support single channel 1x1 images & line-like images. * fix image preview for images other than M x N x C and M x N * comment fix * better shape_short comment * handle empty tensors * is_shaped_like_an_image is now defined via image_height_width_channels, improve comment on both * any Nx1x... image now now treated as image * rename to get_with_image_coords, make it more restrictive * tensor_to_gpu height_width_depth utility uses now tensor.image_height_width_channels * change behavior of is_vector
- Loading branch information
Showing
5 changed files
with
234 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters