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
py -3 tools/export_model.py -c "C:\Users\Administrator\Desktop\4lanServerSvtr\config.yml" -o Global.checkpoints="C:\Users\Administrator\Desktop\4lanServerSvtr\best_accuracy" Global.save_inference_dir="C:\Users\Administrator\Desktop\4lanServerSvtr\best_accuracy"
W0616 04:36:38.681641 6516 gpu_resources.cc:61] Please NOTE: device: 0, GPU Compute Capability: 6.1, Driver API Version: 10.2, Runtime API Version: 10.2
W0616 04:36:38.681641 6516 gpu_resources.cc:91] device: 0, cuDNN Version: 7.6.
[2024/06/16 04:36:50] ppocr INFO: resume from C:\Users\Administrator\Desktop\4lanServerSvtr\best_accuracy
Traceback (most recent call last):
File "tools/export_model.py", line 293, in
main()
File "tools/export_model.py", line 288, in main
export_single_model(
File "tools/export_model.py", line 199, in export_single_model
paddle.jit.save(model, save_path)
File "C:\Program Files\Python38\lib\site-packages\paddle\fluid\dygraph\jit.py", line 631, in wrapper
func(layer, path, input_spec, **configs)
File "C:\Program Files\Python38\lib\site-packages\decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "C:\Program Files\Python38\lib\site-packages\paddle\fluid\wrapped_decorator.py", line 25, in impl
return wrapped_func(*args, **kwargs)
File "C:\Program Files\Python38\lib\site-packages\paddle\fluid\dygraph\base.py", line 51, in impl
return func(*args, **kwargs)
File "C:\Program Files\Python38\lib\site-packages\paddle\fluid\dygraph\jit.py", line 860, in save
concrete_program = static_func.concrete_program_specify_input_spec(
File "C:\Program Files\Python38\lib\site-packages\paddle\fluid\dygraph\dygraph_to_static\program_translator.py", line 527, in concrete_program_specify_input_spec
concrete_program, _ = self.get_concrete_program(
File "C:\Program Files\Python38\lib\site-packages\paddle\fluid\dygraph\dygraph_to_static\program_translator.py", line 436, in get_concrete_program
concrete_program, partial_program_layer = self._program_cache[cache_key]
File "C:\Program Files\Python38\lib\site-packages\paddle\fluid\dygraph\dygraph_to_static\program_translator.py", line 801, in getitem
self._caches[item_id] = self._build_once(item)
File "C:\Program Files\Python38\lib\site-packages\paddle\fluid\dygraph\dygraph_to_static\program_translator.py", line 785, in build_once
concrete_program = ConcreteProgram.from_func_spec(
File "C:\Program Files\Python38\lib\site-packages\decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "C:\Program Files\Python38\lib\site-packages\paddle\fluid\wrapped_decorator.py", line 25, in impl
return wrapped_func(*args, **kwargs)
File "C:\Program Files\Python38\lib\site-packages\paddle\fluid\dygraph\base.py", line 51, in impl
return func(*args, **kwargs)
File "C:\Program Files\Python38\lib\site-packages\paddle\fluid\dygraph\dygraph_to_static\program_translator.py", line 740, in from_func_spec
error_data.raise_new_exception()
File "C:\Program Files\Python38\lib\site-packages\paddle\fluid\dygraph\dygraph_to_static\error.py", line 336, in raise_new_exception
six.exec("raise new_exception from None")
File "", line 1, in
AssertionError: In transformed code:
File "C:\F\pycharm2020.2\PaddleOCR-2.7.5\ppocr\modeling\architectures\base_model.py", line 86, in forward
x = self.backbone(x)
File "C:\F\pycharm2020.2\PaddleOCR-2.7.5\ppocr\modeling\backbones\rec_svtrnet.py", line 572, in forward
x = self.forward_features(x)
File "C:\F\pycharm2020.2\PaddleOCR-2.7.5\ppocr\modeling\backbones\rec_svtrnet.py", line 550, in forward_features
def forward_features(self, x):
x = self.patch_embed(x)
~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
x = x + self.pos_embed
x = self.pos_drop(x)
File "C:\Program Files\Python38\lib\site-packages\paddle\fluid\dygraph\layers.py", line 930, in __call__
return self._dygraph_call_func(*inputs, **kwargs)
File "C:\Program Files\Python38\lib\site-packages\paddle\fluid\dygraph\layers.py", line 915, in _dygraph_call_func
outputs = self.forward(*inputs, **kwargs)
File "C:\Users\ADMINI~1\AppData\Local\Temp\tmp4u5lyr85.py", line 20, in forward
paddle.jit.dy2static.convert_assert(paddle.jit.dy2static.
File "C:\Program Files\Python38\lib\site-packages\paddle\fluid\dygraph\dygraph_to_static\convert_operators.py", line 478, in convert_assert
assert cond, message
AssertionError: Input image size (48*-1) doesn't match model (48*320).
This discussion was converted from issue #13076 on June 17, 2024 01:26.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
问题描述 / Problem Description
运行环境 / Runtime Environment
复现代码 / Reproduction Code
完整报错 / Complete Error Message
可能解决方案 / Possible solutions
附件 / Appendix
py -3 tools/export_model.py -c "C:\Users\Administrator\Desktop\4lanServerSvtr\config.yml" -o Global.checkpoints="C:\Users\Administrator\Desktop\4lanServerSvtr\best_accuracy" Global.save_inference_dir="C:\Users\Administrator\Desktop\4lanServerSvtr\best_accuracy"
W0616 04:36:38.681641 6516 gpu_resources.cc:61] Please NOTE: device: 0, GPU Compute Capability: 6.1, Driver API Version: 10.2, Runtime API Version: 10.2
W0616 04:36:38.681641 6516 gpu_resources.cc:91] device: 0, cuDNN Version: 7.6.
[2024/06/16 04:36:50] ppocr INFO: resume from C:\Users\Administrator\Desktop\4lanServerSvtr\best_accuracy
Traceback (most recent call last):
File "tools/export_model.py", line 293, in
main()
File "tools/export_model.py", line 288, in main
export_single_model(
File "tools/export_model.py", line 199, in export_single_model
paddle.jit.save(model, save_path)
File "C:\Program Files\Python38\lib\site-packages\paddle\fluid\dygraph\jit.py", line 631, in wrapper
func(layer, path, input_spec, **configs)
File "C:\Program Files\Python38\lib\site-packages\decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "C:\Program Files\Python38\lib\site-packages\paddle\fluid\wrapped_decorator.py", line 25, in impl
return wrapped_func(*args, **kwargs)
File "C:\Program Files\Python38\lib\site-packages\paddle\fluid\dygraph\base.py", line 51, in impl
return func(*args, **kwargs)
File "C:\Program Files\Python38\lib\site-packages\paddle\fluid\dygraph\jit.py", line 860, in save
concrete_program = static_func.concrete_program_specify_input_spec(
File "C:\Program Files\Python38\lib\site-packages\paddle\fluid\dygraph\dygraph_to_static\program_translator.py", line 527, in concrete_program_specify_input_spec
concrete_program, _ = self.get_concrete_program(
File "C:\Program Files\Python38\lib\site-packages\paddle\fluid\dygraph\dygraph_to_static\program_translator.py", line 436, in get_concrete_program
concrete_program, partial_program_layer = self._program_cache[cache_key]
File "C:\Program Files\Python38\lib\site-packages\paddle\fluid\dygraph\dygraph_to_static\program_translator.py", line 801, in getitem
self._caches[item_id] = self._build_once(item)
File "C:\Program Files\Python38\lib\site-packages\paddle\fluid\dygraph\dygraph_to_static\program_translator.py", line 785, in build_once
concrete_program = ConcreteProgram.from_func_spec(
File "C:\Program Files\Python38\lib\site-packages\decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "C:\Program Files\Python38\lib\site-packages\paddle\fluid\wrapped_decorator.py", line 25, in impl
return wrapped_func(*args, **kwargs)
File "C:\Program Files\Python38\lib\site-packages\paddle\fluid\dygraph\base.py", line 51, in impl
return func(*args, **kwargs)
File "C:\Program Files\Python38\lib\site-packages\paddle\fluid\dygraph\dygraph_to_static\program_translator.py", line 740, in from_func_spec
error_data.raise_new_exception()
File "C:\Program Files\Python38\lib\site-packages\paddle\fluid\dygraph\dygraph_to_static\error.py", line 336, in raise_new_exception
six.exec("raise new_exception from None")
File "", line 1, in
AssertionError: In transformed code:
Beta Was this translation helpful? Give feedback.
All reactions