Merge branch 'dygraph' into dygraph_for_srn

This commit is contained in:
xiaoting
2021-01-29 11:37:19 +08:00
committed by GitHub
49 changed files with 350 additions and 141 deletions
+10 -3
View File
@@ -75,10 +75,17 @@ def main():
]
]
model = to_static(model, input_spec=other_shape)
else:
infer_shape = [3, 32, 100] if config['Architecture'][
'model_type'] != "det" else [3, 640, 640]
infer_shape = [3, -1, -1]
if config['Architecture']['model_type'] == "rec":
infer_shape = [3, 32, -1] # for rec model, H must be 32
if 'Transform' in config['Architecture'] and config['Architecture'][
'Transform'] is not None and config['Architecture'][
'Transform']['name'] == 'TPS':
logger.info(
'When there is tps in the network, variable length input is not supported, and the input size needs to be the same as during training'
)
infer_shape[-1] = 100
model = to_static(
model,
input_spec=[