slim_walk.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:SSD_tensorflow_VOC 作者: LevinJ 项目源码 文件源码
def disp_model_info():
    with tf.Graph().as_default():
        # Dummy placeholders for arbitrary number of 1d inputs and outputs

        inputs = tf.placeholder(tf.float32, shape=(None, 1))
        outputs = tf.placeholder(tf.float32, shape=(None, 1))

        # Build model
        predictions, end_points = regression_model(inputs)

        # Print name and shape of each tensor.
        print("Layers")
        for k, v in end_points.items():
            print('name = {}, shape = {}'.format(v.name, v.get_shape()))

        # Print name and shape of parameter nodes  (values not yet initialized)
        print("\n")
        print("Parameters")
        for v in slim.get_model_variables():
            print('name = {}, shape = {}'.format(v.name, v.get_shape()))

        print("\n")
        print("Local Parameters")
        for v in slim.get_local_variables():
            print('name = {}, shape = {}'.format(v.name, v.get_shape()))
    return
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号