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

Model cannot be saved #13

Open
gav1n-cheung opened this issue Jul 15, 2021 · 5 comments
Open

Model cannot be saved #13

gav1n-cheung opened this issue Jul 15, 2021 · 5 comments

Comments

@gav1n-cheung
Copy link

Model <model_modelnet.PointConvModel object at 0x7f1cc50f95b0> cannot be saved because the input shapes have not been set. Usually, input shapes are automatically determined from calling .fit() or .predict(). To manually set the shapes, call model.build(input_shape).

cuda=11.2
tensorflow=2.5
python=3.8

@waiyc
Copy link

waiyc commented Aug 16, 2021

I faced the same error . @gav1n-cheung Did you managed to find a solution to this?

My setup:
cuda=11.3
tensorflow=2.5
python=3.6

@waiyc
Copy link

waiyc commented Aug 17, 2021

Found a solution to train without issue. I added the parameter save_weights_only=True in the modelcheckpoint()

keras.callbacks.ModelCheckpoint('./logs/{}/model/weights.ckpt'.format(config['log_dir']), 'val_sparse_categorical_accuracy', save_weights_only=True, save_best_only=True)

@gav1n-cheung
Copy link
Author

Found a solution to train without issue. I added the parameter save_weights_only=True in the modelcheckpoint()

keras.callbacks.ModelCheckpoint('./logs/{}/model/weights.ckpt'.format(config['log_dir']), 'val_sparse_categorical_accuracy', save_weights_only=True, save_best_only=True)

Thanks a lot. I have choosen pytorch for pointnet, it runs well.

@gamzekiprit
Copy link

Hello. I also faced the same problem and solved it by saving the weights, but I still can't load the weights because of a similar error (input form is unknown). How did you load the weights? I would appreciate any help! Thanks a lot!

@gav1n-cheung
Copy link
Author

Hello. I also faced the same problem and solved it by saving the weights, but I still can't load the weights because of a similar error (input form is unknown). How did you load the weights? I would appreciate any help! Thanks a lot!

I have choosn pointnet++ which made by pytorch,it run well.

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

3 participants