Created
February 26, 2021 03:05
-
-
Save Crazz-Zaac/60ee8f9f67a1e09c58315ad2877554ba to your computer and use it in GitHub Desktop.
Computing total cost
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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