You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
运行表格识别出错:RuntimeError: (PreconditionNotMet) Tensor's dimension is out of bound.Tensor's dimension must be equal or less than the size of its memory.But received Tensor's dimension is 8, memory's size is 0.
#70478
Open
chengao93 opened this issue
Dec 26, 2024
· 0 comments
anaconda 使用python3.10
pip install https://paddle-model-ecology.bj.bcebos.com/paddlex/whl/paddlex-3.0.0b1-py3-none-any.whl
pip install paddlepaddle
start.p脚本:
from paddlex import create_model
model = create_model("SLANet")
output = model.predict("table_recognition.jpg", batch_size=1)
for res in output:
res.print(json_format=False)
res.save_to_img("./output/")
res.save_to_json("./output/res.json")
python start.py
Using official model (SLANet), the model files will be be automatically downloaded and saved in /root/.paddlex/official_models.
Traceback (most recent call last):
File "/opt/PaddleX/start.py", line 2, in
model = create_model("SLANet")
File "/root/anaconda3/envs/PaddleX/lib/python3.10/site-packages/paddlex/model.py", line 29, in create_model
return _ModelBasedInference(model, *args, **kwargs)
File "/root/anaconda3/envs/PaddleX/lib/python3.10/site-packages/paddlex/model.py", line 57, in init
self._predictor = create_predictor(*args, **kwargs)
File "/root/anaconda3/envs/PaddleX/lib/python3.10/site-packages/paddlex/inference/models/init.py", line 87, in create_predictor
return BasicPredictor.get(model_name)(
File "/root/anaconda3/envs/PaddleX/lib/python3.10/site-packages/paddlex/inference/models/base/basic_predictor.py", line 42, in init
self._build_components()
File "/root/anaconda3/envs/PaddleX/lib/python3.10/site-packages/paddlex/inference/models/table_recognition.py", line 42, in _build_components
predictor = ImagePredictor(
File "/root/anaconda3/envs/PaddleX/lib/python3.10/site-packages/paddlex/inference/components/paddle_predictor/predictor.py", line 37, in init
self._update_option(option)
File "/root/anaconda3/envs/PaddleX/lib/python3.10/site-packages/paddlex/inference/components/paddle_predictor/predictor.py", line 45, in _update_option
self.reset()
File "/root/anaconda3/envs/PaddleX/lib/python3.10/site-packages/paddlex/inference/components/paddle_predictor/predictor.py", line 64, in reset
) = self._create()
File "/root/anaconda3/envs/PaddleX/lib/python3.10/site-packages/paddlex/inference/components/paddle_predictor/predictor.py", line 163, in _create
predictor = create_predictor(config)
RuntimeError: (PreconditionNotMet) Tensor's dimension is out of bound.Tensor's dimension must be equal or less than the size of its memory.But received Tensor's dimension is 8, memory's size is 0.
[Hint: Expected numel() * SizeOf(dtype()) <= memory_size(), but received numel() * SizeOf(dtype()):8 > memory_size():0.] (at /paddle/paddle/phi/core/dense_tensor_impl.cc:55)
[operator < scale > error]
其他补充信息 Additional Supplementary Information
No response
The text was updated successfully, but these errors were encountered:
bug描述 Describe the Bug
anaconda 使用python3.10
pip install https://paddle-model-ecology.bj.bcebos.com/paddlex/whl/paddlex-3.0.0b1-py3-none-any.whl
pip install paddlepaddle
start.p脚本:
from paddlex import create_model
model = create_model("SLANet")
output = model.predict("table_recognition.jpg", batch_size=1)
for res in output:
res.print(json_format=False)
res.save_to_img("./output/")
res.save_to_json("./output/res.json")
python start.py
Using official model (SLANet), the model files will be be automatically downloaded and saved in /root/.paddlex/official_models.
Traceback (most recent call last):
File "/opt/PaddleX/start.py", line 2, in
model = create_model("SLANet")
File "/root/anaconda3/envs/PaddleX/lib/python3.10/site-packages/paddlex/model.py", line 29, in create_model
return _ModelBasedInference(model, *args, **kwargs)
File "/root/anaconda3/envs/PaddleX/lib/python3.10/site-packages/paddlex/model.py", line 57, in init
self._predictor = create_predictor(*args, **kwargs)
File "/root/anaconda3/envs/PaddleX/lib/python3.10/site-packages/paddlex/inference/models/init.py", line 87, in create_predictor
return BasicPredictor.get(model_name)(
File "/root/anaconda3/envs/PaddleX/lib/python3.10/site-packages/paddlex/inference/models/base/basic_predictor.py", line 42, in init
self._build_components()
File "/root/anaconda3/envs/PaddleX/lib/python3.10/site-packages/paddlex/inference/models/table_recognition.py", line 42, in _build_components
predictor = ImagePredictor(
File "/root/anaconda3/envs/PaddleX/lib/python3.10/site-packages/paddlex/inference/components/paddle_predictor/predictor.py", line 37, in init
self._update_option(option)
File "/root/anaconda3/envs/PaddleX/lib/python3.10/site-packages/paddlex/inference/components/paddle_predictor/predictor.py", line 45, in _update_option
self.reset()
File "/root/anaconda3/envs/PaddleX/lib/python3.10/site-packages/paddlex/inference/components/paddle_predictor/predictor.py", line 64, in reset
) = self._create()
File "/root/anaconda3/envs/PaddleX/lib/python3.10/site-packages/paddlex/inference/components/paddle_predictor/predictor.py", line 163, in _create
predictor = create_predictor(config)
RuntimeError: (PreconditionNotMet) Tensor's dimension is out of bound.Tensor's dimension must be equal or less than the size of its memory.But received Tensor's dimension is 8, memory's size is 0.
[Hint: Expected numel() * SizeOf(dtype()) <= memory_size(), but received numel() * SizeOf(dtype()):8 > memory_size():0.] (at /paddle/paddle/phi/core/dense_tensor_impl.cc:55)
[operator < scale > error]
其他补充信息 Additional Supplementary Information
No response
The text was updated successfully, but these errors were encountered: