Code generation error (loadDeepL​earningNet​work)

I saw the example and followed.
However, I would like to replace my newly created resnet50 neural network, not the pre-trained resnet50 neural network provided by Matlab. I actually made it, and it works well on the Matlb. However, when deploying to Raspberry Pi, loadDeeplelearningnetwork function keeps failing. What's the cause?
Does it matter if my gpu is AMD? Matlab coder is NVIDIA compatible..
this is my function
this is deploy function
errors

4 comentarios

Ram Kokku
Ram Kokku el 9 de Jul. de 2023
Editada: Ram Kokku el 10 de Jul. de 2023
@Chanhyeok, thank you for reaching out. I dont see any obvious issue with the code causing the error, but you may be able to work around the issue by passing a dummy character array as a second argument for coder.loadDeepLearningNetwork.
for example,
net = coder.loadDeepLearningNetwork('dataset800.mat', 'my_dummy_name');
Regarding your inquiry concerning AMD and NVIDIA GPUs, if your target is the Raspberry Pi or any other CPU-based platform, the GPU on the target platform or host is inconsequential.
Chanhyeok
Chanhyeok el 10 de Jul. de 2023
Thank you for your kindness. I agree with your idea that a second argument causes error. I was wonder how to use second argument. Let me know additional explanation about second argument please, :) Is it okay to just use “my dummy name” or something has to be changed?
Ram Kokku
Ram Kokku el 11 de Jul. de 2023
@Chanhyeok, The coders will use the second argument as the recommended name for the C++ class generated for the deep learning network. you can give a simple dummy character array, preferable a single word - for example, 'MyDLClass' or 'my_dummy_string'.
Chanhyeok
Chanhyeok el 11 de Jul. de 2023
I'm sorry that it doesn't work..

Iniciar sesión para comentar.

 Respuesta aceptada

Sayan Saha
Sayan Saha el 11 de Jul. de 2023
Editada: Sayan Saha el 11 de Jul. de 2023

0 votos

Hello @Chanhyeok, are you trying to codegen in a folder that has non-ASCII characters in it's path? If so, can you change to a directory that has only ASCII characters in it's full-path and see if that resolves the issue. Note that codegen is not currently supported for non-ASCII characters https://www.mathworks.com/help/coder/ug/code-generation-for-characters.html.

1 comentario

wtg Wtg
wtg Wtg el 4 de Dic. de 2024
I run gpu checks on r2024a/b over Nvidia RTX4080 Laptop with all combinations of VS2017/2019/2022 + Cuda11.8-12.2/cuDNN8.7-9.2/TensorRT8.5.1.7-8.6.1.6, and always got the deepcodegen & deepcodeexec fails as below :
>>gpuEnvObj = coder.gpuEnvConfig('host');
gpuEnvObj.BasicCodegen = 1;
gpuEnvObj.BasicCodeexec = 1;
gpuEnvObj.DeepLibTarget = 'cudnn';
gpuEnvObj.DeepCodegen = 1;
gpuEnvObj.DeepCodeexec = 1;
results = coder.checkGpuInstall(gpuEnvObj)
Compatible GPU : PASSED
CUDA Environment : PASSED
Runtime : PASSED
cuFFT : PASSED
cuSOLVER : PASSED
cuBLAS : PASSED
cuDNN Environment : PASSED
Host Compiler : PASSED
Basic Code Generation : PASSED
Basic Code Execution : PASSED
Deep Learning (cuDNN) Code Generation: FAILED (GPU code generation failed with an error. View report for further information: View report)
results =
struct with fields:
gpu: 1
cuda: 1
cudnn: 1
tensorrt: 0
hostcompiler: 1
basiccodegen: 1
basiccodeexec: 1
deepcodegen: 0
tensorrtdatatype: 0
deepcodeexec: 0
The Error Report always shows as below :
Could you help ?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Get Started with GPU Coder en Centro de ayuda y File Exchange.

Preguntada:

el 9 de Jul. de 2023

Comentada:

el 4 de Dic. de 2024

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by