@@ -63,7 +63,8 @@ def __init__(self, network_info, launcher, models_args, adapter_info, is_blob=No
63
63
self .decoder = create_model (network_info ['decoder' ], launcher , self ._decoder_mapping , 'decoder' ,
64
64
delayed_model_loading )
65
65
self .adapter = create_adapter (adapter_info )
66
- self .update_inputs_outputs_info ()
66
+ if not delayed_model_loading :
67
+ self .update_inputs_outputs_info ()
67
68
self .adapter .output_blob = 'audio'
68
69
69
70
self .with_prefix = False
@@ -123,6 +124,10 @@ def update_inputs_outputs_info(self, with_prefix):
123
124
self .periods_input = generate_layer_name (self .periods_input , self .default_model_suffix + '_' , with_prefix )
124
125
if hasattr (self , 'outputs' ):
125
126
self .output = postprocess_output_name (self .output , self .outputs , raise_error = False )
127
+ if self .output not in self .outputs :
128
+ self .output = postprocess_output_name (
129
+ generate_layer_name (self .output , self .default_model_suffix + '_' , with_prefix ),
130
+ self .outputs , raise_error = False )
126
131
127
132
128
133
class EncoderDLSDKModel (EncoderModel , TTSDLSDKModel ):
@@ -240,8 +245,20 @@ def update_inputs_outputs_info(self, with_prefix):
240
245
self .rnn_input2 = generate_layer_name (self .rnn_input2 , prefix , with_prefix )
241
246
if hasattr (self , 'outputs' ):
242
247
self .output = postprocess_output_name (self .output , self .outputs , raise_error = False )
248
+ if self .output not in self .outputs :
249
+ self .output = postprocess_output_name (
250
+ generate_layer_name (self .output , self .default_model_suffix + '_' , with_prefix ),
251
+ self .outputs , raise_error = False )
243
252
self .rnn_output1 = postprocess_output_name (self .rnn_output1 , self .outputs , raise_error = False )
253
+ if self .rnn_output1 not in self .outputs :
254
+ self .rnn_output1 = postprocess_output_name (
255
+ generate_layer_name (self .rnn_output1 , self .default_model_suffix + '_' , with_prefix ),
256
+ self .outputs , raise_error = False )
244
257
self .rnn_output2 = postprocess_output_name (self .rnn_output2 , self .outputs , raise_error = False )
258
+ if self .rnn_output2 not in self .outputs :
259
+ self .rnn_output2 = postprocess_output_name (
260
+ generate_layer_name (self .rnn_output2 , self .default_model_suffix + '_' , with_prefix ),
261
+ self .outputs , raise_error = False )
245
262
246
263
247
264
class DecoderONNXModel (BaseONNXModel , DecoderModel ):
0 commit comments