@@ -55,10 +55,16 @@ def release(self):
55
55
model .release ()
56
56
57
57
def load_network (self , network_list , launcher ):
58
+ if len (self ._part_by_name ) == 1 and 'name' not in network_list [0 ]:
59
+ next (iter (self ._part_by_name .values ())).load_model (network_list [0 ]['model' ], launcher )
60
+ return
58
61
for network_dict in network_list :
59
62
self ._part_by_name [network_dict ['name' ]].load_network (network_dict ['model' ], launcher )
60
63
61
64
def load_model (self , network_list , launcher ):
65
+ if len (self ._part_by_name ) == 1 and 'name' not in network_list [0 ]:
66
+ next (iter (self ._part_by_name .values ())).load_model (network_list [0 ], launcher )
67
+ return
62
68
for network_dict in network_list :
63
69
self ._part_by_name [network_dict ['name' ]].load_model (network_dict , launcher )
64
70
@@ -204,6 +210,8 @@ def set_input_and_output(self):
204
210
self .input_blob = input_blob
205
211
self .output_blob = output_blob
206
212
self .with_prefix = with_prefix
213
+ if hasattr (self , 'adapter' ) and self .adapter is not None :
214
+ self .adapter .output_blob = output_blob
207
215
208
216
def load_model (self , network_info , launcher , log = False ):
209
217
if 'onnx_model' in network_info :
@@ -326,6 +334,8 @@ def set_input_and_output(self):
326
334
self .input_blob = input_blob
327
335
self .output_blob = output_blob
328
336
self .with_prefix = with_prefix
337
+ if hasattr (self , 'adapter' ) and self .adapter is not None :
338
+ self .adapter .output_blob = output_blob
329
339
330
340
@property
331
341
def inputs (self ):
0 commit comments