Course 4 Week 4 Assignt 2 Neural Style Training Cost Error

I’m doing the Neural Style Transfer Assignment and have passed all the tests up until the one for the final training step function.

My first training step cost is way too low apparently, very negative. I’m assuming my J_style cost is just way too low, but I haven’t seen other peoples numbers to compare. In addition, the problem seems to persist between changes to the style function, and the style test is being passed.

Does anyone recognize this problem, or have an idea for where the problem may be?

J_style: -7946908
J_content: 0.00884228665

total_cost: -317876320

tf.Tensor(-317876320.0, shape=(), dtype=float32)

By definition, cost cannot be negative.

1 Like

Thanks, it turns out I forgot about integer overflow.