AssertionError: assert decoder is not None, while testing ABINet onnx model on tools/deployment/deploy_test.py #1650
raushan291
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am getting error as:
Traceback (most recent call last):
File "tools/deployment/deploy_test.py", line 109, in
main()
File "tools/deployment/deploy_test.py", line 77, in main
model = ONNXRuntimeRecognizer(args.model_file, cfg, 0)
File "/home/i2v/Documents/Raushan/MMOCR/mmocr/mmocr/core/deployment/deploy_utils.py", line 128, in init
EncodeDecodeRecognizer.init(self, **(cfg.model))
File "/home/i2v/Documents/Raushan/MMOCR/mmocr/mmocr/models/textrecog/recognizer/encode_decode_recognizer.py", line 51, in init
assert decoder is not None
AssertionError
Model configuration is :
model = dict(
type='ABINet',
backbone=dict(type='ResNetABI'),
encoder=dict(
type='ABIVisionModel',
encoder=dict(
type='TransformerEncoder',
n_layers=3,
n_head=8,
d_model=512,
d_inner=2048,
dropout=0.1,
max_len=8 * 32,
),
decoder=dict(
type='ABIVisionDecoder',
in_channels=512,
num_channels=64,
attn_height=8,
attn_width=32,
attn_mode='nearest',
use_result='feature',
num_chars=num_chars,
max_seq_len=max_seq_len,
init_cfg=dict(type='Xavier', layer='Conv2d')),
),
loss=dict(
type='ABILoss',
enc_weight=1.0,
dec_weight=1.0,
fusion_weight=1.0,
num_classes=num_chars),
label_convertor=label_convertor,
max_seq_len=max_seq_len,
# iter_size=1
)
Beta Was this translation helpful? Give feedback.
All reactions