guochengqian / PointNeXt

[NeurIPS'22] PointNeXt: Revisiting PointNet++ with Improved Training and Scaling Strategies
https://guochengqian.github.io/PointNeXt/
MIT License
770 stars 111 forks source link

I'm having trouble running pointmlp #87

Open fgoxiapapopoz opened 1 year ago

fgoxiapapopoz commented 1 year ago

I entered the following command under the ModelNet40 classification dataset: CUDA_VISIBLE_DEVICES=0,1 python examples/classification/main.py --cfg cfgs/modelnet40ply2048/pointmlp.yaml

I get the following error: Traceback (most recent call last): File "examples/classification/main.py", line 67, in main(0, cfg, profile=args.profile) File "/root/PointNeXt-masterjia/examples/classification/../../examples/classification/train.py", line 172, in main optimizer, scheduler, epoch, cfg) File "/root/PointNeXt-masterjia/examples/classification/../../examples/classification/train.py", line 264, in train_one_epoch logits, loss = model.get_logits_loss(data, target) if not hasattr(model, 'module') else model.module.get_logits_loss(data, target) File "/root/.local/conda/envs/openpoints/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1178, in getattr type(self).name, name)) AttributeError: 'PointMLP' object has no attribute 'get_logits_loss'

May I ask where is the problem?

yuchenlichuck commented 1 year ago

Hi, there😊, Thank you for your question, I will try PointMLP from my side, and if it is a bug I will fix it later, Thank you!

yuchenlichuck commented 1 year ago

Hi, there, we are attending neurips and emnlp, I will fix it after the conference, thanks for your patience.

fgoxiapapopoz commented 1 year ago

嗨,我们在那里参加 neurips 和 emnlp,我会在会议结束后修复它,感谢您的耐心等待。

thank you very much

fgoxiapapopoz commented 1 year ago

Hi, there, we are attending neurips and emnlp, I will fix it after the conference, thanks for your patience. Excuse me again, have you fixed this error?

TangYuan96 commented 1 year ago

maybe try this,it can run !!

 # GFLOPs  GMACs   Params.(M)
#  31.36   15.61   13.239
model:
  NAME: BaseCls
  encoder_args:
    NAME: PointMLP
    in_channels: 3
    points: 1024
    num_classes: 40
    embed_dim: 64
    groups: 1
    res_expansion: 1.0
    activation: "relu"
    bias: False
    use_xyz: False
    normalize: "anchor"
    dim_expansion: [ 2, 2, 2, 2 ]
    pre_blocks: [ 2, 2, 2, 2 ]
    pos_blocks: [ 2, 2, 2, 2 ]
    k_neighbors: [ 24, 24, 24, 24 ]
    reducers: [ 2, 2, 2, 2 ]

lr:
  0.1
optimizer:
  NAME: 'momentum'
  momentum: 0.9
  weight_decay: 2.0e-4

sched: cosine
epochs: 300
t_max: 300
min_lr: 0.005
warmup_epochs: 0  # Later change to 10?

criterion_args:
  NAME: SmoothCrossEntropy
  label_smoothing: 0.2

datatransforms:
  train: [PointsToTensor, PointCloudScaleAndTranslate]
  vote: [PointCloudScaleAndTranslate]
  val: [PointsToTensor]
  kwargs:
    shift: [0.2, 0.2, 0.2]

batch_size: 32
val_batch_size: 64
fgoxiapapopoz commented 1 year ago

maybe try this,it can run !!

 # GFLOPs  GMACs   Params.(M)
#  31.36   15.61   13.239
model:
  NAME: BaseCls
  encoder_args:
    NAME: PointMLP
    in_channels: 3
    points: 1024
    num_classes: 40
    embed_dim: 64
    groups: 1
    res_expansion: 1.0
    activation: "relu"
    bias: False
    use_xyz: False
    normalize: "anchor"
    dim_expansion: [ 2, 2, 2, 2 ]
    pre_blocks: [ 2, 2, 2, 2 ]
    pos_blocks: [ 2, 2, 2, 2 ]
    k_neighbors: [ 24, 24, 24, 24 ]
    reducers: [ 2, 2, 2, 2 ]

lr:
  0.1
optimizer:
  NAME: 'momentum'
  momentum: 0.9
  weight_decay: 2.0e-4

sched: cosine
epochs: 300
t_max: 300
min_lr: 0.005
warmup_epochs: 0  # Later change to 10?

criterion_args:
  NAME: SmoothCrossEntropy
  label_smoothing: 0.2

datatransforms:
  train: [PointsToTensor, PointCloudScaleAndTranslate]
  vote: [PointCloudScaleAndTranslate]
  val: [PointsToTensor]
  kwargs:
    shift: [0.2, 0.2, 0.2]

batch_size: 32
val_batch_size: 64

thank you very much!!! i will try