其他分享
首页 > 其他分享> > TensorflowTensorflow细节-P158-slim的使用

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')

标签:variable,slim,contrib,TensorflowTensorflow,pool2d,tf,scope,P158
来源: https://www.cnblogs.com/liuboblog/p/11626560.html