neuralnets.py 文件源码

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

项目:Gene-prediction 作者: sriram2093 项目源码 文件源码
def classifier_layers(x, input_shape, stage_num, trainable=False):

    # compile times on theano tend to be very high, so we use smaller ROI pooling regions to workaround
    # (hence a smaller stride in the region that follows the ROI pool)
    if K.backend() == 'tensorflow':
        x = conv_block_td(x, 3, [512, 512, 1024], stage=stage_num, block='a', input_shape=input_shape, strides=(1, 2), trainable=trainable)
    elif K.backend() == 'theano':
        x = conv_block_td(x, 3, [512, 512, 1024], stage=stage_num, block='a', input_shape=input_shape, strides=(1, 1), trainable=trainable)

    print 'INFO: Classifier layers x block a: ', x
    x = identity_block_td(x, 3, [512, 512, 1024], stage=stage_num, block='c', trainable=trainable)
    print 'INFO: Classifier layers x block b: ', x
    x = identity_block_td(x, 3, [512, 512, 1024], stage=stage_num, block='d', trainable=trainable)
    print 'INFO: Classifier layers x block c: ', x

    #x = TimeDistributed(AveragePooling2D((2, 1)), name='avg_pool')(x)

    return x
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号