【发布时间】:2017-11-21 16:14:26
【问题描述】:
当 Keras 模型接受多个输入时,其层的行为就像只有一个输入一样。这可能是一个错误。
model = vgg19.VGG19(weights='imagenet', include_top=False, pooling='avg')
model(image1)
model(image2)
model.get_output_at(0)
model.get_output_at(1)
#no error here
outputs_0 = [layer.get_output_at(0) for layer in model.layers]
#no error here
outputs_1 = [layer.get_output_at(1) for layer in model.layers]
#error "Asked to get output at node 1, but the layer has only 1 inbound nodes."
我真的不确定outputs_0是什么,因为模型有两个输入,image1和image2,当一个层返回它的输出时,它对应的输入是什么?
【问题讨论】:
标签: keras keras-layer