keras/src/ops/nn.py/PSNR/compute_output_spec
class PSNR:    def compute_output_spec(self, x1, x2):
        if len(x1.shape) != len(x2.shape):
            raise ValueError("Inputs must have the same rank")

        return KerasTensor(shape=())