Functions | |
def | load_network (builder, network, parser) |
def | load_config (config) |
def | calib_data () |
def | create_network (builder, network) |
Variables | |
X = gs.Variable(name="X", dtype=np.float32, shape=(1, 3, 5, 5)) | |
Y = gs.Variable(name="Y", dtype=np.float32, shape=(1, 3, 1, 1)) | |
node = gs.Node(op="GlobalLpPool", attrs={"p": 2}, inputs=[X], outputs=[Y]) | |
graph = gs.Graph(nodes=[node], inputs=[X], outputs=[Y]) | |
W = gs.Constant(name="W", values=np.ones(shape=(5, 3, 3, 3), dtype=np.float32)) | |
MODEL = os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir, "models", "identity.onnx") | |
load_serialized_onnx = BytesFromPath(MODEL) | |
build_onnxrt_session = SessionFromOnnxBytes(load_serialized_onnx) | |
build_engine = EngineFromNetwork(NetworkFromOnnxBytes(load_serialized_onnx)) | |
list | runners |
run_results = Comparator.run(runners) | |
tuple | INPUT_SHAPE = (1, 1, 2, 2) |
list | REAL_DATASET |
list | GOLDEN_VALUES = REAL_DATASET |
outputs = runner.infer(feed_dict={"x": data}) | |
calibrator = Calibrator(data_loader=calib_data(), cache="identity-calib.cache") | |
dictionary | feed_dict = {"x": np.ones(shape=INPUT_SHAPE, dtype=np.float32)} |
string | INPUT_NAME = "input" |
string | OUTPUT_NAME = "output" |
def example.load_network | ( | builder, | |
network, | |||
parser | |||
) |
def example.load_config | ( | config | ) |
def example.calib_data | ( | ) |
def example.create_network | ( | builder, | |
network | |||
) |
example.X = gs.Variable(name="X", dtype=np.float32, shape=(1, 3, 5, 5)) |
example.Y = gs.Variable(name="Y", dtype=np.float32, shape=(1, 3, 1, 1)) |
example.W = gs.Constant(name="W", values=np.ones(shape=(5, 3, 3, 3), dtype=np.float32)) |
example.MODEL = os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir, "models", "identity.onnx") |
example.load_serialized_onnx = BytesFromPath(MODEL) |
example.build_onnxrt_session = SessionFromOnnxBytes(load_serialized_onnx) |
example.build_engine = EngineFromNetwork(NetworkFromOnnxBytes(load_serialized_onnx)) |
list example.runners |
example.run_results = Comparator.run(runners) |
tuple example.INPUT_SHAPE = (1, 1, 2, 2) |
list example.REAL_DATASET |
list example.GOLDEN_VALUES = REAL_DATASET |
example.outputs = runner.infer(feed_dict={"x": data}) |
example.calibrator = Calibrator(data_loader=calib_data(), cache="identity-calib.cache") |
dictionary example.feed_dict = {"x": np.ones(shape=INPUT_SHAPE, dtype=np.float32)} |
string example.INPUT_NAME = "input" |
string example.OUTPUT_NAME = "output" |