logo
Browse Source

Fix input size assert issue

Signed-off-by: Jael Gu <mengjia.gu@zilliz.com>
main
Jael Gu 1 year ago
parent
commit
aea524a9d3
  1. 4
      timm_image.py

4
timm_image.py

@ -109,7 +109,7 @@ class TimmImage(NNOperator):
crop_pct=self.config['crop_pct']
)
except:
self.tfms = create_transform(**resolve_data_config({}, model=self.model))
self.tfms = create_transform(**resolve_data_config({}, model=self.model.model))
self.skip_tfms = skip_preprocess
else:
log.warning('The operator is initialized without specified model.')
@ -149,6 +149,8 @@ class TimmImage(NNOperator):
@property
def config(self):
config = get_pretrained_cfg(self.model_name)
if not isinstance(config, dict) and hasattr(config, 'to_dict'):
config = config.to_dict()
return config
@arg(1, to_image_color('RGB'))

Loading…
Cancel
Save