Exercise 4 - compute_style_cost part has bug with weighted style cost.
Inside for loop there is
J_style += weight[1] * J_style_layer
but it should be
J_style += weight[i] * J_style_layer
Exercise 4 - compute_style_cost part has bug with weighted style cost.
Inside for loop there is
J_style += weight[1] * J_style_layer
but it should be
J_style += weight[i] * J_style_layer
No, I donât think that is an error.
In the for-loop, âiâ and âweightâ will be assigned as pairs via the zip() function. The âweightâ values come from the âSTYLE_LAYERSâ dictionary. weight[0] is a layer name, and weight[1] is the styleâs cost factor.