Cache Failure and Null Weights in Jetson-Inference Tutorial

I’m trying to go through your Jetson-Inference tutorial, however I’m unable to run even the first script. I am not using custom code or models. Nothing from the repo is changed. I’m using: Jetson TX2, Cuda 9.0, TensorRT 4.0, Cuda 9.0

I’m getting the following when trying to run the imagenet console program:

nvidia@tegra-ubuntu:~/jetson-inference/build/aarch64/bin$ ./imagenet-console orange_0.pjg output_0.jpg
imagenet-console
  args (3):  0 [./imagenet-console]  1 [orange_0.pjg]  2 [output_0.jpg]  


imageNet -- loading classification network model from:
         -- prototxt     networks/googlenet.prototxt
         -- model        networks/bvlc_googlenet.caffemodel
         -- class_labels networks/ilsvrc12_synset_words.txt
         -- input_blob   'data'
         -- output_blob  'prob'
         -- batch_size   2

[TRT]  TensorRT version 4.0.2
[TRT]  attempting to open cache file networks/bvlc_googlenet.caffemodel.2.tensorcache
[TRT]  cache file not found, profiling network model
[TRT]  platform has FP16 support.
[TRT]  loading networks/googlenet.prototxt networks/bvlc_googlenet.caffemodel
Weights for layer conv1/7x7_s2 doesn't exist
[TRT]  CaffeParser: ERROR: Attempting to access NULL weights
Weights for layer conv1/7x7_s2 doesn't exist
[TRT]  CaffeParser: ERROR: Attempting to access NULL weights
[TRT]  Parameter check failed at: ../builder/Network.cpp::addConvolution::40, condition: kernelWeights.values != NULL
error parsing layer type Convolution index 1
[TRT]  failed to parse caffe network
failed to load networks/bvlc_googlenet.caffemodel
failed to load networks/bvlc_googlenet.caffemodel
imageNet -- failed to initialize.
imagenet-console:   failed to initialize imageNet

Any help is appreciated.

Hi Kathryn, it may be that the model that gets downloaded during the cmake step may be corrupted.

You could run these steps to try again, or manually downloading bvlc_googlenet.caffemodel if that doesn’t work:

cd jetson-inference
rm -r -f build
mkdir build
cd build
cmake ../    # this is where the models get downloaded
make

Thank you so much for the response.

I’ve done the above, but I’m getting an error when trying to make. I tried removing the entire repo and re-cloning, but I’m still getting the same issue.

I’m getting whitespace warnings, which are non-critical. The error is here:

[ 53%] Built target jetson-inference
Scanning dependencies of target imagenet-console
[ 56%] Building CXX object imagenet-console/CMakeFiles/imagenet-console.dir/imagenet-console.cpp.o
[ 58%] Linking CXX executable ../aarch64/bin/imagenet-console
/usr/bin/aarch64-linux-gnu-ld: CMakeFiles/imagenet-console.dir/imagenet-console.cpp.o: undefined reference to symbol '_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv@@GLIBCXX_3.4.21'
//usr/lib/aarch64-linux-gnu/libstdc++.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
imagenet-console/CMakeFiles/imagenet-console.dir/build.make:101: recipe for target 'aarch64/bin/imagenet-console' failed
make[2]: *** [aarch64/bin/imagenet-console] Error 1
CMakeFiles/Makefile2:122: recipe for target 'imagenet-console/CMakeFiles/imagenet-console.dir/all' failed
make[1]: *** [imagenet-console/CMakeFiles/imagenet-console.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Update:

Got the make to work using -lstdc++

The imagenet script returned the same errors, so I tried using the downloaded model you linked and it worked! In looking in the networks folder, it appears that all of the models are empty. Thank you so much for your help.

Hmm, perhaps your connection or firewall is blocking the CMakePreBuild.sh script from automatically downloading the models using wget.

If you end up needing the other models, you can try manually downloading them from the URLs starting here:
[url]jetson-inference/CMakePreBuild.sh at 6e16563f404af35be08993a44ad3650210f40351 · dusty-nv/jetson-inference · GitHub

It’s probably the corporate firewall. I had to get IT to whitelist the nvidia docker to be able to login.

I’m actually having trouble with the docker at the moment. When I try to go to localhost:8888, it says there is a problem loading the page. When I go look at docker, it appears that digits is exiting almost immediately. I tried running with -dit but that didn’t fix it. I’m completely new to docker, so I don’t know if this is a firewall, nvidia, or docker (or me doing something wrong) issue.

If you are having trouble running DIGITS locally within Docker, are you able to try installing DIGITS natively on an Ubuntu 16.04 machine?

I’ve tried, but caffe isn’t installing properly. I was going to tackle that today if I couldn’t get docker working.