leap-model-parser 0.1.228__py3-none-any.whl → 0.1.232__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -86,12 +86,19 @@ class ModelParser:
86
86
 
87
87
  graph, connected_inputs = model_generator.generate_graph(
88
88
  model_schema, layer_name_to_inbound_nodes)
89
-
89
+ # make sure input order is kept with original model
90
+ input_list = []
91
+ for inp in keras_model.inputs:
92
+ name = inp.name
93
+ name = name.replace(".", "_")
94
+ for inp_graph in connected_inputs:
95
+ if inp_graph.name == name:
96
+ input_list.append(inp_graph)
90
97
  if self.mapping_connections is not None:
91
98
  leap_graph_editor = LeapGraphEditor(graph, keras_model_with_weights)
92
99
  leap_graph_editor.add_connections_to_graph(self.mapping_connections)
93
100
 
94
- return graph, connected_inputs, keras_model_with_weights, error_info
101
+ return graph, input_list, keras_model_with_weights, error_info
95
102
 
96
103
  def _get_k_model_from_pb_path(self, file_path: str):
97
104
  tar_file = tarfile.open(file_path)
@@ -131,7 +138,7 @@ class ModelParser:
131
138
  input_all = [_input.name for _input in onnx_model.graph.input]
132
139
  input_initializer = [
133
140
  node.name for node in onnx_model.graph.initializer]
134
- input_names = list(set(input_all) - set(input_initializer))
141
+ input_names = [name for name in input_all if name not in input_initializer]
135
142
  converted_response: ConvertedResponse = onnx_to_keras(onnx_model, input_names=input_names,
136
143
  name_policy='attach_weights_name',
137
144
  allow_partial_compilation=False)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: leap-model-parser
3
- Version: 0.1.228
3
+ Version: 0.1.232
4
4
  Summary:
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -13,11 +13,11 @@ Classifier: Programming Language :: Python :: 3.8
13
13
  Classifier: Programming Language :: Python :: 3.9
14
14
  Classifier: Programming Language :: Python :: 3.10
15
15
  Requires-Dist: code-loader (>=1.0.127)
16
- Requires-Dist: keras-data-format-converter (==0.1.22)
16
+ Requires-Dist: keras-data-format-converter (==0.1.24)
17
17
  Requires-Dist: leap-model-rebuilder (==0.1.7)
18
18
  Requires-Dist: numpy (>=1.22.3,<2.0.0)
19
19
  Requires-Dist: onnx (==1.13.0)
20
- Requires-Dist: onnx2kerastl (==0.0.177)
20
+ Requires-Dist: onnx2kerastl (==0.0.180)
21
21
  Requires-Dist: tensorflow (==2.12.0) ; platform_machine == "x86_64"
22
22
  Requires-Dist: tensorflow-io-gcs-filesystem (==0.34.0)
23
23
  Requires-Dist: tensorflow-macos (==2.12.0) ; platform_machine == "arm64"
@@ -6,7 +6,7 @@ leap_model_parser/contract/nodedata.py,sha256=1_ML0nzp3QUZ0_9mGSLhfO4_hqjYMwi0DW
6
6
  leap_model_parser/contract/ui_components.json,sha256=0lsxwOLElW1E-imCcdh3zKPWgzFuQ_bApG6aHvYfTvo,410591
7
7
  leap_model_parser/keras_json_model_import.py,sha256=h9-eb41W67goutRV5c3VkStxvntgb6EmPFdPeshhtsY,17058
8
8
  leap_model_parser/leap_graph_editor.py,sha256=s6iVO06xM6LJ8ZjSxkr1srYxsHhGl2KnQjQoc9g4_iE,14329
9
- leap_model_parser/model_parser.py,sha256=W8FGKCBOBClIl0sdBlTdoSRT8sIdVrlbO8veNMouJ7o,8169
9
+ leap_model_parser/model_parser.py,sha256=672YTDpQP38439juRr22UbrLG8YQng8HVmMmLVOy1mI,8510
10
10
  leap_model_parser/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  leap_model_parser/utils/layerpedia/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
12
  leap_model_parser/utils/layerpedia/layerpedia.py,sha256=1syubfXBTB630TVkgcQ-Ge7Qe9Zbr6EtZRreuqCJnQ8,9292
@@ -17,8 +17,8 @@ leap_model_parser/utils/uicomponents/generatenodedata.py,sha256=LRaPlO5jJ9pUtkvL
17
17
  leap_model_parser/utils/uicomponents/tensorflowinscpection.py,sha256=ym613z9iQKPDBpr0RYD35bTABdm1L-Ez86G47BYT7qw,6775
18
18
  leap_model_parser/utils/uicomponents/ui_components.json,sha256=0lsxwOLElW1E-imCcdh3zKPWgzFuQ_bApG6aHvYfTvo,410591
19
19
  leap_model_parser/utils/uicomponents/ui_components_config.yaml,sha256=cRH8T-c3TAL0nfefRvt9pFsjbTWNEg38NRyHR7RpJsk,19534
20
- leap_model_parser-0.1.228.dist-info/METADATA,sha256=4mXS089Qn_kVo07OcvrVsHvQnbu6clRRnJXircAOEG0,1138
21
- leap_model_parser-0.1.228.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
22
- leap_model_parser-0.1.228.dist-info/entry_points.txt,sha256=ZvV6EuQt1uAqwapNg5Lo2qjJM9ZG5g2wfzZoLh_Ztyk,77
23
- leap_model_parser-0.1.228.dist-info/licenses/LICENSE,sha256=qIwWjdspQeSMTtnFZBC8MuT-95L02FPvzRUdWFxrwJY,1067
24
- leap_model_parser-0.1.228.dist-info/RECORD,,
20
+ leap_model_parser-0.1.232.dist-info/METADATA,sha256=3jnqLtGeBomuwwUqg-9mV4mVHvl-h3fOTuaoKTN5EOE,1138
21
+ leap_model_parser-0.1.232.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
22
+ leap_model_parser-0.1.232.dist-info/entry_points.txt,sha256=ZvV6EuQt1uAqwapNg5Lo2qjJM9ZG5g2wfzZoLh_Ztyk,77
23
+ leap_model_parser-0.1.232.dist-info/licenses/LICENSE,sha256=qIwWjdspQeSMTtnFZBC8MuT-95L02FPvzRUdWFxrwJY,1067
24
+ leap_model_parser-0.1.232.dist-info/RECORD,,