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

rm SymbolicShapeInference

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