<s> import argparse <EOL> import cv2 <EOL> import tensorflow as tf <EOL> import imp <EOL> from tensorpack . utils import * <EOL> from tensorpack . utils import sessinit <EOL> from tensorpack . dataflow import * <EOL> parser = argparse . ArgumentParser ( ) <EOL> parser . add_argument ( dest = '<STR_LIT>' ) <EOL> parser . add_argument ( dest = '<STR_LIT>' ) <EOL> parser . add_argument ( dest = '<STR_LIT>' ) <EOL> args = parser . parse_args ( ) <EOL> get_config_func = imp . load_source ( '<STR_LIT>' , args . config ) . get_config <EOL> with tf . Graph ( ) . as_default ( ) as G : <EOL> config = get_config_func ( ) <EOL> config . get_model_func ( config . inputs , is_training = False ) <EOL> init = sessinit . SaverRestore ( args . model ) <EOL> sess = tf . Session ( ) <EOL> init . init ( sess ) <EOL> with sess . as_default ( ) : <EOL> sessinit . dump_session_params ( args . output ) </s>
