通过keras中的特定图层停止Gradient back prop

时间:2017-11-29 06:03:36

标签: tensorflow keras gradient object-detection

x = Conv2D(768, (3, 3), padding='same', activation='relu', kernel_initializer='normal', 
           name='rpn_conv1',trainable=trainable)(base_layers)

x_class = Conv2D(num_anchors, (1, 1), activation='sigmoid', kernel_initializer='uniform', 
                 name='rpn_out_class',trainable=trainable)(x)

    # stop gradient backflow through regression layer
x_regr = Conv2D(num_anchors * 4, (1, 1), activation='linear', kernel_initializer='zero', 
                name='rpn_out_regress',trainable=trainable)(x)

如何使用K.stop_gradient()通过回归层(x_reg)单独停止渐变反向支持?

1 个答案:

答案 0 :(得分:1)

您需要var flickrLayer = new ol.layer.Vector({ style: flickrStyle // this is a function reference, so the Vector class will call it with a given parameter (probably "feature") }); 图层才能使用自定义功能。

Lambda