# Implement a Quadratic Layer, my code runs fine, but whenever I submit this are the reuslts

**URL:** <https://community.deeplearning.ai/t/implement-a-quadratic-layer-my-code-runs-fine-but-whenever-i-submit-this-are-the-reuslts/116488>\
**Category:** Custom Models, Layers and Loss Functions with TF\
**Tags:** week-module-3\
**Created:** [April 5, 2022, 11:15pm UTC](https://community.deeplearning.ai/t/implement-a-quadratic-layer-my-code-runs-fine-but-whenever-i-submit-this-are-the-reuslts/116488 "2022-04-05T23:15:39Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Emms122](https://avatars.discourse-cdn.com/v4/letter/e/258eb7/32.png) [@Emms122](https://community.deeplearning.ai/u/Emms122)\
**Post date:** [April 5, 2022, 11:15pm UTC](https://community.deeplearning.ai/t/implement-a-quadratic-layer-my-code-runs-fine-but-whenever-i-submit-this-are-the-reuslts/116488/1 "2022-04-05T23:15:39Z")

</div>

Filename: nbgrader-part

0/1Score: 0 of 1

Hide grader output

Grader output

[ValidateApp | INFO] Validating ‘/home/jovyan/work/submitted/courseraLearner/W3\_Assignment/C1W3\_Assignment.ipynb’ [ValidateApp | INFO] Executing notebook with kernel: python3 2022-04-05 23:11:45.178906: W tensorflow/stream\_executor/platform/default/dso\_loader.cc:55] Could not load dynamic library ‘libnvinfer.so.6’; dlerror: libnvinfer.so.6: cannot open shared object file: No such file or directory 2022-04-05 23:11:45.179083: W tensorflow/stream\_executor/platform/default/dso\_loader.cc:55] Could not load dynamic library ‘libnvinfer\_plugin.so.6’; dlerror: libnvinfer\_plugin.so.6: cannot open shared object file: No such file or directory 2022-04-05 23:11:45.179098: W tensorflow/compiler/tf2tensorrt/utils/py\_utils.cc:30] Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly. 2022-04-05 23:11:46.190858: W tensorflow/stream\_executor/platform/default/dso\_loader.cc:55] Could not load dynamic library ‘libcuda.so.1’; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory 2022-04-05 23:11:46.190891: E tensorflow/stream\_executor/cuda/cuda\_driver.cc:351] failed call to cuInit: UNKNOWN ERROR (303) 2022-04-05 23:11:46.190928: I tensorflow/stream\_executor/cuda/cuda\_diagnostics.cc:156] kernel driver does not appear to be running on this host (ip-10-2-50-64.ec2.internal): /proc/driver/nvidia/version does not exist 2022-04-05 23:11:46.191313: I tensorflow/core/platform/cpu\_feature\_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 AVX512F FMA 2022-04-05 23:11:46.222457: I tensorflow/core/platform/profile\_utils/cpu\_utils.cc:94] CPU Frequency: 2999995000 Hz 2022-04-05 23:11:46.224643: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x564bbc431ad0 initialized for platform Host (this does not guarantee that XLA will be used). Devices: 2022-04-05 23:11:46.224675: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version [ValidateApp | ERROR] Timeout waiting for execute reply (30s). [ValidateApp | ERROR] Interrupting kernel Success! Your notebook passes all the tests.

---

<div class="post-metadata">

