In this recipe, let's define an optimizer that can minimize the cost. Post optimization, check for CNN performance.