如何修复“未找到 tf_utils 模块”的错误

Phi*_*ip 1 python package

我正在使用 jupyter notebook 使用以下代码运行 python 命令。

from tf_utils import load_dataset, random_mini_batches, convert_to_one_hot, predict
Run Code Online (Sandbox Code Playgroud)

我收到一个错误说 No module named 'tf_utils'. 我应该如何解决这个问题?

Ver*_*123 8

您的问题似乎来自 Andrew Ng 教授的深度学习课程。在tf_utils这里是从不同tensorflow-utilstf_utils.py由工作人员当然写的。它仅用于该任务。

在您的作业笔记本中,您可以单击顶部菜单栏中的“文件”->“打开...”,然后下载tf_utils.py以导入它。