pointnet
pointnet copied to clipboard
To train a model with Tensorflow 2.0
Hi, I'm working to train a model to classify point clouds from my own data and facing a problem while running train.py script.
I upgraded the code of train.py to be worked in Tensorflow 2.0 because anaconda doesn't support GPU version of Tensorflow v1 with my CUDA and CUDNN version.
I run the script on Jupyter Notebook
%run -i train_v2.py
and stopped.
Tensor("Placeholder_2:0", shape=(), dtype=bool, device=/device:GPU:0)
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
~\...\pointnet\train_v2.py in <module>
258
259 if __name__ == "__main__":
--> 260 train()
261 LOG_FOUT.close()
~\...\pointnet\train_v2.py in train()
105
106 # Get model and loss
--> 107 pred, end_points = MODEL.get_model(pointclouds_pl, is_training_pl, bn_decay=bn_decay)
108 loss = MODEL.get_loss(pred, labels_pl, end_points)
109 tf.compat.v1.summary.scalar('loss', loss)
~\...\pointnet\models\pointnet_cls_v2.py in get_model(point_cloud, is_training, bn_decay)
18 def get_model(point_cloud, is_training, bn_decay=None):
19 """ Classification PointNet, input is BxNx3, output Bx40 """
---> 20 batch_size = point_cloud.get_shape().as_list[0]
21 num_point = point_cloud.get_shape().as_list[1]
22 end_points = {}
AttributeError: 'int' object has no attribute 'value'
I found the simillar issue by https://github.com/tensorflow/tensorflow/pull/28461 and I changed the code as follow, but still got the same error. Does anyone have ideas to solve this problem?
i have implemented the masterpiece ,pointnet, last a few days in tensorflow2.3, which is hoped to give a little help
Hello @kota03016991
Can you please share how you preaperd your own dataset to feed it into the network.