I’m not sure to understand the question completely.
Are cnn_input_image, b, and cnn_output_image all image tensors, i.e. di they have the same shape?
If so, wouldn’t you divide by zero, if cnn_output_image is normalized to [0, 1]?