mirror of
https://github.com/qurator-spk/eynollah.git
synced 2026-06-16 09:59:13 +02:00
trocr viarant for Predictor runtime: no model size for input_shape…
Because transformers v4 and v5 API for image preprocessor differs, and the model-internal image input sizes are actually irrelevant, because the preprocessor will resize them anyway, and there is no batch dimension (because the input images will have different shapes), do not advertise this information in `.input_shape`.
This commit is contained in:
parent
f447a9f248
commit
4e7e1c06b9
1 changed files with 2 additions and 2 deletions
|
|
@ -379,9 +379,9 @@ class EynollahModelZoo:
|
|||
return text, conf
|
||||
model.predict_on_batch = predict_torch
|
||||
# not actually needed (image processor does resize itself)
|
||||
# no batch dimension (images passed as list w/ varying shapes)
|
||||
model.input_shape = (None,
|
||||
proc.image_processor.size.height,
|
||||
proc.image_processor.size.width,
|
||||
None,
|
||||
len(proc.image_processor.image_mean))
|
||||
return model
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue