Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre trained model #4

Open
shivammalviya712 opened this issue Jan 2, 2021 · 1 comment
Open

Pre trained model #4

shivammalviya712 opened this issue Jan 2, 2021 · 1 comment

Comments

@shivammalviya712
Copy link

Hi @TianzhongSong,

When I am loading the pre-trained weights into the model present in model_cls.py, it's showing an error that they have a different number of layers. Can you please help?

Thank you in advance (^_^)

Error:

(pointnet_tf2) shivam@Jarvis:~/catkin_ws/src/pointnet_tf2/src$ /home/shivam/anaconda3/envs/pointnet_tf2/bin/python /home/shivam/catkin_ws/src/PointNet-Keras/lab.py
2021-01-02 10:08:07.776251: 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; LD_LIBRARY_PATH: /home/shivam/catkin_ws/devel/lib:/opt/ros/melodic/lib
2021-01-02 10:08:07.776298: E tensorflow/stream_executor/cuda/cuda_driver.cc:313] failed call to cuInit: UNKNOWN ERROR (303)
2021-01-02 10:08:07.776343: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (Jarvis): /proc/driver/nvidia/version does not exist
2021-01-02 10:08:07.776675: I tensorflow/core/platform/cpu_feature_guard.cc:143] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2021-01-02 10:08:07.809391: I tensorflow/core/platform/profile_utils/cpu_utils.cc:102] CPU Frequency: 2699905000 Hz
2021-01-02 10:08:07.809883: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7f6d80000b20 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2021-01-02 10:08:07.809951: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
Traceback (most recent call last):
  File "/home/shivam/catkin_ws/src/PointNet-Keras/lab.py", line 6, in <module>
    model.load_weights('/home/shivam/catkin_ws/src/PointNet-Keras/results/pointnet.h5')
  File "/home/shivam/anaconda3/envs/pointnet_tf2/lib/python3.6/site-packages/tensorflow/python/keras/engine/training.py", line 250, in load_weights
    return super(Model, self).load_weights(filepath, by_name, skip_mismatch)
  File "/home/shivam/anaconda3/envs/pointnet_tf2/lib/python3.6/site-packages/tensorflow/python/keras/engine/network.py", line 1266, in load_weights
    hdf5_format.load_weights_from_hdf5_group(f, self.layers)
  File "/home/shivam/anaconda3/envs/pointnet_tf2/lib/python3.6/site-packages/tensorflow/python/keras/saving/hdf5_format.py", line 685, in load_weights_from_hdf5_group
    ' layers.')
ValueError: You are trying to load a weight file containing 19 layers into a model with 37 layers.
@ohadlights
Copy link

Same here. TF 2.4.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants