提交 f0464c94 编写于 作者: F ftesser 提交者: Gabriel de Marmiesse

Allowed to return the image as a Jupyter Image only if the extension is not pdf (#13383). (#13384)

keras/utils/vis_utils.py
上级 985521ee
......@@ -245,8 +245,9 @@ def plot_model(model,
extension = extension[1:]
dot.write(to_file, format=extension)
# Return the image as a Jupyter Image object, to be displayed in-line.
try:
from IPython import display
return display.Image(filename=to_file)
except ImportError:
pass
if extension != 'pdf':
try:
from IPython import display
return display.Image(filename=to_file)
except ImportError:
pass
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册