cuốn sách gpt4 ai đã làm

python - 如何在 google colab 上安装 pydot 和 graphviz?

In lại Tác giả: Walker 123 更新时间:2023-11-28 19:00:54 31 4
mua khóa gpt4 Nike

我正在尝试在 google colab 上绘制我的模型。

 from keras.utils import plot_model
plot_model(model, to_file="model.png")

我得到了这个错误:

 ImportError: Failed to import pydot. You must install pydot and graphviz for `pydotprint` to work.

我已经安装了 pydot-nggraphviz 但我仍然无法解决这个错误。

câu trả lời hay nhất

要安装 pydot,请运行:

!pip install -q pydot

然后,重新启动您的 VM 以重新加载 keras,然后它应该会检测到 pydot 的存在。 (运行时菜单 -> 重启运行时...)

关于python - 如何在 google colab 上安装 pydot 和 graphviz?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52756389/

31 4 0
Walker 123
Hồ sơ

Tôi là một lập trình viên xuất sắc, rất giỏi!

Nhận phiếu giảm giá taxi Didi miễn phí
Phiếu giảm giá taxi Didi
Chứng chỉ ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com
Xem sitemap của VNExpress