Week 4, assignment 2, train_step, error in function compute_style_cost

There should be no need to coerce types anywhere in your code.

On the point about the floating point constants, did you find this thread? Anytime someone ends up with a negative cost value, this is the first thing to check. There’s no way costs should ever be negative, right?

2 Likes