You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
499 B
31 lines
499 B
#!/bin/bash
|
|
|
|
if [ $# != 4 ];then
|
|
echo "usage: $0 ckpt_prefix model_config mean_std vocab"
|
|
exit -1
|
|
fi
|
|
|
|
ckpt_prefix=$1
|
|
model_config=$2
|
|
mean_std=$3
|
|
vocab=$4
|
|
|
|
output=release
|
|
|
|
mkdir -p ${output}
|
|
function clean() {
|
|
rm -rf ${output}
|
|
}
|
|
trap clean EXIT
|
|
|
|
# ckpt_prfix dir
|
|
cp -r ${ckpt_prefix} ${output}
|
|
# ckpt_prfix.{json,...}
|
|
cp ${ckpt_prefix}.* ${output}
|
|
# model config, mean std, vocab
|
|
cp ${model_config} ${mean_std} ${vocab} ${output}
|
|
|
|
tar zcvf release.tar.gz ${output}
|
|
|
|
echo "tarball done!"
|