Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Data Science by (17.6k points)

In Keras, the optimizer (default ones) minimizes the loss function by default. Is there any way I can make the optimizer maximize the loss function?

1 Answer

0 votes
by (17.6k points)

Simply multiply the loss by -1 to maximize the loss function while trying to minimize it:

new_loss = -loss

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...