TensorflowTensorflow细节-P158-slim的使用

slim的使用

从以下细节可以看出先使用slim = tf.contrib.slim要回用,剩下的看看以下代码就懂了

import tensorflow as tf
slim = tf.contrib.slim

with slim.arg_scope([slim.conv2d, slim.max_pool2d, slim.avg_pool2d], stride=1, padding='VALID'):
    with tf.variable_scope('Mixed_7c'):
        with tf.variable_scope('Branch_0'):
            branch_0 = slim.conv2d(net, 320, [1, 1], scope='Conv2d_0a_1x1')
posted @ 2019-10-06 09:57  博博的Blog  阅读(119)  评论(0编辑  收藏  举报