#!/bin/bash # Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Wrong number of input_type in one-quantize filename_ext="$(basename -- $0)" filename="${filename_ext%.*}" trap_err_onexit() { if grep -q "following arguments are required: --input_model_dtype" "${filename}.log"; then echo "${filename_ext} SUCCESS" exit 0 fi echo "${filename_ext} FAILED" exit 255 } trap trap_err_onexit ERR inputfile="./mobilenet_edgetpu_224_1.0_int8.circle" outputfile="./mobilenet_edgetpu_224_1.0_int8.one-quantize_neg_022.circle" rm -f ${filename}.log # run test with wrong input model dtype one-quantize \ --requantize \ --quantized_dtype uint8 \ --input_path ${inputfile} \ --output_path ${outputfile} > ${filename}.log 2>&1 echo "${filename_ext} FAILED" exit 255