Please tell me how to output images from the tensor during the learning process with tensorflow.

Asked 2 years ago, Updated 2 years ago, 47 views

Please tell me how to output images from the tensor during the learning process with tensorflow.
I would like to have a 40×40×1 image output from a Tensor with shape=(64,40,40,1), dtype=float32.

tensorflow

2022-09-30 18:41

1 Answers

The image is 2D data and the tensor dimension of the question is (64, 40, 40 and 1) in 4(3?) dimensions, so you have to do some conversion.

I think the simple way is to divide the tensors of dimensions (64, 40, 40 and 1) into 64 pieces (40, 40) of 2D data (slice) and display each as an image.

If the whole tensor is to be viewed in bird's-eye view, slices along the axes of X, Y, and Z are made and displayed in order, such as a CT image or an MRI image of a human body.Alternatively, a three-dimensional representation of each value by the size of the sphere would be effective.


2022-09-30 18:41

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.