"conv3_1", "conv3_2", "conv3_3", "conv4_1",
"conv4_2", "conv4_3", "conv5_1", "conv5_2",
"conv5_3", "fc6", "fc7", "fc8"]
for name in list(layers.keys()):
if name in link_names:
layers[name] = layers[name]()
super(VGG16, self).__init__(layers, layer_names)
if pretrained_model in self._models:
path = download_model(self._models[pretrained_model]["url"])
After Change
// avoid doing so whenever possible.
fc_layer_names = ["fc6", "fc6_relu", "fc6_dropout",
"fc7", "fc7_relu", "fc7_dropout", "fc8", "prob"]
if (any([name in fc_layer_names for name in layer_names])
or layer_names in fc_layer_names):
fc_kwargs = {"initialW": constant.Zero(),
"initial_bias": constant.Zero()}
else: