more docstring

pull/2034/head
Hui Zhang 2 years ago
parent de6e4d0c20
commit 7cd40e40be

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
# show model
if [ $# != 1 ];then if [ $# != 1 ];then
echo "usage: $0 model_path" echo "usage: $0 model_path"
exit 1 exit 1

@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
# clone onnx repos
git clone https://github.com/onnx/onnx.git git clone https://github.com/onnx/onnx.git
git clone https://github.com/microsoft/onnxruntime.git git clone https://github.com/microsoft/onnxruntime.git
git clone https://github.com/PaddlePaddle/Paddle2ONNX.git git clone https://github.com/PaddlePaddle/Paddle2ONNX.git

@ -1,4 +1,4 @@
#!/bin/bash #!/bin/bash
# onnx optimizer
onnx-simplifier onnx-simplifier

@ -1,11 +1,13 @@
#!/usr/bin/env python3 -W ignore::DeprecationWarning #!/usr/bin/env python3 -W ignore::DeprecationWarning
# prune model by output names
import argparse import argparse
import copy import copy
import sys import sys
import onnx import onnx
def parse_arguments(): def parse_arguments():
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument( parser.add_argument(

@ -1,4 +1,6 @@
#!/usr/bin/env python3 -W ignore::DeprecationWarning #!/usr/bin/env python3 -W ignore::DeprecationWarning
# rename node to new names
import argparse import argparse
import sys import sys

@ -2,6 +2,7 @@
# https://github.com/jiangjiajun/PaddleUtils/blob/main/paddle/README.md#2-%E4%BF%AE%E6%94%B9paddle%E6%A8%A1%E5%9E%8B%E8%BE%93%E5%85%A5shape # https://github.com/jiangjiajun/PaddleUtils/blob/main/paddle/README.md#2-%E4%BF%AE%E6%94%B9paddle%E6%A8%A1%E5%9E%8B%E8%BE%93%E5%85%A5shape
import argparse import argparse
# paddle inference shape
def process_old_ops_desc(program): def process_old_ops_desc(program):
"""set matmul op head_number attr to 1 is not exist. """set matmul op head_number attr to 1 is not exist.

@ -4,6 +4,7 @@ import argparse
import sys import sys
from typing import List from typing import List
# paddle prune model.
def prepend_feed_ops(program, def prepend_feed_ops(program,
feed_target_names: List[str], feed_target_names: List[str],

Loading…
Cancel
Save