**Author:** ![vsnupoudel](https://avatars.discourse-cdn.com/v4/letter/v/53a042/32.png) [@vsnupoudel](https://community.deeplearning.ai/u/vsnupoudel)\
**Post date:** [April 6, 2022, 3:01pm UTC](https://community.deeplearning.ai/t/implement-a-quadratic-layer-my-code-runs-fine-but-whenever-i-submit-this-are-the-reuslts/116488/2 "2022-04-06T15:01:16Z")

</div>

Could you share the public link to your notebook. From what I can see, I think tensorflow is trying to use GPU, but has python libraries for it missing.  
You could try submitting with just the CPU selected. Sorry, could not be of much help.

---

<div class="post-metadata">

**Author:** ![Emms122](https://avatars.discourse-cdn.com/v4/letter/e/258eb7/32.png) [@Emms122](https://community.deeplearning.ai/u/Emms122)\
**Post date:** [April 6, 2022, 3:18pm UTC](https://community.deeplearning.ai/t/implement-a-quadratic-layer-my-code-runs-fine-but-whenever-i-submit-this-are-the-reuslts/116488/3 "2022-04-06T15:18:55Z")

</div>

I have been able to solve the problem though, I created a new notebook and submitted from there apparently it worked, it seems like the main code is corrupted?

---

<div class="post-metadata">

**Author:** ![redradist](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/redradist/32/6059_2.png) [@redradist](https://community.deeplearning.ai/u/redradist)\
**Post date:** [April 10, 2022, 11:47am UTC](https://community.deeplearning.ai/t/implement-a-quadratic-layer-my-code-runs-fine-but-whenever-i-submit-this-are-the-reuslts/116488/4 "2022-04-10T11:47:35Z")

</div>

@Emms122 Could you describe what do you mean by created new notebook ? You just created copy of original one ? (for me it does not work)  
Or you created fresh notebook and copy all cells manually ?

---

<div class="post-metadata">

**Author:** ![redradist](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/redradist/32/6059_2.png) [@redradist](https://community.deeplearning.ai/u/redradist)\
**Post date:** [April 10, 2022, 12:18pm UTC](https://community.deeplearning.ai/t/implement-a-quadratic-layer-my-code-runs-fine-but-whenever-i-submit-this-are-the-reuslts/116488/5 "2022-04-10T12:18:24Z")

</div>

@vsnupoudel I have the same error, I tried different approaches like duplicate notebook or create it from scratch, but neither solution is worked

---

<div class="post-metadata">

**Author:** ![vsnupoudel](https://avatars.discourse-cdn.com/v4/letter/v/53a042/32.png) [@vsnupoudel](https://community.deeplearning.ai/u/vsnupoudel)\
**Post date:** [April 10, 2022, 1:06pm UTC](https://community.deeplearning.ai/t/implement-a-quadratic-layer-my-code-runs-fine-but-whenever-i-submit-this-are-the-reuslts/116488/6 "2022-04-10T13:06:23Z")

</div>

@redradist . Oh I remember now. We are supposed to make a copy of the notebook first and then edit it with our answers. We submit this notebook to the grader, not the original one.  
Let me know if this solves the issue for you!

---

<div class="post-metadata">

**Author:** ![redradist](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/redradist/32/6059_2.png) [@redradist](https://community.deeplearning.ai/u/redradist)\
**Post date:** [April 10, 2022, 6:18pm UTC](https://community.deeplearning.ai/t/implement-a-quadratic-layer-my-code-runs-fine-but-whenever-i-submit-this-are-the-reuslts/116488/7 "2022-04-10T18:18:50Z")

</div>

@vsnupoudel I’ve already tried to copy notebook and it do not work for me …  
I even created copy of the notebook on my local PC and then upload it to Coursera, but it still not working …

What should I do ? How to reset the notebook ?

---

<div class="post-metadata">

**Author:** ![vsnupoudel](https://avatars.discourse-cdn.com/v4/letter/v/53a042/32.png) [@vsnupoudel](https://community.deeplearning.ai/u/vsnupoudel)\
**Post date:** [April 10, 2022, 7:04pm UTC](https://community.deeplearning.ai/t/implement-a-quadratic-layer-my-code-runs-fine-but-whenever-i-submit-this-are-the-reuslts/116488/8 "2022-04-10T19:04:41Z")

</div>

> <https://stackoverflow.com/questions/49615715/coursera-jupyternotebook-revert-to-the-beginning>

Hi,  
You could refer to the first few answers here.

Btw, can you confirm the notebooks exercises in Coursera environment or in Google colab environment? Above answer is for course environment.

If it is colab, we do create a copy in drive, which creates a copy in our personal Google drive. We then edit this copy and upload it.

---

<div class="post-metadata">

**Author:** ![gent.spah](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/gent.spah/32/136423_2.png) [@gent.spah](https://community.deeplearning.ai/u/gent.spah)\
**Post date:** [April 10, 2022, 7:21pm UTC](https://community.deeplearning.ai/t/implement-a-quadratic-layer-my-code-runs-fine-but-whenever-i-submit-this-are-the-reuslts/116488/9 "2022-04-10T19:21:39Z")

</div>

Hello guys,

The notebook is in coursera and it passes the tests but not the grader, so there is probably some problem with updates and the grader times out. We had a similar problem sometime ago but i can’t remember what was the problem. Let me write an issue for the QA team so they can have a look at it. Thanks.

---

<div class="post-metadata">

**Author:** ![Emms122](https://avatars.discourse-cdn.com/v4/letter/e/258eb7/32.png) [@Emms122](https://community.deeplearning.ai/u/Emms122)\
**Post date:** [April 10, 2022, 8:07pm UTC](https://community.deeplearning.ai/t/implement-a-quadratic-layer-my-code-runs-fine-but-whenever-i-submit-this-are-the-reuslts/116488/10 "2022-04-10T20:07:07Z")

</div>

In the coursera environment the lab to be specific, I clicked on file then clicked on new notebook, but then I opened the link in a separate tab, and funny enough it worked after I submitted it, i hope it works for you as well.

---

<div class="post-metadata">

**Author:** ![redradist](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/redradist/32/6059_2.png) [@redradist](https://community.deeplearning.ai/u/redradist)\
**Post date:** [April 10, 2022, 8:14pm UTC](https://community.deeplearning.ai/t/implement-a-quadratic-layer-my-code-runs-fine-but-whenever-i-submit-this-are-the-reuslts/116488/11 "2022-04-10T20:14:56Z")

</div>

No it is not working for me …

```auto
[ValidateApp | INFO] Validating '/home/jovyan/work/submitted/courseraLearner/W3_Assignment/C1W3_Assignment.ipynb'
[ValidateApp | INFO] Executing notebook with kernel: python3
2022-04-10 20:09:23.517606: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer.so.6'; dlerror: libnvinfer.so.6: cannot open shared object file: No such file or directory
2022-04-10 20:09:23.517756: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer_plugin.so.6'; dlerror: libnvinfer_plugin.so.6: cannot open shared object file: No such file or directory
2022-04-10 20:09:23.517768: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:30] Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
2022-04-10 20:09:24.582273: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory
2022-04-10 20:09:24.582310: E tensorflow/stream_executor/cuda/cuda_driver.cc:351] failed call to cuInit: UNKNOWN ERROR (303)
2022-04-10 20:09:24.582333: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (ip-10-2-14-63.ec2.internal): /proc/driver/nvidia/version does not exist
2022-04-10 20:09:24.582553: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 AVX512F FMA
2022-04-10 20:09:24.611424: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2999995000 Hz
2022-04-10 20:09:24.613703: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x556754010440 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2022-04-10 20:09:24.613741: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
[ValidateApp | ERROR] Timeout waiting for execute reply (30s).
[ValidateApp | ERROR] Interrupting kernel
Success! Your notebook passes all the tests.

```

For me it looks like it is environment issue … but the strange part is that when I run it in browser it works, but during submitting it is not working, looks like that different virtual machines are used for browser version and for submitted one

---

<div class="post-metadata">

**Author:** ![chris.favila](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/chris.favila/32/126338_2.png) [@chris.favila](https://community.deeplearning.ai/u/chris.favila)\
**Post date:** [April 11, 2022, 11:02am UTC](https://community.deeplearning.ai/t/implement-a-quadratic-layer-my-code-runs-fine-but-whenever-i-submit-this-are-the-reuslts/116488/12 "2022-04-11T11:02:18Z")

</div>

Hi everyone! Thank you for reporting! We are now investigating the issue and will update this thread asap.

---

<div class="post-metadata">

**Author:** ![chris.favila](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/chris.favila/32/126338_2.png) [@chris.favila](https://community.deeplearning.ai/u/chris.favila)\
**Post date:** [April 11, 2022, 11:27am UTC](https://community.deeplearning.ai/t/implement-a-quadratic-layer-my-code-runs-fine-but-whenever-i-submit-this-are-the-reuslts/116488/13 "2022-04-11T11:27:43Z")

</div>

Hello again! It seems the grader is timing out because of the training. Sometimes it passes, sometimes it simply times out. This wasn’t the case before. Now I am able to consistently get a grade by commenting out the `model.fit()` code block. Here are the steps I did:

1. Make sure to pass all public tests and get an accuracy \> 97%.
2. Click inside the last code cell of the notebook.
3. Select all lines in this code cell with `Ctrl+A` (Windows/Linux) or `Cmd+A` (Mac), then press `Ctrl+/` (Windows/Linux) or `Cmd+/` (Mac) to comment the entire block. It should look like this:

 ![commenttrain](https://global.discourse-cdn.com/dlai/original/3X/f/6/f6573eb475f4e890947e563d98db7c8fb46a6714.png)

1. From the menu bar, click `File > Save and Checkpoint`. **This is important.**
2. Once saved, click the `Submit Assignment` button.

The grader should now ignore the training cell and give you a score. Please let me know if it also works for you. Hopefully it does! Thanks!

---

<div class="post-metadata">

**Author:** ![redradist](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/redradist/32/6059_2.png) [@redradist](https://community.deeplearning.ai/u/redradist)\
**Post date:** [April 11, 2022, 7:42pm UTC](https://community.deeplearning.ai/t/implement-a-quadratic-layer-my-code-runs-fine-but-whenever-i-submit-this-are-the-reuslts/116488/14 "2022-04-11T19:42:20Z")

</div>

@chris.favila I did like you suggested, tests are passed but grades is 0/1:

```auto
[ValidateApp | INFO] Validating '/home/jovyan/work/submitted/courseraLearner/W3_Assignment/C1W3_Assignment.ipynb'
[ValidateApp | INFO] Executing notebook with kernel: python3
2022-04-11 19:40:45.959093: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer.so.6'; dlerror: libnvinfer.so.6: cannot open shared object file: No such file or directory
2022-04-11 19:40:45.959204: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer_plugin.so.6'; dlerror: libnvinfer_plugin.so.6: cannot open shared object file: No such file or directory
2022-04-11 19:40:45.959217: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:30] Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
2022-04-11 19:40:46.683054: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory
2022-04-11 19:40:46.683086: E tensorflow/stream_executor/cuda/cuda_driver.cc:351] failed call to cuInit: UNKNOWN ERROR (303)
2022-04-11 19:40:46.683119: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (ip-10-2-15-202.ec2.internal): /proc/driver/nvidia/version does not exist
2022-04-11 19:40:46.683421: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 AVX512F FMA
2022-04-11 19:40:46.707432: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2999995000 Hz
2022-04-11 19:40:46.709601: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x555cf20ce540 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2022-04-11 19:40:46.709634: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
Success! Your notebook passes all the tests.

```

---

<div class="post-metadata">

**Author:** ![Emms122](https://avatars.discourse-cdn.com/v4/letter/e/258eb7/32.png) [@Emms122](https://community.deeplearning.ai/u/Emms122)\
**Post date:** [April 11, 2022, 9:16pm UTC](https://community.deeplearning.ai/t/implement-a-quadratic-layer-my-code-runs-fine-but-whenever-i-submit-this-are-the-reuslts/116488/15 "2022-04-11T21:16:31Z")

</div>

Hey, have u tried, opening a new notebook in a separate tab? did it show the Jupyter notebook logo at the top? instead of the coursera logo, that’s what i did for mine and it worked, though someone said “I commented out the last line of the last cell (model.eval) and it worked” you can try that

---

<div class="post-metadata">

**Author:** ![chris.favila](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/chris.favila/32/126338_2.png) [@chris.favila](https://community.deeplearning.ai/u/chris.favila)\
**Post date:** [April 12, 2022, 1:48am UTC](https://community.deeplearning.ai/t/implement-a-quadratic-layer-my-code-runs-fine-but-whenever-i-submit-this-are-the-reuslts/116488/16 "2022-04-12T01:48:48Z")

</div>

Hi! Please check your inbox. Thanks!
