clock_model.py 文件源码

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

项目:deep-time-reading 作者: felixduvallet 项目源码 文件源码
def inference(images, num_classes):
    """ Build a time reading model for *either* hours or minutes.

    Args:
      images: Images returned from distorted_inputs() or inputs().
      num_classes: 12 for hours, 60 for minutes.

    Returns:
      Logits.
    """

    local4 = _inference_shared(images)

    dim = num_classes

    # softmax, i.e. softmax(WX + b)
    with tf.variable_scope('softmax_linear') as scope:
        weights = _variable_with_weight_decay('weights', [192, dim],
                                              stddev=1 / 192.0, wd=0.0)
        biases = _variable_on_cpu('biases', [dim],
                                  tf.constant_initializer(0.0))
        softmax_linear = tf.add(tf.matmul(local4, weights), biases,
                                name=scope.name)
        _activation_summary(softmax_linear)
    return softmax_linear
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号