1 Star 0 Fork 0

loic_wang/VGG-or-MobileNet-SSD

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
gen_shufflenet_model.sh 1.42 KB
一键复制 编辑 原始数据 按行查看 历史
FreeApe 提交于 2017-12-04 20:51 . Support ShuffleNet
#!/bin/sh
if test -z $1 ;then
echo usage: $0 CLASSNUM
echo " for voc the classnum is 21"
exit 1
fi
echo $1 |grep '^[0-9]*$' >/dev/null 2>&1
if [ $? != 0 ];then
echo usage: $0 CLASSNUM
echo " for voc the classnum is 21"
exit 1
fi
cls_num=$1
cls_num3=$(expr $1 \* 3)
cls_num6=$(expr $1 \* 6)
target_dir=shufflenet_ssd_head_shoulder_temp
trainfile=examples/$target_dir/shufflenet_ssd_train.prototxt
testfile=examples/$target_dir/shufflenet_ssd_test.prototxt
deploybnfile=examples/$target_dir/shufflenet_ssd_deploy_bn.prototxt
deployfile=examples/$target_dir/shufflenet_ssd_deploy.prototxt
mkdir -p examples/$target_dir
cp shufflenet_template/shufflenet_ssd_train_template.prototxt $trainfile
sed -i "s/cls6x/${cls_num6}/g" $trainfile
sed -i "s/cls3x/${cls_num3}/g" $trainfile
sed -i "s/cls1x/${cls_num}/g" $trainfile
cp shufflenet_template/shufflenet_ssd_test_template.prototxt $testfile
sed -i "s/cls6x/${cls_num6}/g" $testfile
sed -i "s/cls3x/${cls_num3}/g" $testfile
sed -i "s/cls1x/${cls_num}/g" $testfile
#cp template/MobileNetSSD_deploy_bn_template.prototxt $deploybnfile
#sed -i "s/cls6x/${cls_num6}/g" $deploybnfile
#sed -i "s/cls3x/${cls_num3}/g" $deploybnfile
#sed -i "s/cls1x/${cls_num}/g" $deploybnfile
cp shufflenet_template/shufflenet_ssd_deploy_template.prototxt $deployfile
sed -i "s/cls6x/${cls_num6}/g" $deployfile
sed -i "s/cls3x/${cls_num3}/g" $deployfile
sed -i "s/cls1x/${cls_num}/g" $deployfile
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/loic_wang/VGG-or-MobileNet-SSD.git
git@gitee.com:loic_wang/VGG-or-MobileNet-SSD.git
loic_wang
VGG-or-MobileNet-SSD
VGG-or-MobileNet-SSD
master

搜索帮助