提交 20eef555 编写于 作者: W wjj19950828

rm SymbolicShapeInference

上级 d740acce
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
# limitations under the License. # limitations under the License.
from x2paddle.core.graph import GraphNode, Graph from x2paddle.core.graph import GraphNode, Graph
from x2paddle.decoder.onnx_shape_inference import SymbolicShapeInference
from onnx.checker import ValidationError from onnx.checker import ValidationError
from onnx.checker import check_model from onnx.checker import check_model
from onnx import helper, shape_inference from onnx import helper, shape_inference
...@@ -184,14 +183,10 @@ class ONNXGraph(Graph): ...@@ -184,14 +183,10 @@ class ONNXGraph(Graph):
self.value_infos = {} self.value_infos = {}
self.graph = onnx_model.graph self.graph = onnx_model.graph
self.get_place_holder_nodes() self.get_place_holder_nodes()
print("shape inferencing ...") print("Shape inferencing ...")
self.graph = SymbolicShapeInference.infer_shapes( onnx_model = shape_inference.infer_shapes(onnx_model)
onnx_model, fixed_input_shape=self.fixed_input_shape) self.graph = onnx_model.graph
if self.graph is None: print("Shape inferenced.")
print('[WARNING] Shape inference by ONNX offical interface.')
onnx_model = shape_inference.infer_shapes(onnx_model)
self.graph = onnx_model.graph
print("shape inferenced.")
self.build() self.build()
self.collect_value_infos() self.collect_value_infos()
self.allocate_shapes() self.allocate_shapes()
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册