-
Notifications
You must be signed in to change notification settings - Fork 456
Implement symmetric padding mode #1698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Tom Wildenhain <[email protected]>
b568d9c
to
6fe345a
Compare
Thanks for the work @TomWildenhain-Microsoft. What tensorflow version are you using for this? I've been trying this commit for issue #1686 but having What I've tried: pip3 install git+https://github.com/onnx/tensorflow-onnx@tom/symmetric_padding
python3 -m tf2onnx.convert \
--graphdef weights/COCO-MaskRCNN-R50C41x.pb \
--output weights/test.onnx \
--inputs image:0 \
--outputs output/boxes:0,output/scores:0,output/labels:0,output/masks:0 \
--opset 15 Output with tensorflow 2.6: /Users/linus/anaconda3/envs/tf2_2/lib/python3.7/runpy.py:125: RuntimeWarning: 'tf2onnx.convert' found in sys.modules after import of package 'tf2onnx', but prior to execution of 'tf2onnx.convert'; this may result in unpredictable behaviour
warn(RuntimeWarning(msg))
WARNING:tensorflow:From /Users/linus/anaconda3/envs/tf2_2/lib/python3.7/site-packages/tf2onnx/tf_loader.py:305: convert_variables_to_constants (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.compat.v1.graph_util.convert_variables_to_constants`
2021-09-03 22:25:52,312 - WARNING - From /Users/linus/anaconda3/envs/tf2_2/lib/python3.7/site-packages/tf2onnx/tf_loader.py:305: convert_variables_to_constants (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.compat.v1.graph_util.convert_variables_to_constants`
WARNING:tensorflow:From /Users/linus/anaconda3/envs/tf2_2/lib/python3.7/site-packages/tensorflow/python/framework/convert_to_constants.py:927: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.compat.v1.graph_util.extract_sub_graph`
2021-09-03 22:25:52,313 - WARNING - From /Users/linus/anaconda3/envs/tf2_2/lib/python3.7/site-packages/tensorflow/python/framework/convert_to_constants.py:927: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.compat.v1.graph_util.extract_sub_graph`
2021-09-03 22:25:57,769 - INFO - Using tensorflow=2.6.0, onnx=1.10.1, tf2onnx=1.10.0/46e239
2021-09-03 22:25:57,769 - INFO - Using opset <onnx, 15>
2021-09-03 22:26:11,073 - INFO - Computed 2 values for constant folding
2021-09-03 22:26:17,887 - INFO - folding node using tf type=Mul, name=maskrcnn/deconv/mul
2021-09-03 22:26:17,888 - INFO - folding node using tf type=Mul, name=maskrcnn/deconv/mul_1
./to_onnx.sh: line 6: 15937 Segmentation fault: 11 python3 -m tf2onnx.convert --graphdef weights/COCO-MaskRCNN-R50C41x.pb --output weights/test.onnx --inputs image:0 --outputs output/boxes:0,output/scores:0,output/labels:0,output/masks:0 --opset 15 With tensorflow 1.15: /Users/linus/anaconda3/envs/tf2_2/lib/python3.7/runpy.py:125: RuntimeWarning: 'tf2onnx.convert' found in sys.modules after import of package 'tf2onnx', but prior to execution of 'tf2onnx.convert'; this may result in unpredictable behaviour
warn(RuntimeWarning(msg))
WARNING:tensorflow:From /Users/linus/anaconda3/envs/tf2_2/lib/python3.7/site-packages/tf2onnx/verbose_logging.py:76: The name tf.logging.set_verbosity is deprecated. Please use tf.compat.v1.logging.set_verbosity instead.
2021-09-03 22:20:47,185 - WARNING - From /Users/linus/anaconda3/envs/tf2_2/lib/python3.7/site-packages/tf2onnx/verbose_logging.py:76: The name tf.logging.set_verbosity is deprecated. Please use tf.compat.v1.logging.set_verbosity instead.
2021-09-03 22:20:55,109 - INFO - Using tensorflow=1.15.0, onnx=1.10.1, tf2onnx=1.10.0/46e239
2021-09-03 22:20:55,110 - INFO - Using opset <onnx, 15>
2021-09-03 22:21:07,678 - INFO - Computed 2 values for constant folding
2021-09-03 22:21:15,321 - INFO - folding node using tf type=Mul, name=maskrcnn/deconv/mul
2021-09-03 22:21:15,321 - INFO - folding node using tf type=Mul, name=maskrcnn/deconv/mul_1
./to_onnx.sh: line 6: 15310 Segmentation fault: 11 python3 -m tf2onnx.convert --graphdef weights/COCO-MaskRCNN-R50C41x.pb --output weights/test.onnx --inputs image:0 --outputs output/boxes:0,output/scores:0,output/labels:0,output/masks:0 --opset 15 |
@lamhoangtung opset 15 isn't released yet. Try opset 14. I'm using |
Thanks @TomWildenhain-Microsoft. It's working with |
Signed-off-by: Tom Wildenhain [email protected]