PaddlePaddle / models

Officially maintained, supported by PaddlePaddle, including CV, NLP, Speech, Rec, TS, big models and so on.
Apache License 2.0
6.9k stars 2.91k forks source link

3d_vision PointNet++分类训练报错UnavailableError: There are no kernels which are registered in the fill_constant operator. #5260

Open Milalaa opened 3 years ago

Milalaa commented 3 years ago

刚入门小白,遇到了问题恳请各位大神帮忙!谢谢 AI Studio PaddlePaddle2.0.0 3d_vision PointNet++分类训练报错UnavailableError: There are no kernels which are registered in the fill_constant operator.具体如下 aistudio@jupyter-622623-1481923:~/PointNet++$ python train_cls.py --model=MSG --batch_size=16 --save_dir=checkpoints_msg_cls 2021-02-02 16:17:38,539-INFO: ----------- Configuration Arguments ----------- 2021-02-02 16:17:38,539-INFO: batch_size: 16 2021-02-02 16:17:38,539-INFO: bn_momentum: 0.99 2021-02-02 16:17:38,539-INFO: data_dir: dataset/ModelNet40/modelnet40_ply_hdf5_2048 2021-02-02 16:17:38,539-INFO: decay_steps: 12500 2021-02-02 16:17:38,540-INFO: enable_ce: False 2021-02-02 16:17:38,540-INFO: epoch: 201 2021-02-02 16:17:38,540-INFO: log_interval: 1 2021-02-02 16:17:38,540-INFO: lr: 0.01 2021-02-02 16:17:38,540-INFO: lr_decay: 0.7 2021-02-02 16:17:38,540-INFO: model: MSG 2021-02-02 16:17:38,540-INFO: num_classes: 40 2021-02-02 16:17:38,540-INFO: num_points: 2048 2021-02-02 16:17:38,540-INFO: resume: None 2021-02-02 16:17:38,540-INFO: save_dir: checkpoints_msg_cls 2021-02-02 16:17:38,540-INFO: use_gpu: True 2021-02-02 16:17:38,540-INFO: weight_decay: 1e-05 2021-02-02 16:17:38,540-INFO: ------------------------------------------------ /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/layers/math_op_patch.py:298: UserWarning: /home/aistudio/PointNet++/models/pointnet2_modules.py:53 The behavior of expression A - B has been unified with elementwise_sub(X, Y, axis=-1) from Paddle 2.0. If your code works well in the older versions but crashes in this version, try to use elementwise_sub(X, Y, axis=0) instead of A - B. This transitional warning will be dropped in the future. op_type, op_type, EXPRESSION_MAP[method_name])) W0202 16:17:39.180770 1631 device_context.cc:362] Please NOTE: device: 0, GPU Compute Capability: 7.0, Driver API Version: 10.1, Runtime API Version: 10.1 W0202 16:17:39.185834 1631 device_context.cc:372] device: 0, cuDNN Version: 7.6. Traceback (most recent call last): File "train_cls.py", line 308, in train() File "train_cls.py", line 184, in train exe.run(startup) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/executor.py", line 1110, in run six.reraise(*sys.exc_info()) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/six.py", line 703, in reraise raise value File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/executor.py", line 1108, in run return_merged=return_merged) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/executor.py", line 1238, in _run_impl use_program_cache=use_program_cache) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/executor.py", line 1328, in _run_program [fetch_var_name]) RuntimeError: In user code:

File "train_cls.py", line 308, in <module>
  train()
File "train_cls.py", line 166, in train
  optimizer.minimize(train_loss, parameter_list=params)
File "</opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/decorator.py:decorator-gen-104>", line 2, in minimize

File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/dygraph/base.py", line 260, in __impl__
  return func(*args, **kwargs)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/optimizer.py", line 951, in minimize
  loss, startup_program=startup_program, params_grads=params_grads)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/optimizer.py", line 862, in apply_optimize
  optimize_ops = self.apply_gradients(params_grads)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/optimizer.py", line 836, in apply_gradients
  optimize_ops = self._create_optimization_pass(params_grads)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/optimizer.py", line 664, in _create_optimization_pass
  [p[0] for p in parameters_and_grads if p[0].trainable])
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/optimizer.py", line 2048, in _create_accumulators
  type=core.VarDesc.VarType.LOD_TENSOR, device='cpu')
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/optimizer.py", line 577, in _add_accumulator
  var, initializer=Constant(value=float(fill_value)))
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/layer_helper_base.py", line 448, in set_variable_initializer
  initializer=initializer)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/framework.py", line 2851, in create_var
  kwargs['initializer'](var, self)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/initializer.py", line 165, in __call__
  stop_gradient=True)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/framework.py", line 3104, in _prepend_op
  attrs=kwargs.get("attrs", None))
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/framework.py", line 2102, in __init__
  for frame in traceback.extract_stack():

