Convolutional Neural Networks Week 4 Art Generation with Neural Style Transfer submission issue

I am getting following error on the submission
<<<<<
We encountered the following warnings when grading this part:

  • The grader ran out of memory while grading your submission. Please try submitting an optimized solution. If you think your solution is correct, please visit the Discussion forum to see if your peers are experiencing similar errors. If the issue isn’t resolved in 24 hours, please reach out to Coursera through our Help Center.

Here is the grader outp

[ValidateApp | INFO] Validating ‘/home/jovyan/work/submitted/courseraLearner/W4A2/Art_Generation_with_Neural_Style_Transfer.ipynb’
[ValidateApp | INFO] Executing notebook with kernel: python3
2021-04-29 14:43:54.573926: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library ‘libcudart.so.10.1’; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory
2021-04-29 14:43:54.573966: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
2021-04-29 14:43:56.285385: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library ‘libcuda.so.1’; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory
2021-04-29 14:43:56.285433: W tensorflow/stream_executor/cuda/cuda_driver.cc:312] failed call to cuInit: UNKNOWN ERROR (303)
2021-04-29 14:43:56.285464: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (somehost): /proc/driver/nvidia/version does not exist
2021-04-29 14:43:56.285686: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations: AVX2 AVX512F FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2021-04-29 14:43:56.294485: I tensorflow/core/platform/profile_utils/cpu_utils.cc:104] CPU Frequency: 3000000000 Hz
2021-04-29 14:43:56.296382: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7f882155db10 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2021-04-29 14:43:56.296428: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
2021-04-29 14:44:01.190793: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 6400000000 exceeds 10% of free system memory.
[ValidateApp | ERROR] Kernel died while waiting for execute reply.
[ValidateApp | ERROR] Traceback (most recent call last):
File “/opt/conda/lib/python3.7/site-packages/nbconvert/preprocessors/execute.py”, line 478, in _poll_for_reply
msg = self.kc.shell_channel.get_msg(timeout=timeout)
File “/opt/conda/lib/python3.7/site-packages/jupyter_client/blocking/channels.py”, line 57, in get_msg
raise Empty
_queue.Empty

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/conda/lib/python3.7/site-packages/nbgrader/preprocessors/execute.py", line 41, in preprocess
    output = super(Execute, self).preprocess(nb, resources)
  File "/opt/conda/lib/python3.7/site-packages/nbconvert/preprocessors/execute.py", line 405, in preprocess
    nb, resources = super(ExecutePreprocessor, self).preprocess(nb, resources)
  File "/opt/conda/lib/python3.7/site-packages/nbconvert/preprocessors/base.py", line 69, in preprocess
    nb.cells[index], resources = self.preprocess_cell(cell, resources, index)
  File "/opt/conda/lib/python3.7/site-packages/nbconvert/preprocessors/execute.py", line 438, in preprocess_cell
    reply, outputs = self.run_cell(cell, cell_index, store_history)
  File "/opt/conda/lib/python3.7/site-packages/nbconvert/preprocessors/execute.py", line 578, in run_cell
    exec_reply = self._poll_for_reply(parent_msg_id, cell, timeout)
  File "/opt/conda/lib/python3.7/site-packages/nbconvert/preprocessors/execute.py", line 483, in _poll_for_reply
    self._check_alive()
  File "/opt/conda/lib/python3.7/site-packages/nbconvert/preprocessors/execute.py", line 510, in _check_alive
    raise DeadKernelError("Kernel died")
nbconvert.preprocessors.execute.DeadKernelError: Kernel died

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/conda/lib/python3.7/site-packages/nbgrader/apps/validateapp.py", line 72, in start
    validator.validate_and_print(filename)
  File "/opt/conda/lib/python3.7/site-packages/nbgrader/validator.py", line 340, in validate_and_print
    results = self.validate(filename)
  File "/opt/conda/lib/python3.7/site-packages/nbgrader/validator.py", line 311, in validate
    nb = self._preprocess(nb)
  File "/opt/conda/lib/python3.7/site-packages/nbgrader/validator.py", line 290, in _preprocess
    nb, resources = pp.preprocess(nb, resources)
  File "/opt/conda/lib/python3.7/site-packages/nbgrader/preprocessors/execute.py", line 44, in preprocess
    raise UnresponsiveKernelError()
nbgrader.preprocessors.execute.UnresponsiveKernelError

[ValidateApp | ERROR] nbgrader encountered a fatal error while trying to validate ‘submitted/courseraLearner/W4A2/Art_Generation_with_Neural_Style_Transfer.ipynb’

My all tests are passed , but not sure why I am getting this error. Please check.

2 Likes

I’m also facing the exact same issue, but on Transfer_learning_with_MobileNet_v1 notebook on Week2

Could not load dynamic library ‘libcudart.so.10.1’
Could not load dynamic library ‘libcuda.so.1’;

Judging by above 2 snippets, it looks like the grader is NOT running on a machine with a GPU.
Not sure how this should be fixed or brought to the attention of Course Admins

same issue, [ValidateApp | ERROR] nbgrader encountered a fatal error while trying to validate ‘submitted/courseraLearner/W3A2/Image_segmentation_Unet_v1.ipynb’

Hi i am doubt in train_step:
what we need to write for these parameters :
a_G=vgg_model_outputs(a_S,a_C)
J_style =compute_style_cost(a_S,a_G)
J_content =compute_content_cost(a_C, a_G)
J =compute_total_cost(J_style,J_Content,alpha = 10,beta = 40)
These are the things written but getting wrong output so can you help me out in resolving these steps

Hey everyone! We have encountered problems with assignment grading for C4. We are trying our best to fix them. We apologise for the inconvenience. I’ll keep you guys posted, as to when it gets fixed.

Hi Mubsi
Hi i am doubt in train_step:
what we need to write for these parameters :
a_G=vgg_model_outputs(a_S,a_C)
J_style =compute_style_cost(a_S,a_G)
J_content =compute_content_cost(a_C, a_G)
J =compute_total_cost(J_style,J_Content,alpha = 10,beta = 40)
These are the things written but getting wrong output so can you help me out in resolving these steps
[/quote]

For my reference: looked at this post.

Please frequently check this post regarding the update: Course 4 Assignment Submission Issues

a_G = vgg_model_outputs(generated_image)
#(1 line)

    # Compute the style cost
    #(1 line)
    J_style = compute_style_cost(a_S,a_G)

    #(2 lines)
    # Compute the content cost
    J_content = compute_content_cost(a_C,a_G)
    # Compute the total cost
    J = total_cost(J_content, J_style, alpha = 10, beta = 40)

The above is the driver code
and i am getting the following error.

NotImplementedError: in user code:

<ipython-input-32-b61f8754af0a>:25 train_step  *
    J_style = compute_style_cost(a_S,a_G)
<ipython-input-16-74c43cad8f37>:28 compute_style_cost  *
    J_style_layer = compute_layer_style_cost(a_S[i], a_G[i])
<ipython-input-11-6e87028f5e00>:29 compute_layer_style_cost  *
    J_style_layer = factor * tf.reduce_sum(np.power(GS - GG, 2))
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/ops.py:848 __array__  **
    " a NumPy call, which is not supported".format(self.name))

NotImplementedError: Cannot convert a symbolic Tensor (sub:0) to a numpy array. This error may indicate that you're trying to pass a Tensor to a NumPy call, which is not supported.

Can anyone tell me what is the error and how i can correct it or any hint will work. Thank you

@Mubsi

Kindly DM me your solution notebook.