pointnet2-tensorflow2 icon indicating copy to clipboard operation
pointnet2-tensorflow2 copied to clipboard

Model cannot be saved

Open gav1n-cheung opened this issue 2 years ago • 5 comments

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

gav1n-cheung avatar Jul 15 '21 11:07 gav1n-cheung

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 avatar Aug 16 '21 07:08 waiyc

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)

waiyc avatar Aug 17 '21 01:08 waiyc

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.

gav1n-cheung avatar Aug 23 '21 01:08 gav1n-cheung

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!

gamzekiprit avatar Oct 05 '21 11:10 gamzekiprit

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.

gav1n-cheung avatar Oct 06 '21 06:10 gav1n-cheung