import tensorflow as tf

    #theta_tensor = tf.get_default_graph().get_tensor_by_name('spt_trans_theta')
    cls_score, cls_prob, bbox_pred, rois = sess.run([net.get_output('cls_score'),
    net.get_output('cls_prob'), net.get_output('bbox_pred'), net.get_output('rois')],
                                                    feed_dict=feed_dict,
                                                    options=run_options,
                                                    run_metadata=run_metadata)

    if (save_vis_dir is not None and os.path.exists(save_vis_dir)):
        # first get the weights out
        with tf.variable_scope('conv5_3', reuse=True) as scope:
            conv5_3_weights = tf.get_variable("weights")

        conv5_3_weights_np, conv5_3_features, st_pool_features =\
        sess.run([conv5_3_weights, net.get_output('conv5_3'), net.get_output('pool_5')],
                  feed_dict=feed_dict,
                  options=run_options,
                  run_metadata=run_metadata)
        np.save(os.path.join(save_vis_dir, '%s_conv5_3_w.npy' % img_name), conv5_3_weights_np)
        np.save(os.path.join(save_vis_dir, '%s_conv5_3_f.npy' % img_name), conv5_3_features)
        np.save(os.path.join(save_vis_dir, '%s_st_pool_f.npy' % img_name), st_pool_features)
