Coursera 笔记

Module 03 · Sequence Models & Attention Mechanism

Instructions If You Are Unable to Open Your Notebook无法打开 Notebook 时的处理说明

For the upcoming code assignment, "Trigger Word Detection", if you open the notebook and see the following pop-up error message
对于即将到来的代码作业“触发词检测”,如果您打开笔记本并看到以下弹出错误信息

"Error loading notebook ... An unknown error occurred while loading this notebook. This version can load notebook formats v4 or earlier. See the server log for details"
加载笔记本出错...在加载此笔记本时发生未知错误。此版本可加载 v4 或更早版本的笔记本格式。请查看服务器日志以获取详细信息

Please continue reading to see how to fix this issue.
请继续阅读以了解如何解决这个问题。

This error occurs because the notebook outputs many small audio files when you run the code. If you save the notebook, close it, and then re-open it, you may see this pop-up error message and a blank notebook.
此错误发生是因为您运行代码时,笔记本输出了许多小音频文件。如果您保存笔记本,关闭它,然后重新打开,您可能会看到此弹出错误消息和一个空白的笔记本。

Here are instructions to help you clear the notebook's cell outputs so that you can open your notebook.
以下是指南,帮助您清除笔记本单元格的输出,以便您打开笔记本。

  • Go to any other programming assignment in this course and open the notebook.
    进入本课程中的任何其他编程作业并打开笔记本。

  • Click on the "Coursera" logo in the top left corner to access the file directory.
    点击页面左上角的“Coursera”标志以访问文件目录。

  • Navigate to Week 3. Duplicate your notebook 'Trigger word detection - v2a.ipynb' and give it another name, such as "tmp.ipynb".
    导航至第 3 周。复制您的笔记本“触发词检测 - v2a.ipynb”,并给它另一个名称,例如“tmp.ipynb”。

  • Open a terminal window by going to the top right and clicking "New", and in the drop-down menu, click "Terminal".
    打开终端窗口,请前往右上角点击“新建”,然后在下拉菜单中点击“终端”。

  • Within the terminal, navigate to the 'Week 3' folder. You can type cd Week\ 3/Trigger\ word\ detection/
    在终端中,导航到“第 3 周”文件夹。您可以输入 cd Week\ 3/Trigger\ word\ detection/

  • You can check that you're in the correct directory by typing 'pwd' (print working directory), and see the contents of that directory by typing 'ls'.
    您可以通过输入 'pwd'(打印工作目录)来检查您是否在正确的目录中,并通过输入 'ls' 来查看该目录的内容。

  • Type this command to remove the code outputs:
    输入此命令以删除代码输出:

jupyter nbconvert tmp.ipynb --to notebook --ClearOutputPreprocessor.enabled=True --output tmp.ipynb

Now you can go back to your file directory and open the 'tmp.ipynb' notebook. Verify that it opens properly. Then you can delete the original notebook and rename this tmp file as 'Trigger word detection - v1.ipynb'.
现在您可以回到您的文件目录,打开 'tmp.ipynb' 笔记本。验证它是否正确打开。然后您可以删除原始笔记本,将此临时文件重命名为 'Trigger word detection - v1.ipynb'。

Many thanks to Loic Roldan Waals for sharing this fix. Here is Loic's forum post.
非常感谢 Loic Roldan Waals 分享了这个修复方案。以下是 Loic 的论坛帖子。

We are contacting the team at Coursera to find a more permanent fix to this issue.
我们正在联系 Coursera 团队寻找这个问题的更永久性的解决方案。

Thanks!  谢谢!

  • The deeplearning.ai team
  • Deeplearning.ai 团队

Source: https://www.coursera.org/learn/nlp-sequence-models/supplement/0kud6/instructions-if-you-are-unable-to-open-your-notebook