#!/bin/bash
set -e
set -x

magicmind_model=${1}
precision=${2}
batch_size=${3}
dynamic_shape=${4}
img_h=112
img_w=112
clip_len=8

python gen_model.py --precision ${precision} \
                    --input_dims ${batch_size} 3 ${clip_len} ${img_h} ${img_w} \
                    --dynamic_shape ${dynamic_shape} \
                    --magicmind_model ${magicmind_model} \
                    --image_dir ${UCF101_DATASETS_PATH} \
                    --caffemodel ${MODEL_PATH}/c3d_resnet18_ucf101_r2_ft_iter_20000.caffemodel \
                    --prototxt ${MODEL_PATH}/c3d_resnet18_r2_ucf101.prototxt \
                    --input_layout NDHWC \
                    --dim_range_min 1 3 ${clip_len} ${img_h} ${img_w} \
                    --dim_range_max 32 3 ${clip_len} ${img_h} ${img_w} \
                    --type64to32_conversion "true" \
                    --conv_scale_fold "true" 

