Skip to content

Efficientnet lite #141

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

Merged
merged 7 commits into from
Jul 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4f99bd653a4cf94b
1 change: 1 addition & 0 deletions script/.cm/alias-u-4f99bd653a4cf94b
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
install-package-tensorflowmodel-efficientnet-lite
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"backup_data_uid": "4f99bd653a4cf94b",
"backup_module_uid": "84e27ad9dd12e734",
"backup_module_uoa": "script",
"control": {
"engine": "CK",
"iso_datetime": "2020-07-27T17:07:19.766100",
"version": [
"1",
"11",
"4",
"1"
]
},
"data_name": "install-package-tensorflowmodel-efficientnet-lite"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#! /bin/bash

#
# Copyright (c) 2018-2020 cTuning foundation.
# See CK COPYRIGHT.txt for copyright details.
#
# SPDX-License-Identifier: BSD-3-Clause.
# See CK LICENSE.txt for licensing details.
#
# EfficientNet-Lite for TensorFlow
# Python model and weights install script

########################################################################
echo
echo "Download weights from ${PACKAGE_URL} ..."
wget ${PACKAGE_URL}/${PACKAGE_NAME}

########################################################################
echo
echo "Unpack weights file ${PACKAGE_NAME} ..."
tar -zxvf ${PACKAGE_NAME}

# EfficientNet-Lite unpacks into subdirectory
echo
echo "Move files out of ${PACKAGE_NAME_EFFICIENTNET_LITE}/ ..."
mv ${PACKAGE_NAME_EFFICIENTNET_LITE}/* ${PACKAGE_NAME_EFFICIENTNET_LITE}/..
rmdir ${PACKAGE_NAME_EFFICIENTNET_LITE}
echo "Keeping file ${PACKAGE_NAME_EFFICIENTNET_LITE_WITH_PRECISION}.tflite"
if [ "${MODEL_EFFICIENTNET_LITE_PRECISION}" == "fp32" ]; then
file_to_remove="${PACKAGE_NAME_EFFICIENTNET_LITE}-int8.tflite"
echo "Removing file ${file_to_remove}"
rm ${file_to_remove}
else
file_to_remove="${PACKAGE_NAME_EFFICIENTNET_LITE}-fp32.tflite"
echo "Removing file ${file_to_remove}"
rm ${file_to_remove}
fi

########################################################################
echo
echo "Remove temporary files ..."
rm ${PACKAGE_NAME}
13 changes: 13 additions & 0 deletions script/install-package-tensorflowmodel-mobilenet-py/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ if [[ -d ${PACKAGE_NAME_V2_QUANT} ]]; then
rmdir ${PACKAGE_NAME_V2_QUANT}
fi

#Exception: v3 also unpacks into subdirectory
if [[ -d ${PACKAGE_NAME_MOBILENET_V3} ]]; then
echo
echo "Move files out of ${PACKAGE_NAME_MOBILENET_V3}/ ..."
mv ${PACKAGE_NAME_MOBILENET_V3}/* ${PACKAGE_NAME_MOBILENET_V3}/..
rmdir ${PACKAGE_NAME_MOBILENET_V3}
fi

########################################################################
echo
echo "Remove temporary files ..."
Expand Down Expand Up @@ -61,3 +69,8 @@ if [ "${VERSION}" == "2" ]; then
cp ${THIS_SCRIPT_DIR}/mobilenet.py .
cp ${THIS_SCRIPT_DIR}/conv_blocks.py .
fi
if [ "${VERSION}" == "3" ]; then
cp ${THIS_SCRIPT_DIR}/mobilenet_v3.py .
cp ${THIS_SCRIPT_DIR}/mobilenet.py .
cp ${THIS_SCRIPT_DIR}/conv_blocks.py .
fi
761 changes: 761 additions & 0 deletions script/install-package-tensorflowmodel-mobilenet-py/mobilenet_v3.py

Large diffs are not rendered by default.