Hi,
I am not able to get through this problem and any help around it will be very much appreciated.
While solving the programming assignment, I am getting wrong value for overall cost but all of tests before are working fine. Please check attachments.
Also when I try to Debug by printing individual style and content costs, it end up printing model layer information such as Tensor(“add_4:0”, shape=(), dtype=float32)
Surprisingly it looks like using the tf functions for square and subtraction was generating negative values for Style Cost function. When I replaced these with ** and - operators, and re-running all cells, the issue disappeared.
The tf functions return tensors. That’s not what you want when computing a scalar value.
You can’t use print() statements for debugging very well, because they just give a summary of the tensor definition when the model is created. Only at runtime can you get real values.