UnavailableError: There are no kernels which are registered in the fill_constant operator.
  [Hint: Expected kernels_iter != all_op_kernels.end(), but received kernels_iter == all_op_kernels.end().] (at /paddle/paddle/fluid/framework/operator.cc:1179)
  [operator < fill_constant > error]

aistudio@jupyter-622623-1481923:~/PointNet++$

heavengate commented 3 years ago

你好,请问按照README里面编译ext_op了么

milala1235 commented 3 years ago

@heavengate 你好!ext_op编译过了

gg22mm commented 1 year ago

遇到同样的问题

gg22mm commented 1 year ago

[Hint: Expected kernel_iter != kernels.end(), but received kernel_iter == kernels.end().] (at /paddle/paddle/fluid/imperative/prepared_operator.cc:419) [operator < transpose2 > error]

JackonLiu commented 1 year ago

我也一样 Traceback (most recent call last): File "tools/train.py", line 209, in main(config, device, logger, vdl_writer) File "tools/train.py", line 181, in main program.train(config, train_dataloader, valid_dataloader, device, model, File "C:\Users\Administrator\PycharmProjects\python\digit_reco\ppocr_digit\work\PaddleOCR\tools\program.py", line 288, in train preds = model(images, data=batch[1:]) File "C:\Users\Administrator\anaconda3\envs\pytorch-gpu\lib\site-packages\paddle\fluid\dygraph\layers.py", line 930, in call return self._dygraph_call_func(*inputs, kwargs) File "C:\Users\Administrator\anaconda3\envs\pytorch-gpu\lib\site-packages\paddle\fluid\dygraph\layers.py", line 915, in _dygraph_call_func outputs = self.forward(*inputs, *kwargs) File "C:\Users\Administrator\PycharmProjects\python\digit_reco\ppocr_digit\work\PaddleOCR\ppocr\modeling\architectures\base_model.py", line 100, in forward x = self.head(x, targets=data) File "C:\Users\Administrator\anaconda3\envs\pytorch-gpu\lib\site-packages\paddle\fluid\dygraph\layers.py", line 930, in call return self._dygraph_call_func(inputs, kwargs) File "C:\Users\Administrator\anaconda3\envs\pytorch-gpu\lib\site-packages\paddle\fluid\dygraph\layers.py", line 915, in _dygraph_call_func outputs = self.forward(*inputs, kwargs) File "C:\Users\Administrator\PycharmProjects\python\digit_reco\ppocr_digit\work\PaddleOCR\ppocr\modeling\heads\rec_multi_head.py", line 69, in forward sar_out = self.sar_head(x, targets[1:]) File "C:\Users\Administrator\anaconda3\envs\pytorch-gpu\lib\site-packages\paddle\fluid\dygraph\layers.py", line 930, in call return self._dygraph_call_func(*inputs, *kwargs) File "C:\Users\Administrator\anaconda3\envs\pytorch-gpu\lib\site-packages\paddle\fluid\dygraph\layers.py", line 915, in _dygraph_call_func outputs = self.forward(inputs, kwargs) File "C:\Users\Administrator\PycharmProjects\python\digit_reco\ppocr_digit\work\PaddleOCR\ppocr\modeling\heads\rec_sar_head.py", line 395, in forward holistic_feat = self.encoder(feat, targets) # bsz c File "C:\Users\Administrator\anaconda3\envs\pytorch-gpu\lib\site-packages\paddle\fluid\dygraph\layers.py", line 930, in call return self._dygraph_call_func(*inputs, *kwargs) File "C:\Users\Administrator\anaconda3\envs\pytorch-gpu\lib\site-packages\paddle\fluid\dygraph\layers.py", line 915, in _dygraph_call_func outputs = self.forward(inputs, *kwargs) File "C:\Users\Administrator\PycharmProjects\python\digit_reco\ppocr_digit\work\PaddleOCR\ppocr\modeling\heads\rec_sar_head.py", line 104, in forward T, paddle.ceil(valid_ratios[i] T).astype('int32')) - 1 File "C:\Users\Administrator\anaconda3\envs\pytorch-gpu\lib\site-packages\paddle\fluid\layers\layer_function_generator.py", line 269, in func return op(x) RuntimeError: (NotFound) There are no kernels which are registered in the ceil operator. [Hint: Expected kernels_iter != all_op_kernels.end(), but received kernels_iter == all_op_kernels.end().] (at ..\paddle\fluid\imperative\prepared_operator.cc:341) [operator < ceil > error]