python3.7版本,tensorflow1.14版本,画图时设置dpi出错
from keras.utils.vis_utils import plot_model
help(plot_model)
输出结果:
Help on function plot_model in module keras.utils.vis_utils:
plot_model(model, to_file='model.png', show_shapes=False, show_layer_names=True, rankdir='TB', expand_nested=False, dpi=96)
Converts a Keras model to dot format and save to a file.
# Arguments
model: A Keras model instance
to_file: File name of the plot image.
show_shapes: whether to display shape information.
show_layer_names: whether to display layer names.
rankdir: `rankdir` argument passed to PyDot,
a string specifying the format of the plot:
'TB' creates a vertical plot;
'LR' creates a horizontal plot.
expand_nested: whether to expand nested models into clusters.
dpi: dot DPI.
# Returns
A Jupyter notebook Image object if Jupyter is installed.
This enables in-line display of the model plots in notebooks.
你可以试一下你的输入上面这个代码,输出有没有这个dpi参数,感觉你的版本没有这个参数或者不支持修改,你试一下