Skip to content

Commit c2aa45d

Browse files
committed
[python]: update yamrt
1 parent 9520ff0 commit c2aa45d

File tree

3 files changed

+2
-25
lines changed

3 files changed

+2
-25
lines changed

.github/workflows/ccpp.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

python/mrt/yamrt/quant/quantize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def quantize_static(model_input,
106106

107107
model = load_model(Path(model_input), optimize_model)
108108

109-
calibrator = get_calibrator(model, op_types_to_quantize, calibrate_method=calibrate_method)
109+
calibrator = get_calibrator(model, op_types_to_quantize, method=calibrate_method)
110110
calibrator.collect_data(calibration_data_reader)
111111
tensors_range = calibrator.compute_range()
112112

tests/yamrt/infer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def softmax(x):
4646
for i in range(data.shape[0]):
4747
norm_data[i,:,:] = (data[i,:,:]/255 - mean_vec[i]) / stddev_vec[i]
4848
norm_data = norm_data.reshape(1, 3, 224, 224).astype('float32')
49-
49+
5050
result = session.run([output_name],{input_name:norm_data})
5151
res = softmax(np.array(result)).tolist()
5252
idx = np.argmax(res)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy