Finally, we have a function that displays the content and style images together with best_image:
def show_results(best_image, content_path, style_path, show_large_final=True):
plt.figure(figsize=(10, 5))
content = load_image(content_path)
style = load_image(style_path)
plt.subplot(1, 2, 1)
show_image(content, 'Content Image')
plt.subplot(1, 2, 2)
show_image(style, 'Style Image')
if show_large_final:
plt.figure(figsize=(10, 10))
plt.imshow(best_image)
plt.title('Output Image')
plt.show()
This is followed by a call to that function, as follows:
show_results(best_image, content_path, style_path)