Skip to content

Instantly share code, notes, and snippets.

@Crazz-Zaac
Created February 26, 2021 03:05
Show Gist options
  • Save Crazz-Zaac/60ee8f9f67a1e09c58315ad2877554ba to your computer and use it in GitHub Desktop.
Save Crazz-Zaac/60ee8f9f67a1e09c58315ad2877554ba to your computer and use it in GitHub Desktop.
Computing total cost
def total_cost(J_content, J_style, alpha = 10, beta = 40):
"""
Computes the total cost function
Arguments:
J_content -- content cost coded above
J_style -- style cost coded above
alpha -- hyperparameter weighting the importance of the content cost
beta -- hyperparameter weighting the importance of the style cost
Returns:
J -- total cost as defined by the formula above.
"""
### START CODE HERE ### (≈1 line)
J = alpha*J_content + beta*J_style
### END CODE HERE ###
return J
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment